# RSTSRN: Recursive Swin Transformer Super-Resolution Network for Mars Images
## 3 Materials and Methods  
### Rststn Architecture  
Inspired by the mechanism of parameter sharing and recursive proposed in DRCN [46], we propose a novel Recursive Swin Transformer Super-Resolution Network (RSTSRN) combining the Swin Transformer [65] with the Laplacian Pyramid introduced in the LapSRN. Figure 1 shows our proposed RSTSRN network architecture; our goal is to estimate \(2\times/4\times/8\times\) SR images from an input LR image.  
The Residual Image Extraction Block (RIEB) starts from a \(3\times 3\) convolutional layer, which can be formulated as  
\[x_{1 sf}=f_{IFE}(I_{LR}), \tag{1}\]  
where \(I_{LR}\) denotes the LR input to the network, \(f_{IFE}\) denotes the feature extraction function for \(I_{LR}\), and \(x_{1 sf}\) denotes the feature map extracted from LR.  
Then, \(x_{1 sf}\) passed into the next RSTBs and other layers of the RIEB, as shown in equation  
\[I_{2\times\text{R}}=f_{RI}(x_{1 sf}), \tag{2}\]  
\[I_{2\times\text{R}}=f_{RIE}(I_{LR})=f_{RI}(f_{IFE}(I_{LR})), \tag{3}\]  
where \(I_{2\times\text{R}}\) denotes the residual image extracted from LR by the first RIEB.  
As shown in Figure 1, each RIEB contains 6 RSTBs. RSTB is based on the original RSTB and STB structures that were used in SwinIR [54] and Swin Transformer [65]; we have added the global skip connection that was used within the RIEB, and non-homologous skip connections were used for each RSTB to focus on residual learning. This design reduces the difficulty of learning residual images and improves the convergence efficiency of the network.  
After the nonlinear feature mapping, we use the Pixelshuffle layer [44] for up-sampling. The input size of the Pixelshuffle layer is consistent with the size of the LR for each RIEB. The combination of a pair of convolutional layers and a LReLU layer before the Pixelshuffle layer is used to improve the extraction ability of deep features. The convolutional layer after the Pixelshuffle layer is used to improve the reconstruction quality of residual images. The \(2\times\), \(4\times\), and \(8\times\) SR image reconstruction processes can be expressed as  
\[I_{2\times\text{SR}}=I_{2\times\text{R}}+f_{up}(I_{\text{LR}}), \tag{4}\]  
\[I_{2\times\text{SR}}=I_{2\times\text{R}}+I_{2\times\text{LR}}, \tag{5}\]  
\[I_{4\times\text{SR}}=I_{4\times\text{R}}+f_{up}(I_{2\times\text{SR}}), \tag{6}\]  
\[I_{4\times\text{SR}}=I_{4\times\text{R}}+I_{4\times\text{LR}}, \tag{7}\]  
\[I_{8\times\text{SR}}=I_{8\times\text{R}}+f_{up}(I_{4\times\text{SR}}), \tag{8}\]The up-sampling method (\(f_{up}\)) from \(I_{LR}\) to \(I_{2\times\text{LR}}\), \(I_{2\times\text{SR}}\) to \(I_{4\times\text{LR}}\), and \(I_{4\times\text{SR}}\) to \(I_{8\times\text{LR}}\) is all bicubic interpolation (scale = 2).  
In an RSTSRN, the key to generating high-quality SR images is the inference of residual images. The residual image should contain more high-frequency information. Replace up-sampling from \(I_{2\times\text{LR}}\) to \(I_{4\times\text{LR}}\) and \(I_{4\times\text{LR}}\) to \(I_{8\times\text{LR}}\) with \(I_{2\times\text{SR}}\) to \(I_{4\times\text{LR}}\) and \(I_{4\times\text{SR}}\) to \(I_{8\times\text{LR}}\),  
Figure 1: RSTSRN network architecture.  
respectively; then, the high-frequency information of \(I_{2\times\text{SR}}\) and \(I_{4\times\text{SR}}\) is better utilized in residual learning.  
In an RSTSRN, parameters sharing is designed at two levels: one is between RIEBs and the other is between RSTBs. As shown in Figure 1, the RSTSRN consists of a three-level pyramid structure where each level performs 2\(\times\) SR tasks with consistent functionality. Therefore, parameter sharing can be carried out between levels, where the convolutional layers, RSTBs, and the Pixelshuffle layer corresponding to each level use the same parameters. RSTBs are the core structure of the RSTSRN network, which is responsible for inferring residual images from shallow features for SR image reconstruction. In an RSTSRN, each RSTB shares the same parameters. However, STBs in RSTB do not share parameters.