# GPSR: Gradient-Prior-Based Network for Image Super-Resolution
## 3 Method
### Network Architecture  
As shown in Figure 1, our GPSR is composed of two branches, including the gradient branch and the SR branch. Among them, the gradient branch contains several gradient modules, which are mainly responsible for inferring multi-scale spatial structural feature maps to provide additional gradient priors for each decoding stage of the SR branch, thus improving the edge and texture details of the reconstructed images; while the SR branch contains several encoder-decoders, and it aims to generate the reconstructed images with high fidelity. Given a LR image \(I_{LR}\) as the input of our GPSR, the bicubic upsampling is first used to rescale \(I_{LR}\) to the desired resolution, and then the shallow feature \(F_{0}\) is extracted from \(I_{LR}\) through a convolutional layer (Conv),  
\[F_{0}=f_{conv}(f_{up}(I_{LR})), \tag{1}\]  
where \(f_{up}(\cdot)\) denotes the upsampling function with bicubic kernel and \(f_{conv}(\cdot)\) denotes the convolution operation. The shallow feature map \(F_{0}\) passes through \(N\) stacked encoders, yielding \(N\) shallow feature maps with different scales additionally. Let \(F_{i-1}\) be the input of the \(i\)-th encoder; the corresponding output \(F_{i}\) can be obtained by:  
\[F_{i}=H_{en}(F_{i-1}), \tag{2}\]  
where \(H_{en}(\cdot)\) denotes the encoder function and \(i=1,2,...,N\). The goal of the encoder, which contains two stacked Convs (with stride 2) and a Rectified Linear Unit (ReLU), is to perform \(\times 2\) downsampling (halving the spatial dimension and doubling the channel dimension) and shallow feature extraction operations:  
\[H_{en}(\cdot)=f_{conv}(\rho(f_{conv}(\cdot))), \tag{3}\]  
where \(f_{conv}(\cdot)\) represents the function of the strided Conv (with stride 2), and \(\rho(\cdot)\) represents Leaky ReLU. To compensate for the information loss caused by forward propagation, we pass these shallow features \(F_{i}\) to the decoders at each level through skip connections, where \(i=0,1,\cdots,N-1\). Figure 1: Network architecture of our Gradient-Prior-based Super-Resolution network (GPSR). The network consists of two branches, the gradient branch (bottom right), which is used to generate the multi-scale spatial structure feature maps, and the SR branch (upper left), which is used to generate the final reconstructed image. Notably, the intermediate features generated on the SR branch are integrated into the gradient branch to provide additional beneficial structural features. In addition, the multi-scale spatial structure feature maps generated on the gradient branch are integrated into the SR branch to strengthen the edge and texture details. Then, the output \(F_{N}\) of the \(N\)-th encoder passes through \(N\) decoders, yielding \(N\) deep feature maps with different scales. Let \(F_{j+N-1}\) be the input of the \(j\)-th decoder; the output \(F_{j}^{\prime}\) of the \(j\)-th encoder can be obtained by:  
\[F_{j}^{\prime}=H_{de}\big{(}F_{j+N-1}\big{)}, \tag{4}\]  
where \(H_{de}(\cdot)\) denotes the decoder function, \(j=1,2,...,N\). The goal of the decoder, which contains \(M\) stacked RS3 AM-SR (Section 3.3.3) and a pixel-shuffle [36] layer followed by a Conv, is to perform \(\times 2\) upsampling (halving the channel dimension and doubling the spatial dimension) and deep feature extraction operations:  
\[H_{de}(\cdot)=f_{conv}\Big{(}f_{subpix}\Big{(}f_{de}^{M}\Big{(}...f_{de}^{2} \Big{(}f_{de}^{1}(\cdot)\Big{)}...\Big{)}\Big{)}\Big{)}, \tag{5}\]  
where, \(f_{subpix}(\cdot)\) represents the sub-pixel convolution operation, \(f_{de}^{a}(\cdot)\) represents the function of the \(a\)-th RS3 AM-SR, and \(a=1,2,...,M\). Subsequently, by concatenating the shallow feature \(F_{N-j}\), the output \(F_{j}^{\prime}\) of the \(j\)-th decoder and the spatial structure feature map \(F_{j}^{grad}\) produced by the \(j\)-th gradient module, the advanced fused feature \(F_{j+N}\) is acquired,  
\[F_{j+N}=\Big{[}F_{N-j},F_{j}^{\prime},F_{j}^{grad}\Big{]}. \tag{6}\]  
Then, \(F_{j+N}\) is treated as the input of the \((j+1)\)-th decoder.