Abstract
Digital matting is essential for extracting foreground objects with high-fidelity transparency, yet traditional methods rely heavily on labor-intensive user-provided trimaps. This paper presents a "Late Fusion" CNN architecture that automates this process. By employing a dual-decoder structure to estimate foreground and background probabilities independently and a specialized fusion branch to reconcile them, the model achieves state-of-the-art performance on human matting and remains competitive on general object benchmarks without any manual guidance.
Introduction
Digital matting is the process of calculating the opacity ($\alpha$) of foreground pixels to allow for the seamless extraction of an object from its background. Mathematically, an image $I$ is represented as a linear combination of foreground $F$ and background $B$:
$$I = \alpha F + (1-\alpha)B$$
This is an inherently ill-posed problem because there are three unknowns ($F, B, \alpha$) for every pixel. To constrain the problem, traditional algorithms require a trimap—a manual guide labeling regions as definitely foreground, definitely background, or unknown. However, creating trimaps is tedious and requires significant expertise. This research aims to eliminate the trimap requirement entirely, proposing a fully automatic "image-in, alpha-matte-out" system.
Methodology: The Late Fusion Architecture
The proposed Late Fusion CNN consists of three integrated components designed to learn implicit trimaps and handle complex boundaries:
- Encoder: A shared DenseNet-201 backbone extracts high-level semantic features from the input RGB image.
- Dual Decoders: Unlike standard single-decoder models, this network uses two parallel branches. One predicts the probability of a pixel being foreground ($F_p$), while the other predicts the probability of it being background ($B_p$).
- Fusion Branch: This branch predicts a blending weight ($\beta_p$). The final alpha value is then computed using a specific fusion formula: $$\alpha_p = \beta_p F_p + (1 - \beta_p)(1 - B_p)$$
This structure allows the dual decoders to "bracket" the alpha value. In solid regions, the decoders typically agree, but in fuzzy transition regions like hair or fine structures, the fusion branch learns the subtle residuals that a single classification branch might miss.
Training and Datasets
The model is trained in three stages: pre-training the segmentation decoders, pre-training the fusion branch, and finally, end-to-end joint fine-tuning using a combination of L1, L2, and Laplacian gradient losses.
To support this work, the authors introduced a new Human Image Matting Dataset containing high-quality human foregrounds. They also evaluated the model on the standard Composition-1k benchmark. Data augmentation involved compositing foregrounds onto random backgrounds from PASCAL VOC and MS-COCO to ensure robustness across various environments.
Experimental Results
The Late Fusion CNN demonstrates significant improvements in automation and accuracy. On human-specific matting tasks, it outperformed existing state-of-the-art methods, including Deep Image Matting (DIM) and Semantic Human Matting (SHM), across metrics such as Sum of Absolute Difference (SAD) and Mean Squared Error (MSE).
While the model ranked slightly below DIM on the general Composition-1k dataset, it is important to note that DIM requires a manually created trimap, whereas the Late Fusion model is fully automatic. Furthermore, the model is computationally efficient, processing an 800x800 image in approximately 0.39 seconds on a modern GPU.
Discussion and Conclusion
A key insight of this work is that the network learns to generate "implicit trimaps." Areas where the two decoders show high uncertainty naturally correspond to the transition regions of a traditional trimap. By providing the network with more "mathematical room" through the dual-branch architecture, it can better negotiate soft boundaries.
Despite its success, the model occasionally makes semantic errors, such as misidentifying small parts of an object due to the lack of user guidance. Future work will focus on extending this architecture to video matting, where maintaining temporal consistency remains a primary challenge.
Summary updated