limbee / NTIRE2017

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

Can I use my dataset for training? #20

Closed happsky closed 5 years ago

happsky commented 6 years ago

Thanks for you work, but for the DIV2K dataset, I just reduce the number of images from 900 to 10 in every folders, there is a problem occur during training time, the error as following:

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 /home/hao/torch/install/bin/luajit: /home/hao/torch/install/share/lua/5.1/threads/threads.lua:183: [thread 1 callback] /home/hao/torch/install/share/lua/5.1/image/init.lua:367: /home/hao/NTIRE2017/dataset/DIV2K/DIV2K_train_LR_bicubic/X2/0403x2.png: No such file or directory stack traceback: [C]: in function 'error' /home/hao/torch/install/share/lua/5.1/image/init.lua:367: in function 'load' ./data/div2k.lua:122: in function 'get' ./dataloader.lua:89: in function <./dataloader.lua:76> [C]: in function 'xpcall' /home/hao/torch/install/share/lua/5.1/threads/threads.lua:234: in function 'callback' /home/hao/torch/install/share/lua/5.1/threads/queue.lua:65: in function </home/hao/torch/install/share/lua/5.1/threads/queue.lua:41> [C]: in function 'pcall' /home/hao/torch/install/share/lua/5.1/threads/queue.lua:40: in function 'dojob' [string " local Queue = require 'threads.queue'..."]:15: in main chunk stack traceback: [C]: in function 'error' /home/hao/torch/install/share/lua/5.1/threads/threads.lua:183: in function 'dojob' ./dataloader.lua:158: in function '(for generator)' ./train.lua:69: in function 'train' main.lua:33: in main chunk [C]: in function 'dofile' .../hao/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00406670

but when I use the entire images, it works. So, the questions are, (i) should I need to use the whole images in DIV2K to train the model and (ii) may I use my dataset for training and testing? Thanks a lot!

sanghyun-son commented 6 years ago

Hello.

To use only 10 DIV2K images for training, please add the -nTrain_DIV2K (number) argument in your script. For example, -nTrain_DIV2K 10 makes the program to use only 10 images from DIV2K dataset. (From 0001.png to 0010.png. If you want to use random 10 images from training set, there is no way till now.)

For the second question, we will add the support for an arbitrary dataset soon.

Thank you!