sanghyun-son / EDSR-PyTorch

PyTorch version of the paper 'Enhanced Deep Residual Networks for Single Image Super-Resolution' (CVPRW 2017)
MIT License
2.44k stars 673 forks source link

PSNR is nan when test DIV2K data #340

Closed Zency-Sun closed 2 years ago

Zency-Sun commented 2 years ago

I hava prepared the DIV2K dataset in '/home/zency/桌面/dataset',And I have set the parser.add_argument('--dir_data', type=str, default='/home/zency/桌面/dataset', help='dataset directory')

After Then I run the Demo.sh python main.py --data_test DIV2K --data_range 801-900 --scale 4 --pre_train "../models/edsr_baseline_x4-6b446fab.pt" --test_only --self_ensemble The result is : `Making model... Load the model from ../models/edsr_baseline_x4-6b446fab.pt

Evaluation: 0it [00:00, ?it/s] [DIV2K x4] PSNR: nan (Best: nan @epoch 1) Forward: 0.07s

Saving... Total: 0.07s ` What is Wrong with me ? @sanghyun-son

Whitecatwarrior commented 2 years ago

I have the same problem ,did u solve it?

Zency-Sun commented 2 years ago

I have solved this problem for the following reasons.

  1. Place the downloaded (provided by this code base) DIV2K dataset in the "... /dataset" folder. /dataset" folder, then change the default value of --dir_data to ".../dataset". /dataset". For example, if the path of my DIV2K is '/home/zency/desktop/dataset/DIV2K', then the default value of --dir_data is '/home/zency/desktop/dataset'.
  2. The DIV2K dataset given by this codebase is archived in a slightly different way from the official dataset. The DIV2K given by this codebase merges the Train and Val of the official dataset, and the program can run successfully using the dataset given by this codebase My problem has been solved and I will close the issue
Wanghanying commented 3 months ago

@Zency-Sun this link is invalid now, https://cv.snu.ac.kr/research/EDSR/DIV2K.tar, can you please show me what is it look like after decompressing it

Zency-Sun commented 3 months ago

@Zency-Sun this link is invalid now, https://cv.snu.ac.kr/research/EDSR/DIV2K.tar, can you please show me what is it look like after decompressing it

You can find the answer here:https://github.com/XPixelGroup/BasicSR/blob/master/docs/DatasetPreparation.md#DIV2K