Giter VIP home page Giter VIP logo

super-resolution's Introduction

Photo-Realistic Single Image Super-Resolution GAN

TensorFlow Keras nVIDIA

Code style: black Checked with mypy Build Status

Note

I adapted the code from this awesome PyTorch version. Please check it out as well.

Important

I am using python 3.11 with tensorflow 2.12 on WSL2.

Steps

  1. pip install -r requirements.txt
  2. download the COCO dataset (I use COCO 2017).
  3. download the Set5, Set14, BSD100 test datasets
  4. create_data_lists.py creates the JSON files for training and testing from the COCO image paths.
  5. architecture.py defines the training blueprints for both models (ResNet and GAN).
  6. train.py runs the whole training pipeline with top-down logic found in the file. Everything is managed by the Trainer from trainer.py.
  7. resolve.py generates the super resolution images from a given high resolution image (the low resolution version to be solved is generated by down-sampling the given image) and evaluates the models using with scikit-image's peak_signal_noise_ratio and structural_similarity using the Evaluator from evaluator.py.

The code itself is heavily commented and you can get a feel for super-resolution models by looking at the tests.

Overfitting on one image

  • Top-Left: Bicubic Up-sampling
  • Top-Right: Super Resolution ResNet
  • Bottom-Left: Super Resolution GAN
  • Bottom-Right: Original High Resolution

bird_resolved

Evaluation results:
{   'PSNR (SRGAN)': 29.44381,
    'PSNR (SRResNet)': 29.380556,
    'SSIM (SRGAN)': 0.87486875,
    'SSIM (SRResNet)': 0.87476}

super-resolution's People

Contributors

andreimoraru123 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.