Abstract
Existing portrait matting methods either require auxiliary inputs that are costly to obtain or involve multiple stages that are computationally expensive, making them less suitable for real-time applications. In this work, we present a light-weight matting objective decomposition network (MODNet) for portrait matting in real-time with a single input image. The key idea behind our efficient design is by optimizing a series of sub-objectives simultaneously via explicit constraints. In addition, MODNet includes two novel techniques for improving model efficiency and robustness. First, an Efficient Atrous Spatial Pyramid Pooling (e-ASPP) module is introduced to fuse multi-scale features for semantic estimation. Second, a self-supervised sub-objectives consistency (SOC) strategy is proposed to adapt MODNet to real-world data to address the domain shift problem common to trimap-free methods. MODNet is easy to be trained in an end-to-end manner. It is much faster than contemporaneous methods and runs at 67 frames per second on a 1080Ti GPU. Experiments show that MODNet outperforms prior trimap-free methods by a large margin on both Adobe Matting Dataset and a carefully designed photographic portrait matting (PPM-100) benchmark proposed by us. Further, MODNet achieves remarkable results on daily photos and videos.
Introduction
Portrait matting is the process of precisely extracting a person from an image, right down to individual strands of hair. Traditionally, this is an "ill-posed" problem that requires auxiliary inputs like a trimap (a hand-drawn map of foreground, background, and unknown regions) or a static background image to guide the algorithm. However, trimaps are expensive to create, and background images are difficult to align in real-world settings.
While "trimap-free" methods exist, they are often computationally heavy multi-stage pipelines that are too slow for live video or fail to generalize to real-world photos due to "domain shift" (the difference between synthetic training data and real-life photos). MODNet aims to bridge this gap by being fast, accurate, and robust enough for "in-the-wild" applications using only a single RGB image.
The MODNet Architecture
The authors introduce a Matting Objective Decomposition Network (MODNet). Instead of treating matting as a single end-to-end task, they split it into three branches that are optimized simultaneously:
- Semantic Estimation ($S$): A low-resolution branch (using a MobileNetV2 backbone) that identifies the general location of the person.
- Detail Prediction ($D$): A high-resolution branch that focuses on the "transition regions" (boundaries and hair) to extract fine details.
- Semantic-Detail Fusion ($F$): A final branch that blends the outputs of the first two to produce the final alpha matte.
Key Innovations
- e-ASPP (Efficient Atrous Spatial Pyramid Pooling): A redesigned version of the standard ASPP module used for multi-scale feature fusion. It uses depth-wise convolutions and channel reduction to achieve comparable performance with only 1% of the parameters and computational overhead of the original.
- SOC (Self-supervised Sub-Objective Consistency): To handle real-world data where ground truth labels aren't available, the authors use a consistency constraint. They force the model's semantic predictions and detail predictions to be internally consistent on unlabeled data, helping the model adapt to new environments.
- OFD (One-Frame Delay): A simple temporal trick for video that smooths out "flickering" by checking if a pixel's value in the current frame is a wild outlier compared to the frames immediately before and after it.
Experimental Results
MODNet was evaluated on the standard Adobe Matting Dataset (AMD) and a new, more challenging benchmark introduced by the authors: PPM-100 (Photographic Portrait Matting). PPM-100 contains 100 finely annotated portraits with natural backgrounds, diverse poses, and people holding objects.
- Speed: MODNet runs at 67 FPS on an NVIDIA GTX 1080Ti, making it roughly twice as fast as its closest competitors (like FDMPA).
- Efficiency: It has the smallest parameter count among all compared trimap-free methods.
- Accuracy: On the PPM-100 benchmark, MODNet significantly outperformed previous state-of-the-art trimap-free models in terms of Mean Squared Error (MSE) and Mean Absolute Difference (MAD).
Discussion and Conclusion
A key insight of this work is that optimizing sub-objectives simultaneously allows the model to share intermediate representations, which is more efficient than sequential "coarse-to-fine" approaches. By forcing specific parts of the network to learn specific things (semantics vs. details) via explicit constraints, the model achieves high accuracy without auxiliary inputs.
While MODNet performs exceptionally well, it can still struggle with strong motion blur because it primarily processes frames individually. Future work may involve adding an optical flow sub-objective to better handle fast-moving video. Nonetheless, MODNet represents a significant step toward high-quality, real-time portrait matting for everyday devices.
Summary updated