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

not an issue - question on project_images #7

Open
johndpope opened this issue Dec 28, 2020 · 2 comments
Open

not an issue - question on project_images #7

johndpope opened this issue Dec 28, 2020 · 2 comments

Comments

@johndpope
Copy link

johndpope commented Dec 28, 2020

Hi Justin,

maybe you can help me - my goal is to take a picture of myself and toonify myself.

I've compressed it into 3 steps

  1. align the imges
  2. project images
  3. blend networks

this line - step 2.

python project_images.py --num-steps 500 aligned generated
which is going to go through the aligned photos / after being processed from raw has some training component. I'm not clear on why or what this is doing only that the generated folder is showing a bunch of blurred images.

WHY do we need to
Adding the images to tfrecords ...????
I want to take any image and find the associated npy.... do they all need to be added to tfrecords? and what does this actually do.

step 3 - just takes an array of npy file (the found vector of phot from latent space) and does the final step to make toon image. latent_dir.glob("*.npy")

https://gist.github.com/johndpope/55d4b8c33c3cac2c794373c4af7202ad

is there a faster / better way to just get the npy from an existing image?

@johndpope
Copy link
Author

it seems like the logic for step2 could be collapsed around spitting out the npz/npy file
https://github.com/johndpope/stylegan2-ada/tree/digressions

python projector.py --outdir=out --target=targetimg.png \
    --network=https://nvlabs-fi-cdn.nvidia.com/stylegan2-ada/pretrained/ffhq.pkl

this creates 3 files in the out directory. targetimg.png / found latent image and the associated latent vector npy file.

@johndpope
Copy link
Author

johndpope commented Dec 29, 2020

this projector code is old one from 2019
https://github.com/justinpinkney/stylegan2/blob/master/projector.py

you should abandon stylegan2 and use the stylegan2-ada repo.
I got it working with tensorflow2
https://github.com/johndpope/stylegan2-ada/blob/digressions/projector.py

UPDATE -
I tested the updated code / it also does 1000 steps / ticks to find the correspnding npy file.
When the toonify openapi do their processing - presumably they're not doing as many samples?

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

No branches or pull requests

1 participant