# Improvement of a Subpixel Convolutional Neural Network for a Super-Resolution Image
## 2 Materials and Methods
### R-ESPCN Structure
The pixels at the same point of the image maps are created in a 3 \(\times\) 3 matrix arrangement in the super-resolution map. The pseudocodes containing the described stages of the proposed algorithm are given in Algorithm 1. ```

**Algorithm 1** Pseudocodes of the Proposed Algorithm

## 3 Application Results

The purpose of the super-resolution process is to increase the image resolution as much as possible and to ensure that the details of the image are as clear as possible. There are some widely used methods to evaluate the new image created with the super-resolution method and the original image. The most commonly used methods for quantitative evaluation are the structural similarity index measure (SSIM) [26] and the peak signal-to-noise ratio (PSNR) [27]. The SSIM is designed to measure the brightness, contrast, and structure of the image. The larger the PSNR value, the smaller the degree of distortion in the image [28] and the better the reconstruction of the image. In this article, an MSI GF65 model computer, an Intel i7 10750H 2.60 GHz-supported processor, 24 GB RAM, and an NVIDIA GeForce GTX 1660 Ti graphics card were used to test the proposed R-ESPCN model under the Windows 11 operating system. The Python 3.9.13 coding language and the Pytorch framework were used as the library for training the proposed R-ESPCN model. The R-ESPCN model was trained using set5 and set14 training sets with a learning rate of 0.01, a batch size of 64, and a training round epoch value of 100, as in the ESPCN model. While the training values of the ESPCN model were 25 dB, it was found that the training value of the R-ESPCN model is around 28.39 dB and that it is trained approximately 0.3 dB better than the ESPCN model. It was observed that the loss function of the proposed R-EPCN model is improved approaching 0, and likewise, the proposed model has a more stable improvement in the PSNR and the loss value compared to the ESPCN model in the validation process. The training results of the R-ESPCN model are given in Figure 7.

The bicubic, ESPCN, and proposed R-ESPCN models were tested on publicly available dataset images. The comparisons of the structural similarity index measure (SSIM) and the peak signal-to-noise ratio (PSNR) values to determine to what extent the proposed model was improved are given in tables. The peak signal-to-noise ratio (PSNR) is commonly used to measure the reconstruction quality and is inversely proportional to the logarithm of the mean square error (MSE) between the ground truth and the high-resolution image generated. The PSNR (in dB) is defined as:

\[PSNR=10\ log_{10}\frac{\max\lvert x(i,j)\rvert^{2}}{MSE} \tag{4}\]

\[MSE=\frac{1}{mxn}\sum_{i=1}^{m}\sum_{j=1}^{n}[x(i,j)-y(i,j)]^{2} \tag{5}\]

The SSIM is calculated between two windows of pixel values of common size x and y from corresponding locations in the two images to be compared. These SSIM values can be summed over the full images by averaging or other variations. The SSIM measure between x and y is:

\[SSIM=\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)} \tag{6}\]

\(\mu_{x}\mu_{y}\) the pixel sample mean of x,y

\(\sigma_{xy}\) the pixel sample covariance of x,y

\(\sigma_{x}^{2},\ \sigma_{y}^{2}\) the pixel sample variance of x,y

\(c_{1},\ c_{2}\) the constant for stability

In the article, datasets such as the publicly available dataset VOC2012 were selected. It was preferred to increase the image resolution by a factor of 3 in all datasets. When looking at the set5 data in Figure 8, it is seen that the R-ESPCN model we proposed gives more successful results than the ESPCN model, and the PSNR and SSIM values are higher. Figure 6.0 Training results of (**a**) the ESPCN model and (**b**) the R-ESPCN model. According to the set5 data in Figure 8, the PSNR values in the images increased by 3.01 dB, 0.78 dB, 0.12 dB, 1.97 dB, and 0.56 dB, respectively.