资源算法fast-neural-style-super-resolution

fast-neural-style-super-resolution

2020-02-21 | |  36 |   0 |   0

fast-neural-style-super-resolution

implement fast-neural-style-super-resolution by pytorch

In this repository we only provide the source code.

Setup

All code is implemented in PyTorch.

See more details in PyTorch official website.

Training a new model

Use neural_style_vx_x.py to train a new model. Use train key word to set the script in train mode.

Model options for training:

  • --epoch: How many epoch would you like to do. The default is 2.

  • --save-model-dir: The directory that the model will be saved.

  • --cuda: Set 1 to use GPU

  • --arch: The architecture of the transform net. It isn't implemented yet.

  • --batch-size: Default is 4

  • --dataset: The dataset you used to train the model. The floder must contain another folder which contain all images.

  • --upsample: The scale of the edge.

  • --image-size: All images will be resize in the image_size

  • --seed: Random seed for training

  • --content-weight: Weight for content-loss, default is 1.0

  • --pix_weight: Weight for pixel-loss, default is 1.0

  • --lr: Learning rate. Default is 0.001

  • --log-interval: Number of images after which the training loss is logged, default is 500

  • srcnn: The architecture of the transform net. set 1 to use srcnn. It isn't implemented yet.

Use eval to super resolution a image.

Modle options for super resolution

  • --content-image: The directory of the LR image.

  • --content-scale: Factor for scaling down the content image.

  • --output-image: Path for saving output image.

  • --model: Saved model to be used for super resolution.

  • --cuda: Set it to 1 for running on GPU, 0 for CPU


上一篇:Fast-Neural-Style-Transfer-Pytorch

下一篇:Neural_Fast_Style_Transfer_with_Tensorflow

用户评价
全部评价

热门资源

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