1 Introduction

Single image super-resolution (SISR), as a fundamental low-level vision problem, has attracted increasing attention in the research community and AI companies. SISR aims at recovering a high-resolution (HR) image from a single low-resolution (LR) one. Since the pioneer work of SRCNN proposed by Dong et al. [8], deep convolution neural network (CNN) approaches have brought prosperous development. Various network architecture designs and training strategies have continuously improved the SR performance, especially the Peak Signal-to-Noise Ratio (PSNR) value [13, 21, 22, 24, 25, 36, 37, 45, 46]. However, these PSNR-oriented approaches tend to output over-smoothed results without sufficient high-frequency details, since the PSNR metric fundamentally disagrees with the subjective evaluation of human observers [25].

Fig. 1.
figure 1

The super-resolution results of \(\times 4\) for SRGAN, the proposed ESRGAN and the ground-truth. ESRGAN outperforms SRGAN in sharpness and details.

Several perceptual-driven methods have been proposed to improve the visual quality of SR results. For instance, perceptual loss [7, 19] is proposed to optimize super-resolution model in a feature space instead of pixel space. Generative adversarial network [11] is introduced to SR by [25, 33] to encourage the network to favor solutions that look more like natural images. The semantic image prior is further incorporated to improve recovered texture details [40]. One of the milestones in the way pursuing visually pleasing results is SRGAN [25]. The basic model is built with residual blocks [15] and optimized using perceptual loss in a GAN framework. With all these techniques, SRGAN significantly improves the overall visual quality of reconstruction over PSNR-oriented methods.

However, there still exists a clear gap between SRGAN results and the ground-truth (GT) images, as shown in Fig. 1. In this study, we revisit the key components of SRGAN and improve the model in three aspects. First, we improve the network structure by introducing the Residual-in-Residual Dense Block (RDDB), which is of higher capacity and easier to train. We also remove Batch Normalization (BN) [18] layers as in [26] and use residual scaling [26, 35] and smaller initialization to facilitate training a very deep network. Second, we improve the discriminator using Relativistic average GAN (RaGAN) [20], which learns to judge “whether one image is more realistic than the other” rather than “whether one image is real or fake”. Our experiments show that this improvement helps the generator recover more realistic texture details. Third, we propose an improved perceptual loss by using the VGG features before activation instead of after activation as in SRGAN. We empirically find that the adjusted perceptual loss provides sharper edges and more visually pleasing results, as will be shown in Sect. 4.3. Extensive experiments show that the enhanced SRGAN, termed ESRGAN, consistently outperforms state-of-the-art methods in both sharpness and details (see Figs. 1 and 7).

Fig. 2.
figure 2

Perception-distortion plane on PIRM self validation dataset. We show the baselines of EDSR [26], RCAN [45] and EnhanceNet [33], and the submitted ESRGAN model. The blue dots are produced by image interpolation. (Color figure online)

We take a variant of ESRGAN to participate in the PIRM-SR Challenge [5]. This challenge is the first SR competition that evaluates the performance in a perceptual-quality aware manner based on [6]. The perceptual quality is judged by the non-reference measures of Ma’s score [27] and NIQE [30], i.e., perceptual index = \(\frac{1}{2} ((10-\text {Ma})+\text {NIQE})\). A lower perceptual index represents a better perceptual quality.

As shown in Fig. 2, the perception-distortion plane is divided into three regions defined by thresholds on the Root-Mean-Square Error (RMSE), and the algorithm that achieves the lowest perceptual index in each region becomes the regional champion. We mainly focus on region 3 as we aim to bring the perceptual quality to a new high. Thanks to the aforementioned improvements and some other adjustments as discussed in Sect. 4.5, our proposed ESRGAN won the first place in the PIRM-SR Challenge (region 3) with the best perceptual index.

In order to balance the visual quality and RMSE/PSNR, we further propose the network interpolation strategy, which could continuously adjust the reconstruction style and smoothness. Another alternative is image interpolation, which directly interpolates images pixel by pixel. We employ this strategy to participate in region 1 and region 2. The network interpolation and image interpolation strategies and their differences are discussed in Sect. 3.4.

