Abstract
High-quality human matting typically requires labor-intensive trimaps or massive amounts of pixel-perfect annotated data. This paper introduces a novel three-stage framework that leverages easily obtainable coarse segmentation data alongside limited high-quality matting data. By employing a Quality Unification Network, the model produces professional-grade alpha mattes from simple RGB images without manual intervention, achieving state-of-the-art performance.
Introduction
Image matting—the process of precisely extracting a foreground object with per-pixel opacity (alpha)—is a fundamental but under-constrained problem. Mathematically, one must determine seven unknowns (foreground RGB, background RGB, and alpha) from only three known values (pixel RGB).
Traditionally, this has been solved using trimaps: hand-drawn maps labeling pixels as foreground, background, or unknown. However, creating trimaps is slow and requires expert skill. Moreover, training deep learning models for matting requires massive datasets with fine annotations, which are expensive to produce. This paper addresses this "data hunger" by utilizing "coarse" annotations—rough masks common in public segmentation datasets—to boost the performance of high-quality matting.
Methodology
The authors propose a sequential pipeline consisting of three subnetworks designed to bridge the gap between coarse and fine data:
- Mask Prediction Network (MPN): Predicts a low-resolution coarse semantic mask. It is trained on a hybrid of fine-annotated and coarse-annotated data, allowing the model to learn robust human semantics across various poses and environments.
- Quality Unification Network (QUN): This is the core innovation. Because the MPN is trained on mixed-quality data, its outputs vary. The QUN "rectifies" these outputs to a consistent level using identity and consistency losses, effectively normalizing the mask quality.
- Matting Refinement Network (MRN): This high-resolution network takes the original image and the unified mask to predict the final alpha matte. By focusing on fine-annotated data, the MRN learns to recover intricate details like individual hair strands.
Datasets and Evaluation
The authors constructed a substantial hybrid dataset to train their system:
- Fine-Annotated Data: 9,526 image/alpha pairs, including 202 from the Deep Image Matting (DIM) dataset and 9,324 new high-quality images.
- Coarse-Annotated Data: 10,597 images from the Supervisely Person Dataset.
- Backgrounds: Foregrounds were composited onto backgrounds from MS COCO and Pascal VOC to prevent overfitting.
The model was evaluated on a set of 1,360 images, achieving a Sum of Absolute Differences (SAD) of 0.0058 and a Mean Squared Error (MSE) of 0.0026, significantly outperforming previous automatic matting methods.
Results and Discussion
The proposed method outperformed semantic segmentation (DeepLab) and previous automatic matting methods (SHM). Remarkably, it achieved results comparable to the state-of-the-art DIM model, despite DIM requiring a manually created trimap as input.
Key Insights
- Coarse Data as a Semantic Anchor: While coarse data lacks hair detail, it is excellent for teaching the model the human's location, preventing errors in complex backgrounds.
- The Quality Gap Problem: The refinement stage needs consistent input quality to function correctly, necessitating the QUN.
- Refinement via Image Context: The MRN uses the original RGB image as a guide to "re-discover" high-frequency hair details even if the input mask was coarse.
Conclusion
This research demonstrates that high-quality human matting can be achieved without trimaps by effectively leveraging coarse annotations. The entire pipeline is efficient, with an average testing time of 0.08 seconds for an 800x800 image. Future work may extend this "coarse-to-fine" approach to general object matting beyond humans.
Summary updated