Image Matting without Matting-Specific Annotations via Eikonal Fields

Tao Huang, WangYi, Xiaohong Zhang, Wei Zhang, Tao Yin, Zhibin Zhang, Qiuli WangNeurIPS 2026

TL;DR

Separating wispy hair or fur from a complex background—a task called image matting—usually requires training neural networks on painfully expensive, hand-crafted transparency maps. FreeMatte ditches these costly annotations entirely by borrowing a page from classical wave physics. By treating a rough, off-the-shelf segmentation mask like a pebble dropped into a pond, it simulates how a wavefront ripples across the image’s colors and edges to automatically generate the training signals needed for crisp, fine-grained cutouts.

What Problem Does This Paper Address?

If you want to cut an object out of a photo, standard image segmentation gives you a binary choice: every pixel is either 100% foreground or 100% background. That works fine for a coffee mug, but fails miserably on a golden retriever, translucent glass, or blowing hair, where pixels along the edge are a continuous blend of object and background.

Estimating that exact per-pixel opacity (the alpha matte, ranging from 0 to 1) is the domain of image matting. Because separating foreground color, background color, and opacity from a single RGB pixel is mathematically ill-posed, deep learning models rely heavily on human-annotated training targets. Typically, this means either dense ground-truth alpha mattes or trimaps (three-zone maps marking definite foreground, definite background, and an "unknown" boundary region). Both are notoriously tedious and expensive to create at scale, bottlenecking matting in specialized domains.

Figure 1: Comparison of different supervision paradigms in image matting. Existing deep matting methods rely on matting-specific supervision during training, such as (a) dense alpha mattes or (b) trimaps. In contrast, (c) FreeMatte constructs supervision from input images and coarse localization priors generated by a pretrained segmentation model, without requiring alpha mattes or trimaps as training targets or loss supervision.

The authors ask a simple, liberating question: Do we actually need matting-specific human labels to learn delicate transparency transitions?

Methods

FreeMatte’s core philosophy is to decouple matting into two distinct sub-problems: finding the object (localization) and inferring wispy edges (transparency). Off-the-shelf foundation models like the Segment Anything Model (SAM) already solve localization, yielding a coarse binary mask. FreeMatte keeps SAM frozen and uses standard prediction backbones (ViTMatte), innovating entirely on how the network is supervised during training.

To turn a blocky SAM mask into matting supervision, the authors model a wavefront propagation process governed by the Eikonal equation—the same partial differential equation used in optics and seismology to calculate shortest travel times through varying media:

Overview of the FreeMatte pipeline, from resistance construction to wavefront arrival times and sparse supervision.
  1. Building a "Resistance" Map: Imagine the coarse SAM mask is a water source, and the rest of the image is terrain with varying friction. FreeMatte computes a pixel-wise resistance function combining three cues: color resistance (pixels whose colors clash with the foreground block the wave), structural resistance (sharp image gradients like hair strands offer low resistance so the wave stays sensitive to fine details), and spatial modulation (gradually reverting to uniform resistance far away from the object).
  2. Solving for Arrival Time: Using the classical Fast Marching Method, FreeMatte solves the Eikonal equation to get an arrival-time field. Pixels easily reached via compatible colors and structures have early arrival times; pixels behind stark color boundaries take much longer to reach.
  3. Anchor-and-Consistency Training: Matting networks need three things to learn without ground-truth alphas: known foreground anchors ($\alpha=1$), known background anchors ($\alpha=0$), and a rule for smooth transitions in between. FreeMatte uses the coarse prior for foreground anchors, converts late arrival times into probabilities to sparsely sample high-confidence background anchors, and uses the arrival-time field to gate a local color-consistency loss (adapted from prior work, DDC-Matting) so background textures don't accidentally trigger false alpha variations.

Datasets

No new benchmarks are introduced. FreeMatte is evaluated on four existing natural image matting datasets covering diverse subjects:

  • AM-2K (animals—lots of fur and whiskers)
  • AIM-500 (diverse generic natural objects)
  • P3M-500-NP and RefMatte-RW-100 (human portraits)

