Abstract
Traditional human instance matting relies on inefficient two-stage pipelines that process individuals sequentially. This paper introduces E2E-HIM, the first end-to-end framework designed to predict high-quality alpha mattes for all individuals in an image simultaneously. By optimizing perception and matting tasks jointly, E2E-HIM achieves a 5x speedup and a 50% reduction in error rates compared to state-of-the-art multi-stage methods.
Introduction
In computer vision, while segmentation provides coarse object masks, matting is required to calculate precise transparency (alpha mattes), which is critical for realistic image editing and background replacement. Extracting separate, high-quality mattes for every person in a crowded scene—known as Human Instance Matting—has historically been a computationally expensive two-stage process. These pipelines first segment individuals to create "trimaps" and then run a separate matting model for each detection. This approach is prone to error propagation and high latency. E2E-HIM addresses these challenges by performing instance detection and matting in a single, unified pass.
Methodology
The E2E-HIM framework consists of three jointly optimized sub-networks:
- General Perception Network: Utilizing a hybrid CNN-Transformer architecture, this network extracts global features and decodes "instance contexts" into latent codes—compact mathematical representations for every person detected.
- United Guidance Network: This module employs spatial attention and semantic embedding to generate a single guidance map. This map encodes the locations and boundaries of all instances, allowing the model to distinguish between overlapping individuals without multiple passes.
- Instance Matting Network: This component uses the extracted features and united guidance to dynamically generate kernels for each person, predicting final alpha mattes for all individuals in parallel.
By treating instance detection as a set prediction problem via a Transformer-based decoder, the model handles a variable number of people without requiring manual post-processing like Non-Maximum Suppression (NMS).
The HIM-100K Dataset
To support this research, the authors introduced HIM-100K, a large-scale dataset specifically for human instance matting. It contains over 100,000 images with approximately 326,000 human instances, featuring a mix of real-world scenes and high-quality synthetic composites. Each instance is meticulously labeled with a bounding box, a segmentation mask, and a high-resolution alpha matte.
Key Results and Evaluation
E2E-HIM demonstrates significant improvements in both efficiency and accuracy. For an image containing six people at 640×640 resolution, the model runs at 10.3 FPS on an NVIDIA RTX 2080Ti, making it 5x faster than standard two-stage pipelines (e.g., Mask R-CNN combined with FBAMatting).
In terms of accuracy, E2E-HIM reduced the Effective Mean Square Error (EMSE) by 50% on the HIM-100K dataset. Furthermore, the model generalizes well to single-subject benchmarks such as PPM-100 and P3M-500, achieving competitive or state-of-the-art results even when multi-instance processing is not required.
Conclusion
E2E-HIM represents a significant step forward in making high-quality matting practical for complex, multi-person scenes. By replacing disjointed stages with a unified Transformer-based architecture, the framework eliminates error propagation and drastically reduces computational overhead. Future work will focus on extending this framework to other object categories and optimizing performance for ultra-high-resolution video processing.
Summary updated