All Projects → idearibosome → tf-bsrn-sr

idearibosome / tf-bsrn-sr

Licence: Apache-2.0 license
Official implementation of block state-based recursive network (BSRN) for super-resolution in TensorFlow

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to tf-bsrn-sr

pytorch-gans
PyTorch implementation of GANs (Generative Adversarial Networks). DCGAN, Pix2Pix, CycleGAN, SRGAN
Stars: ✭ 21 (-25%)
Mutual labels:  super-resolution
DAN
This is an official implementation of Unfolding the Alternating Optimization for Blind Super Resolution
Stars: ✭ 196 (+600%)
Mutual labels:  super-resolution
libsrcnn
Super-Resolution imaging with Convolutional Neural Network library for G++, Non-OpenCV model.
Stars: ✭ 14 (-50%)
Mutual labels:  super-resolution
WaifuLite
Super Resolution for Anime image, lightweight implementation
Stars: ✭ 20 (-28.57%)
Mutual labels:  super-resolution
tf-perceptual-eusr
A TensorFlow-based image super-resolution model considering both quantitative and perceptual quality
Stars: ✭ 44 (+57.14%)
Mutual labels:  super-resolution
picasso
A collection of tools for painting super-resolution images
Stars: ✭ 77 (+175%)
Mutual labels:  super-resolution
MSG-Net
Depth Map Super-Resolution by Deep Multi-Scale Guidance, ECCV 2016
Stars: ✭ 76 (+171.43%)
Mutual labels:  super-resolution
TC-YoukuVSRE
天池2019阿里巴巴优酷视频增强和超分辨率挑战赛自用代码,EDVR、WDSR、ESRGAN三个模型。
Stars: ✭ 41 (+46.43%)
Mutual labels:  super-resolution
LFSSR-SAS-PyTorch
Repository for "Light Field Spatial Super-resolution Using Deep Efficient Spatial-Angular Separable Convolution" , TIP 2018
Stars: ✭ 22 (-21.43%)
Mutual labels:  super-resolution
sparse-deconv-py
Official Python implementation of the 'Sparse deconvolution'-v0.3.0
Stars: ✭ 18 (-35.71%)
Mutual labels:  super-resolution
AI-Lossless-Zoomer
AI无损放大工具
Stars: ✭ 940 (+3257.14%)
Mutual labels:  super-resolution
FB
Multi-frame super-resolution via sub-pixel.
Stars: ✭ 55 (+96.43%)
Mutual labels:  super-resolution
EGVSR
Efficient & Generic Video Super-Resolution
Stars: ✭ 774 (+2664.29%)
Mutual labels:  super-resolution
tensorflow-bicubic-downsample
tf.image.resize_images has aliasing when downsampling and does not have gradients for bicubic mode. This implementation fixes those problems.
Stars: ✭ 23 (-17.86%)
Mutual labels:  super-resolution
FISR
Official repository of FISR (AAAI 2020).
Stars: ✭ 72 (+157.14%)
Mutual labels:  super-resolution
MLSR
Source code for ECCV2020 "Fast Adaptation to Super-Resolution Networks via Meta-Learning"
Stars: ✭ 59 (+110.71%)
Mutual labels:  super-resolution
ImSwitch
ImSwitch is a software solution in Python that aims at generalizing microscope control by providing a solution for flexible control of multiple microscope modalities.
Stars: ✭ 43 (+53.57%)
Mutual labels:  super-resolution
SR Framework
A generic framework which implements some famouts super-resolution models
Stars: ✭ 54 (+92.86%)
Mutual labels:  super-resolution
EmiyaEngine
只要蘊藏著想成為真物的意志,偽物就比真物還要來得真實。
Stars: ✭ 27 (-3.57%)
Mutual labels:  super-resolution
NRSR
Neighborhood Regression for Edge-Preserving Image Super-Resolution (ICASSP 2015)
Stars: ✭ 13 (-53.57%)
Mutual labels:  super-resolution

Lightweight and Efficient Image Super-Resolution with Block State-based Recursive Network (BSRN)

Urban100 - 067

This repository contains the official TensorFlow-based implementation of the BSRN model, which is explained in the following paper.

  • J.-H. Choi, J.-H. Kim, M. Cheon, J.-S. Lee: Lightweight and efficient image super-resolution with block state-based recursive network. arXiv:1811.12546 (2018) [arXiv]
@article{choi2018lightweight,
  title={Lightweight and efficient image super-resolution with block state-based recursive network},
  author={Choi, Jun-Ho and Kim, Jun-Hyuk and Cheon, Manri and Lee, Jong-Seok},
  journal={arXiv preprint arXiv:1811.12546},
  year={2018}
}

Dependencies

  • Python 3.6+
  • TensorFlow 1.8+

Testing the pre-trained model

We provide the pre-trained multi-scale BSRN model in the checkpoints/ directory. To test with it, use the following code:

python test_bsrn.py
  --model=bsrn
  --bsrn_model_scales=2,3,4
  --restore_path=checkpoints/bsrn_c64_s64_x234.ckpt
  --input_path=<path of input images>
  --scale=<scaling factor [2|3|4]>

The super-resolved images will be saved at SR/ folder. You can change the destination folder with --output_path=<path of output images>.

We also provide the result images obtained on four benchmark datasets (i.e., Set5, Set14, BSD100, and Urban100). [Download]

Training

The original BSRN model is trained with the DIV2K dataset. You can download the images from its official website. After downloading and extracting the images, the directory structure may be looked like this:

/tmp/dataset/DIV2K/
|- DIV2K_train_LR_bicubic/
   |- X2/
      |- 0001x2.png
      |- 0002x2.png
      |- ...
   |- X3/
      |- 0001x3.png
      |- 0002x3.png
      |- ...
   |- X4/
      |- 0001x4.png
      |- 0002x4.png
      |- ...
|- DIV2K_train_HR/
   |- 0001.png
   |- 0002.png
   |- ...

Now you can train the model with the following command:

python train.py
  --dataloader=div2k_loader
  --data_input_path=/tmp/dataset/DIV2K/DIV2K_train_LR_bicubic
  --data_truth_path=/tmp/dataset/DIV2K/DIV2K_train_HR
  --train_path=/tmp/bsrn
  --model=bsrn
  --scales=2,3,4
  --bsrn_clip_norm=5

If your computer has sufficient amount of RAMs (e.g., more than 16GB), specify --data_cached to boost the training speed.

You can also change other parameters, e.g., batch size, the number of convolutional channels, and learning rate. Please run python train.py --dataloader=div2k_loader --model=bsrn --helpfull for more information.

During the training, you can view the current training status via TensorBoard, e.g.,

tensorboard --logdir=/tmp/bsrn

You can also validate the trained model by validate_bsrn.py. For example, if you want to evaluate the model saved at step 50000 with the BSD100 dataset, run

python validate_bsrn.py
  --dataloader=basic_loader
  --data_input_path=/tmp/dataset/BSD100/LR
  --data_truth_path=/tmp/dataset/BSD100/HR
  --model=bsrn
  --scales=2,3,4
  --restore_path=/tmp/bsrn/model.ckpt-50000
  --save_path=/tmp/bsrn/results

It will print out the PSNR and RMSE values of the upscaled images with saving them on the path that you specified in --save_path. Please run python validate_bsrn.py --model=bsrn --helpfull for more information.

※ Note that the calculated PSNR and RMSE values may differ from the the values in our paper, due to the different calculation methods. The code in this repository calculates PSNR and RMSE values from R, G, and B channels, while the measures reported in the paper were obtained from Y channel of the YCbCr color space.

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