# Conditional GAN-Based Two-Stage ISP Tuning Method: A Reconstruction-Enhancement Proxy Framework
## 4 Experiments
### Denoising Tuning Experiment  
In this section, to verify the effectiveness of the ReEn-GAN method proposed in this paper compared to end-to-end proxy, hand-tuning, and other methods, we compared the ISP parameters generated by each method on the image denoising task after applying them to Infinite-ISP. In addition to the parameter generation methods mentioned above, we also compared the results of default parameters, random parameters, and extra BM3D to demonstrate the effectiveness of the tuning method. The criteria we used in our evaluation are PNSR and SSIM, by calculating the PSNR and SSIM between ground truth images and ISP processed images with parameters obtained by various methods to obtain the effects of different tuning methods and facilitate quantitative comparison. The equation of PSNR and SSIM are shown as follows: \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Methods** & **SSIM** & **HC** & **Params/M** & **FLOPs/G** \\ \hline End-to-End Proxy [20] & 0.965 & 0.954 & **8.7** & **66.72** \\ Proposed Proxy & 0.967 & **0.978** & 14.29 & 116.58 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of SSIM, HC, Params, and FLOPs by end-to-end proxy and proposed proxy. \[\left\{ \begin{aligned}  PSNR(x,y)&=10\cdot\log_{10}\left(\frac{\text{MAX}^{2}}{ \text{MSE}(\text{x},y)}\right)\\ MSE(x,y)&=\frac{1}{M\cdot N}\sum_{i=0}^{M-1}\sum_{j=0}^{N -1}[x(i,j)-y(i,j)]^{2}\\ SSIM(x,y)&=\frac{\left(2\mu_{x}\mu_{y}+C_{1}\right) \left(2\sigma_{xy}+C_{2}\right)}{\left(\mu_{x}^{2}+\mu_{y}^{2}+C_{1}\right) \left(\sigma_{x}^{2}+\sigma_{y}^{2}+C_{2}\right)}\end{aligned} \right. \tag{11}\]  
where MAX is the maximum value of pixels in the image, \(M\) and \(N\) are the length and width of the image, respectively, \(C1\) and \(C2\) are constants often set as \((0.01 MAX)^{2}\) and \((0.03 MAX)^{2}\), and the MSE is Mean Square Error. In the denoising tuning step, we randomly initialize the hyper-parameters \(\mathcal{P}\). As mentioned above, we use \(\mathcal{L}_{1}\) as loss function. We use ADAM optimizer (\(\beta_{1}\) = 0.9, \(\beta_{2}\) = 0.999) and a LR of 0.000005. After about epoch 20, the \(\mathcal{P}\) tend to convergent. Then, the \(\mathcal{P}\) are used in the Infinite-ISP to get the output images alone with PSNR and SSIM in average. The results are shown in Table 3 below. From this table, we can see that firstly, compared to random parameters, the noise reduction effect of ISP with default parameters or adjusted parameters is greatly improved, indicating that the adjustment of parameters has a particularly important impact on the quality of ISP image processing. Secondly, compared to the ISP with default parameters, the ISP with hand-tuned parameters has a greater enhancement effect on SSIM than on PSNR, indicating that hand-tuning pays more attention to the structural loss of images than to noise. Hand-tuning is more suitable for modules that have a significant impact on human perception and is not widely applicable to any downstream task. Thirdly, the effect of using the proxy method for tuning is better than hand-tuning, indicating that for general downstream tasks, using the proxy method can significantly improve the effect, and there is also an improvement in timeliness compared to time-consuming manual tuning. Last but not least, compared with the tuning method using end-to-end proxy, the performance improvement of the proxy method proposed in this paper on the SSIM index is greater than that on PSNR, indicating that the scheme of using staged reconstruction to enhance the proxy can eliminate the perceptual changes in the image caused by the enhancement stage in the reconstruction proxy stage compared to the end-to-end proxy scheme of a single network. At the same time, using generative adversarial networks can also make the generalization ability of the generative network stronger, making the proxy better able to represent the structural information of the image, resulting in a greater improvement in the SSIM index compared to PSNR. Part of the test result is shown in Figure 6.