Zero-Shot Object Removal via Attention Masking, Latent Anchoring, and Refinement
Abstract
Removing an object from a real image requires more than synthesizing plausible content within a mask: the method must suppress residual object features, preserve the unedited scene, and generate replacement content that is consistent with the surrounding background. This paper approaches object removal from a stage-based perspective and proposes a zero-shot framework for constrained latent inpainting with a frozen pretrained Stable Diffusion model, requiring no task-specific training or model fine-tuning. The method integrates SAM-based mask construction, BLIP image-caption conditioning, DDIM inversion, background-weighted masked null-text optimization, decoder self-attention masking, hard outside-mask latent anchoring, and localized renoise--denoise refinement into a unified pipeline. The method is evaluated through qualitative examples, quantitative local-consistency metrics, and ablation studies. The results demonstrate effective object removal and context-consistent replacement content. The ablations indicate that background-weighted masked NTI is particularly beneficial for structurally complex backgrounds, whereas the no-NTI variant is sufficient in other evaluated examples. Repeated refinement further reduces object remnants and boundary artifacts remaining after the primary editing pass.
Create a lesson
Metadata
- Comments
- Code available at https://github.com/arman-taghizadeh/zero-shot-diffusion-object-removal
Related papers
AstraLOD3: Zero-shot multimodal agentic reconstruction of LOD3 building models
Shared title terminologycs.CVBryan G. Pantoja-Rosero
FounRef: Robust, Structure-Preserving, and Fast Metric Refinement of Frozen Monocular Foundation Priors with Sparse Anchors
Shared title terminologycs.CVDan Halperin, Mirko Mählisch
Hybrid Gaussians for Robust Open-Vocabulary 3D Segmentation with Multi-View Object Association and Boundary Refinement
Shared title terminologycs.CVXueqi Qiu, Yueming Sun, Tianyu Zhang et al.
Frequency-Domain AI-Generated Image Detection: Exploring Decoder and Channel Attention for Feature Refinement
Shared title terminologycs.CVUday Shankar Roy, Mahbuba Jahan Minu
LiveVAE: Causal Window Attention Makes Efficient Streaming Video VAE
Shared title terminologycs.CVJiachen An, Sijie Zhao, Le Li et al.
Enhancing Maritime Domain Awareness using Latent Space Representations
Shared title terminologycs.CVRikard Vinge, Miguel A. Belenguer-Plomer, Isabelle Wittmann et al.