affromero / SMILE

SMILE: Semantically-guided Multi-attribute Image and Layout Editing, ICCV Workshops 2021.
https://affromero.github.io/SMILE/
MIT License
35 stars 1 forks source link

No such file or directory "metric/segmentation_weights.pth' #3

Closed szopeno closed 2 years ago

szopeno commented 2 years ago

File "main.py", line 129, in main(config) File "main.py", line 69, in main Demo(config, data_loader)() File "/home/szopen/Pobrane/SMILE/demo.py", line 59, in init self.init_seg() File "/home/szopen/Pobrane/SMILE/demo.py", line 114, in init_seg map_location=lambda storage, loc: storage) File "/home/szopen/.local/lib/python3.6/site-packages/torch/serialization.py", line 594, in load with _open_file_like(f, 'rb') as opened_file: File "/home/szopen/.local/lib/python3.6/site-packages/torch/serialization.py", line 230, in _open_file_like return _open_file(name_or_buffer, mode) File "/home/szopen/.local/lib/python3.6/site-packages/torch/serialization.py", line 211, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'metrics/segmentation_weights.pth'

Any idea where get the file from, or what may cause this error? I was liberal with requirements, because I couldn't get them to work, so some package versions might be a little different.

affromero commented 2 years ago

Hello, Thank you for bringing this up. I think when I released the code I changed some names and this one is not the same as the rest of the pre-trained models. Can you please try with "face_parsing_bisenet.pth" that you can download from here, and let me know? image

szopeno commented 2 years ago

Thank you! I am leaving now for few days so I can't test everything, but the demo worked - well, misc/utils.py in line 305 complained about missing data/Times-ROman.otf, so I changed that into some other ttf font and all is good.

I tried it also with a custom image (just replacing Figures/teaser_input in command line with my own images) and results were less satisfying :)