Skip to content

guiyan2018/Image_Rescaling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1.paper:Enhancing Image Rescaling Using High Frequency Guidance and Attentions in Downscaling and Upscaling Network

2.Dependencies and Installation

2.1. create conda virtual env.

Python 3 (Recommend to use Anaconda)

2.2. install pytorch, reference url: https://pytorch.org.

PyTorch >= 1.0
NVIDIA GPU + CUDA

2.3. install dependent packages.

pip install numpy opencv-python lmdb pyyaml

2.4. install tensorBoard

PyTorch >= 1.1: pip install tb-nightly future
PyTorch == 1.0: pip install tensorboardX

3.Dataset Preparation

Commonly used training and testing datasets can be downloaded here.

url:  https://pan.baidu.com/s/1HlM1Mex-Glgd76ZnB42bFA?pwd=vq97  提取码:vq97

4. Training and testing codes are in 'codes/'.

4.1. Training

First set a config file in options/train/, then run as following:

python train.py -opt options/train/train_DSNetSRNet_x2.yml

4.2. Test

First set a config file in options/test/, then run as following:

python test.py -opt options/test/test_DSNetSRNet_x2.yml

Code Framework

The code framework follows BasicSR. It mainly consists of four parts - Config, Data, Model and Network.

Let us take the train command python train.py -opt options/train/train_DSNetSRNet_x2.yml for example. A sequence of actions will be done after this command.

  • train.py is called.
  • Reads the configuration in options/train/train_DSNetSRNet_x2.yml, including the configurations for data loader, network, loss, training strategies and etc. The config file is processed by options/options.py.
  • Creates the train and validation data loader. The data loader is constructed in data/__init__.py according to different data modes.
  • Creates the model (is constructed in models/__init__.py.
  • Start to train the model. Other actions like logging, saving intermediate models, validation, updating learning rate and etc are also done during the training.

Config

options/ Configure the options for data loader, network structure, model, training strategies and etc.

Data

data/ A data loader to provide data for training, validation and testing.

Model

models/ Construct models for training and testing.

Network

models/modules/ Construct network architectures.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published