Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would it be possible to render a video from projected W? #23

Open
georgeguida opened this issue Aug 23, 2022 · 2 comments
Open

Would it be possible to render a video from projected W? #23

georgeguida opened this issue Aug 23, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@georgeguida
Copy link

I would like to generate a video from a projected w vector and specify the number of frames between this interpolation. The current image generator permits the option to ==projected-w, however, this does not seem possible for video. Is this currently possible?

Describe the solution you'd like
Project images as npz file (vs npy) -> combine multiple vectors into a single npz file -> generate interpolation video between projected images.

Describe alternatives you've considered
Resembles this generator - https://github.com/dvschultz/stylegan2-ada-pytorch/blob/main/generate.py, or the colab : https://colab.research.google.com/github/dvschultz/stylegan2-ada-pytorch/blob/main/SG2_ADA_PyTorch.ipynb#scrollTo=4cgezYN8Dsyh

@ !python generate.py --process=interpolation --interpolation=linear --easing=easeInOutQuad --space=w --network=/content/ladiesblack.pkl --outdir=/content/combined-proj/ --projected-w=/content/npz/combined.npz --frames=120

Amazing set of features! Thank you @PDillis

@PDillis PDillis added the enhancement New feature or request label Aug 23, 2022
@PDillis
Copy link
Owner

PDillis commented Aug 23, 2022

It can be done, but have you also tried using that file in this repository directly (changing its name and just removing everything else)? If it doesn't run, what errors do you get? Will look into it still!

@georgeguida
Copy link
Author

Tested it out, however stylegan2 ada pytorch and stylegan 3 .pkl files are different

Input :
!python generate.py --process=interpolation --interpolation=linear
--easing=easeInOutQuad --space=w
--network=/notebooks/training-runs/00007-stylegan3-t-dataset_dalle-gpus2-batch32-gamma8/network-snapshot-000600.pkl
--outdir=/notebooks/out_generator
--projected-w=/notebooks/projector/00000-projection-w-wavgstart-sgan2/projected_wavg_final.npy
--frames=200

Error:
/notebooks/stylegan3-fun/generate.py:59: SyntaxWarning: "is not" with a literal. Did you mean "!="?
elif(len(seeds) is not 3):
Loading networks from "/notebooks/training-runs/00007-stylegan3-t-dataset_dalle-gpus2-batch32-gamma8/network-snapshot-000600.pkl"...
Traceback (most recent call last):
File "/notebooks/stylegan3-fun/generate.py", line 492, in
generate_images() # pylint: disable=no-value-for-parameter
File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/notebooks/stylegan3-fun/generate.py", line 408, in generate_images
G = legacy.load_network_pkl(f, custom=custom, **G_kwargs)['G_ema'].to(device) # type: ignore
TypeError: load_network_pkl() got an unexpected keyword argument 'custom'

Thanks for your response 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants