Skip to content

csu-eis/etds

Repository files navigation

Get Started

Data preparation

Like BasicSR, we put the training and validation data under the datasets folder. You can download the data in the way provided by BasicSR, but please note that our data path is slightly different from BasicSR, please modify the data path in the configuration file (all configuration files are under the configs folder).

Also, under the scripts/datasets/DIV2K folder, we provide the script to download the DIV2K dataset. You can download the DIV2K dataset as follows:

bash scripts/datasets/DIV2K/build.sh

Finally, the structure of the dataset is as follows:

datasets/
├── DIV2K
    ├── train
        ├── HR
            ├── original
                ├── 0001.png
                ├── 0002.png
                ├── ...
                ├── 0800.png
            ├── subs
                ├── 0001_s001.png
                ├── 0001_s002.png
                ├── ...
                ├── 0800_s040.png
        ├── LR
            ├── bicubic
                ├── X2
                    ├── original
                        ├── 0001x2.png
                        ├── 0002x2.png
                        ├── ...
                        ├── 0800x2.png
                    ├── subs
                        ├── 0001_s001.png
                        ├── 0001_s002.png
                        ├── ...
                        ├── 0800_s040.png
                ├── X3...
                ├── X4...
    ├── valid...
├── Set5
    ├── GTmode12
        ├── baby.png
        ├── bird.png
        ├── butterfly.png
        ├── head.png
        ├── woman.png
    ├── original...
    ├── LRbicx2...
    ├── LRbicx3...
    ├── LRbicx4...

Training

train.py is the entry file for the training phase. You can find the description of train.py in the BasicSR repository. The training command is as follows:

python train.py -opt {configs-path}.yml

where {configs-path} represents the path to the configuration file. All configuration files are under the configs/train folder. The log, checkpoint and other files generated during training are saved in the experiments/{name} folder, where {name} refers to the name option in the configuration file.

Convert

ETDS during training is a dual stream network, and it can be converted into a plain model through converter.py, as follows:

python converter.py --input {input-model-path}.pth --output {output-model-path}.pth

where {input-model-path}.pth represents the path to the pre-trained model, and {output-model-path}.pth indicates where the converted model will be saved.

Also, the code of converting ECBSR and ABPN to plain models is in converter_ecbsr_et and converter_abpn_et.

Our pretrained models after conversion are in the experiments/pretrained_models folder.

Validition

The validition command is as follows:

python test.py -opt {configs-path}.yml

where {configs-path} represents the path to the configuration file. All configuration files are under the configs/test folder. The verification results are saved in the results folder.

Results

Mobile Image Super-Resolution

ETDS, ECBSR and ABPN with and without ET

✨Core File List

This repository is based on BasicSR's code framework and has undergone secondary development. Here we point out the core files of this repository (Descending order of importance):

About

etds超分

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages