-
Notifications
You must be signed in to change notification settings - Fork 270
Inspirational generation #121
Comments
Hi, I just solved this issue by amending this line |
Hi @Molugan , one more question about the functionality of inspirational generation.
and two pt files it would be great if you could share more detailed information on this workflow, namely how to interpret the result derived using this function? |
Hello, Sorry for the delay I do not spend enough time on this repo ! Can you make a PR with your changes ? If not I can manage to push one soon :) About the workflow. The inspiration pipeline performs a gradient descent (or a non-gradient optimization if you use the nevergrad methods) from a random latent vector and will try to minimize the following loss: Distance(image target, image generated) is computed using the image features provided by a simple vgg network trained on image net while the "Realism penalty" is the score provided by the discriminator D trained with the generator. More details are available here : https://arxiv.org/pdf/1906.11661.pdf . The inspiration pipeline can generate several images and the "Barycenter" option here will give you the mean distance between the "mean" results of the pipelines (ie the generated vectors are averaged and a new image is produced from it) and each of the vectors obtained by gradient descent. In order to get nice looking results, I'd advise to use the nevergrad optimizers they work pretty well (LBFGS typically). |
Hi @Molugan , thank you for this great repo!
I have trained the stylegan using my own dataset and tried to do the inspirational generation following your instruction. I have conducted
python save_feature_extractor.py vgg19 feature_extractor_345 --layers 3 4 5
And then run
python eval.py inspirational_generation -n stylegan_outdoor -m StyleGAN --input_image fake_data_outdoor/gen_0.jpg -f feature_extractor_345
Yet I got error as following:
Besides, there might be a typo in the readme file, as the command should be
--input_image $pathTotheInputImage
instead of
--inputImage $pathTotheInputImage
Any insights on how to solve the RuntimeError issue? Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: