# Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data

Real-ESRGAN learns real-world super-resolution from purely synthetic degraded image pairs

Xintao Wang, Liangbin Xie, Chao Dong, Ying Shan · arXiv · 2021-7-22

- **Problem** Super-resolution models trained on single-pass synthetic degradations struggle with real photos. Real photos go through repeated processing such as capture, editing and reshared compression, which those models never see.
- **Method** Real-ESRGAN trains an ESRGAN-based model on synthetic pairs. It applies a second-order degradation pipeline with sinc filtering and uses a U-Net discriminator with spectral normalization.
- **Results** Visual comparisons at scale 4 on real-world samples show fewer overshoot and ringing artifacts and richer textures than ESRGAN, DAN, RealSR and BSRGAN.

## Why bicubic-trained super-resolution breaks on real photos

Many super-resolution networks assume a bicubic downsampling kernel, and that assumption differs from the degradations found in real photographs. Blind super-resolution targets the harder case in which the degradation is unknown and complicated.

Explicit methods model the degradation with a classical pipeline of blur, downsampling, noise and JPEG compression. Real degradations are often too tangled for one such pass, so these methods can fail on real inputs. Implicit methods learn the degradation from data with a GAN, but what they learn is limited to degradations present in their training sets, so they generalize poorly to out-of-distribution images.

The motivation comes from how photos actually degrade. A camera photo can pick up blur and sensor noise, then be sharpened, compressed and reshared several times, so the degradation is a chain of processes rather than a single one. The authors observed that models trained on single-pass synthetic pairs can handle some real images but amplify noise or add ringing on complex ones.

## Building training pairs with a high-order degradation model

Each training input starts from a ground-truth image y. The image is convolved with a blur kernel k, downsampled by a scale factor r, has noise n added, and is finally JPEG-compressed, as written in the following relation. \\\[ x = D(y) = \\left\[(y \\circledast k)\\downarrow\_r + n\\right\]\_{\\mathrm{JPEG}} \\\]

The blur kernel is a Gaussian whose covariance matrix is built from two standard deviations and a rotation angle. Equal standard deviations give an isotropic kernel and unequal ones give an anisotropic kernel. Because Gaussian shapes may not match real camera blur, the authors add generalized Gaussian kernels, controlled by a shape parameter beta, and a plateau-shaped distribution.

They found that these kernels gave sharper outputs on several real samples.

The noise is either additive Gaussian or Poisson. When the Gaussian noise is sampled independently per RGB channel it becomes color noise, and sampling one value for all three channels gives gray noise. Resizing is chosen at random among area, bilinear and bicubic operations. Nearest-neighbor interpolation is excluded because it introduces misalignment.

JPEG compression uses the DiffJPEG implementation in PyTorch, and a lower quality factor q means stronger compression and worse quality.

Instead of one pass, Real-ESRGAN repeats the same classical procedure several times, each pass with its own hyperparameters. The composed operator is written as follows. \\\[ x = D\_n(y) = (D\_n \\circ \\cdots \\circ D\_2 \\circ D\_1)(y) \\\] The authors use n equal to 2, since that resolves most real cases while staying simple. Because repeated passes would grow the resolution, the downsampling step is replaced by a random resize.

The random shuffling strategy of BSRGAN \[55\] can also repeat degradations, but the authors argue that the high-order repetition itself is the key, and not every shuffled degradation is needed.

## Ringing and overshoot from sinc filtering

Ringing appears as spurious bands near sharp edges, and overshoot appears as an exaggerated jump at an edge transition. The authors link both to a signal that is bandlimited, meaning its high frequencies are missing, and they appear after sharpening or JPEG compression.

The authors model these artifacts with a sinc filter, an idealized filter that cuts off high frequencies. Its 2D kernel is set by a cutoff frequency, written as omega c, and a first-order Bessel function of the first kind. Cutoff values of pi over 5 and pi over 3 give different ringing strengths, and the filtered images show the same kind of edge artifacts as the first two real samples.

## Generator and U-Net discriminator

The generator is the ESRGAN network built from residual-in-residual dense blocks. For scale factors of 2 and 1, a pixel-unshuffle first moves spatial detail into the channel dimension, so most of the computation runs at a lower resolution.

ESRGAN uses a VGG-style discriminator that judges global style. Real-ESRGAN needs accurate feedback on local textures, so the discriminator becomes a U-Net with skip connections that outputs a realness value for each pixel and gives per-pixel feedback to the generator.

The U-Net structure and the harder degradations make training less stable, so spectral normalization is applied to the discriminator. The authors also observed that it reduces over-sharp artifacts introduced by GAN training.

