Tuning-Free Amodal Segmentation via the Occlusion-Free Bias of Inpainting Models

Jae Joong Lee, Bedrich Benes, Raymond A. YeharXiv 2025

TL;DR

Amodal segmentation—predicting the full shape of an object, including its hidden, occluded parts—traditionally requires painstaking manual annotations or synthetic training data. This paper introduces a zero-shot, tuning-free method that cleverly exploits the inherent "occlusion-free bias" of pretrained diffusion inpainting models to reconstruct completed objects before segmenting them. By avoiding training altogether, it generalizes remarkably well, outperforming supervised state-of-the-art models by an average of 5.3% mIoU while running up to 19x faster.

What Problem Does This Paper Address?

When we look at a car parked behind a tree, our brains automatically fill in the hidden parts of the vehicle. Replicating this capability in computer vision is known as amodal segmentation. It is a crucial task for autonomous driving and robotics, where planning requires understanding the true scale and position of partially hidden obstacles.

Standard approaches treat this as a supervised learning problem. However, creating datasets for amodal segmentation is incredibly difficult: human annotators are highly inconsistent when guessing what lies behind an obstacle, and synthetic datasets (e.g., from 3D game engines) suffer from a severe "domain gap" when models are deployed in the real world. Existing zero-shot methods are either restricted to a small set of predefined object categories or require slow, iterative occlusion removal loops. The authors of this paper aim to build a flexible, category-agnostic, and completely tuning-free amodal segmentation pipeline.

Methods

The core trick relies on a fascinating property of generative models: the occlusion-free bias. If you mask out an area containing an occluded object and ask a diffusion model to fill it in, it naturally prefers to draw a complete, unoccluded object rather than continuing the obstacle.

Figure 1. Occlusion-free bias for a diffusion inpainting model. We observe that an inpainted object is always placed without oc- clusions inside the inpainting area (blue box), e.g., a tree could have been inpainted behind the fence.

To harness this bias without any fine-tuning, the authors designed a three-step pipeline:

  1. Leakage Conditioning: Instead of strictly forcing the inpainting model to keep the unmasked background identical, they "leak" a fraction of the original image context into the diffusion process. This creates a "soft scaffold" that allows the model to alter pixels outside the strict mask boundary, enabling it to smoothly extrapolate shapes beyond what is visible.
  2. Context-Aware Condition Image: To prevent the model from getting confused by sharp, artificial edges, they extract the visible object pixels, add a controlled amount of noise, and blend them into a smooth background generated from the object's own color histogram.
  3. Soft Inpainting Area: They compute the convex hull of the visible object's contours to define the region where the model should focus its generative power.

Once the diffusion model generates a complete, unoccluded version of the object, a standard segmentation model (like Segment Anything, or SAM) is used to extract the final amodal mask.

Overview of the tuning-free amodal segmentation pipeline.

Datasets

The method was evaluated across five diverse datasets to test its zero-shot generalizability:

  • COCO-A: Human-annotated amodal masks on top of real-world natural images from Microsoft COCO.
  • BSDS-A: Real-world images with manual amodal annotations derived from the Berkeley Segmentation Dataset.
  • KINS: A large-scale real-world dataset based on KITTI, focusing on autonomous driving scenes (cars, pedestrians, etc.).
  • FishBowl: A synthetic dataset featuring various fish species in an aquarium setup.
  • SAILVOS: A massive synthetic dataset rendered using the photo-realistic GTA-V game engine.

Key Insights and Ideas

  • The Generative Prior is Enough: We don't need explicit "amodal datasets" to teach a model what a whole object looks like. Internet-scale text-to-image and inpainting models already possess a deep geometric and structural understanding of the world.
  • Soft Inpainting Beats Hard Constraints: Traditional inpainting treats the mask as an absolute boundary. By introducing "leakage," the authors turn the mask into a suggestion, allowing the model to smoothly extrapolate contours beyond what is visible.
  • Background Harmony Matters: Diffusion models are highly sensitive to edge discontinuities. Replacing a harsh black or white background with a blurred, color-matched histogram of the object itself drastically improves the stability and accuracy of the reconstructed object contours.
Figure 3. We show a visual process of the diffusion model. As we are doing soft-inpainting, observe that our approach can predict an amodal mask much larger than the visible mask, i.e., extrapolate.

Key Results

  • Outperforming Supervised SOTA: Despite being completely zero-shot and tuning-free, the method beats the supervised state-of-the-art model (pix2gestalt) by an average of 5.3% mIoU across all five datasets.
  • Incredible Generalization: On out-of-domain datasets where supervised models struggle due to limited training variety, this method shines. It achieved a massive 25.6% mIoU improvement on KINS and a 21.9% improvement on SAILVOS.
  • Massive Efficiency Gains: Because it doesn't require complex iterative loops or heavy custom architectures, using Stable Diffusion 2 within this pipeline is 19x faster during inference and uses 4.1x less VRAM than pix2gestalt.
Figure 5. Qualitative comparison of amodal mask on KINS [37], FishBowl [45], and SAILVOS [18]. We observe that for novel cate- gories/ domain pix2gestalt may hallucinate inaccurate amodal masks.

Limitations and Future Work

  • Dependency on Contour Quality: The method doesn't care if the inpainted image looks perfectly photorealistic, but it does rely heavily on the model generating accurate object boundaries. If the underlying diffusion model hallucinates an incorrect shape topology, the final mask will be wrong.
  • Extreme Occlusion: When an object is almost entirely hidden (e.g., >90% occlusion), the initial visible mask provides very little color or contour context, making accurate reconstruction highly difficult.
  • Future Directions: The authors suggest that integrating this pipeline with next-generation foundation models (like Flux) or exploring adaptive leakage schedules based on the estimated occlusion rate could further push performance boundaries.

Summary updated

BibTeX
@misc{lee2025tuning,
  author = {Jae Joong Lee and Bedrich Benes and Raymond A. Yeh},
  title = {{Tuning-Free Amodal Segmentation via the Occlusion-Free Bias of Inpainting Models}},
  year = {2025},
  eprint = {2503.18947},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.18947},
}
Figure