woctezuma/stylegan2-projecting-images

python project_images.py datasets/aligned_images/ results/generated_images_tiled/ --video True --video-mode 2

stone100010 opened this issue · 3 comments

root@25f892c013fc:/stylegan2# python project_images.py datasets/aligned_images/ results/generated_images_tiled/ --video True --video-mode 2
Loading networks from "./stylegan2-ffhq-config-f.pkl"...
Setting up TensorFlow plugin "fused_bias_act.cu": Preprocessing... Loading... Done.
Setting up TensorFlow plugin "upfirdn_2d.cu": Preprocessing... Loading... Done.
Traceback (most recent call last):
File "project_images.py", line 126, in
main()
File "project_images.py", line 110, in main
tiled = args.tiled
TypeError: init() got an unexpected keyword argument 'vgg16_pkl'


The face data file in "datasets / aligned"_ Images / "inside," results / generated_ images_ Tiled / "training export file," stylegan2-ffhq-config-f.pkl "and" vgg16 "_ zhang_ perceptual.pkl "Both files are local, using". / "to call, I am more confused about the cause of the current error, looking forward to your help me, thank you!

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.90. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

To summarize, you run:

!python project_images.py aligned_images/ generated_images_tiled/ \
 --video True --video-mode 2

with my fork, and you encounter this error:

TypeError: init() got an unexpected keyword argument 'vgg16_pkl'

at this line:

https://github.com/woctezuma/stylegan2/blob/99b855b5e2e9c58eb1bcf8d0383e08001610facd/project_images.py#L104-L111

Sorry, I cannot replicate your issue in my minimal working example. Open In Colab

Here is the video of the projection on Youtube. The projected image is shown below:

One of the two results

If you have any inquiry about the Python code, I would suggest asking at rolux/stylegan2encoder, which I mention in the references of the README. I have studied the code there in order to write my fork and my notebooks, so it is a good place.

Today, I have been quick to answer but that is sheer luck. Rolux's repository is more well-known, so, on a usual day, you are more likely to find other people with similar issues regarding project_images.py and its usage.