omertov / encoder4editing

Official implementation of "Designing an Encoder for StyleGAN Image Manipulation" (SIGGRAPH 2021) https://arxiv.org/abs/2102.02766
MIT License
945 stars 154 forks source link

No such file or directory: 'pretrained_models/model_ir_se50.pth' #5

Closed ghost closed 3 years ago

ghost commented 3 years ago

When I run train.py, it will prompt: No such file or directory: 'pretrained_models/model_ir_se50.pth', Where can I find the ‘’model_ir_se50.pth‘’? If you have time, can you help me solve this problem, thank you very much! image

yuval-alaluf commented 3 years ago

Hi @azyp19970815 , you can find the model file in the README: https://github.com/omertov/encoder4editing#pretrained-models

ghost commented 3 years ago

嗨@ azyp19970815,您可以在自述文件中找到模型文件:https : //github.com/omertov/encoder4editing#pretrained-models

Thank you very much, but I encountered a new problem. When I set ‘’train_source_root‘’, it shows is not a valid directory. 屏幕截图 2021-03-04 192909

yuval-alaluf commented 3 years ago

Notice that your error occurs in line 227 when you try to define the test data. However, your test data (celeba_test) is empty and therefore you are obtaining the error. You should fill in this value with a valid path.

omertov commented 3 years ago

Hi @azyp19970815, As for your problem, @yuval-alaluf is correct.

Also, from looking at your project directory, it seems that the encoder4editing-main/ffhq directory contains the pretrained ffhq encoder. Notice that the dataset paths in the paths_config.py should point to the dataset directory containing the training images.