Manuscript Offprint

arXiv:2609.02299

Domain shift-robust object detection with GenAI image editing

Isabel D. Stein, Thijs A. Eker, Sebastiaan P. Snel, Ella P. Fokkinga, Klamer Schutte, Luca Ambrogioni, Friso G. Heslinga

ABSTRACT

Object detectors often degrade under domain shifts such as changes in lighting, weather, or occlusion. These shifts alter object appearance and expose a reliance on visual shortcuts learned from the training distribution that do not generalize across domains. Acquiring sufficient real-world samples to capture such domain variation is particularly difficult in specialized, low-data settings. Recent advances in diffusion-based generative image editing have shown promise for improving the in-domain performance of object detectors through synthetic data augmentation. However, their potential to improve out-of-domain robustness remains largely unexplored. We hypothesize that generative image editing can simulate a controlled domain shift in training data, effectively bridging the gap between source and target domains.

To test this, we studied camouflaged military vehicle detection as a challenging domain shift scenario. Detectors trained on uncamouflaged data demonstrate substantial degradation on real test imagery containing foliage, netting, and multi-spectral camouflage across 15 vehicle classes in close-up, ground-level imagery. We used two diffusion-based editing models, Qwen Image Edit 2509 and Flux.2 Dev, to synthetically add camouflage to the training data, alongside a LoRA fine-tuned version of Qwen. A non-generative black-bar occlusion baseline served as a lower bound on augmentation quality. Using a GroundingDINO detector trained on real and synthetic data, generative camouflage augmentation yielded substantial mAP improvements for foliage (+20.1) and netting (+14.4) camouflage. Generating multi-spectral camouflage proved more challenging, but LoRA fine-tuning improved performance by 4.4 mAP over the uncamouflaged baseline. The stronger gains from more realistic augmentations relative to the black-bar baseline confirm that higher synthetic fidelity introduces meaningful visual features. These findings demonstrate that generative image editing is a promising approach to reducing domain gaps in low-data regimes, with fine-tuning available to address cases where zero-shot editing alone falls short.

Keywords: Diffusion model; Rectified flow transformer; Data augmentation; Generative AI; Synthetic data; Deep learning; Object detection; Vehicle detection; Domain shift; Camouflage

1. INTRODUCTION

Object detection models often degrade substantially when deployed in an environment that differs from their training data,1^{1} a phenomenon known as domain shift. Domain shifts can arise from changes in environmental conditions, object appearance, or background context, which alter the visual cues available for detection.2^{2} Detectors are particularly vulnerable to these changes when they rely on visual shortcuts that are predictive in the training domain but fail to generalize across domains.3^{3} Robust detection therefore relies on learning feature representations that remain informative despite domain shifts.4^{4} However, capturing the full range of target-domain variations in real-world data is often infeasible.5^{5}

Recent advances in generative AI (GenAI), particularly diffusion-based image synthesis, offer a promising approach to enrich limited real-world datasets with synthetic diversity.6^{6} Diffusion-generated images have been shown to improve in-domain segmentation, classification, and detection performance,7−13^{7-13} yet to our knowledge this approach has not been used to improve out-of-domain detection by editing source-domain images, without

Corresponding author: Friso G. Heslinga. E-mail: fgheslinga@gmail.com target-domain data. In this work, we hypothesize that generative image editing can reduce the source-target domain gap by introducing controlled target-domain appearance variations into the training data while preserving the underlying object and scene content.

We focus on camouflaged military vehicle detection as a challenging domain shift. Detectors trained on uncamouflaged vehicles are expected to experience substantial performance degradation when deployed on camouflaged vehicles, partly due to the occlusion of key visual cues and partly because camouflage reduces the contrast between the target and the background. At the same time, collecting and annotating large amounts of real-world camouflaged military imagery is particularly difficult. This scarcity motivates the use of generative image editing to construct a synthetic camouflaged dataset. A dataset containing imagery of 15 uncamouflaged military vehicle classes is used, onto which synthetic camouflage is introduced while preserving the underlying vehicle geometry. This introduces target-domain appearance variation without requiring additional data collection. Generative image editing is particularly promising in this setting because modern generative models can synthesize images with high fidelity, 14,15^{14,15} reproducing detailed visual cues such as texture, shadow, and reflections, which support fine-grained recognition.

In this work, we evaluate whether generative image editing can reduce detection performance degradation under camouflage-induced domain shifts in low-data settings. We further investigate whether fine-tuning generative models on domain-specific data improves the usefulness of the resulting synthetic data for object detection. To address these questions, we compare zero-shot and fine-tuned generative image editing pipelines that synthetically introduce foliage, netting, and multi-spectral camouflage. A non-generative augmentation baseline is included to assess the importance of synthetic realism.

References (43)