Twizwei / in-n-out

Other
3 stars 2 forks source link

Single image inversion #4

Open Dong142857 opened 1 month ago

Dong142857 commented 1 month ago

Can you provide a single image inversion guidance? I use my own dataset to train but this training code may need a latent.pt as initialization. How to get the lantent code?

boringwar commented 1 month ago

It seems that the indomain inversion is kept secret by the author.

I used a third-party w+ invesion, and the dimension is 18 instead of 14.

Dong142857 commented 1 month ago

The W+ dimension in EG3D is exactly 14, not 18, because the feature map upsamples to 256x256 instead of 1024x1024. To obtain the latent code, i think we can try and modify this code, or use the pretrained EG3D inversion encoder such as GOAE and TriplaneNet. I think the author has opened lots of their codes, but there is too many codes to read without guidance.

Twizwei commented 1 month ago

Yep I can provide a script for single image inversion this month. Sorry a little bit occupied by other stuff.

Twizwei commented 1 month ago

The W+ dimension in EG3D is exactly 14, not 18, because the feature map upsamples to 256x256 instead of 1024x1024. To obtain the latent code, i think we can try and modify this code, or use the pretrained EG3D inversion encoder such as GOAE and TriplaneNet. I think the author has opened lots of their codes, but there is too many codes to read without guidance.

Yes you are right. For EG3D its latent space is 14-dim, instead of 18-dim like 2D StyleGANs. I'll try to find a slot recently to provide you with a script.