# An Iris Image Super-Resolution Model Based on Swin Transformer and Generative Adversarial Network
## 3 Method
### Adversarial Architecture  
The overall structure of the discriminator is shown in Figure 10. The discriminator uses a VGG-style network structure that can be divided into two parts: the feature extraction and the classifier. The input is the super-resolution image generated by the generator. After feature extraction and classifier processing, the input image is mapped to a number from 0 to 1 by a Sigmoid function, determining whether the input image is the original high-resolution image or the generated super-resolution image. The GAN solves a min-max type problem. The generator and discriminator components of the network are optimized  
Figure 8: Subpixel convolution feature maps. From left to right and top to bottom, the obtained feature maps correspond to the increasing epochs.  
Figure 9: An example of super-resolution reconstruction process.  
alternately in order to make the final output distribution match the target distribution. Its objective function can be defined as:  
\[\underset{\theta_{G}}{\text{minmax}}_{\theta_{D}}\mathbb{E}_{\mathbf{\mu}\mathbf{R}} \big{[}logD_{\theta_{D}}\big{(}\mathbf{H}^{\mathbf{HR}}\big{)}\big{]}+\mathbb{E}_{\mathbf{F} \mathbf{R}}\big{[}log(1-D_{\theta_{D}}\big{(}G_{\theta_{G}}\big{(}\mathbf{I}^{\mathbf{LR}} \big{)}\big{)}\big{]} \tag{2}\]  
where \(\mathbb{E}_{\mathbf{\mu}\mathbf{R}}[\cdot]\) and \(\mathbb{E}_{\mathbf{\mu}\mathbf{S}}[\cdot]\) represent the operation of averaging all the high-resolution image data and the generated super-resolution image data in a mini-batch, respectively, \(\mathbf{I}^{\mathbf{HR}}\) is the high-resolution iris image, \(\mathbf{I}^{\mathbf{LR}}\) is the low-resolution iris image, \(\theta_{G}\) and \(\theta_{D}\) are the parameters of the generator and discriminator, \(G\) is the generator, and \(D\) is the discriminator.  
The idea behind the formula is that the generator is continuously trained to fool the discriminator. At the same time, the discriminator is also constantly optimized to improve its ability to distinguish the actual image and the generated image.  
Unlike the standard GAN network, inspired by ESRGAN, the discriminator adopts the design scheme of Relativistic GAN (RaGAN). Compared with the discriminator of the traditional GAN, that determines whether the image is actual or generated, the RaGAN learns to distinguish the probability that the actual image is more realistic relative to the faked image, resulting in a more significant effect when processing images.  
The formula is described as follows:  
\[D_{Ra}\big{(}\mathbf{I}^{\mathbf{HR}},\mathbf{I}^{\mathbf{SR}}\big{)} =\sigma\Big{(}\text{D}\big{(}\mathbf{I}^{\mathbf{HR}}\big{)}-\mathbb{E}_{ \mathbf{F}\mathbf{R}}\big{[}\text{D}\big{(}\mathbf{I}^{\mathbf{SR}}\big{)}\big{]}\Big{)} \tag{3}\] \[D_{Ra}\big{(}\mathbf{I}^{\mathbf{SR}},\mathbf{I}^{\mathbf{HR}}\big{)} =\sigma\Big{(}D\big{(}\mathbf{I}^{\mathbf{SR}}\big{)}-\mathbb{E}_{\mathbf{ \mu}\mathbf{R}}\big{[}D\big{(}\mathbf{I}^{\mathbf{HR}}\big{)}\big{]}\Big{)} \tag{4}\]  
where \(\sigma\) is the sigmoid function, \(D_{Ra}\) is the relative discriminator and \(\mathbf{I}^{\mathbf{SR}}\) is the super-resolution image generated by the generator. Our target is to maximize \(D_{Ra}\big{(}\mathbf{I}^{\mathbf{HR}},\mathbf{I}^{\mathbf{SR}}\big{)}\).