limbee / NTIRE2017

Torch implementation of "Enhanced Deep Residual Networks for Single Image Super-Resolution"
652 stars 146 forks source link

Issues when training with my own image #26

Closed feiyun1265 closed 5 years ago

feiyun1265 commented 6 years ago

Hi, @LimBee , Thank you for sharing your work. I have a problem need you help, thank you! I use part images of DIV2K dataset. In every folders of DIV2K dataset, i choose 30 images, and the number is 0001-0030. I occur a error when training with these choose images, error information as follows: loading model and criterion...
Creating model from file: models/baseline.lua
Creating data loader... loading data... Initializing data loader for train set...
Initializing data loader for val set... Train start [Iter: 0.1k / lr: 1.00e-4] Time: 98.73 (Data: 93.01) Err: 13.301673
[Iter: 0.2k / lr: 1.00e-4] Time: 96.38 (Data: 91.71) Err: 7.238939
[Iter: 0.3k / lr: 1.00e-4] Time: 96.18 (Data: 91.42) Err: 6.127012
[Iter: 0.4k / lr: 1.00e-4] Time: 100.27 (Data: 95.47) Err: 5.501482
[Iter: 0.5k / lr: 1.00e-4] Time: 95.15 (Data: 90.37) Err: 5.155260
[Iter: 0.6k / lr: 1.00e-4] Time: 97.84 (Data: 93.15) Err: 5.166865
[Iter: 0.7k / lr: 1.00e-4] Time: 97.32 (Data: 92.40) Err: 5.002103
[Iter: 0.8k / lr: 1.00e-4] Time: 98.88 (Data: 94.14) Err: 4.949536
[Iter: 0.9k / lr: 1.00e-4] Time: 98.07 (Data: 93.16) Err: 4.653362
[Iter: 1.0k / lr: 1.00e-4] Time: 98.70 (Data: 93.79) Err: 4.809450
/home/halo_op/torch/install/bin/luajit: .../halo_op/torch/install/share/lua/5.1/threads/threads.lua:183: [thread 1 callback] /home/halo_op/torch/install/share/lua/5.1/image/init.lua:367: /data/csfu/dataset/DIV2K_part/DIV2K/DIV2K_train_LR_bicubic/X2/0801x2.png: No such file or directory stack traceback: [C]: in function 'error' /home/halo_op/torch/install/share/lua/5.1/image/init.lua:367: in function 'load' ./data/div2k.lua:122: in function 'get'

ps: I use the command begin training as follows: th main.lua -datadir /data/dataset/DIV2K_part -nTrain_DIV2K 30 -datatype png

Looking forward to your reply, thank you!

limbee commented 6 years ago

Hi. The error occurs because it performs validation using 801 ~ 810 images (and your DIV2K_part directory doesn't have it). Maybe you can address this issue by setting another validation set, using the following training option: th main.lua [other options] -valOffset 20 Then it will use 021~030 images for validation. Alternatively, if you want to use 30 images for training, you can add HR and LR 031 ~ 040 images in your DIV2K_part directory and use the options: th main.lua [other options] -valOffset 30

feiyun1265 commented 6 years ago

I see. Thanks for your answer.@LimBee