yjn870 / SRDenseNet-pytorch

PyTorch implementation of Image Super-Resolution Using Dense Skip Connections (ICCV 2017)

Home Page:http://openaccess.thecvf.com/content_ICCV_2017/papers/Tong_Image_Super-Resolution_Using_ICCV_2017_paper.pdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SRDenseNet

This repository is implementation of the "Image Super-Resolution Using Dense Skip Connections".

Requirements

  • PyTorch 1.0.0
  • Numpy 1.15.4
  • Pillow 5.4.1
  • h5py 2.8.0
  • tqdm 4.30.0

Train

The coco2017 50K, Set5 dataset converted to HDF5 can be downloaded from the links below.

Dataset Scale Type Link
coco2017 50K 4 Train Download
Set5 4 Eval Download

Otherwise, you can use prepare.py to create custom dataset.

python train.py --train-file "BLAH_BLAH/coco2017_x4.h5" \
                --eval-file "BLAH_BLAH/Set5_x4.h5" \
                --outputs-dir "BLAH_BLAH/outputs" \
                --scale 4 \  # Only scale factor 4 can be used.
                --lr 1e-4 \
                --batch-size 16 \
                --num-epochs 60 \
                --num-workers 8 \
                --seed 123                

Test

Pre-trained weights can be downloaded from the links below.

Model Scale Link
SRDenseNet_All 4 Download

The results are stored in the same path as the query image.

python test.py --weights-file "BLAH_BLAH/srdensenet_x4.pth" \
               --image-file "data/ppt3.bmp" \
               --scale 4

Results

PSNR was calculated on the Y channel.

Set5

Eval. Mat Scale SRDenseNet_All (Paper) SRDenseNet_All (Ours)
PSNR 4 32.02 31.80
Original BICUBIC x4 SRDenseNet x4 (22.94 dB)
Original BICUBIC x4 SRDenseNet x4 (27.19 dB)

About

PyTorch implementation of Image Super-Resolution Using Dense Skip Connections (ICCV 2017)

http://openaccess.thecvf.com/content_ICCV_2017/papers/Tong_Image_Super-Resolution_Using_ICCV_2017_paper.pdf


Languages

Language:Python 100.0%