DOI: 10.3390/agriculture16121361 ISSN: 2077-0472

Agri-DETR: An Efficient Visual Obstacle Detection Framework for Intelligent Agricultural Machinery in Unstructured Field Environments

Hao Fan, Jintao Xi, Xi Chen, Bingyu Sun

Object detection in unstructured agricultural environments remains challenging due to large scale variations, complex backgrounds, irregular obstacle shapes, and limited computational resources. To address these challenges, this paper proposes Agri-DETR, an efficient end-to-end detection framework based on the Real-Time Detection Transformer (RT-DETR), with coordinated improvements in feature perception, multi-scale representation, spatial reconstruction, and bounding box regression. Specifically, a lightweight backbone with a high-resolution feature branch is introduced to enhance the representation of small and fine-grained targets. A large selective feature fusion module is designed to strengthen multi-scale contextual modeling and improve feature discrimination under complex backgrounds. In addition, an attention-enhanced dynamic upsampling module refines high-resolution feature reconstruction, while a scale–shape–geometry-aware Intersection over Union (SSGIoU) loss improves localization stability for irregular and elongated objects. Experimental results show that Agri-DETR achieves 66.0% Average Precision (AP) on the self-constructed Agricultural Obstacle Dataset (AO-Dataset), outperforming representative detectors while reducing the parameter count by approximately 25% compared with RT-DETR-R18 baseline. In particular, small-object AP increases by 1.4%, demonstrating improved detection capability for small obstacles. Cross-dataset evaluation on COCO2017 further shows that Agri-DETR achieves 48.3% AP, demonstrating favorable generalization capability beyond the agricultural domain. These results indicate that Agri-DETR achieves an effective balance among detection accuracy, model complexity, and practical efficiency, making it a promising solution for real-world agricultural obstacle detection.

More from our Archive