2 Related Work

We focus on deep neural network approaches to solve the SR problem. Dong et al. [8, 9] propose SRCNN to learn the mapping from LR to HR images in an end-to-end manner, achieving superior performance against previous works. Later on, the field has witnessed a variety of network architectures, such as a deeper network with residual learning [21], Laplacian pyramid structure [24], residual blocks [25], recursive learning [22, 36], densely connected network [37], deep back projection [13] and residual dense network [46]. Specifically, Lim et al. [26] propose EDSR model by removing unnecessary BN layers in the residual block and expanding the model size. Zhang et al. [46] propose to use effective residual dense block in SR, and they further explore a deeper network with channel attention [45]. Besides supervised learning, other methods like reinforcement learning [41] and unsupervised learning [42] are also introduced to solve general image restoration problems.

Several methods have been proposed to stabilize training a very deep model. For instance, residual path is developed to stabilize the training and improve the performance [15, 21, 45]. Residual scaling is first employed by Szegedy et al. [35] and also used in EDSR. For general deep networks, He et al. [14] propose a robust initialization method for VGG-style networks without BN. To facilitate training a deeper network, we develop a compact and effective residual-in-residual dense block, which also helps to improve the perceptual quality.

Perceptual-driven approaches have also been proposed to improve the visual quality of SR results. Based on the idea of being closer to perceptual similarity [7, 10], perceptual loss [19] is proposed to enhance the visual quality by minimizing the error in a feature space instead of pixel space. Contextual loss [29] is developed to generate images with natural image statistics by using an objective that focuses on the feature distribution. Ledig et al. [25] propose SRGAN model that uses perceptual loss and adversarial loss to favor outputs residing on the manifold of natural images. Sajjadi et al. [33] develop a similar approach and further explored the local texture matching loss. Based on these works, Wang et al. [40] propose spatial feature transform to effectively incorporate semantic prior in an image and improve the recovered textures.

Photo-realism is usually attained by adversarial training with GAN [11]. Recently there are a bunch of works that focus on developing more effective GAN frameworks. WGAN [2] proposes to minimize a reasonable and efficient approximation of Wasserstein distance and regularizes discriminator by weight clipping. Other improved regularization for discriminator includes gradient clipping [12] and spectral normalization [31]. Relativistic discriminator [20] is developed not only to increase the probability that generated data are real, but also to simultaneously decrease the probability that real data are real. In this work, we enhance SRGAN by employing a more effective relativistic average GAN.

SR algorithms are typically evaluated by several widely used distortion measures, e.g., PSNR and SSIM. However, these metrics fundamentally disagree with the subjective evaluation of human observers [25]. Non-reference measures are used for perceptual quality evaluation, including Ma’s score [27] and NIQE [30], both of which are used to calculate the perceptual index in the PIRM-SR Challenge [5]. In a recent study, Blau et al. [6] find that the distortion and perceptual quality are at odds with each other.

Fig. 3.
figure 3

We employ the basic architecture of SRResNet [25], where most computation is done in the LR feature space. We could select or design “basic blocks” (e.g., residual block [15], dense block [16], RRDB) for better performance.

3 Proposed Methods

Our main aim is to improve the overall perceptual quality for SR. In this section, we first describe our proposed network architecture and then discuss the improvements from the discriminator and perceptual loss. At last, we describe the network interpolation strategy for balancing perceptual quality and PSNR.

3.1 Network Architecture

In order to further improve the recovered image quality of SRGAN, we mainly make two modifications to the structure of generator G: (1) remove all BN layers; (2) replace the original basic block with the proposed Residual-in-Residual Dense Block (RRDB), which combines multi-level residual network and dense connections as depicted in Fig. 4.

Fig. 4.
figure 4

Left: We remove the BN layers in residual block in SRGAN. Right: RRDB block is used in our deeper model and \(\beta \) is the residual scaling parameter.

