PTI icon indicating copy to clipboard operation
PTI copied to clipboard

Custom Images - Run on full images

Open tanisha605 opened this issue 1 year ago • 3 comments

When trying to run model on a full image, it gives only the face part. How can I run the model for full images

tanisha605 avatar Jul 04 '23 04:07 tanisha605

Hi @tanisha605, You will have to use a specific GAN for this action. For example StyleGAN-XL or StyleGAN-Human. The facial pretrained GAN assumes the facial image is aligned and only looks at the face.

Of course you could always incorporate the edited facial image to the original image as they do in STIT

danielroich avatar Jul 04 '23 14:07 danielroich

@danielroich Can you give some code example how to change the GAN model?

Or just replace this in https://github.com/danielroich/PTI/blob/main/notebooks/inference_playground.ipynb

image

631068264 avatar Jul 10 '23 07:07 631068264

It is more complicated. "Full" (human body) image required usage of StyleGAN_Human model what has proportion 2:1 instead 1:1 of face FFHQ model. Moreover StyleGAN_Human has num_ws=16 instead FFHQ num_ws=18. Sadly modification direction (age, smile, rotation) also has dimension of 18. Summary: this (original) PTI project do not support full body human image inversion and modification. For inversion use PTI fork from StyleGAN_Human project. For modification... i am do not know. I am want advice myself.

Vadim2S avatar Jul 19 '23 15:07 Vadim2S