(Note: Specific training dataset splits are deferred to the paper's appendix and not detailed in the main text.)

Key Insights and Ideas

  • Supervision hides inside the image itself: Once you roughly know where an object is, the combination of raw image gradients, color statistics, and spatial continuity contains enough structural information to supervise continuous opacity—no human pixel-painting required.
  • Content-aware physics beats geometric heuristics: A naive way to avoid human trimaps is to take a SAM mask and mechanically dilate/erode its borders to create a "pseudo-trimap." The authors show that fixed dilation radii force an ugly trade-off between region accuracy and boundary sharpness across different datasets. Because Eikonal wavefronts bend and slow down around real image edges, a single set of hyperparameters works reliably everywhere.
  • Eikonal fields as a supervision bridge: While modern vision papers often train neural networks to predict Eikonal fields (like signed distance functions in 3D rendering), FreeMatte flips this around—solving the classical equation directly on 2D images to supervise a standard vision transformer.

Key Results

Evaluated under a point-prompt protocol across four benchmarks, FreeMatte achieves surprisingly strong performance despite using zero alpha mattes or trimaps during training:

  • Competitive with supervised models: On AM-2K, FreeMatte ranks second overall among promptable baselines in Mean Squared Error (0.0089) and Sum of Absolute Differences (SAD of 27.49), trailing only the fully supervised diffusion model SDMatte (SAD 17.54) while beating supervised models like MatAny (32.20) and SmartMatting (62.61). On P3M-500-NP, it achieves the best connectivity error (13.14) of all tested methods.
  • Quantifying the annotation-free gap: In a strictly controlled head-to-head using the exact same ViTMatte backbone on AM-2K, fully supervised training achieves a SAD of 21.99 and Gradient error of 11.91, compared to FreeMatte's 27.49 and 17.43.
  • Massive boundary refinement over raw priors: Feeding raw SAM masks into FreeMatte slashes boundary Gradient errors—for example, dropping Grad error on P3M-500-NP from 87.49 (raw mask prior) down to 25.47.
Figure 3: Visual comparison with coarse priors and ground-truth alpha mattes.

Limitations and Future Work

FreeMatte hasn't completely closed the door on human labels just yet. On generic object and portrait benchmarks like AIM-500 and RefMatte-RW-100, a noticeable performance gap remains compared to top-tier fully supervised models like SDMatte (e.g., SAD of 58.83 vs. 31.80 on AIM-500).

For future work, the authors plan to take FreeMatte where its annotation-free nature shines brightest: domain-specific, label-scarce fields like medical imaging, where obtaining dense transparency ground truths from radiologists is practically impossible.

Summary updated

Abstract

Image matting aims to estimate a continuous alpha matte that separates foreground objects from the background. However, existing deep matting methods still rely heavily on task-specific supervision for matting, including alpha mattes and trimaps, which are costly to annotate and limit their applicability in annotation-scarce scenarios. To address this limitation, we propose FreeMatte, a novel framework that learns to predict high-quality alpha mattes without relying on alpha matte or trimap supervision. The proposed framework formulates the construction of matting supervision as a foreground-driven wavefront propagation process. Starting from a coarse localization prior generated by an off-the-shelf segmentation foundation model, it solves an Eikonal equation constructed from the prior and the input image itself to obtain an arrival-time field that encodes how readily each pixel can be reached from the coarse foreground source. The arrival-time field is then used to identify high-confidence background pixels for sparse supervision and to modulate local consistency constraints, providing indirect supervision for alpha prediction. Experiments on AM-2K, AIM-500, P3M-500-NP, and RefMatte-RW-100 demonstrate the effectiveness of FreeMatte, which achieves competitive performance on AM-2K and P3M-500-NP.
BibTeX
@inproceedings{huang2026image,
  author = {Tao Huang and WangYi and Xiaohong Zhang and Wei Zhang and Tao Yin and Zhibin Zhang and Qiuli Wang},
  title = {{Image Matting without Matting-Specific Annotations via Eikonal Fields}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=X2jELwz645},
}
Figure