# STGAN: Swin Transformer-Based GAN to Achieve Remote Sensing Image Super-Resolution Reconstruction
## 3 Method
### Network Architecture  
#### 3.2.1 Generator  
As shown in Figure 2, the whole model generator consists of three parts: feature extraction, feature alignment and transfer, and high-quality image reconstruction. 1. Feature extraction module (SFE): Given a low-quality (LR) input \(\mathrm{I}_{\mathrm{LR}}\in\mathrm{R}^{H\times W\times C}\) (where H, W, and C are the image height, width, and the number of input channels, respectively), as shown in Figure 3, a convolutional layer (using a 3 \(\times\) 3 convolutional kernel as well as a Leaky ReLU activation function) is firstly utilized to extract the shallow feature \(\mathrm{F}_{0}\in\mathrm{R}^{\mathrm{H}\times\mathrm{W}\times C}\) as: \(\mathrm{F}_{0}=\mathrm{H}_{\mathrm{HEAD}}(\mathrm{I}_{\mathrm{LR}})\), and secondly, the deep feature \(\mathrm{F}_{\mathrm{DF}}\in\mathrm{R}^{\mathrm{H}\times\mathrm{W}\times C}\) as: \[\mathrm{F}_{\mathrm{DF}}=\mathrm{H}_{\mathrm{BODY}}(\mathrm{F}_{0})\] (1) where \(\mathrm{H}_{\mathrm{BODY}}(\cdot)\) consists of multiple residual blocks (ResBlocks). Each residual block contains two convolutional layers inside, both of which use a 3 \(\times\) 3 convolutional  
Figure 1: The overall workflow of STGAN. kernel and the same number of filters to ensure that the dimensionality of the input and output is consistent. It has been shown [44; 45] that deep convolutional networks help to improve super-resolution performance. Finally, the shallow feature \(\mathrm{F}_{0}\) and the deep feature \(\mathrm{F}_{\mathrm{DF}}\) are summed up by residual concatenation to obtain the final output feature: \(\mathrm{F}_{\mathrm{OUT}}=\mathrm{F}_{\mathrm{DF}}+\mathrm{F}_{0}\). The design of the residual block is crucial when training deep networks, as it effectively mitigates the problems of gradient vanishing and gradient explosion, ensuring that information can be effectively passed through the network. In addition, the role of the SFE module is to perform shallow feature processing, and it is capable of performing image feature extraction and gradient map feature processing independently, respectively. Figure 3: Generator feature extraction module with residual structure; inputs are LR image and LR gradient image. Figure 2: The generator of STGAN consists of a feature extraction module, feature alignment and transfer module, and high-quality reconstruction module. The inputs are Ref image and LR image, and the SR image is finally generated by extracting the corresponding features. 2. Feature alignment and transfer module: In this module, as shown in Figure 4, two CNN-Swin Transformer blocks (MCST) and a fusion convolution block (LFRC) are included. Each MCST block adopts a two-channel design based on CNN and a specific modification of Swin Transformer, respectively. The Patch Convolutional Module (PCM) is adapted with a feature extraction module specifically designed for extracting rich features \(\text{F}_{\text{last}}\in\text{R}^{\text{H}_{\times}\text{W}\times\text{C}}\) from the input image as: \[\text{F}_{\text{last}}=\text{H}_{\text{ALL}}(\text{I}_{\text{LR}})\] (2) where \(\text{H}_{\text{ALL}}(\cdot)\) consists of multiple residual blocks. PCM is responsible for local feature extraction, capturing basic features such as edges and texture of the image through a series of residual convolutional layers. The input image \(\text{I}_{\text{LR}}\) is first passed through an initial convolutional layer to extract primary features, and then further processed through multiple ResBlocks to capture more complex features. To maintain training stability and facilitate feature transfer, PCM employs residual connections in each ResBlock. Finally, the shallow and deep features integrated through residual concatenation from the final output \(\text{F}_{\text{last}}\). Deepened Swin Transformer (DST) is an adaptation of the Swin Transformer architecture based on the 7 \(\times\) 7 sliding window mechanism, and is specifically designed to capture global detailed features of an image.