Coder Social home page Coder Social logo

yukariin / natsr_pytorch Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 2.0 50 KB

Pytorch implementation of Natural and Realistic Single Image Super-Resolution

License: MIT License

Python 100.00%
pytorch super-resolution generative-adversarial-network waifu2x

natsr_pytorch's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.