All Projects → sgrvinod → A Pytorch Tutorial To Super Resolution

sgrvinod / A Pytorch Tutorial To Super Resolution

Licence: mit
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network | a PyTorch Tutorial to Super-Resolution

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to A Pytorch Tutorial To Super Resolution

Iseebetter
iSeeBetter: Spatio-Temporal Video Super Resolution using Recurrent-Generative Back-Projection Networks | Python3 | PyTorch | GANs | CNNs | ResNets | RNNs | Published in Springer Journal of Computational Visual Media, September 2020, Tsinghua University Press
Stars: ✭ 202 (+28.66%)
Mutual labels:  gan, generative-adversarial-network, super-resolution, gans
DLSS
Deep Learning Super Sampling with Deep Convolutional Generative Adversarial Networks.
Stars: ✭ 88 (-43.95%)
Mutual labels:  generative-adversarial-network, gan, gans, super-resolution
Pytorch Srgan
A modern PyTorch implementation of SRGAN
Stars: ✭ 289 (+84.08%)
Mutual labels:  gan, generative-adversarial-network, super-resolution
Sdv
Synthetic Data Generation for tabular, relational and time series data.
Stars: ✭ 360 (+129.3%)
Mutual labels:  gan, generative-adversarial-network, gans
Generative adversarial networks 101
Keras implementations of Generative Adversarial Networks. GANs, DCGAN, CGAN, CCGAN, WGAN and LSGAN models with MNIST and CIFAR-10 datasets.
Stars: ✭ 138 (-12.1%)
Mutual labels:  gan, generative-adversarial-network, gans
AvatarGAN
Generate Cartoon Images using Generative Adversarial Network
Stars: ✭ 24 (-84.71%)
Mutual labels:  generative-adversarial-network, gan, gans
Faceswap Gan
A denoising autoencoder + adversarial losses and attention mechanisms for face swapping.
Stars: ✭ 3,099 (+1873.89%)
Mutual labels:  gan, generative-adversarial-network, gans
Awesome Gan For Medical Imaging
Awesome GAN for Medical Imaging
Stars: ✭ 1,814 (+1055.41%)
Mutual labels:  gan, generative-adversarial-network, super-resolution
Gif
GIF is a photorealistic generative face model with explicit 3D geometric and photometric control.
Stars: ✭ 233 (+48.41%)
Mutual labels:  gan, generative-adversarial-network, gans
Tensorflow Srgan
Tensorflow implementation of "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network" (Ledig et al. 2017)
Stars: ✭ 33 (-78.98%)
Mutual labels:  gan, generative-adversarial-network, super-resolution
Gans In Action
Companion repository to GANs in Action: Deep learning with Generative Adversarial Networks
Stars: ✭ 748 (+376.43%)
Mutual labels:  gan, generative-adversarial-network, gans
Pacgan
[NeurIPS 2018] [JSAIT] PacGAN: The power of two samples in generative adversarial networks
Stars: ✭ 67 (-57.32%)
Mutual labels:  gan, generative-adversarial-network, gans
srgan
Pytorch implementation of "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network"
Stars: ✭ 39 (-75.16%)
Mutual labels:  generative-adversarial-network, gan, super-resolution
pytorch-gans
PyTorch implementation of GANs (Generative Adversarial Networks). DCGAN, Pix2Pix, CycleGAN, SRGAN
Stars: ✭ 21 (-86.62%)
Mutual labels:  generative-adversarial-network, gans, super-resolution
Frontalization
Pytorch deep learning face frontalization model
Stars: ✭ 160 (+1.91%)
Mutual labels:  pytorch-tutorial, gan, generative-adversarial-network
Anycost Gan
[CVPR 2021] Anycost GANs for Interactive Image Synthesis and Editing
Stars: ✭ 367 (+133.76%)
Mutual labels:  gan, generative-adversarial-network, gans
Tagan
An official PyTorch implementation of the paper "Text-Adaptive Generative Adversarial Networks: Manipulating Images with Natural Language", NeurIPS 2018
Stars: ✭ 97 (-38.22%)
Mutual labels:  gan, generative-adversarial-network, gans
Ranksrgan
ICCV 2019 (oral) RankSRGAN: Generative Adversarial Networks with Ranker for Image Super-Resolution. PyTorch implementation
Stars: ✭ 213 (+35.67%)
Mutual labels:  gan, generative-adversarial-network, super-resolution
Pytorch Cyclegan And Pix2pix
Image-to-Image Translation in PyTorch
Stars: ✭ 16,477 (+10394.9%)
Mutual labels:  gan, generative-adversarial-network, gans
Fast Srgan
A Fast Deep Learning Model to Upsample Low Resolution Videos to High Resolution at 30fps
Stars: ✭ 417 (+165.61%)
Mutual labels:  generative-adversarial-network, super-resolution, gans

