Introduction
Interactive Portrait Matting (IPM) is a critical task in computer vision that involves extracting high-quality transparency masks (alpha mattes) of specific individuals based on user-provided guidance. While existing matting tools perform adequately in controlled studio environments, they often struggle in "in-the-wild" scenarios characterized by multiple people, heavy occlusions, and complex backgrounds.
This paper introduces DFIMat, a decoupled, multi-modal framework designed to overcome the limitations of current interactive matting systems. By separating the task into distinct localization and refinement phases, DFIMat achieves state-of-the-art performance while maintaining the efficiency required for real-time applications.
Problem Statement
The authors identify three primary roadblocks hindering progress in Interactive Portrait Matting:
- Coupled Architectures: Most existing models attempt to map user inputs directly to a high-resolution alpha matte in a single step. This lack of modularity makes it difficult for the network to simultaneously learn high-level semantic localization (identifying the target) and low-level detail extraction (capturing hair strands).
- Rigid Input Modalities: Many models are restricted to a single input type, such as clicks. However, different inputs offer unique advantages; for instance, bounding boxes are efficient for localization, while scribbles are superior for boundary refinement.
- Static Interaction: Real-world usage is iterative. Most models treat each user interaction as an isolated event, failing to leverage the history of previous corrections to improve subsequent predictions.
The DFIMat Framework
DFIMat addresses these challenges through a decoupled architecture consisting of two specialized modules and a novel reasoning component.
Interactive Semantic Capture Network (ISCN)
The ISCN focuses on intent understanding. It maps diverse user inputs—including clicks, bounding boxes, scribbles, and text prompts—into a unified visual-semantic space. Utilizing a transformer-based decoder, the ISCN localizes the target instance and generates a coarse mask, effectively handling the "who to matte" portion of the problem.
Matting Refinement Network (MRN)
The MRN receives the coarse mask from the ISCN and the original high-resolution image to produce the final alpha matte. It employs a dual-branch architecture: a CNN-based local branch to capture fine textures and a Transformer-based global branch to ensure structural consistency across the image.
Contrastive Reasoning Module (CRM)
To support multi-round interactions, the CRM identifies "conflict areas" where the model’s previous prediction contradicts the user’s updated input. This provides explicit guidance, allowing the model to focus its refinement on specific errors identified during the interaction history.
Data Innovation: The SMPMat Dataset
A significant hurdle in multi-person matting research is the lack of large-scale, realistic datasets. To address this, the authors developed SMPMat (Synthetic Multi-Person Matting), containing 40,000 realistic images with over 142,000 instances.
Rather than using traditional "cut-and-paste" synthesis, which often results in visual artifacts, the researchers utilized Stable Diffusion to generate cohesive scenes. They developed a specialized interpreter to extract high-quality ground-truth mattes directly from the latent features and attention maps of the diffusion process. This ensures that the synthetic training data closely mirrors the complexity of real-world photography.
Experimental Results
DFIMat was evaluated against existing state-of-the-art (SOTA) models on both the SMPMat and HIM2K datasets. Key findings include:
- Superior Accuracy: DFIMat outperformed previous SOTA models by 3.48 points in SAD (Sum of Absolute Differences) on the SMPMat dataset.
- Efficiency: The authors introduced DFIMat-S, a lightweight variant that utilizes only 33% of the parameters of current SOTA models while maintaining superior accuracy.
- Qualitative Performance: Qualitative analysis demonstrates that DFIMat excels at capturing "hollow" areas (e.g., gaps between fingers) and intricate hair details that coupled models often miss.
- Input Synergy: Testing revealed that a "Box-then-Scribble" workflow is highly effective, using the box for rapid localization and scribbles for fine-tuning boundaries.
Conclusion and Future Work
DFIMat represents a significant advancement in interactive matting by decoupling semantic localization from detail refinement. While the model shows exceptional performance, the authors note that accuracy can decrease when provided with only very coarse inputs (like a single text prompt) without subsequent refinement. Future work will focus on improving the underlying diffusion models to handle extremely dense crowd scenarios and further diversifying the training data.
Summary updated