# Satellite Image Super-Resolution by 2D RRDB and Edge-Enhanced Generative Adversarial Network +
## 3 Materials and Methods
### Loss Functions  
At first, we create a content loss function to force the generator G to output the intermediate HR image that is supposed to be similar to the real HR image by the equation below:  
\[L_{cont}(\tau_{\text{G}})=arg\min_{\tau_{\text{G}}}\sum_{i=1}^{k}\rho(I_{HR,i}-I _{BASE,i}), \tag{1}\]  
where \(\tau_{\text{G}}\) represents a set of model parameters in the generator, \(\rho(x)=\sqrt{x^{2}+\xi^{2}}\) represents the Charbonnier penalty function [10]. As the same as [10], the compensation parameter is set to \(\epsilon=10^{-3}\), \(I_{HR}\) and \(I_{BASE}\) denote the real HR image and the intermediate HR image generated by the UDSN.  
To reduce artifacts and enhance the quality of the reconstructed image, we included the pixel-based Charbonnier loss to improve the consistency of the image content between the real and generated HR images. The consistency loss function is denoted as:  
\[L_{img\_cst}(\tau_{\text{G}})=\rho(I_{HR}-I_{SR}), \tag{2}\]  
where \(\tau_{\text{G}}\) is the model parameter set as the same as mentioned before, \(I_{HR}\) and \(I_{SR}\) refer to the real HR image and the final SR image.  
Then, \(I_{HR}\) and \(I_{BASE}\) are both input into the discriminator to determine the authenticity of \(I_{BASE}\). Moreover, the discriminator is trained to minimize the adversarial loss, which can force the generator to output the reconstructed image \(I_{SR}\) as similar as the real HR image. The adversarial loss can be written as:  
\[L_{adv}(\tau_{\text{G}},\tau_{\text{D}})=-\log D(I_{HR})-\log(1-D(G(I_{LR}))), \tag{3}\]  
where \(\tau_{\text{D}}\) refers to the model parameters in the discriminator, \(I_{LR}\) represents the input LR image, \(G(\cdot)\) represents the generator function, and \(D(\cdot)\) is the discriminator function to compute the probability of being the generated HR image or real HR image. In the discriminator, the generated image is expected to be classified as 0, and the real image is expected to be classified as 1. If the discriminator can correctly decide whether this is a real or generated image, then the Equation (3) will output 0, which is the smallest value. For the generator, it is expected to confuse the discriminator to make it unable to distinguish between the real image and generated image, and classify the generated image as 1.  
Furthermore, we included the edge image consistency loss function, as shown in Equation (4), where \(I_{edge\_HR}\) is the edge image of the real HR image, and \(I_{edge\_SR}\) is the edge image of the generated SR image. As we know, the image consistency loss \(L_{img\_cst}\) in Equation (2) helps to obtain an output with good edge information, but the edges for some objects in the image are distorted and have produced noise. Therefore, we incorporate this loss to resolve this issue. The weighting coefficient of this loss is chosen to be the same as \(L_{img\_cst}\).  
\[L_{edge\_cst}(\tau_{\text{G}})=\rho(I_{edge\_HR}-I_{edge\_SR}). \tag{4}\]  
Figure 5: Edge extraction and enhancement, where Edge* represents the image after edge enhancement.  
Equation (5) shows the perceptual loss [34], and we incorporated the edge perceptual loss function described in Equation (6). The feature map (\(\mathit{vgg_{feat}}(\cdot)\)) before the activation layer of the fine-tuned VGG19 [7] network are adopted to compute the perceptual loss and the edge perceptual loss as follows:  
\[L_{\mathit{perc}}=E\Big{\|}\mathit{vgg_{feat}}(I_{BASE})-\mathit{vgg_{feat}}(I_{ HR})\Big{\|}, \tag{5}\]  
\[L_{\mathit{edge\_perc}}=E\Big{\|}\mathit{vgg_{feat}}(I_{\mathit{edge\_BASE}})- \mathit{vgg_{feat}}(I_{\mathit{edge\_HR}})\Big{\|}, \tag{6}\]  
where \(I_{BASE}\) represents the intermediate SR image, \(I_{HR}\) is the real HR image, \(I_{\mathit{edge\_BASE}}\) is the edge map of the intermediate SR image, \(I_{\mathit{edge\_HR}}\) is the edge map of the real HR image, and \(E\) denotes the calculation of mean value for the difference of feature maps.