genforce / interfacegan

[CVPR 2020] Interpreting the Latent Space of GANs for Semantic Face Editing
https://genforce.github.io/interfacegan/
MIT License
1.51k stars 281 forks source link

Requirments.txt and pre-trained models #4

Closed gogoAiEnity closed 5 years ago

gogoAiEnity commented 5 years ago

Great contribution and git my friends, thanks so much for posting this open to the community to use.

Would like to ask several questions:

1) Any way you can provide a requirements.txt file in order for those who don't have the libraries to easily use your git?

2) Can you link to the appropriate pre-trained models and where to download them? I have tried using the PGGAN from the github and yet the edit.py isn't working.

Thanks again!

ShenYujun commented 5 years ago

We use python 3.7 with requirements pytorch-1.1.0 for the main project, tensorflow-1.12.2 for converting the official tensorflow models to pytorvch version, and sklearn-0.21.2 for SVM training. Please see the header of README. You may also need to install tqdm package for showing progress bar.

PGGAN model and StyleGAN model can be found on their official repos. Please download them and put them under models/pretrain folder.

What error do you run into when you say "edit.py isn't working"?

gogoAiEnity commented 5 years ago

Thanks for that, I was just saying a requirements.txt would make it easier for people to use on demand and might look friendlier to those downloading.

The edit.py isn't finding the stylegan pretrained model.. which is why I was asking about the pretrained model links incase I was using the wrong one.

ModuleNotFoundError: No module named 'requests'

This is strange because it works with PGGAN pre trained model but not the StyleGAN pretrained model I am using. Hence why I think it's the pretrained model.

SOLVED pip install requests in order to use the StyleGan pretrained. I also took the cache out of the name on the styleGan pre trained model file.

Sorry for the confusion, again great work!