Skip to content

Pytorch implementation of Natural and Realistic Single Image Super-Resolution

License

Notifications You must be signed in to change notification settings

Yukariin/NatSR_pytorch

Repository files navigation

NatSR_pytorch

Unofficial Pytorch implementation of Natural and Realistic Single Image Super-Resolution. Official Tensorflow implementation can be found there.

Pre-trained Models

Data

All models trained on the same anime-themed datased based on Danbooru2019. Final dataset consists of 800/100 (train/val) images. Original images are all PNG images at least 2K x 2K. Images downsampled to 2K by LANCZOS, that is they have 2K pixels on at least one of the axes (vertical or horizontal), and then cropped to multiple of 12 pixels on both axes. All images splitted into 96x96/192x192 (x2/x4) HR and 48x48 LR (with jpeg noise) overlapping patches. All HR patches filtered by it's gradient and variance, and stored in SQLite database.

Image noise are from JPEG format only. Same as for waifu2x. Noise level 1 means quality ranges uniformly from [75, 95]; level 2 means quality ranges uniformly from [50, 75].

Scores

Scores calculated on validation dataset which consists of ~14K HR/LR patches for scale factor of 2.

Model Noise level L1(-) PSNR(+) SSIM(+)
FRSR 1 0.0091 35.0785 0.9802
NSR 1 0.0081 35.7897 0.9817

Models

FRSR - Scale factor x2 - Noise level 1

NatSR - Scale factor x2 - Noise level 1

Usage

python test.py --scale 2 --checkpoint path/to/model.pth --input path/to/image.jpg --output SR_output_x2.png

Citation

@InProceedings{Soh_2019_CVPR,
author = {Soh, Jae Woong and Park, Gu Yong and Jo, Junho and Cho, Nam Ik},
title = {Natural and Realistic Single Image Super-Resolution With Explicit Natural Manifold Discrimination},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2019}
}

Acknowledgments

ImageSplitter and SQLite-based dataset are based on yu45020's waifu2x re-implementation.

SQLite-based data generator based on reference NatSR implementation.

NMD training codes heavily based on reference NatSR implementation.

About

Pytorch implementation of Natural and Realistic Single Image Super-Resolution

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages