Training Matting Models without Alpha Labels
Wenze Liu, Zixuan Ye, Hao Lu, Zhiguo Cao, Xiangyu Yue
TL;DR
This work tackles the labeling bottleneck in deep image matting by training with only coarse trimap supervision rather than fine alpha mattes. It introduces a distance-based nonlocal prior, first as a DC loss and then as a Directional Distance Consistency Loss (DDC) that preserves the direction of alpha changes to align with image structure, enabling alpha propagation from known regions into transitions. The approach achieves performance on AM-2K and P3M-10K comparable to fine-label baselines, and in some cases even surpasses human ground truth, while requiring significantly less annotation effort. By combining semantic learning with well-crafted matting priors, the method offers a practical route toward high-quality matting without dense alpha labeling, with potential extensions to transparent objects and interactive matting.
Abstract
The labelling difficulty has been a longstanding problem in deep image matting. To escape from fine labels, this work explores using rough annotations such as trimaps coarsely indicating the foreground/background as supervision. We present that the cooperation between learned semantics from indicated known regions and proper assumed matting rules can help infer alpha values at transition areas. Inspired by the nonlocal principle in traditional image matting, we build a directional distance consistency loss (DDC loss) at each pixel neighborhood to constrain the alpha values conditioned on the input image. DDC loss forces the distance of similar pairs on the alpha matte and on its corresponding image to be consistent. In this way, the alpha values can be propagated from learned known regions to unknown transition areas. With only images and trimaps, a matting model can be trained under the supervision of a known loss and the proposed DDC loss. Experiments on AM-2K and P3M-10K dataset show that our paradigm achieves comparable performance with the fine-label-supervised baseline, while sometimes offers even more satisfying results than human-labelled ground truth. Code is available at \url{https://github.com/poppuppy/alpha-free-matting}.