## Two-stage training and synthesis settings

Training has two stages. Real-ESRNet is first trained with an L1 loss as a PSNR-oriented model, fine-tuned from ESRGAN for faster convergence. Its weights then initialize the Real-ESRGAN generator, which is trained with an L1 loss, a perceptual loss and a GAN loss with weights {1, 1, 0.1}. The perceptual loss uses conv1 to conv5 feature maps of a pre-trained VGG19 network, with weights {0.1, 0.1, 1, 1, 1}.

The authors use a second-order degradation model. Gaussian, generalized Gaussian and plateau-shaped kernels are chosen with probabilities {0.7, 0.15, 0.15}, with kernel sizes from 7 to 21 and sigma from 0.2 to 3 in the first pass and from 0.2 to 1.5 in the second. A sinc kernel is used with probability 0.1 in blur, and the second blur is skipped with probability 0.2.

The final sinc filter is applied with probability 0.8. Gaussian and Poisson noise are chosen with probabilities {0.5, 0.5}, with noise sigma from 1 to 30 in the first pass and from 1 to 25 in the second, and gray noise is used with probability 0.4. The JPEG quality factor is sampled from 30 to 95.

Because batch processing forces all samples in a batch to share settings such as the resize factor, the authors keep a training pair pool of 180 pairs and draw each batch from it to increase variety. Real-ESRGAN+ is trained with sharpened ground-truth images. Unsharp masking as a post-process tends to introduce overshoot artifacts, while sharpening the targets during training gave the authors a better balance of sharpness and artifact suppression.

## Visual comparisons with prior methods

Real-ESRGAN is compared visually with ESRGAN, DAN, CDC, RealSR and BSRGAN, with Bicubic as a reference, at upsampling scale 4. The test images come from RealSR, DRealSR, OST300, DPED, ADE20K validation and Internet images.

In the first sample, the image has overshoot artifacts as white edges around letters. DAN and BSRGAN amplify these when upsampling, while Real-ESRGAN removes them because the sinc filter appears in its training degradations.

The second sample has unknown and complicated degradations that most methods do not remove, while Real-ESRGAN trained with the second-order process does. Real-ESRGAN also restores brick, mountain and tree textures, whereas RealSR and BSRGAN either leave degradations or add unnatural textures.

Real-ESRGAN+ sharpens the output further than Real-ESRGAN on the same samples. The authors note that existing perceptual quality metrics do not reliably reflect human preference at a fine-grained level, so the main evidence here is visual, and the quantitative results are deferred to an appendix.

## What each component changes

The second-order ablation is run on Real-ESRNet, which the authors describe as more controllable. Replacing the second-order process with the classical first-order model leaves noise on a wall and blur in a wheat field, while Real-ESRNet handles both.

Without sinc filters in training, Real-ESRNet amplifies the ringing and overshoot artifacts already present in the inputs, especially around text and lines. With sinc filters in training these artifacts are removed.

With the ESRGAN VGG-style discriminator, bricks and bushes are not restored and unpleasant artifacts appear in bush branches. The U-Net design improves local detail but adds unnatural textures and instability, and adding spectral normalization improves textures while stabilizing training.

Removing the generalized Gaussian and plateau-shaped kernels leaves blur on some real samples, while the differences are marginal on most samples. The authors keep these kernels because they gave slightly better performance.

## Limits of the synthetic pipeline

The high-order degradation process is not perfect and does not cover the whole real-world degradation space. It extends the boundary of degradations that earlier blind SR methods can solve, through changes to data synthesis only.

Some restored buildings and indoor scenes show twisted lines, attributed to aliasing issues. GAN training also introduces unpleasant artifacts on some samples. Out-of-distribution complicated degradations are not removed, and Real-ESRGAN may even amplify them.

## Paper info

- **Authors**: Xintao Wang, Liangbin Xie, Chao Dong, Ying Shan
- **Venue**: arXiv · Preprint
- **First published**: 2021-7-22
- **Added**: 2026-11-12
- **Updated**: 2021-8-17
- **Version**: v2
- **arXiv**: 2107.10833
- **Category**: eess.IV · cs.CV
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/2107.10833v2) · [PDF ↗](https://arxiv.org/pdf/2107.10833v2)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Xintao Wang, Liangbin Xie, Chao Dong, Ying Shan (2021). Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data. arXiv:2107.10833v2. https://arxiv.org/abs/2107.10833v2

**BibTeX**

```
@misc{wang2021real,
  title = {{Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data}},
  author = {Xintao Wang and Liangbin Xie and Chao Dong and Ying Shan},
  year = {2021},
  eprint = {2107.10833},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.10833v2}
}
```

## Related papers

- [ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks](https://refivu.com/en/papers/ebad818e-19ed-4df9-8fcf-6d62836fa124-esrgan-enhanced-super-resolution-generative-adversarial.md)
- [CyCADA: Cycle-Consistent Adversarial Domain Adaptation](https://refivu.com/en/papers/86c1af43-2e3a-459f-87e6-d7c0653694a6-cycada-cycle-consistent-adversarial-domain-adaptation.md)
- [Enhanced Deep Residual Networks for Single Image Super-Resolution](https://refivu.com/en/papers/755b4a71-c6fa-4954-b300-73653bb1c2b2-enhanced-deep-residual-networks-for-single-image-super.md)
- [Spectral Normalization for Generative Adversarial Networks](https://refivu.com/en/papers/a69a23bf-3dd6-4b32-9fb1-444f7f67a6e8-spectral-normalization-for-generative-adversarial-networks.md)
- [EDiffSR: An Efficient Diffusion Probabilistic Model for Remote Sensing Image Super-Resolution](https://refivu.com/en/papers/76f50706-1489-43e9-9b29-6e7734ea5128-ediffsr-an-efficient-diffusion-probabilistic-model-for.md)
- [DU-GAN: Generative Adversarial Networks with Dual-Domain U-Net Based Discriminators for Low-Dose CT Denoising](https://refivu.com/en/papers/46030b78-75d0-4156-80ef-e92602d09b95-du-gan-generative-adversarial-networks-with-dual-domain.md)

## Other paper commentary

- [InstructPix2Pix: Learning to Follow Image Editing Instructions](https://refivu.com/en/papers/b87997ee-e5f2-4a2e-9b66-e15df3a71be7-instructpix2pix-learning-to-follow-image-editing.md)
- [MemNet: A Persistent Memory Network for Image Restoration](https://refivu.com/en/papers/80fb0022-b1b0-497f-8285-0c27e8c156fc-memnet-a-persistent-memory-network-for-image-restoration.md)
- [Unsupervised Learning of Video Representations using LSTMs](https://refivu.com/en/papers/a715f01b-843f-4405-90d9-dbb255bc47c5-unsupervised-learning-of-video-representations-using-lstms.md)
- [Expressive Body Capture: 3D Hands, Face, and Body from a Single Image](https://refivu.com/en/papers/13b094cd-136a-43d9-a552-fafa9aa19691-expressive-body-capture-3d-hands-face-and-body.md)
- [WIDER FACE: A Face Detection Benchmark](https://refivu.com/en/papers/f25dbb8a-9814-427e-8059-2cad94728cee-wider-face-a-face-detection-benchmark.md)
- [End-to-end Recovery of Human Shape and Pose](https://refivu.com/en/papers/da029864-5c93-4c98-a8b5-99aa97d36118-end-to-end-recovery-of-human-shape-and.md)
- [What Does BERT Look At? An Analysis of BERT's Attention](https://refivu.com/en/papers/8f682775-2bc4-4c36-a7e8-6afc56d2aeae-what-does-bert-look-at-an-analysis-of.md)
- [Curiosity-driven Exploration by Self-supervised Prediction](https://refivu.com/en/papers/93936438-d2c7-4a12-b814-3073185546ca-curiosity-driven-exploration-by-self-supervised-prediction.md)
- [FFA-Net: Feature Fusion Attention Network for Single Image Dehazing](https://refivu.com/en/papers/05326df3-34c3-4503-97d2-d46822e1fbfa-ffa-net-feature-fusion-attention-network-for-single.md)
- [Adversarial Examples: Attacks and Defenses for Deep Learning](https://refivu.com/en/papers/757e3533-c849-4349-8fbc-e8ea84c0b042-adversarial-examples-attacks-and-defenses-for-deep-learning.md)

## Terms in this paper

- [spectral normalization](https://refivu.com/en/terms/bf3f626bf932-spectral-normalization)
- [DIV2K](https://refivu.com/en/terms/ef8c4161aa33-div2k)
- [DAN](https://refivu.com/en/terms/d8e2fd93379f-dan)
- [ESRGAN](https://refivu.com/en/terms/27196a912aea-esrgan)
- [Flickr2K](https://refivu.com/en/terms/6f27ba5ed59a-flickr2k)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/cb516b02-b479-42ed-88af-4ec01e125184-real-esrgan-training-real-world-blind-super-resolution)
