Stable diffusion fine-tuned for precise garden photo editing

Domain-Adapted Stable Diffusion for Mask-Guided Residential Landscape Inpainting: A Small-Data Case Study

Computer Vision and Pattern RecognitionMachine Learning

Summary

Editing photos of real gardens is tricky for general AI models because they don’t always know garden-specific terms and struggle to keep untouched parts of the photo the same. The authors fine-tuned a version of the Stable Diffusion model using a small set of garden images so it better understands landscaping features. Their model lets users redraw just a chosen part of a garden photo while leaving everything else unchanged. They tested their method on several photos and showed it can create different realistic garden layouts while avoiding visible changes outside the edited area.

What this means in practice

  • For landscape architects: Generate plausible design alternatives for specific garden areas directly on real photographs, facilitating client presentations and planning.
  • For real estate marketers: Create multiple edited garden views in property photos to highlight potential outdoor enhancements without altering the original surroundings.

Authors

Moazzam Umer Gondal, Muhammad Arham, Abdullah Umar, Hamad Ul Qudous

Abstract

Text-guided diffusion models can generate convincing outdoor scenes, but redesigning the garden in a photograph of a real home requires two things that general-purpose models do not provide by default: familiarity with landscaping vocabulary (decking, stone pathways, hedging, raised planters) and strict preservation of everything outside the region being redesigned. We study a simple recipe that targets both. We briefly fine-tune the U-Net of Stable Diffusion 2 on 433 captioned landscaping images, keeping the autoencoder and text encoder frozen, and use the resulting checkpoint for mask-guided latent editing in which only a user-painted ground region is regenerated. We analyze 46 edits of 10 residential photographs produced in 11 exploratory sessions with recorded seeds and sampler settings. Because no ground-truth redesigns exist, we use reference-free measurements: the pipeline leaves pixels outside the estimated edit region unchanged (median PSNR 56.3 dB, mean SSIM 0.998); the edit boundary carries no more edge energy than the original photograph (seam ratio 0.94 vs. 0.96); different seeds give visibly different layouts; and the magnitude of change is consistent with the denoising strength, as expected from SDEdit-style editing. We also show observed failure cases, including an ignored negation and an overly literal rendering of a prompt phrase.