All Projects → huangzehao → Torch Srgan

huangzehao / Torch Srgan

Licence: mit
torch implementation of srgan

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to Torch Srgan

Ntire2017
Torch implementation of "Enhanced Deep Residual Networks for Single Image Super-Resolution"
Stars: ✭ 554 (+628.95%)
Mutual labels:  super-resolution, torch
Waifu2x
Image Super-Resolution for Anime-Style Art
Stars: ✭ 22,741 (+29822.37%)
Mutual labels:  super-resolution, torch
Paperspace Python
Paperspace API for python
Stars: ✭ 38 (-50%)
Mutual labels:  torch
Texture nets
Code for "Texture Networks: Feed-forward Synthesis of Textures and Stylized Images" paper.
Stars: ✭ 1,147 (+1409.21%)
Mutual labels:  torch
Neuralamr
Sequence-to-sequence models for AMR parsing and generation
Stars: ✭ 60 (-21.05%)
Mutual labels:  torch
Jsi Gan
Official repository of JSI-GAN (Accepted at AAAI 2020).
Stars: ✭ 42 (-44.74%)
Mutual labels:  super-resolution
Esrgan Tf2
ESRGAN (Enhanced Super-Resolution Generative Adversarial Networks, published in ECCV 2018) implemented in Tensorflow 2.0+. This is an unofficial implementation. With Colab.
Stars: ✭ 61 (-19.74%)
Mutual labels:  super-resolution
Super Resolution
Tensorflow 2.x based implementation of EDSR, WDSR and SRGAN for single image super-resolution
Stars: ✭ 952 (+1152.63%)
Mutual labels:  super-resolution
Ilo
Official implementation: Intermediate Layer Optimization for Inverse Problems using Deep Generative Models
Stars: ✭ 71 (-6.58%)
Mutual labels:  super-resolution
Hzproc
torch data augmentation toolbox (supports affine transform)
Stars: ✭ 56 (-26.32%)
Mutual labels:  torch
Sine
A PyTorch Implementation of "SINE: Scalable Incomplete Network Embedding" (ICDM 2018).
Stars: ✭ 67 (-11.84%)
Mutual labels:  torch
Tensorflow Espcn
TensorFlow implementation of the Efficient Sub-Pixel Convolutional Neural Network
Stars: ✭ 49 (-35.53%)
Mutual labels:  super-resolution
Pytorch Cpp
C++ Implementation of PyTorch Tutorials for Everyone
Stars: ✭ 1,014 (+1234.21%)
Mutual labels:  torch
Neuralhmm
code for unsupervised learning Neural Hidden Markov Models paper
Stars: ✭ 64 (-15.79%)
Mutual labels:  torch
Hyperspectral Image Spatial Super Resolution Via 3d Full Convolutional Neural Network
Hyperspectral Image Spatial Super-Resolution via 3D-Full-Convolutional-Neural-Network
Stars: ✭ 41 (-46.05%)
Mutual labels:  super-resolution
Colorizer
Add colors to black and white images with neural networks (GANs).
Stars: ✭ 69 (-9.21%)
Mutual labels:  torch
Tensorflow Srgan
Tensorflow implementation of "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network" (Ledig et al. 2017)
Stars: ✭ 33 (-56.58%)
Mutual labels:  super-resolution
Srrescgan
Code repo for "Deep Generative Adversarial Residual Convolutional Networks for Real-World Super-Resolution" (CVPRW NTIRE2020).
Stars: ✭ 44 (-42.11%)
Mutual labels:  super-resolution
Videosuperresolution
A collection of state-of-the-art video or single-image super-resolution architectures, reimplemented in tensorflow.
Stars: ✭ 1,118 (+1371.05%)
Mutual labels:  super-resolution
Dfc Vae
Variational Autoencoder trained by Feature Perceputal Loss
Stars: ✭ 74 (-2.63%)
Mutual labels:  torch

torch-srgan

This code only provides the implementation of SRResNet. SRGAN is implemented but the result is not very good.

Torch implementation of Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network that generates high-resolution images from low-resolution input images, for example:

Setup

Prerequisites

  • Linux
  • NVIDIA GPU + CUDA CuDNN
  • Python with Numpy, Scipy, PIL, h5py
  • Torch with nn, image, graphicsmagick, trepl, hdf5, cunn, cutorch

Getting Started

  • Clone this repo:
git clone https://github.com/huangzehao/torch-srgan
cd torch-srgan

Train

python make_data.py --train_dir $(train_data_folder) --val_dir $(val_data_folder) --output_file $(output_hdf5_file)
  • (Optional) Download VGG19 model for perceptual training
cd models
bash VGG19.sh
  • Train the model
mkdir checkpoint val
# SRResNet MSE
CUDA_VISIBLE_DEVICES=0 th train.lua -h5_file $(output_hdf5_file) -num_epoch 50 -loss 'pixel'
# SRResNet MSE VGG22 (need VGG19 model)
CUDA_VISIBLE_DEVICES=0 th train.lua -h5_file $(output_hdf5_file) -num_epoch 50 -loss 'percep' -percep_layer 'conv2_2' -use_tanh
# SRResNet MSE VGG54 (need VGG19 model)
CUDA_VISIBLE_DEVICES=0 th train.lua -h5_file $(output_hdf5_file) -num_epoch 50 -loss 'percep' -percep_layer 'conv5_4' -use_tanh

Test

  • Test trained model
# SRResNet MSE
CUDA_VISIBLE_DEVICES=0 th test.lua -img ./imgs/comic_input.bmp -output ./output.bmp -model ./models/SRResNet_MSE_100.t7
# SRResNet MSE VGG22
CUDA_VISIBLE_DEVICES=0 th test.lua -img ./imgs/comic_input.bmp -output ./output.bmp -model ./models/SRResNet_MSE_VGG22_100.t7 -use_tanh
# SRResNet MSE VGG54
CUDA_VISIBLE_DEVICES=0 th test.lua -img ./imgs/comic_input.bmp -output ./output.bmp -model ./models/SRResNet_MSE_VGG54_100.t7 -use_tanh

Acknowledgments

Code borrows heavily from fast-neural-style and cifar.torch. Thanks for their excellent work!

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].