ConSinGAN
ConSinGAN copied to clipboard
fine-tune error
Hi, I am trying to use the fine-tune function but this error always comes up
cmd input:
G:\projects\ConSinGAN-test-p\ConSinGAN-master\ConSinGAN-master>py main_train.py --gpu 0 --train_mode harmonization --input_name Images/Harmonization/23.jpg --naive_img Images/Harmonization/23.png --fine_tune --model_dir TrainedModels/23/2020_04_23_15_58_53_harmonization_train_depth_3_lr_scale_0.1_BN_act_lrelu_0.3
But this error pops up:
Image does not exist: G:/projects/ConSinGAN
Please specify a valid image.
The error also skipped the -test-p
of ConSinGAN-test-p
and outputting only G:/projects/ConSinGAN
I am using Windows and you told me last time to change main_train.py
line 107 to
copyfile(py_file, osp.join(dir2save, py_file.split("\\")[-1]))
fyi.
Thank you
Hi, the error is thrown because the input image (opt.input_name) does not exist (see https://github.com/tohinz/ConSinGAN/blob/52193b494c2183784cfbf1227b2a44cf4b78552e/main_train.py#L61). It seems something with your --input_name does not work as it also does not print you input_name argument. Can you try putting the image into the same directory as main_train.py to make sure it's not something due to the different path formatting (Windows vs Ubuntu) again? Also, is it correct that --input_name is a jpg but the naive image is a png?
The same error is still occurring even if I made the images (naive & input_name) to the same directory as main_train.py And yes the input_name is a jpg and naive is a png
Hm, maybe you can just hardcode the paths to the two images in the code directly to get it to work for now? It might also work if you use the absolute path to the images instead of the relative ones. It's hard to solve this from here but I believe it has something to do with Windows and how it handles paths since it works fine with Ubuntu.