- PyTorch >= 1.7 (Recommend NOT using torch 1.8!!! It would cause abnormal performance.)
- BasicSR == 1.3.4.9
Install Pytorch first. Then,
pip install -r requirements.txt
python setup.py develop
Otherwise,
-
Refer to
./options/test
for the configuration file of the model to be tested, and prepare the testing data . -
Then run the following codes (taking
SVTSR_X4net_g_latest.pth
as an example):
python svtsr/test.py -opt options/test/SVTSR_SRx4.yml
The testing results will be saved in the ./results
folder.
Note that the tile mode is also provided for limited GPU memory when testing. You can modify the specific settings of the tile mode in your custom testing option by referring to ./options/test/HAT_tile_example.yml
.
- Refer to
./options/train
for the configuration file of the model to train. - Preparation of training data can refer to this page.
- The training command is like
CUDA_VISIBLE_DEVICES=0,1,2,3 python -m torch.distributed.launch --nproc_per_node=4 --master_port=4321 options/train/train_SVTSR_SRx2_from_scratch.yml --launcher pytorch
- Note that the default batch size per gpu is 1, which will cost about 5G memory for each GPU.
The training logs and weights will be saved in the ./experiments
folder.
The inference results on benchmark datasets are available at Google Drive or Baidu Netdisk (access code: a51h).
If you have any question, please email jiabao18437907605@gmail.com