GeoDiffuser: Geometry-Based Image Editing with Diffusion Models
Rahul Sajnani, Jeroen Vanbaar, Jie Min, Kapil Katyal, Srinath Sridhar
TL;DR
GeoDiffuser presents a zero-shot method that unifies 2D and 3D image editing by embedding geometric transformations directly into the shared attention of diffusion models. It uses object segmentation and optional depth maps, inverts the input image, and optimizes latents and null-text embeddings under losses that preserve background and object identity while inpainting disoccluded regions. The approach, which does not require training and works with any attention-enabled diffusion model, demonstrates strong quantitative and perceptual performance against baselines for translation, rotation, scaling, and removal. This technique advances practical image editing by enabling precise geometric edits in natural scenes with realistic lighting, shadows, and inpainted backgrounds. The results indicate significant potential for robust, geometry-driven editing in real-world workflows while highlighting areas for improvement in foreground disocclusion handling for large 3D rotations.
Abstract
The success of image generative models has enabled us to build methods that can edit images based on text or other user input. However, these methods are bespoke, imprecise, require additional information, or are limited to only 2D image edits. We present GeoDiffuser, a zero-shot optimization-based method that unifies common 2D and 3D image-based object editing capabilities into a single method. Our key insight is to view image editing operations as geometric transformations. We show that these transformations can be directly incorporated into the attention layers in diffusion models to implicitly perform editing operations. Our training-free optimization method uses an objective function that seeks to preserve object style but generate plausible images, for instance with accurate lighting and shadows. It also inpaints disoccluded parts of the image where the object was originally located. Given a natural image and user input, we segment the foreground object using SAM and estimate a corresponding transform which is used by our optimization approach for editing. GeoDiffuser can perform common 2D and 3D edits like object translation, 3D rotation, and removal. We present quantitative results, including a perceptual study, that shows how our approach is better than existing methods. Visit https://ivl.cs.brown.edu/research/geodiffuser.html for more information.
