cjwbw/style-your-hair

Pose-Invariant Hairstyle Transfer

  • Public
  • 8.1K runs

Run time and cost

This model runs on Nvidia T4 GPU hardware. Predictions typically complete within 22 minutes.

Readme

This is a cog implementation of https://github.com/Taeu/Style-Your-Hair

Style-Your-Hair

Official Pytorch implementation of “Style Your Hair: Latent Optimization for Pose-Invariant Hairstyle Transfer via Local-Style-Aware Hair Alignment (ECCV 2022)”

teaser qualitative result

Style Your Hair: Latent Optimization for Pose-Invariant Hairstyle Transfer via Local-Style-Aware Hair Alignment
Taewoo Kim*, Chaeyeon Chung*, Yoonseo Kim*, Sunghyun Park, Kangyeol Kim, and Jaegul Choo
* indicates equal contributions.

arXiv | BibTeX |

Abstract Editing hairstyle is unique and challenging due to the complexity and delicacy of hairstyle. Although recent approaches significantly improved the hair details, this is achieved under the assumption that a target hair and a source image are aligned. HairFIT, a pose-invariant hairstyle transfer model, alleviates this assumption, yet it still shows unsatisfactory quality in preserving delicate hair textures. To solve these limitations, we propose a high-performing pose-invariant hairstyle transfer model equipped with a latent optimization and a newly presented local-style-matching loss. In the StyleGAN2 latent space, we first explore a pose-aligned latent code of a target hair with the detailed textures preserved based on local-style-matching. Then, our model inpaints the occlusions of the source considering the aligned target hair and blends both images to produce a final output. The experimental results demonstrate that our model has strengths in transferring a hairstyle under higher pose differences and preserving local hairstyle textures.

Acknowledgments

This code borrows heavily from Barbershop.

BibTeX

@article{kim2022style,
  title={Style Your Hair: Latent Optimization for Pose-Invariant Hairstyle Transfer via Local-Style-Aware Hair Alignment},
  author={Kim, Taewoo and Chung, Chaeyeon and Kim, Yoonseo and Park, Sunghyun and Kim, Kangyeol and Choo, Jaegul},
  journal={arXiv preprint arXiv:2208.07765},
  year={2022}
}