Automatic Animation of Hair Blowing in Still Portrait Photos

Wenpeng Xiao, Wentao Liu, Yitong Wang, Bernard Ghanem, Bing Li

Abstract

This paper presents a fully automatic framework for transforming a single portrait photograph into a "cinemagraph" featuring realistic, wind-blown hair. By conceptualizing hair as a collection of discrete "wisps" rather than individual strands, the authors employ an instance-based segmentation approach coupled with a physics-based mass-spring simulation. This method produces high-fidelity animations that surpass existing fluid-based or general image-to-video techniques in both visual quality and physical plausibility.

Introduction

Animating hair in a static image is a significant challenge in computer vision due to the sheer complexity of human hair—comprising approximately 100,000 strands with intricate interactions. Existing methods typically fall into two categories: fluid animation, which often results in unrealistic "melting" effects for fibrous structures like hair, and 3D hair modeling, which requires specialized hardware or intensive manual labor.

The proposed framework bridges this gap by automatically generating perceptually pleasing motion from a single 2D image without user intervention.

High-level overview of the hair animation process: (a) input image, (b) extracted hair wisps with motion vectors, and (c) the resulting animated frames.

Methodology

The animation pipeline consists of three primary stages: Instance-based Hair Wisp Extraction (IHWE), a Hair Wisp Animation Model, and Depth-Aware Frame Composition.

The complete system architecture, detailing the extraction of hair wisps via deep learning, the physics-based animation module, and the final depth-aware composition.

Instance-based Hair Wisp Extraction (IHWE)

The core innovation lies in treating hair as a set of "wisps"—groups of strands that move together. The system utilizes a deep neural network for instance segmentation to detect these wisps. A subsequent refinement step ensures smooth contours and sharp hair tips, which are critical for visual realism.

Hair Wisp Animation Model

Extracted wisps are represented as multi-layer meshes. The model classifies each wisp as either "scalp-connected" or "unconnected." Motion is generated using a mass-spring system, where mesh vertices act as particles influenced by simulated gravity and wind. This classical physics approach allows for natural swinging and deformation while preserving the original image texture.

Depth-Aware Frame Composition

To ensure the animated hair integrates seamlessly with the subject, the framework employs face parsing and depth estimation. This allows for correct occlusion handling (e.g., hair moving behind the neck). Image inpainting is used to fill gaps created when wisps move from their original coordinates.

Datasets and Evaluation

To train the IHWE module, the authors introduced the Hair-Wisp Dataset, containing 4,500 images with ground-truth wisp annotations generated via a "sketch-filled" algorithm based on artist-drawn strokes.

The model was evaluated against state-of-the-art baselines using 114 portrait images. Quantitative results showed that the proposed method achieved a Frechet Video Distance (FVD) of 1153.98, significantly outperforming competitors like Halperin et al. (1778.24). In a user study with 18 participants, 81.5% preferred the results of this framework over existing alternatives, citing a lack of jittering and more realistic edges.

Conclusion

By shifting the focus from individual strands to hair wisps, this research provides a computationally efficient and visually effective solution for portrait animation. While the system handles subtle cinemagraph-style motion exceptionally well, future work will address extreme hair motion and complex occlusions in highly layered hairstyles.

Summary updated

BibTeX
@inproceedings{xiao2023automatic,
  author = {Wenpeng Xiao and Wentao Liu and Yitong Wang and Bernard Ghanem and Bing Li},
  title = {{Automatic Animation of Hair Blowing in Still Portrait Photos}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure