Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fine-tune error #11

Open
bycloudai opened this issue Apr 26, 2020 · 3 comments
Open

fine-tune error #11

bycloudai opened this issue Apr 26, 2020 · 3 comments

Comments

@bycloudai
Copy link

bycloudai commented Apr 26, 2020

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

@tohinz
Copy link
Owner

tohinz commented Apr 28, 2020

Hi, the error is thrown because the input image (opt.input_name) does not exist (see

if not os.path.exists(opt.input_name):
).
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?

@bycloudai
Copy link
Author

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

@tohinz
Copy link
Owner

tohinz commented Apr 30, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants