About PyTorch 1.4.0
- Now the master branch supports PyTorch 1.4.0 by default.
- Self_ensemble functions are temporarily disabled. If you have to train/evaluate the DRBAESR model, please use legacy branches.
Differences between Torch version
- Codes are much more compact. (Removed all unnecessary parts.)
- Models are smaller. (About half.)
- Slightly better performances.
- Training and evaluation requires less memory.
- Python-based.
- Python 3.6
- PyTorch >= 1.4.0
- numpy
- skimage
- imageio
- matplotlib
- tqdm
- cv2 >= 3.xx (Only if you want to use video input/output)
Clone this repository into any place you want.
git clone https://github.com/sheepc/DRBAESR-PyTorch-master
cd DRBAESR-PyTorch-master
You can test our super-resolution algorithm with your images. Place your images in test
folder. (like test/<your_image>
) We support png and jpeg files.
Run the script in src
folder. Before you run the demo, please uncomment the appropriate line in demo.sh
that you want to execute.
cd src
python main.py
You can find the result images from experiment/test/results
folder.
We used DIV2K dataset to train our model. Please download it from here (7.1GB).
Unpack the tar file to any place you want. Then, change the dir_data
argument in src/option.py
to the place where DIV2K images are located.
We recommend you to pre-process the images before training. This step will decode all png files and save them as binaries. Use --ext sep_reset
argument on your first run. You can skip the decoding part and use saved binaries with --ext sep
argument.
If you have enough RAM (>= 32GB), you can use --ext bin
argument to pack all DIV2K images in one binary file.
You can train DRBAESR by yourself. All scripts are provided in the src/demo.sh
.
cd src # You are now in */DRBAESR-PyTorch-master/src
sh demo.sh