The Super-Resolution Generative Adversarial Network (SRGAN) is a seminal work that is capable of generating realistic textures during single image super-resolution. However, the hallucinated details are often accompanied with unpleasant artifacts. To further enhance the visual quality, we thoroughly study three key components of SRGAN - network architecture, adversarial loss and perceptual loss, and improve each of them to derive an Enhanced SRGAN (ESRGAN). In particular, we introduce the Residual-in-Residual Dense Block (RRDB) without batch normalization as the basic network building unit. Moreover, we borrow the idea from relativistic GAN to let the discriminator predict relative realness instead of the absolute value. Finally, we improve the perceptual loss by using the features before activation, which could provide stronger supervision for brightness consistency and texture recovery. Benefiting from these improvements, the proposed ESRGAN achieves consistently better visual quality with more realistic and natural textures than SRGAN and won the first place in the PIRM2018-SR Challenge. The code is available at https://github.com/xinntao/ESRGAN .
$ pip3 install -r requirements.txt
$ cd /path/to/modelzoo/cv/super_resolution/esrgan/pytorch
# Download DIV2K
$ mkdir -p data/DIV2K
$ cd data/DIV2K
# Homepage of DIV2K: https://data.vision.ee.ethz.ch/cvl/DIV2K/
# Download validation samples
$ cd ../..
$ mkdir -p data/test
$ cd data/test
# Home page of Set5: http://people.rennes.inria.fr/Aline.Roumy/results/SR_BMVC12.html
# Home page of Set14: https://github.com/jbhuang0604/SelfExSR
$ python3 get_div2k_anno.py
$ python3 train.py <config file> [training args] # config file can be found in the configs directory
$ bash dist_train.sh <config file> <num_gpus> [training args] # config file can be found in the configs directory
bash dist_train.sh configs/esrgan_psnr_x4c64b23g32_g1_1000k_div2k.py 8
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。