On the Transferability of Agricultural Weed Detection Under Cross-Field Distribution Shift

Nikhilesh Prabhakar, Pranuthi Tenali, Wilfredo Abudeye Fernandez, Shekhar Borah, Athresh Karanam, Erik Blasch, Prabha Sundaravadivel, Sriraam NatarajanarXiv 2026

TL;DR

Weed detection models trained on UAV (drone) imagery fail to generalize when deployed on new fields or different crop types. This paper demonstrates that instead of relying on complex, volatile unsupervised domain adaptation algorithms, practitioners can achieve significantly better performance by simply fine-tuning models with a tiny handful of labeled target images (as few as 25).

What Problem Does This Paper Address?

Precision agriculture relies heavily on Unmanned Aerial Vehicles (UAVs) to spot weeds, allowing farmers to apply herbicides precisely where needed. While deep learning models excel at detecting weeds within the specific field they were trained on, they suffer a massive drop in accuracy when moved to a new field or a different crop. This "distribution shift" is caused by changes in weed species, crop appearance, soil conditions, drone altitudes, and camera sensors.

Since manually labeling thousands of bounding boxes for every new field is prohibitively expensive, researchers have turned to Unsupervised Domain Adaptation (DAOD) to bridge the gap without requiring new labels. However, the authors note that DAOD frameworks are rarely tested on the messy, real-world shifts encountered in agriculture—such as moving from a soybean field to a cotton field. This paper investigates exactly how severe these cross-field performance drops are and evaluates the most practical strategies to recover accuracy.

Methods

The authors establish a standardized evaluation pipeline using a Faster R-CNN backbone with a ResNet-50-FPN architecture. They systematically compare two main paradigms for handling domain shift:

  1. Unsupervised Domain Adaptive Object Detection (DAOD): Using the unified ALDI framework, they test two dominant DAOD strategies without providing any target-domain labels:
  2. Adversarial Feature Alignment (Align): Uses a gradient-reversal layer to force the network to learn features that are indistinguishable between the source and target fields.
  3. Self-Distillation (Distill): Uses a teacher-student model where a running average of the model generates "pseudo-labels" on the unlabeled target field to guide training.
  4. Few-Shot Fine-Tuning: A much simpler approach where the model is pretrained on a source dataset and then fine-tuned using standard supervised learning on a very small budget of labeled target images ($K \in \{5, 10, 25\}$).

Datasets

The study evaluates transferability across four distinct datasets representing different crops, viewpoints, and sensors:

  • Cotton Dataset (New): Collected by the authors, featuring 590 high-resolution UAV images taken at 25 feet, tiled into 5,706 patches ($640 \times 640$ pixels).
  • Soybean Dataset: An existing UAV dataset collected under a similar protocol, tiled into 1,628 patches.
  • CoFly-WeedDB: A public low-altitude drone dataset (207 images).
  • CottonWeedDet12: A public ground-level dataset containing 5,648 images of cotton weeds.

Key Insights and Ideas

  • DAOD is highly volatile out-of-the-box: Applying state-of-the-art unsupervised adaptation methods without extensive hyperparameter tuning frequently degraded performance compared to doing nothing at all (zero-shot transfer).
  • Simplicity wins over algorithmic complexity: A model fine-tuned on just 25 labeled images from the target field consistently outperformed complex unsupervised DAOD methods.
  • Data selection trumps algorithms: Choosing a "domain-adjacent" source dataset (e.g., transferring from one aerial row-crop to another) provides a much stronger foundation for few-shot learning than relying on algorithmic sophistication to fix a massive domain gap (like transferring from ground-level photos to aerial drone imagery).

Key Results

  • Zero-Shot Collapse: Directly applying a model trained on one dataset to another usually resulted in single-digit mAP@50 scores. The only exception was transferring from Cotton to Soybean (57.8 mAP@50), as they shared similar aerial perspectives and weed species.
  • DAOD Failures: As seen in Table 1, when adapting from Cotton to Soybean, unsupervised DAOD actually hurt performance, dropping the mAP@50 from 57.8 down to 50.3 (Distill) and 42.8 (Align).
Table 1. Domain-adaptation comparison for cross-field weed detection (target-test mAP50, checkpoints selected on the target validation split). In-Domain is the target’s in-domain supervised mAP50; Source-only is the source-trained detector applied zero- shot to the target. Distillation and adversarial alignment are reported as mean ± std over n seeds (single-seed cells show no interval); ∆is the change relative to source- only. Adversarial alignment on the 108-image CoFly source diverges (Inf/NaN) at the default learning rate and is omitted (†). Adversarial alignment was not run for the CottonWeedDet12 target (–-); we report distillation only.
  • Few-Shot Dominance: As shown in Table 2, providing just 5 labeled target images ($K=5$) for the Cotton $\rightarrow$ Soybean transfer bumped the mAP@50 to 66.7. Increasing the budget to $K=25$ achieved 80.0 mAP@50, outperforming the unsupervised DAOD baseline by nearly 30 points and approaching the ideal in-domain performance (76.8).
Table 2. Few-shot fine-tuning vs. unsupervised domain adaptation (target-test mAP50). Each K column is the mean ± std over M random label draws (M=5 for K ∈{5, 10}, M=4 for K=25). The “All (full FT)” column fine-tunes the source de- tector on the entire target training set (full supervision, n=3 seeds, longer schedule) and is compared against the in-domain score to isolate the value of source pretraining. Source and DAOD (from Table 1) and the in-domain score are shown for reference. Fine-tuning on a handful of target labels exceeds both source-only and the best adapted model on the learnable target (soybean (S)), reaching the in-domain score by K=25, but does not move the target (cotton (C)). CoFly and CWDet12 are referred by CF and CW for brevity.

Limitations and Future Work

While few-shot learning worked exceptionally well when transferring to the soybean dataset, the newly introduced cotton dataset proved to be a much harder target. When transferring from Soybean to Cotton, even 25 labeled images failed to push the mAP@50 past 9.4, indicating that some distribution shifts remain fundamentally too difficult for simple few-shot adaptation.

Additionally, the authors applied the DAOD algorithms using default configurations; deployment-specific hyperparameter tuning might yield better results, though it requires ML expertise that practical agronomists typically lack. Moving forward, the authors plan to integrate these models into a closed-loop system where real-time detection feedback dynamically alters drone flight paths to focus on heavily infested areas.

Summary updated

BibTeX
@misc{prabhakar2026transferability,
  author = {Nikhilesh Prabhakar and Pranuthi Tenali and Wilfredo Abudeye Fernandez and Shekhar Borah and Athresh Karanam and Erik Blasch and Prabha Sundaravadivel and Sriraam Natarajan},
  title = {{On the Transferability of Agricultural Weed Detection Under Cross-Field Distribution Shift}},
  year = {2026},
  eprint = {2608.21254},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.21254},
}
Figure