资源算法pytorch-SRDenseNet

pytorch-SRDenseNet

2020-02-04 | |  39 |   0 |   0

PyTorch SRDenseNet

Implementation of ICCV 2017 Paper: Image Super-Resolution Using Dense Skip Connections in PyTorch

Usage

Training

usage: main.py [-h] [--batchSize BATCHSIZE] [--nEpochs NEPOCHS] [--lr LR]
               [--step STEP] [--cuda] [--resume RESUME]
               [--start-epoch START_EPOCH] [--threads THREADS]
               [--momentum MOMENTUM] [--weight-decay WEIGHT_DECAY]
               [--pretrained PRETRAINED]

PyTorch DenseNet

optional arguments:
  -h, --help            show this help message and exit
  --batchSize BATCHSIZE
                        training batch size
  --nEpochs NEPOCHS     number of epochs to train for
  --lr LR               Learning Rate. Default=1e-4
  --step STEP           Sets the learning rate to the initial LR decayed by
                        momentum every n epochs, Default: n=10
  --cuda                Use cuda?
  --resume RESUME       Path to checkpoint (default: none)
  --start-epoch START_EPOCH
                        Manual epoch number (useful on restarts)
  --threads THREADS     Number of threads for data loader to use, Default: 1
  --momentum MOMENTUM   Momentum, Default: 0.9
  --weight-decay WEIGHT_DECAY, --wd WEIGHT_DECAY
                        weight decay, Default: 1e-4
  --pretrained PRETRAINED
                        path to pretrained model (default: none)

An example of training usage is shown as follows:

python main.py --cuda

Evaluation

usage: eval.py [-h] [--cuda] [--model MODEL] [--dataset DATASET]
               [--scale SCALE]

PyTorch SRDenseNet Eval

optional arguments:
  -h, --help         show this help message and exit
  --cuda             use cuda?
  --model MODEL      model path
  --dataset DATASET  dataset name, Default: Set5
  --scale SCALE      scale factor, Default: 4

An example of evalutation usage is shown as follows:

python eval.py --cuda

Demo

usage: demo.py [-h] [--cuda] [--model MODEL] [--image IMAGE] [--scale SCALE]

PyTorch SRDenseNet Test

optional arguments:
  -h, --help     show this help message and exit
  --cuda         use cuda?
  --model MODEL  model path
  --image IMAGE  image name
  --scale SCALE  scale factor, Default: 4

An example of demo usage is shown as follows:

python demo.py --model model_adam/model_epoch_60.pth --image butterfly_GT --scale 4 --cuda

Prepare Training dataset

  • Please refer Code for Data Generation for creating training files.

  • Data augmentations including flipping, rotation, downsizing are adopted.

Performance

  • So far performance in PSNR is not as good as paper, since we only used 30,000 images for training while the authors used 50,000 images.

DatasetSRDenseNet PaperSRDenseNet PyTorch
Set532.0231.58
Set1428.5028.36
BSD10027.5327.38

Misc.


上一篇:BinaryConverter.Net

下一篇:SRDenseNet-Caffe

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...