Removing BN layers has proven to increase performance and reduce computational complexity in different PSNR-oriented tasks including SR [26] and deblurring [32]. BN layers normalize the features using mean and variance in a batch during training and use estimated mean and variance of the whole training dataset during testing. When the statistics of training and testing datasets differ a lot, BN layers tend to introduce unpleasant artifacts and limit the generalization ability. We empirically observe that BN layers are more likely to bring artifacts when the network is deeper and trained under a GAN framework. These artifacts occasionally appear among iterations and different settings, violating the needs for a stable performance over training. We therefore remove BN layers for stable training and consistent performance. Furthermore, removing BN layers helps to improve generalization ability and to reduce computational complexity and memory usage.

We keep the high-level architecture design of SRGAN (see Fig. 3), and use a novel basic block namely RRDB as depicted in Fig. 4. Based on the observation that more layers and connections could always boost performance [26, 45, 46], the proposed RRDB employs a deeper and more complex structure than the original residual block in SRGAN. Specifically, as shown in Fig. 4, the proposed RRDB has a residual-in-residual structure, where residual learning is used in different levels. A similar network structure is proposed in [44] that also applies a multi-level residual network. However, our RRDB differs from [44] in that we use dense block [16] in the main path as [46], where the network capacity becomes higher benefiting from the dense connections.

In addition to the improved architecture, we also exploit several techniques to facilitate training a very deep network: (1) residual scaling [26, 35], i.e., scaling down the residuals by multiplying a constant between 0 and 1 before adding them to the main path to prevent instability; (2) smaller initialization, as we empirically find residual architecture is easier to train when the initial parameter variance becomes smaller. More discussion can be found in the supplementary material.

3.2 Relativistic Discriminator

Besides the improved structure of generator, we also enhance the discriminator based on the Relativistic GAN [20]. Different from the standard discriminator D in SRGAN, which estimates the probability that one input image x is real and natural, a relativistic discriminator tries to predict the probability that a real image \(x_r\) is relatively more realistic than a fake one \(x_f\), as shown in Fig. 5.

Fig. 5.
figure 5

Difference between standard discriminator and relativistic discriminator.

Specifically, we replace the standard discriminator with the Relativistic average Discriminator RaD [20], denoted as \(D_{Ra}\). The standard discriminator in SRGAN can be expressed as \(D(x)=\sigma (C(x))\), where \(\sigma \) is the sigmoid function and C(x) is the non-transformed discriminator output. Then the RaD is formulated as \(D_{Ra}(x_r, x_f)=\sigma (C(x_r)-\mathbb {E}_{x_f}[C(x_f)])\), where \(\mathbb {E}_{x_f}[\cdot ]\) represents the operation of taking average for all fake data in the mini-batch. The discriminator loss is then defined as:

$$\begin{aligned} L_{D}^{Ra} = -\mathbb {E}_{x_r}[\log (D_{Ra}(x_r, x_f))] - \mathbb {E}_{x_f}[\log (1 - D_{Ra}(x_f, x_r))]. \end{aligned}$$
(1)

The adversarial loss for generator is in a symmetrical form:

$$\begin{aligned} L_{G}^{Ra} = -\mathbb {E}_{x_r}[\log (1 - D_{Ra}(x_r, x_f))] - \mathbb {E}_{x_f}[\log (D_{Ra}(x_f, x_r))], \end{aligned}$$
(2)

where \(x_f=G(x_i)\) and \(x_i\) stands for the input LR image. It is observed that the adversarial loss for generator contains both \(x_r\) and \(x_f\). Therefore, our generator benefits from the gradients from both generated data and real data in adversarial training, while in SRGAN only generated part takes effect. In Sect. 4.3, we will show that this modification of discriminator helps to learn sharper edges and more detailed textures.

3.3 Perceptual Loss

We also develop a more effective perceptual loss \(L_\text {percep}\) by constraining on features before activation rather than after activation as practiced in SRGAN.

