XingangPan / ShadeGAN

Code for ShadeGAN (NeurIPS2021)
https://arxiv.org/abs/2110.15678
MIT License
146 stars 22 forks source link

gan inversion code release #3

Open HollyDQWang opened 2 years ago

HollyDQWang commented 2 years ago

Will the code for GAN inversion be released?

JC1DA commented 2 years ago

Also interested in the GAN inversion to generate shapes from custom images. @XingangPan is there any ETA? Thanks

XingangPan commented 1 year ago

I have just uploaded the scripts for the GAN inversion part. You may refer to this example: https://github.com/XingangPan/ShadeGAN/blob/main/scripts/inversion.sh. You need to pull the new commit and download the model weights again. To invert your own image, you need to first align it to match the celeba dataset. You can do it either manually or use the celeba align tool at https://github.com/XingangPan/ShadeGAN/blob/main/inversion/align_face_celeba.m. (This requires five landmarks as input, which can be obtained using other landmark detection tools like dlib) For the second way, you also need to add --crop to inversion.py

zhanghongyong123456 commented 1 year ago

I have just uploaded the scripts for the GAN inversion part. You may refer to this example: https://github.com/XingangPan/ShadeGAN/blob/main/scripts/inversion.sh. You need to pull the new commit and download the model weights again. To invert your own image, you need to first align it to match the celeba dataset. You can do it either manually or use the celeba align tool at https://github.com/XingangPan/ShadeGAN/blob/main/inversion/align_face_celeba.m. (This requires five landmarks as input, which can be obtained using other landmark detection tools like dlib) For the second way, you also need to add --crop to inversion.py

I input a portrait, a background image, then how to get the background image illumination information as the basis of portrait re-light