Small green fruit detection is often required during the thinning stage in an orchard. However, serious challenges remain, such as high color similarity between target fruits and background foliage, small physical dimensions, low image contrast, and frequent dense occlusion. Existing frameworks suffer from shallow feature loss caused by repeated backbone downsampling, insufficient saliency modeling under low contrast, and semantic misalignment across feature pyramid levels. In this study, an improved detection model, AFS-DETR (Adaptive Fusion and Sensitivity-aware Real-Time Detection Transformer), was proposed based on Real-Time Detection Transformer (RT-DETR) to improve detection accuracy for small green fruits in complex orchard environments. Three targeted modules were incorporated into the RT-DETR architecture. The C2f_AdaptiveFusion (C2AF) module was designed to replace the standard backbone block with a multi-branch dynamic convolution structure, particularly with an Adaptive Kernel Weights (AKW) mechanism, thereby enhancing shallow-layer feature representation for tiny-target localization. The HyperACE (HACE) module was introduced into the feature pyramid neck to model high-order semantic dependencies over multi-scale features via dynamic hyperedge construction, thus improving adaptive fusion under low contrast. The FullPAD_Tunnel (FPADT) gated alignment module was introduced with a learnable scalar gate to suppress cross-level semantic misalignment at the feature-pyramid-to-decoder interface with minimal computational overhead. Experiments were conducted on three types of datasets under different fruit species and scene conditions. The Golden Pear dataset was captured with 2 438 high-resolution images under diverse orchard conditions, including top-view, upward-view, front-lighting, back-lighting, occlusion, and stacking scenarios. Furthermore, AFS-DETR achieved an average precision at intersection-over-union threshold 0.5 (AP50) of 90.4%, AP at threshold 0.75 (AP75) of 78.4%, recall of 84.5%, and F1-score of 86.9%. Small-object average precision (APS) reached 56.8%. As such, AFS-DETR recorded the highest APS of 56.8% and the highest medium-object average precision (APM) of 85.7% among all compared models on the Golden Pear dataset, including YOLOv8-n, YOLOv11-n, YOLOv13-n, Faster R-CNN (Region-based Convolutional Neural Network), and Dynamic R-CNN. The public MinneApple benchmark included 1 001 images with the mixed red and green apple instances at dense small-scale distributions. Furthermore, AFS-DETR achieved a mean average precision (AP50-95) of 40.9% and APS of 27.1%, with the AP50-95 ranking first among all compared models. The AP50-95 of 40.9% exceeded Deformable DETR (18.7%) by more than a factor of two and surpassed the latest lightweight detectors YOLOv12-n (34.4%) and YOLOv13-n (36.2%). On the Crabapple dataset with 1 057 images, including nighttime low-illumination scenes, AFS-DETR achieved an AP50 of 89.6%, AP50-95 of 65.6%, and APS of 52.0%, thus outperforming YOLOv11-n (APS of 49.2%), YOLOv13-n (APS of 45.6%), and Faster R-CNN (APS of 35.1%). Ablation experiments on the Golden Pear dataset confirmed that the C2AF provided the largest individual performance gain as the feature-extraction foundation. The C2AF and FPADT combination achieved the highest recall of 84.3% and F1-score of 87.5% among all dual-module configurations. The complete AFS-DETR attained the optimal AP75 of 78.4%. APS ranked first on the Golden Pear and Crabapple datasets, and was the best among Transformer-based methods on MinneApple. In model efficiency, AFS-DETR contained 15.2 M parameters and 46.8 giga floating-point operations (GFLOPs), which were reduced by 23.2% and 17.8%, compared with the RT-DETR-R18 baseline. End-to-end processing speed on an NVIDIA RTX 3090 graphics processing unit (GPU) reached 65.5 frames per second (FPS), demonstrating real-time processing capability on the test platform. AFS-DETR addresses the detection difficulties of small green fruits in complex orchard environments—low foreground-background contrast, fine-scale target dimensions, and dense occlusion—through three complementary modular structural improvements. The generalization of the model is also verified over self-built and public benchmark datasets, including different fruit species and scene variations. The framework can provide a reliable and deployable technical solution for yield estimation, growth monitoring, and intelligent robotic fruit-thinning in a precision orchard.
Publications
- Article type
- Year
- Co-author
Year
Issue
Transactions of the Chinese Society of Agricultural Engineering 2026, 42(15): 296-306
Published: 15 August 2026
Downloads:0
Total 1
京公网安备11010802044758号