Based on the idea of being closer to perceptual similarity [7, 10], Johnson et al. [19] propose perceptual loss and it is extended in SRGAN [25]. Perceptual loss is previously defined on the activation layers of a pre-trained deep network, where the distance between two activated features is minimized. Contrary to the convention, we propose to use features before the activation layers, which will overcome two drawbacks of the original design. First, the activated features are very sparse, especially after a very deep network, as depicted in Fig. 6. For example, the average percentage of activated neurons for image ‘baboon’ after VGG19-54Footnote 1 layer is merely 11.17%. The sparse activation provides weak supervision and thus leads to inferior performance. Second, using features after activation also causes inconsistent reconstructed brightness compared with the ground-truth image, which we will show in Sect. 4.3.

Therefore, the total loss for the generator is:

$$\begin{aligned} L_G = L_{\text {percep}} + \lambda {L_G^{Ra}}+ \eta {L_1}, \end{aligned}$$
(3)

where \(L_1 = \mathbb {E}_{x_i}||G(x_i) - y||_1\) is the content loss that evaluate the 1-norm distance between recovered image \(G(x_i)\) and the ground-truth y, and \(\lambda , \eta \) are the coefficients to balance different loss terms.

We also explore a variant of perceptual loss in the PIRM-SR Challenge. In contrast to the commonly used perceptual loss that adopts a VGG network trained for image classification, we develop a more suitable perceptual loss for SR – MINC loss. It is based on a fine-tuned VGG network for material recognition [3], which focuses on textures rather than object. Although the gain of perceptual index brought by MINC loss is marginal, we still believe that exploring perceptual loss that focuses on texture is critical for SR.

Fig. 6.
figure 6

Representative feature maps before and after activation for image ‘baboon’. With the network going deeper, most of the features after activation become inactive while features before activation contains more information.

3.4 Network Interpolation

To remove unpleasant noise in GAN-based methods while maintain a good perceptual quality, we propose a flexible and effective strategy – network interpolation. Specifically, we first train a PSNR-oriented network \(G_{\text {PSNR}}\) and then obtain a GAN-based network \(G_{\text {GAN}}\) by fine-tuning. We interpolate all the corresponding parameters of these two networks to derive an interpolated model \(G_\text {INTERP}\), whose parameters are:

$$\begin{aligned} \theta _G^{\text {INTERP}} = (1-\alpha ) \ \theta _G^{\text {PSNR}} + \alpha \ \theta _G^{\text {GAN}}, \end{aligned}$$
(4)

where \(\theta _G^{\text {INTERP}}\), \(\theta _G^{\text {PSNR}}\) and \(\theta _G^{\text {GAN}}\) are the parameters of \(G_\text {INTERP}\), \(G_\text {PSNR}\) and \(G_\text {GAN}\), respectively, and \(\alpha \in [0,1]\) is the interpolation parameter.

The proposed network interpolation enjoys two merits. First, the interpolated model is able to produce meaningful results for any feasible \(\alpha \) without introducing artifacts. Second, we can continuously balance perceptual quality and fidelity without re-training the model.

We also explore alternative methods to balance the effects of PSNR-oriented and GAN-based methods. For instance, one can directly interpolate their output images (pixel by pixel) rather than the network parameters. However, such an approach fails to achieve a good trade-off between noise and blur, i.e., the interpolated image is either too blurry or noisy with artifacts (see Sect. 4.4). Another method is to tune the weights of content loss and adversarial loss, i.e., the parameter \(\lambda \) and \(\eta \) in Eq. (3). But this approach requires tuning loss weights and fine-tuning the network, and thus it is too costly to achieve continuous control of the image style.

4 Experiments

4.1 Training Details

Following SRGAN [25], all experiments are performed with a scaling factor of \(\times 4\) between LR and HR images. We obtain LR images by down-sampling HR images using the MATLAB bicubic kernel function. The mini-batch size is set to 16. The spatial size of cropped HR patch is \(128 \times 128\). We observe that training a deeper network benefits from a larger patch size, since an enlarged receptive field helps to capture more semantic information. However, it costs more training time and consumes more computing resources. This phenomenon is also observed in PSNR-oriented methods (see supplementary material).

