# Reduction of Compression Artifacts Using a Densely Cascading Image Restoration Network
## 3 Proposed Method
### Network Training  
In the proposed DCRN, we set the filter size as 3 \(\times\) 3 except for the CA block, whose kernel size is 1 \(\times\) 1. Table 2 shows the selected hyper parameters in the DCRN. We used zero padding to allow all feature maps to have the same spatial resolution between the different convolutional layers. We defined L1 loss [48] as the loss function using Adam optimizer [49] with a batch size of 128. The learning rate was decreased from \(10^{-3}\) to \(10^{-5}\) for 50 epochs.  
To design a lightweight architecture, we first studied the relationship between network complexity and performance according to the number of dense layer feature maps within the DC block. Second, we checked the performance of various activation functions. Third, we studied the performance of loss functions. Fourth, we investigated the relationship between network complexity and performance based on the number in each dense layers of DC block and the number of DC blocks. Finally, we studied the performance of the tool-off test (skip connection, channel attention block).  
Table 3 lists the PSNR obtained according to the number of concatenated feature maps within the DC block. We set the optimal number of concatenated feature maps to 16 channels. Moreover, we conducted verification tests to determine the most suitable activation function for the proposed network, the results of which are shown in Figure 4. After measuring the PSNR and SSIM obtained via various activation functions, such as ReLU [34], leaky ReLU [50], and parametric ReLU [51], parametric ReLU was chosen for the proposed DCRN. Table 4 summarizes the results of the verification tests concerning loss functions, in terms of the L1 and mean square error (MSE) losses. As shown in Table 4, the L1 loss exhibits marginally improved PSNR, SSIM, and PSNR-B compared  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Hyper Parameters** & **Options** \\ \hline Loss function & L1 loss \\ Optimizer & Adam \\ Batch size & 128 \\ Num. of epochs & 50 \\ Learning rate & \(10^{-3}\) to \(10^{-5}\) \\ Initial weight & Xavier \\ Activation function & Parametric ReLU \\ Padding mode & Zero padding \\ \hline \hline \end{tabular}
\end{table}
Table 2: Hyper parameters of the proposed DCRN.  
Figure 3: The architecture of a CA-block. ‘\(\sigma\)’ and ‘\(\otimes\)’ indicate sigmoid function and channel-wise product, respectively.  
to those exhibited by the MSE loss. In addition, we verified the effectiveness the of skip connection and channel attention block mechanisms. Through the results of tool-off tests on the proposed DCRN, which are summarized in Figure 5, we confirmed that both skip connection and channel attention block affect the AR performance of the proposed method.  
Note that the higher the number of DC blocks and dense layers, the more the memory required to store the network parameters. Finally, we performed a variety of verification tests on the validation dataset to optimize the proposed method. In this paper, we denote the number of DC blocks and the number of dense layers per DC block as DC and L, respectively. The performance comparison between the proposed and existing methods in terms of the AR performance (i.e., PSNR), model size (i.e., number of parameters), and total memory size is displayed in Figures 6 and 7. We set the value of DC and L to three and five, respectively.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Category** & **PSNR (dB)** & **SSIM** & **PSNR-B (dB)** \\ \hline L1 loss & 29.64 & 0.825 & 29.35 \\ MSE loss & 29.62 & 0.824 & 29.33 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Verification tests for loss functions.  
Figure 4: Verification of activation functions. (**a**) PSNR per epoch. (**b**) L1 loss per epoch.  
Figure 5: Verification of the skip connection off (skip-off), channel attention blocks off (CA-off) and proposed method in terms of AR performance. (**a**) PSNR per epoch. (**b**) L1 loss per epoch.