tensorflow-vdsr

December 16, 2021 ยท View on GitHub

Overview

This is a Tensorflow implementation for "Accurate Image Super-Resolution Using Very Deep Convolutional Networks", CVPR 16'.

  • The author's project page
  • To download the required data for training/testing, please refer to the README.md at data directory.

Files

  • VDSR.py : main training file.
  • MODEL.py : model definition.
  • MODEL_FACTORIZED.py : model definition for Factorized CNN. (not recommended to use. for record purpose only)
  • PSNR.py : define how to calculate PSNR in python
  • TEST.py : test all the saved checkpoints
  • PLOT.py : plot the test result from TEST.py

How To Use

Training

# if start from scratch
python VDSR.py
# if start with a checkpoint
python VDSR.py --model_path ./checkpoints/CHECKPOINT_NAME.ckpt

Testing

# this will test all the checkpoint in ./checkpoint directory.
# and save the results in ./psnr directory
python TEST.py

Plot Result

# plot the psnr result stored in ./psnr directory
python PLOT.py

Result

The checkpoint is file is here

Results on Set 5
ScaleBicubicVDSRtf_VDSR
2x - PSNR/SSIM33.66/0.992937.53/0.958737.24
3x - PSNR/SSIM30.39/0.868233.66/0.921333.37
4x - PSNR/SSIM28.42/0.810431.35/0.883831.09
Results on Set 14
ScaleBicubicVDSRtf_VDSR
2x - PSNR/SSIM30.24/0.868833.03/0.912432.80
3x - PSNR/SSIM27.55/0.774229.77/0.831429.67
4x - PSNR/SSIM26.00/0.702728.01/0.767427.87

Remarks

  • The training is further accelerated with asynchronous data fetch.
  • Tried to accelerate the network with the idea from Factorized CNN. It is possible to implement with tf.nn.depthwise_conv2d and 1x1 convolution, but not so effective.
  • Thanks to @harungunaydin 's comment, AdamOptimizer gives a much more stable training. There's an option added.