Towards Label-Efficient Human Matting: A Simple Baseline for Weakly Semi-Supervised Trimap-Free Human Matting

Beomyoung Kim, Myeong-Yeon Yi, Joonsang Yu, Young Joon Yoo, Sung Ju HwangarXiv 2024

Abstract

This paper presents a new practical training method for human matting, which demands delicate pixel-level human region identification and significantly laborious annotations. To reduce the annotation cost, most existing matting approaches often rely on image synthesis to augment the dataset. However, the unnaturalness of synthesized training images brings in a new domain generalization challenge for natural images. To address this challenge, we introduce a new learning paradigm, weakly semi-supervised human matting (WSSHM), which leverages a small amount of expensive matte labels and a large amount of budget-friendly segmentation labels, to save the annotation cost and resolve the domain generalization problem. To achieve the goal of WSSHM, we propose a simple and effective training method, named Matte Label Blending (MLB), that selectively guides only the beneficial knowledge of the segmentation and matte data to the matting model. Extensive experiments with our detailed analysis demonstrate our method can substantially improve the robustness of the matting model using a few matte data and numerous segmentation data. Our training method is also easily applicable to real-time models, achieving competitive accuracy with breakneck inference speed (328 FPS on NVIDIA V100 GPU).

Introduction: The Annotation Tax and the Trimap Burden

In computer vision, segmentation is akin to using a thick marker to outline a person, while matting is like using a fine-tipped brush to capture every individual hair strand and its transparency. High-quality human matting faces two primary challenges:

  1. The Annotation Tax: Creating alpha mattes (matte labels) is incredibly laborious and expensive. Consequently, most researchers rely on synthetic data—compositing a person onto a new background—which leads to a "domain gap." Models trained on these synthetic composites often fail when faced with the lighting and context of real-world photos.
  2. The Trimap Burden: Many high-performing matting tools require a "trimap" (a hand-drawn guide showing foreground, background, and unknown regions). This manual requirement makes them impractical for automated, real-time applications like video conferencing.
Comparison of label types: Segmentation labels provide coarse outlines, while Matte labels capture fine details like hair. Trimaps serve as manual guides for traditional methods.

Methodology: Weakly Semi-Supervised Human Matting (WSSHM)

To address these challenges, we introduce Weakly Semi-Supervised Human Matting (WSSHM). This paradigm achieves high-quality, trimap-free human matting by combining a small number of expensive matte labels with a large volume of cheap, accessible segmentation labels. The core of this approach is a two-step teacher-student framework centered around Matte Label Blending (MLB).

  • The Teacher: A teacher network is trained on synthetic data where perfect matte labels are available. This network becomes an expert at identifying fine boundary details (like hair) but struggles with the "big picture" in real-world photos, often making errors in the solid foreground or background.
  • The Student: The student network is trained on real-world images using budget-friendly segmentation labels rather than expensive matte labels.
  • Matte Label Blending (MLB): To train the student, MLB takes the teacher’s detailed boundary predictions and "blends" them with the ground-truth segmentation labels. This effectively uses the segmentation label to "clean up" the teacher's mistakes in the main body while preserving the teacher's high-fidelity hair details at the edges. This allows the student to learn robustness from real-world segmentation data and delicate details from the teacher's blended pseudo-labels.

Experimental Results and Insights

Our model was evaluated on real-world benchmarks (P3M, PPM, RWP) and the synthetic Distinctions-646 dataset. The proposed method significantly outperformed existing trimap-free models like MODNet and LFM. For example, on the P3M dataset, it achieved an MSE of 4.391, compared to MODNet's 9.692.

The proposed method achieves high-fidelity matting on real-world images with complex hair details without requiring a trimap.

Key insights from our analysis include:

  • Segmentation as a Strong Prior: While segmentation labels lack hair-level detail, they provide excellent spatial context. A large amount of "weak" data is often better for real-world robustness than a small amount of "perfect" synthetic data.
  • Diminishing Returns of Matte Labels: Increasing the number of matte labels from 50 to 2,000 yielded only marginal improvements when sufficient segmentation data was present, suggesting that boundary knowledge can be learned from a very small, high-quality sample.
  • Real-Time Performance: Using a lightweight backbone (ResNet-18), the model reached 328 FPS on an NVIDIA V100 GPU, making it ideal for real-time video applications.

Conclusion and Future Work

While the WSSHM paradigm significantly reduces the need for matte labels, it still relies on a substantial amount of labeled segmentation data (approx. 50k images). Future work will explore incorporating unlabeled data by using pseudo-segmentation labels generated from web-crawled images to further scale the training process. Additionally, while the method is robust, extremely complex backgrounds that mimic human textures remain a challenge for initial segmentation guidance.

Summary updated

Abstract

This paper presents a new practical training method for human matting, which demands delicate pixel-level human region identification and significantly laborious annotations. To reduce the annotation cost, most existing matting approaches often rely on image synthesis to augment the dataset. However, the unnaturalness of synthesized training images brings in a new domain generalization challenge for natural images. To address this challenge, we introduce a new learning paradigm, weakly semi-supervised human matting (WSSHM), which leverages a small amount of expensive matte labels and a large amount of budget-friendly segmentation labels, to save the annotation cost and resolve the domain generalization problem. To achieve the goal of WSSHM, we propose a simple and effective training method, named Matte Label Blending (MLB), that selectively guides only the beneficial knowledge of the segmentation and matte data to the matting model. Extensive experiments with our detailed analysis demonstrate our method can substantially improve the robustness of the matting model using a few matte data and numerous segmentation data. Our training method is also easily applicable to real-time models, achieving competitive accuracy with breakneck inference speed (328 FPS on NVIDIA V100 GPU). The implementation code is available at \url{https://github.com/clovaai/WSSHM}.
BibTeX
@misc{kim2024towards,
  author = {Beomyoung Kim and Myeong-Yeon Yi and Joonsang Yu and Young Joon Yoo and Sung Ju Hwang},
  title = {{Towards Label-Efficient Human Matting: A Simple Baseline for Weakly Semi-Supervised Trimap-Free Human Matting}},
  year = {2024},
  eprint = {2404.00921},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.00921},
}
Figure