Photorealistic Object Insertion with Diffusion-Guided Inverse Rendering
Ruofan Liang, Zan Gojcic, Merlin Nimier-David, David Acuna, Nandita Vijaykumar, Sanja Fidler, Zian Wang
TL;DR
DiPIR addresses the challenge of photorealistic virtual object insertion into single images by jointly estimating scene lighting and tone-mapping through a diffusion-guided, physically based inverse rendering framework. It couples a differentiable path-traced renderer with a personalized diffusion model via an adaptive diffusion guidance (LDS) loss and introduces two-stage environment-map fusion to recover high-frequency lighting cues and accurate shadows. The approach uses a lightweight LoRA-based diffusion personalization and SG-based lighting to enable end-to-end optimization of lighting, shadowing, and tone curves, applicable to indoor and outdoor scenes and across videos. Experimental results on Waymo and PolyHaven demonstrate superior realism and robustness against strong baselines, with ablations validating the contributions of personalization, tone-mapping, and environment-map fusion.
Abstract
The correct insertion of virtual objects in images of real-world scenes requires a deep understanding of the scene's lighting, geometry and materials, as well as the image formation process. While recent large-scale diffusion models have shown strong generative and inpainting capabilities, we find that current models do not sufficiently "understand" the scene shown in a single picture to generate consistent lighting effects (shadows, bright reflections, etc.) while preserving the identity and details of the composited object. We propose using a personalized large diffusion model as guidance to a physically based inverse rendering process. Our method recovers scene lighting and tone-mapping parameters, allowing the photorealistic composition of arbitrary virtual objects in single frames or videos of indoor or outdoor scenes. Our physically based pipeline further enables automatic materials and tone-mapping refinement.
