Filling in the blanks of an image isn't just about making things look aesthetically pleasing—it’s about making them geometrically accurate. When using a reference photo to complete a missing region in a target image (a task known as reference-driven image completion), standard AI models often struggle. They might generate a perfectly sharp texture that is completely misaligned with the rest of the scene’s perspective.
A new framework from researchers at the National University of Singapore, titled GeoComplete, argues that the missing ingredient is explicit 3D geometry. By teaching diffusion models to "see" the underlying 3D structure of a scene, they’ve achieved a massive leap in both accuracy and visual consistency.
The Challenge of 3D-Aware Image Completion
Imagine you have a photo of a living room with a large object blocking the view of a bookshelf. You also have a few other photos of the same room from different angles where the bookshelf is visible. Reference-driven image completion aims to use those extra photos to "paint in" the bookshelf in your original photo.
Current generative models, such as Stable Diffusion, excel at creating plausible textures but lack "geometric common sense." Without knowing the camera's position or the depth of the objects, these models often hallucinate structures that don't match the 3D layout of the room. They might put the books at the wrong angle or fail to account for how the shelf should look from the target viewpoint. Existing methods try to solve this by fine-tuning on the reference images, but they still fall short when the viewpoints differ significantly.
The GeoComplete Approach
GeoComplete introduces a unified framework to fix this misalignment by explicitly conditioning the diffusion process on 3D structural guidance.
The system relies on three core innovations:
- Dual-Branch Diffusion Architecture: Instead of a single stream of information, the model uses two parallel branches. The Target Branch processes the masked image we want to complete, while the Cloud Branch processes a projected 3D point cloud of the scene. These two branches communicate via Joint Self-Attention, allowing the geometric features from the point cloud to directly guide the pixel synthesis in the image.
- Target-Aware Masking: During training, most models mask regions randomly. GeoComplete projects the target view into the reference views to identify "informative regions"—areas that are missing in the target but visible in the references. It then specifically masks these regions to force the model to learn how to transfer useful information across views.
- Dynamic Content Filtering: To get a clean 3D point cloud, the system uses VGGT (Visual Geometry Grounded Transformer) for 3D attribute prediction. Crucially, it integrates LangSAM (Language Segment Anything) to filter out dynamic objects (like a walking cat or a moving person) that would otherwise break the geometric consistency of the static scene.
Key Insights and Results
The researchers evaluated GeoComplete on two primary benchmarks: RealBench (33 complex scenes with ground-truth completions) and QualBench (25 challenging scenes for qualitative assessment). The model was compared against heavyweights like Paint-by-Example, TransFill, and RealFill.
The quantitative results are striking. On the RealBench dataset, GeoComplete achieved:
- A 17.1% improvement in PSNR (Peak Signal-to-Noise Ratio) over the previous state-of-the-art.
- Significant gains in SSIM (Structural Similarity Index), moving from 0.424 to 0.578, indicating vastly superior structural preservation.
In user studies, participants preferred GeoComplete’s results by a wide margin, citing better realism and consistency with the reference images. Qualitatively, where previous methods would "bend" walls or misplace windows, GeoComplete maintains straight lines and correct perspective. The explicit conditioning on 3D point clouds acts as a "spatial anchor," preventing the model from hallucinating misaligned structures.
Limitations and Future Work
Despite its success, GeoComplete has a few hurdles. The model relies on per-scene fine-tuning (using LoRA), which takes about 72 minutes for 2,000 steps on four high-end GPUs, making it less suitable for real-time applications. Furthermore, the quality of the completion is heavily dependent on the accuracy of the initial 3D estimation; if the point cloud is noisy, the final image will suffer.
Looking ahead, the authors suggest pre-training the LoRA parameters on a massive, task-specific dataset to provide a better initialization. This could drastically reduce the number of fine-tuning steps needed for a new scene, paving the way for faster, geometrically flawless image completion.
Summary updated