nagadomi / waifu2x

Image Super-Resolution for Anime-Style Art
http://waifu2x.udp.jp/
MIT License
27.54k stars 2.71k forks source link

Need Help For Training Model #239

Open Archit01 opened 6 years ago

Archit01 commented 6 years ago

i used this code for scale th train.lua -save_history 1 -model upconv_7 -downsampling_filters "Box,Sinc,Catrom" -style photo -data_dir ./data/photo -model_dir models/test/new_photo_rev2 -test query/machine.png -color rgb -random_unsharp_mask_rate 0.3 -thread 3 -backend cudnn -oracle_rate 0.05

it gave output like different scale2.0x_model.t7 scale2.0x_model.34-4.t7 so which file should i use for noise and upscale in next code scale2.0.t7 or 34-4.t7 according to image 34-4.t7 shows best output th train.lua -save_history 1 -model upconv_7 -downsampling_filters "Box,Sinc,Catrom" -style photo -method noise_scale -noise_level 2 -data_dir ./data/photo -model_dir models/test/new_photo_rev2 -test query/bsd500.jpg -color rgb -random_unsharp_mask_rate 0.5 -thread 3 -backend cudnn -nr_rate 0.6 -resume models/test/new_photo_rev2/scale2.0x_model.t7 -oracle_rate 0.0 -active_cropping_rate 0 -resize_blur_min 1 -resize_blur_max 1

next i want to know that for first code it used train query machine.png what kind of image file should i use a high resoultion one noise free or a small and for noise scale it uses bsd500.jpg what parameters for this image do both the images need to be same

Also the second code gave different .t7 files what file to keep

and what is .json file and paired wise training and how to create and use them

how can i pause the training step and shut down and resume the process

nagadomi commented 6 years ago

In each epoch, the converted image specified by -test is saved to the file like scale2.0_best.34-4.png. The image specified by -test is used to visual testing for each epoch. Typically it is better to use the last model, but if it makes artifacts, use other model of other epochs.

what is .json file

It is used by third party software such as waifu2x-caffe.

how can i pause the training step and shut down and resume the process

See #209

Archit01 commented 6 years ago

Thanks for the help And please tell about the query image like bsd500.jpg what kind of file should be used like the what resolution and all

And about pairwise training and can we combine the results of pairwise and noise scale method

nagadomi commented 6 years ago

please tell about the query image like bsd500.jpg what kind of file should be used like the what resolution and all

It's just for visual testing. If you do not have the image you want to check specifically, specify a randomly selected image in the dataset.

Archit01 commented 6 years ago

Thanks

Archit01 commented 6 years ago

I have a data set of 1000 images but due to limited ram I split the training data set into 500 images And then used this command to convert data for 1st set th convert_data.lua -style photo -max_training_image_size 3000

And then train for scale using

th train.lua -save_history 1 -model upconv_7 -downsampling_filters "Box,Sinc,Catrom" -style photo -model_dir models/test/new_photo_rev2 -test test1.png -color rgb -random_unsharp_mask_rate 0.3 -thread 3 -backend cudnn -oracle_rate 0.05

And for second data set first I convert data using above same command For updating training scale do I have to assign -resume and best .t7 and what learning rate should I specify

nagadomi commented 6 years ago

split training probably will not work. If you do not have enough RAM, specify a small size for -max_training_image_size option. All images are randomly cropped to the specified size.