yuval-alaluf/stylegan3-editing

How to change rotation and translation parameters for spatial editing?

FeiiYin opened this issue ยท 4 comments

Thanks for your excellent work!
As mentioned in Eq. (1) y=G(w; (r, tx, ty)) in the paper. How do I change the parameters r, tx and ty in code?

Hi @FeiiYin
This depends on what you're trying to solve.
If you want to simply generate random images with various transforms, the original SG3 repo should have what you're looking for: https://github.com/NVlabs/stylegan3#getting-started
If you would like to edit random images at various random transforms, you could take a look at our editing script: https://github.com/yuval-alaluf/stylegan3-editing#editing-synthetic-images-with-interfacegan
Are you looking for more explict control on the parameters that are used?

Yes, I am looking for explicit control like Fig. 2 in the paper.
In my understanding, the method you mentioned is to update the w code of StyleGAN, which is hard to realize the explicit spatial control.
After re-reading your paper, now I noticed in the caption of Fig. 2 that you apply the explicit transformation on the Fourier features, and I think I can achieve my goal with a similar procedure.
Thanks again for your in time reply!

I find you realized the function in the identity_transform.
Thanks!

I noticed in the caption of Fig. 2 that you apply the explicit transformation on the Fourier features, and I think I can achieve my goal with a similar procedure.

Yea thats the idea. Modifying the Fourier features to get control over the position and rotation of the generated image

I find you realized the function in the identity_transform.

Correct. This identity control basically means to not alter the fourier features, meaning the image will be aligned.

If you have any other questions feel free to reopen the issue :)