Abstract
Semantic Human Matting (SHM) introduces the first end-to-end deep learning framework capable of high-quality human matting without manual user intervention. By integrating a semantic segmentation network (T-Net) with a fine-detail matting network (M-Net) via a novel fusion module, the system automatically extracts human subjects from complex backgrounds with professional-grade precision. This approach overcomes the limitations of traditional trimap-dependent methods, enabling scalable applications in e-commerce and background replacement.
Introduction
Image matting is the technical challenge of precisely extracting a foreground object from its background. Mathematically, this is an under-constrained problem where for every pixel, the foreground color, background color, and alpha (opacity) value must be determined from a single known pixel color.
Traditionally, algorithms have relied on user-provided trimaps—manual annotations labeling regions as foreground, background, or unknown. This "user-in-the-loop" requirement prevents the scaling of matting for high-volume tasks. While automatic methods exist, they typically fall into two categories: semantic segmentation, which identifies global structure but produces "hard" edges, and standard matting, which captures fine details but lacks global context. Semantic Human Matting bridges this gap.
Methodology
The SHM framework employs a dual-network architecture designed to mimic human perception: identifying the subject globally before refining local edges.
T-Net: Trimap Generation
The T-Net utilizes a PSPNet-50 architecture to perform semantic segmentation. Rather than a binary mask, it generates a three-channel probability map. These channels represent the likelihood of a pixel belonging to the foreground, background, or an "unknown" transition region.
M-Net: Matting Network
The M-Net is an encoder-decoder network based on VGG16. It receives a six-channel input consisting of the original RGB image concatenated with the T-Net's probability maps. Its primary function is to analyze local textures and structural details to predict a "raw" alpha matte.
Fusion Module
The core innovation of SHM is the fusion module, which employs a probabilistic strategy to combine coarse semantics with fine details. The final alpha value ($\alpha_p$) is calculated as: $$\alpha_p = F_s + U_s\alpha_r$$ where $F_s$ is the foreground probability, $U_s$ is the unknown region probability, and $\alpha_r$ is the M-Net's prediction. This allows the system to rely on segmentation for the solid body and the matting network for fuzzy or complex edges.
Dataset Development
To address the lack of large-scale human matting data, the authors created a new benchmark dataset containing 35,513 unique human foregrounds with high-quality alpha mattes. These foregrounds were composited onto diverse backgrounds from the COCO dataset, resulting in over 52,000 training images. Unlike previous portrait-only datasets, this collection includes full-body shots, various poses, and accessories like handbags and phones.
Key Results
SHM demonstrates significant improvements over previous state-of-the-art methods. Quantitatively, SHM achieved a Sum of Absolute Differences (SAD) score of 3.833, nearly doubling the performance of the previous best deep matting method (DIM, which scored 6.140) when both were tested without manual trimaps.
Qualitatively, the model excels at recovering fine hair details and handling complex "holes" in the foreground, such as the space between an arm and the torso. Remarkably, this fully automatic system achieves results comparable to traditional interactive methods that require manual input.
Conclusion and Future Work
Semantic Human Matting proves that deep networks can learn implicit constraints for matting, eliminating the need for manual trimaps. While the current model faces challenges with "synthetic" composition artifacts and computational weight, it sets a new standard for automatic extraction. Future work may involve optimizing the architecture for mobile real-time performance and extending the fusion strategy to universal object matting.
Summary updated