This is a PyTorch Tutorial to Super-Resolution.

This is the fifth in a series of tutorials I'm writing about implementing cool models on your own with the amazing PyTorch library.

Basic knowledge of PyTorch, convolutional neural networks is assumed.

If you're new to PyTorch, first read Deep Learning with PyTorch: A 60 Minute Blitz and Learning PyTorch with Examples.

Questions, suggestions, or corrections can be posted as issues.

I'm using PyTorch 1.4 in Python 3.6.


27 Jan 2020: Code is now available for a PyTorch Tutorial to Machine Translation.


Contents

Objective

Concepts

Overview

Implementation

Training

Inference

Frequently Asked Questions

Objective

To build a model that can realistically increase image resolution.

Super-resolution (SR) models essentially hallucinate new pixels where previously there were none. In this tutorial, we will try to quadruple the dimensions of an image i.e. increase the number of pixels by 16x!

We're going to be implementing Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network. It's not just that the results are very impressive... it's also a great introduction to GANs!

We will train the two models described in the paper — the SRResNet, and the SRGAN which greatly improves upon the former through adversarial training.

Before you proceed, take a look at some examples generated from low-resolution images not seen during training. Enhance!






A video demo for the SRGAN!

Since YouTube's compression is likely reducing the video's quality, you can download the original video file here for best viewing.

Click here to watch

Make sure to watch in 1080p so that the 4x scaling is not downsampled to a lower value.


There are large examples at the end of the tutorial.


Tutorial in Progress

I am still writing this tutorial.

In the meantime, you could take a look at the code – it works!

Model checkpoints are available here.

While the authors of the paper trained their models on a 350k-image subset of the ImageNet data, I simply used about 120k COCO images (train2014 and val2014 folders). They're a lot easier to obtain. If you wish to do the same, you can download them from the links listed in my other tutorial.

Here are the results (with the paper's results in parantheses):

PSNR SSIM PSNR SSIM PSNR SSIM
SRResNet 31.927 (32.05) 0.902 (0.9019) 28.588 (28.49) 0.799 (0.8184) 27.587 (27.58) 0.756 (0.7620)
SRGAN 29.719 (29.40) 0.859 (0.8472) 26.509 (26.02) 0.729 (0.7397) 25.531 (25.16) 0.678 (0.6688)
Set5 Set5 Set14 Set14 BSD100 BSD100

Erm, huge grain of salt. The paper emphasizes repeatedly that PSNR and SSIM aren't really an indication of the quality of super-resolved images. The less realistic and overly smooth SRResNet images score better than those from the SRGAN. This is why the authors of the paper conduct an opinion score test, which is obviously beyond our means here.

Large examples

The images in the following examples (from Cyberpunk 2077) are quite large. If you are viewing this page on a 1080p screen, you would need to click on the image to view it at its actual size to be able to effectively see the 4x super-resolution.

Click on image to view at full size.


Click on image to view at full size.


Click on image to view at full size.


Click on image to view at full size.


Click on image to view at full size.


Click on image to view at full size.


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].