The training process is divided into two stages. First, we train a PSNR-oriented model with the L1 loss. The learning rate is initialized as \(2\times 10^{-4}\) and decayed by a factor of 2 every \(2 \times 10^5\) iterations. We then employ the trained PSNR-oriented model as an initialization for the generator. The generator is trained using the loss function in Eq. (3) with \(\lambda =5 \times 10^{-3}\) and \(\eta =1 \times 10^{-2}\). The learning rate is set to \(1\times 10^{-4}\) and halved at [50k, 100k, 200k, 300k] iterations. Pre-training with pixel-wise loss helps GAN-based methods to obtain more visually pleasing results. We use Adam [23] and alternately update the generator and discriminator network until the model converges.

For training data, we mainly use the DIV2K dataset [1], which is a high-quality (2K resolution) dataset for image restoration tasks. Beyond the training set of DIV2K that contains 800 images, we also seek for other datasets with rich and diverse textures for our training. To this end, we further use the Flickr2K dataset [38] consisting of 2650 2 K high-resolution images collected on the Flickr website, and the OutdoorSceneTraining (OST) [40] dataset to enrich our training set. We empirically find that using this large dataset with richer textures helps the generator to produce more natural results, as shown in Fig. 8.

We train our models in RGB channels and augment the training dataset with random horizontal flips and 90\(^\circ \) rotations. We evaluate our models on widely used benchmark datasets – Set5 [4], Set14 [43], BSD100 [28], Urban100 [17], and the PIRM self-validation dataset that is provided in the PIRM-SR Challenge.

4.2 Qualitative Results

We compare our final models on several public benchmark datasets with state-of-the-art PSNR-oriented methods including SRCNN [8], EDSR [26] and RCAN [45], and also with perceptual-driven approaches including SRGAN [25] and EnhanceNet [33]. Since there is no effective and standard metric for perceptual quality, we present some representative qualitative results in Fig. 7. PSNR (evaluated on the luminance channel in YCbCr color space) and the perceptual index used in the PIRM-SR Challenge are also provided for reference.

Fig. 7.
figure 7

Qualitative results of ESRGAN. ESRGAN produces more natural textures, e.g., animal fur, building structure and grass texture, and also less unpleasant artifacts, e.g., artifacts in the face by SRGAN.

It can be observed from Fig. 7 that our proposed ESRGAN outperforms previous approaches in both sharpness and details. For instance, ESRGAN can produce sharper and more natural baboon’s whiskers and grass textures (see image 43074) than PSNR-oriented methods, which tend to generate blurry results, and than previous GAN-based methods, whose textures are unnatural and contain unpleasing noise. ESRGAN is capable of generating more detailed structures in building (see image 102061) while other methods either fail to produce enough details (SRGAN) or add undesired textures (EnhanceNet). Moreover, previous GAN-based methods sometimes introduce unpleasant artifacts, e.g., SRGAN adds wrinkles to the face. Our ESRGAN gets rid of these artifacts and produces natural results.

4.3 Ablation Study

In order to study the effects of each component in the proposed ESRGAN, we gradually modify the baseline SRGAN model and compare their differences. The overall visual comparison is illustrated in Fig. 8. Each column represents a model with its configurations shown in the top. The red sign indicates the main improvement compared with the previous model. A detailed discussion is provided as follows.

BN Removal. We first remove all BN layers for stable and consistent performance without artifacts. It does not decrease the performance but saves the computational resources and memory usage. For some cases, a slight improvement can be observed from the \(2^{nd}\) and \(3^{rd}\) columns in Fig. 8 (e.g., image 39). Furthermore, we observe that when a network is deeper and more complicated, the model with BN layers is more likely to introduce unpleasant artifacts. The examples can be found in the supplementary material.

Before Activation in Perceptual Loss. We first demonstrate that using features before activation can result in more accurate brightness of reconstructed images. To eliminate the influences of textures and color, we filter the image with a Gaussian kernel and plot the histogram of its gray-scale counterpart. Figure 9a shows the distribution of each brightness value. Using activated features skews the distribution to the left, resulting in a dimmer output while using features before activation leads to a more accurate brightness distribution closer to that of the ground-truth.

