# GPSR: Gradient-Prior-Based Network for Image Super-Resolution
## 3 Method
### Detail-Preserving Gradient-Guided Strategy (GGS)
#### 3.2.1 Gradient Branch  
In the GPSR model, the additional gradient branch is designed to achieve the spatial distribution translation from the LR gradient images to the HR gradient images. Since the gradient map of an image can be acquired by calculating the difference among neighboring pixels, we perform convolution operations with specific kernels on an LR image \(I_{LR}\) to attain its gradient map \(I_{LR}^{grad}\):  
\[I_{LR}^{grad}=g(I_{LR})=\big{\|}\big{[}I_{LR}*M_{x},I_{LR}*M_{y}\big{]}\big{\|} _{2}, \tag{8}\]  
where \(g(\cdot)\), \(*\) and \(\|\cdot\|_{2}\) denote the gradient feature extraction function, the convolution operation, and the \(\ell_{2}\) norm, respectively. \(M_{x}\) and \(M_{y}\) separately represent the fixed convolution kernels for computing the horizontal and vertical gradients:\[M_{x}=\begin{pmatrix}0&0&0\\ 1&0&-1\\ 0&0&0\end{pmatrix},M_{y}=\begin{pmatrix}0&1&0\\ 0&0&0\\ 0&-1&0\end{pmatrix}. \tag{9}\]  
As we know, the gradient map of an image contains a wealth of high-frequency information that can be converted into sharp edge and texture details. Therefore, the gradient branch is used to restore a series of multi-scale spatial structure feature maps through learning the complex mapping relationship between the gradient maps of the LR image and the corresponding gradient maps of the HR image. All spatial structure feature maps are delivered to each decoder in the SR branch, as depicted in Equations (4)-(6), to provide multi-scale gradient priors for the SR process.  
Given an LR image \(I_{LR}\) as the input of the gradient branch, we firstly convert \(I_{LR}\) into the gradient map fo the LR image by utilizing the gradient extraction function \(g(\cdot)\), and then we extract its shallow gradient feature \(F_{0}^{grad}\) with convolution operation:  
\[F_{0}^{grad}=f_{conv}(g(I_{LR})). \tag{10}\]  
To restore beneficial spatial structure feature maps, it is common practice to stack a large number of basic blocks to form a very deep neural network for SR [35]. However, such an approach severely increases the number of parameters and leads to a bloated network. Considering that the intermediate features generated on the SR branch involve abundant high-frequency information, which are significant for structure preservation, we integrate these features into the gradient branch to recover more spatial structure feature maps with fewer parameters and better reconstruction accuracy. As shown in Figure 2, the output \(F_{k-1}^{grad}\) of the \((k-1)\)-th gradient module and the intermediate features \(F_{ite,k}^{m}\) produced by the \(m\)-th RS3 AM-SR module in the \(k\)-th decoder on the SR branch are fed into the \(k\)-th gradient module to attain the spatial structure feature map \(F_{k}^{grad}\):  
\[F_{k}^{grad}=f_{conv}\Big{(}f_{subpix}\Big{(}H_{GE}\Big{(}F_{k-1}^{grad},F_{ de,k}^{1},...,F_{de,k}^{M}\Big{)}\Big{)}\Big{)}, \tag{11}\]  
where \(H_{GE}(\cdot)\) denotes the function of RS3 AM-G module (Section 3.3.3), and \(F_{de,k}^{m}\) denotes the output of the \(m\)-th RS3 AM-SR of the \(k\)-th decoder in SR branch, \(m=1,2,...,M\), \(k=1,2,...,N\). Then, \(F_{k}^{grad}\) is transferred to the encoder instantly, supplementing the SR process with the essential structural information, as depicted in Equations (4)-(6). The proposed gradient branch contains \(N\) gradient modules, which generate \(N\) spatial structure feature maps at different scales to provide multi-scale gradient priors for restoring more sharp edge and texture details.  
Figure 2: Architecture of the \(k\)-th gradient module of the gradient branch.