Hair Segmentation on Time-of-Flight RGBD Images

Yuanxi Ma, Cen Wang, Guli Zhang, Qilei Jiang, Shiying Li, Jingyi YuarXiv 2019

TL;DR

This paper introduces a novel approach for segmenting hair in images by leveraging the unique noise patterns present in Time-of-Flight (ToF) depth sensors, combined with RGB data. By analyzing how light scatters and reflects off hair, they develop a deep learning model and a refinement process that significantly improves hair segmentation accuracy, especially in challenging scenarios.

What Problem Does This Paper Address?

Segmenting hair from portrait images is notoriously difficult. Hair lacks a consistent shape, style, or color, and dark hair, in particular, offers very few distinguishing features for traditional computer vision methods. Existing approaches, primarily relying on RGB images, struggle with variations in lighting, viewing angles, and similar backgrounds or foregrounds. While some methods use manual user input to guide segmentation, fully automated solutions are still prone to errors, especially in complex real-world scenarios.

Methods

The core of this paper's contribution lies in its novel use of Time-of-Flight (ToF) depth sensor data. The authors first analyze how hair's complex, filamentous structure causes unique scattering and inter-reflection patterns in ToF depth images, leading to distinct noise characteristics compared to smoother surfaces like skin. They then develop a deep learning model, "ToF-HairNet," which combines RGB images with these ToF depth features (specifically, a "HVA" channel incorporating horizontal disparity, height above ground, and angle with gravity, along with a variance map derived from ToF noise). This network provides an initial segmentation, labeling hair into top, back, and side regions. This initial segmentation is then refined using a conditional random field (CRF) approach, incorporating the ToF noise prior to further improve accuracy and boundary definition.

Datasets

The authors introduce the first ToF RGBD hair dataset, containing over 20,000 head images captured from 30 human subjects with diverse hairstyles and at various view angles. This dataset includes RGB images (1024x2048) and corresponding ToF depth images (640x480). For training and validation, 8,000 images were manually annotated with pixel-wise labels for background, facial regions, and hair regions (top, back, two sides), as well as directional maps for hair.

Key Insights and Ideas

  • ToF Noise as a Feature: The paper's central insight is that the "noise" in ToF depth images, often considered a nuisance, actually contains valuable discriminative information for hair segmentation due to hair's unique light interaction properties.
  • Hair Structure and Light Interaction: The complex scattering and inter-reflection of light off hair strands create distinct, identifiable patterns in ToF data that differ significantly from those on skin.
  • Multi-Modal Fusion for Robustness: Combining RGB data (especially gradients) with ToF depth features (variance, disparity, etc.) creates a more robust representation than either modality alone, leading to better performance in challenging conditions.
  • Leveraging Noise for Refinement: Using the ToF noise characteristics as a prior in a CRF framework effectively refines the segmentation, particularly at hair boundaries.

Key Results

  • The proposed ToF-HairNet combined with CRF refinement achieves state-of-the-art performance, outperforming existing RGB-based methods like DeepLabv3+ and D-CNN.
  • The method demonstrates significant improvements in accuracy and robustness, particularly for challenging cases such as dark hair, similar hair/background, and similar hair/foreground.
  • Component analysis shows that ToF data and its derived features (variance, HVA channels) contribute substantially to the mIoU score, with depth constraints improving accuracy by up to 4% and variance by an additional 2% over RGB alone.
  • The system can also infer hair direction, which is useful for applications like hair style identification and rendering.

Limitations and Future Work

  • Depth Discrepancy: The authors acknowledge that the approach is limited by low depth discrepancy in existing ToF sensors. If the camera is far from the subject, variance estimation can be challenging, potentially impacting segmentation.
  • Future Directions: The paper suggests extending the approach to multi-view settings for 3D hair reconstruction, noting that current methods often model hair as coarse meshes. They propose that their ToF noise analysis could be used to measure hair fiber density and guide strand-based modeling for more realistic hair rendering.

Summary updated

Abstract

Robust segmentation of hair from portrait images remains challenging: hair does not conform to a uniform shape, style or even color; dark hair in particular lacks features. We present a novel computational imaging solution that tackles the problem from both input and processing fronts. We explore using Time-of-Flight (ToF) RGBD sensors on recent mobile devices. We first conduct a comprehensive analysis to show that scattering and inter-reflection cause different noise patterns on hair vs. non-hair regions on ToF images, by changing the light path and/or combining multiple paths. We then develop a deep network based approach that employs both ToF depth map and the RGB gradient maps to produce an initial hair segmentation with labeled hair components. We then refine the result by imposing ToF noise prior under the conditional random field. We collect the first ToF RGBD hair dataset with 20k+ head images captured on 30 human subjects with a variety of hairstyles at different view angles. Comprehensive experiments show that our approach outperforms the RGB based techniques in accuracy and robustness and can handle traditionally challenging cases such as dark hair, similar hair/background, similar hair/foreground, etc.
BibTeX
@misc{ma2019hair,
  author = {Yuanxi Ma and Cen Wang and Guli Zhang and Qilei Jiang and Shiying Li and Jingyi Yu},
  title = {{Hair Segmentation on Time-of-Flight RGBD Images}},
  year = {2019},
  eprint = {1903.02775},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1903.02775},
}
Figure