# Improving Medical Image Quality Using a Super-Resolution Technique with Attention Mechanism
## 4 Experimental Results  
### Training Configurations and Evaluation Metrics  
The L1 loss function used in this study is defined as follows:  
\[L_{1}\big{(}x,\,f\big{(}x^{\prime}\big{)}\big{)}=\big{\|}x-f\big{(}x^{\prime} \big{)}\big{\|}. \tag{12}\]  
Here, L1(x, f(x\({}^{\prime}\))) represents the pixel-wise absolute difference between the ground truth image (x) and the reconstructed super-resolved image f(x\({}^{\prime}\)). This loff function is computed as:  
\[L_{1}\big{(}x,\,f\big{(}x^{\prime}\big{)}\big{)}=\sum_{i=1}^{N}\big{\|}x_{i}-f \big{(}x^{\prime}\big{)}_{i}\big{\|}. \tag{13}\]  
where N is the total number of pixels in the image, x\({}_{i}\) represents the pixel value in the ground truth image, and f(x\({}^{\prime}\))\({}_{i}\) is the corresponding pixel value in the reconstructed image. The L1 loss minimizes the absolute error, preserving texture details and mitigating over-smoothing effects often seen with L2 loss. The Adam optimizer [33] was used for training, with a learning rate of 0.001, \(\beta_{1}\) of 0.9, and \(\beta_{2}\) of 0.999. The input data were divided into 48 \(\times\) 48 sized patches, and the resulting images were trained according to the ratio. In this paper, we used the ISIC (2020) dataset to evaluate the proposed method, comparing it with bicubic interpolation, VDSR, and EDSR. For the training data configuration, we downsampled the images to one-half, one-third, and one-quarter of their original sizes. The ISIC consists of high-resolution images with resolutions of 1000 \(\times\) 1000 or higher. We used the original images and images downscaled using bicubic interpolation as training data. To provide further clarity on the experimental environment and ensure reproducibility, the hardware and software configurations used in this study are summarized in Table 2.  
Figure 13: Upsampling. The training parameters, including patch size, upscaling factors, and initialization settings, are detailed in Table 3. These configurations were optimized to balance model performance and computational efficiency. The training time varied depending on the dataset size. For the ISIC 2020 dataset, training required approximately 3-4 days to complete on the specified hardware. For smaller datasets such as DIV2K, training was significantly faster, taking less than a day. Models for each upscaling factor (2\(\times\), 3\(\times\), and 4\(\times\)) were trained separately to optimize performance for each scale. The peak signal-to-noise ratio (PSNR) measures the quality loss of an image by comparing the noise ratio to the maximum image value. A higher PSNR value indicates less loss compared with the original image [34]. Similarly, the structural similarity index (SSIM) evaluates human perceptual quality by assessing the structural integrity of the image. \[PSNR=10\times log_{10}(\frac{MAX_{I}^{2}}{MSE}). \tag{14}\]  
Here, \(MAX\) refers to the maximum value of the image, and \(MSE\) (mean squared error) represents the squared difference between the original image and the reconstructed image. The structural similarity index measure (SSIM) is a metric that evaluates human perception. The human vision specializes in extracting structural information, which impacts image quality considerably, from an image. SSIM utilizes luminance, contrast, and structure to measure similarity; a higher SSIM value indicates less loss. \[SSIM(x,y)=[l(x,y)]^{a}\cdot[c(x,y)]^{\beta}\cdot[s(x,y)]^{\gamma}. \tag{15}\]  
Here, \(l\) represents luminance, \(c\) represents contrast, and \(s\) represents structural. Figure 14 presents the super-resolution results for 3371618 images from the ISIC 2020 challenge dataset. The images within the red boxes are the downscaled versions of the original images, which were then 2\(\times\) upscaled using the super-resolution algorithm. The images within the blue boxes represent the 3\(\times\) upscaled versions, and the images within the green boxes represent the 4\(\times\) upscaled versions.