Fig. 8.
figure 8

Overall visual comparisons for showing the effects of each component in ESRGAN. Each column represents a model with its configurations in the top. The red sign indicates the main improvement compared with the previous model. (Color figure online)

We can further observe that using features before activation helps to produce sharper edges and richer textures as shown in Fig. 9b (see bird feather) and Fig. 8 (see the \(3^{rd}\) and \(4^{th}\) columns), since the dense features before activation offer a stronger supervision than that a sparse activation could provide.

RaGAN. RaGAN uses an improved relativistic discriminator, which is shown to benefit learning sharper edges and more detailed textures. For example, in the \(5^{th}\) column of Fig. 8, the generated images are sharper with richer textures than those on their left (see the baboon, image 39 and image 43074).

Deeper Network with RRDB. Deeper model with the proposed RRDB can further improve the recovered textures, especially for the regular structures like the roof of image 6 in Fig. 8, since the deep model has a strong representation capacity to capture semantic information. Also, we find that a deeper model can reduce unpleasing noises like image 20 in Fig. 8.

Fig. 9.
figure 9

Comparison between before activation and after activation.

In contrast to SRGAN, which claimed that deeper models are increasingly difficult to train, our deeper model shows its superior performance with easy training, thanks to the improvements mentioned above especially the proposed RRDB without BN layers.

4.4 Network Interpolation

We compare the effects of network interpolation and image interpolation strategies in balancing the results of a PSNR-oriented model and GAN-based method. We apply simple linear interpolation on both the schemes. The interpolation parameter \(\alpha \) is chosen from 0 to 1 with an interval of 0.2.

Fig. 10.
figure 10

The comparison between network interpolation and image interpolation.

As depicted in Fig. 10, the pure GAN-based method produces sharp edges and richer textures but with some unpleasant artifacts, while the pure PSNR-oriented method outputs cartoon-style blurry images. By employing network interpolation, unpleasing artifacts are reduced while the textures are maintained. By contrast, image interpolation fails to remove these artifacts effectively. Interestingly, it is observed that the network interpolation strategy provides a smooth control of balancing perceptual quality and fidelity in Fig. 10.

4.5 The PIRM-SR Challenge

We take a variant of ESRGAN to participate in the PIRM-SR Challenge [5]. Specifically, we use the proposed ESRGAN with 16 residual blocks and also empirically make some modifications to cater to the perceptual index. (1) The MINC loss is used as a variant of perceptual loss, as discussed in Sect. 3.3. Despite the marginal gain on the perceptual index, we still believe that exploring perceptual loss that focuses on texture is crucial for SR. (2) Pristine dataset [30], which is used for learning the perceptual index, is also employed in our training; (3) a high weight of loss \(L_1\) up to \(\eta =10\) is used due to the PSNR constraints; (4) we also use back projection [39] as post-processing, which can improve PSNR and sometimes lower the perceptual index.

For other regions 1 and 2 that require a higher PSNR, we use image interpolation between the results of our ESRGAN and those of a PSNR-oriented method RCAN [45]. The image interpolation scheme achieves a lower perceptual index (lower is better) although we observed more visually pleasing results by using the network interpolation scheme. Our proposed ESRGAN model won the first place in the PIRM-SR Challenge (region 3) with the best perceptual index.

5 Conclusion

We have presented an ESRGAN model that achieves consistently better perceptual quality than previous SR methods. The method won the first place in the PIRM-SR Challenge in terms of the perceptual index. We have formulated a novel architecture containing several RDDB blocks without BN layers. In addition, useful techniques including residual scaling and smaller initialization are employed to facilitate the training of the proposed deep model. We have also introduced the use of relativistic GAN as the discriminator, which learns to judge whether one image is more realistic than another, guiding the generator to recover more detailed textures. Moreover, we have enhanced the perceptual loss by using the features before activation, which offer stronger supervision and thus restore more accurate brightness and realistic textures.