oneThousand1000 / HairMapper

(CVPR 2022) HairMapper: Removing Hair from Portraits Using GANs.
279 stars 39 forks source link

Very Important Issue - Leftover hair after using align image code. How can i train even if i imcrease more croppin area till chest level so that neck, cloth, shoulder get good Reconstruction? #19

Closed Vikram91221 closed 6 months ago

Vikram91221 commented 1 year ago

How can i train so that the shoulder and neck part get good Reconstruction after using image aligning code. Please find the reference images of ORIGINAL and GENERATED. Btw, Fantastic work but needed to train by increasing the ratio value more than 1 so that it crops more but results are weird. How to train more than 1 ratio value? Even if I try going more than 0.5 might give an error because the box is going too much of boundaries.

In short, how to train to remove the more hair and reconstruct if i increase the boundaries more?

The model itself WASN'T trained much with images coming till shoulders? Is that the issue? If yes, how can I train the images till CHEST level so that it would have good Reconstruction?

Please, let me know. thumb_09c8c98KA002_1_01_res thumb_rangriti_valleyo3611ss20blu_1_01_res thumb_09c8c98KA002_1 thumb_rangriti_valleyo3611ss20blu_1

oneThousand1000 commented 1 year ago

Hi Vikram91221,

It can indeed be a challenging problem to apply the manipulation results to full image, especially with StyleGAN-based methods.

I would highly recommend that you read the paper https://www.mmlab-ntu.com/project/styleganex and try their open-source code. Styleganex is an excellent work that can be extended into larger image areas, and can accommodate variable resolutions, making them more robust in characterizing unaligned faces. What's more, styleganex claims that it can directly load the original StyleGAN parameters, fully compatible with the generative space of StyleGAN, and retains its style representation and editing ability.

While I have not personally tried using styleganex, it is worth a try to explore and experiment with this model by replacing the StyleGAN code in this project with styleganex, which may help you achieve better results.

arjundheek commented 1 year ago

I really loved the question put by vikram91221 and a quick response from Author. Thankyou for quick response @oneThousand1000 because it helps the others and like minded people like me a lot. Once Again, Thankyou...I too love to try

arjundheek commented 1 year ago

Hi @oneThousand1000 . Could you please try with the recommended paper because I'm not able to understand on how to replace the STYLEGAN code with Styleganex in the hair mapper project. If you are busy, could you atleast let me know in detail as what is the suitable exact paper to address vikram91221 issue because I'm again NOT able to pick among the publications as there are a lot of papers. Thanks in Advance.

oneThousand1000 commented 1 year ago

Hi @oneThousand1000 . Could you please try with the recommended paper because I'm not able to understand on how the replace the STYLEGAN code with Styleganex in the hair mapper project. If you are busy, could you let me know in detail so that others also find easy. Thanks in Advance.

I would like to direct your attention to the "Image Face Editing" portion of the StyleGANEX paper at https://www.mmlab-ntu.com/project/styleganex. This will provide you with a good understanding of how the authors achieved effective face editing using the model.

While StyleGANEX is a powerful tool for full image editing, I should note that our Hairmapper may not be fully compatible with it. Therefore, I suggest that you first read through the paper to better understand how StyleGANEX can be implemented in combination with other face editing methods and to determine if any modifications to the Hairmapper are necessary.

Once you have reviewed the paper, you may apply some modifications or re-training to Hairmapper if needed, before following these steps:

  1. Finish the installation steps as outlined in https://github.com/williamyang1991/StyleGANEX.
  2. Run StyleGANEX Inversion to obtain the latent code and the first-layer feature.
  3. Run the Hairmapper, making any necessary modifications as required.

I am currently occupied with other tasks and am unable to provide further assistance with this extension.

Vikram91221 commented 1 year ago

Thanks a lot, Again. Superb response. I will look into it.