Amodal Instance Segmentation with Diffusion Shape Prior Estimation

Minh Tran, Khoa Vo, Nguyen Thanh Binh, Ngan LePOETS @ CVPR 2024 · DOI

Abstract

Amodal Instance Segmentation (AIS) requires models to perceive the full extent of objects, even when partially occluded. Current methods often fail to generalize or ignore vital semantic information. We introduce AISDiff, a framework that utilizes pre-trained diffusion models to estimate shape priors by "hallucinating" occluded regions. By leveraging the internal attention maps of a diffusion process, AISDiff extracts rich geometric and semantic priors without the need for full image generation. Our method achieves state-of-the-art performance on several AIS benchmarks, including KINS, COCOA-cls, and D2SA.

Introduction

In real-world visual scenes, objects are frequently occluded. While humans possess the cognitive ability to infer the complete shape of a partially hidden object—such as a car behind a tree—computational models find this task, known as Amodal Instance Segmentation (AIS), significantly challenging.

Existing AIS approaches typically attempt to learn "shape priors" from limited training data. However, these methods suffer from two primary drawbacks: overfitting to specific training shapes and neglecting semantic information. For instance, knowing an object is a "car" provides a strong structural template that purely mask-based methods often ignore.

Methodology

AISDiff addresses these challenges by treating amodal completion as a generative inpainting task. The framework consists of three main components: an occlusion-aware head, a diffusion-based shape prior estimator (DiffSP), and an amodal predictor.

The AISDiff framework overview, showing the flow from ROI features to the final amodal mask prediction.

1. Occlusion-Aware Head

The process begins with an input Region of Interest (RoI). The occlusion-aware head predicts three essential elements: the Visible Mask (visible pixels), the Occluding Mask (pixels of the blocking object), and the Object Category (e.g., "car"). These predictions serve as conditions for the subsequent diffusion stage.

2. DiffSP: Diffusion Shape Prior Estimation

The core innovation of AISDiff is the DiffSP module, which leverages a pre-trained diffusion model (such as Stable Diffusion) to generate a shape prior. Unlike standard generative tasks, AISDiff does not require a full, high-resolution image.

Detailed view of the DiffSP module, illustrating how cross-attention maps are extracted from the diffusion process to form a shape prior.

Instead of waiting for the full denoising process, the authors found that internal cross-attention maps stabilize rapidly. By averaging these maps over a small number of steps (e.g., $T=10$), the model extracts a robust "shape prior" that outlines the full object. This process is conditioned on the visible pixels, the occluding mask, and a text prompt of the object category, allowing the model to use its vast pre-trained knowledge to "fill in" the gaps.

3. Shape Prior Amodal Predictor

The estimated shape prior is then passed to a predictor module. This module uses an attention-based mechanism to refine the original RoI features using the diffusion-derived prior, ultimately outputting the final Amodal Mask.

Experiments and Results

AISDiff was evaluated on three major benchmarks: KINS (autonomous driving), COCOA-cls (natural scenes), and D2SA (supermarket items).

The model achieved state-of-the-art (SOTA) or highly competitive results:

  • D2SA: 71.01 AP, surpassing previous leaders.
  • COCOA-cls: 35.93 AP, showing significant improvement in complex scenes.
  • KINS: 36.9 AP (with ResNet-101), matching SOTA performance on large-scale data.

Ablation studies highlighted the importance of multi-condition diffusion. Incorporating both the object category and the occluding mask as conditions led to a substantial performance jump on the KINS dataset (from 31.12 to 36.36 AP).

Discussion and Conclusion

AISDiff demonstrates that pre-trained generative models can serve as powerful knowledge bases for discriminative tasks like AIS. By using internal attention maps as a "shortcut," the framework avoids the high computational cost of full image generation while still benefiting from the model's deep understanding of object geometry.

While the use of diffusion models introduces some computational overhead compared to traditional CNN heads, the gains in accuracy and generalization are significant. Future work may involve optimizing the diffusion architecture for real-time applications or integrating these priors more deeply into the initial detection backbones.

Summary updated

BibTeX
@misc{tran2024amodal,
  author = {Minh Tran and Khoa Vo and Nguyen Thanh Binh and Ngan Le},
  title = {{Amodal Instance Segmentation with Diffusion Shape Prior Estimation}},
  year = {2024},
  eprint = {2409.18256},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.18256},
}
Figure