# Image Deraining Algorithm Based on Multi-Scale Features
## 4 Experiments and Results Analysis  
### Datasets and Evaluation Metrics  
Models were trained using 14,200 paired clean-rain images collected from multiple datasets as shown in Table 1. Models trained using these datasets were evaluated against various test sets, including the datasets in [18], Rain100H [22], Rain100L [22], Test100 [39], Test2800 [23] and Test1200 [40]. Running on Pycharm ([[https://www.jetbrains.com/pycharm/](https://www.jetbrains.com/pycharm/)]([https://www.jetbrains.com/pycharm/](https://www.jetbrains.com/pycharm/)), accessed on 22 June 2024) with an RTX 3060 GPU (NVIDIA, Santa Clara, CA, USA) and a Ryzen 7 CPU (AMD, Santa Clara, CA, USA). Evaluation metrics are quantitatively compared using PSNR (Peak Signal-to-Noise Ratio) and SSIM (Structural Similarity Index Measure) [41]. PSNR is the Peak Signal to Noise Ratio which reflects the ratio of the maximum power of the signal to the noise power of the signal and is often used to assess the quality of a compressed, reconstructed image. In an image, each pixel has a specific value and these color values may change during compression and decompression. Because of the wide dynamic range of the signal, PSNR is usually expressed in decibels. PSNR is used as an objective metric for assessing image quality. However, according to numerous experimental data, PSNR scores do not always correspond exactly to the quality of images as perceived by human vision. Sometimes, images with higher PSNR are visually worse than those with lower PSNR because the perception of the human visual system to errors is not absolute. Its results are affected by many factors, for example, the human visual system perceives contrast changes at low spatial frequencies more clearly and perceives luminance changes more acutely than chromaticity changes. In addition, the perception of the human visual system to specific regions is affected by the environment, and it produces the effect of visual deception in some specific environments. Typical peak signal-to-noise ratio values in images and video compression are between 30 dB and 50 dB. The common benchmark is 30 dB. Image degradation below 30 dB is more obvious. Given a clean image \(I\) and a noisy image \(K\) of size \(m\times n\). The mean square error (\(MSE\)) is defined as:  
\[MSE=\frac{1}{mn}\sum_{i=0}^{m-1}\sum_{i=0}^{n-1}\left[I(i,j)-K(i,j)\right]^{2} \tag{4}\]  
\(PSNR\) (dB) is defined as:  
\[PSNR=10\times\log_{10}(\frac{MAX_{I}^{2}}{MSE}) \tag{5}\]  
where \(MAX_{I}\) is the maximum possible pixel value of the image. If each pixel was represented by an 8-bit binary, that would be 255. SSIM measures structural similarity which generally gives values from within a range; the larger the value, the better the quality. SSIM is a metric that measures the similarity of two images. The metric was first proposed by the Image and Video Engineering Laboratory at the University of Texas at Austin. If the two images are a derained image and a labeled image, then SSIM can be used to assess the quality of the derained image. The SSIM formula is based on three comparative measures between samples \(x\) and \(y\): lightness, contrast, and structure. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Dataset** & **Rain14000** & **Rain800** & **Rain100H** & **Rain100L** & **Rain1200** \\ \hline Train Samples & 13,500 & 700 & 0 & 0 & 0 \\ Test Samples & 500 & 100 & 100 & 100 & 400 \\ \hline Testset Rename & Test500 & Test100 & Rain100H & Rain100L & Test400 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The datasets used for training and testing.