DODA: Adapting Object Detectors to Dynamic Agricultural Environments in Real-Time with Diffusion
Shuai Xiang, Pieter M. Blok, James Burridge, Haozhou Wang, Wei Guo
TL;DR
DODA tackles the practical problem of domain shift in agricultural object detection by enabling real-time adaptation to unseen environments without retraining. It decouples domain-specific features from the diffusion model through external domain embeddings and introduces LI2I to tightly control layout, allowing high-quality, domain-consistent synthetic data generation. A two-stage training strategy further enhances data quality by leveraging unlabeled target-domain images. Empirical results on GWHD show consistent AP improvements across domains, with adaptation as fast as 2 minutes on a consumer GPU, highlighting DODA’s potential for practical, scalable deployment in diverse agricultural settings.
Abstract
Object detection has wide applications in agriculture, but domain shifts of diverse environments limit the broader use of the trained models. Existing domain adaptation methods usually require retraining the model for new domains, which is impractical for agricultural applications due to constantly changing environments. In this paper, we propose DODA ($D$iffusion for $O$bject-detection $D$omain Adaptation in $A$griculture), a diffusion-based framework that can adapt the detector to a new domain in just 2 minutes. DODA incorporates external domain embeddings and an improved layout-to-image approach, allowing it to generate high-quality detection data for new domains without additional training. We demonstrate DODA's effectiveness on the Global Wheat Head Detection dataset, where fine-tuning detectors on DODA-generated data yields significant improvements across multiple domains. DODA provides a simple yet powerful solution for agricultural domain adaptation, reducing the barriers for growers to use detection in personalised environments. The code is available at https://github.com/UTokyo-FieldPhenomics-Lab/DODA.
