YOLO11-ARAF: An Accurate and Lightweight Method for Apple Detection in Real-World Complex Orchard Environments

Yuan Lin, Yu-Jun Xia, Pengcheng Xia, Zhengyang Liu, Haodi Wang, Chengjin Qin, Liang Gong, Chengliang LiuAgriculture 2025 · DOI

TL;DR

This paper introduces YOLO11-ARAF, a novel deep learning model for accurate and efficient apple detection in complex orchard environments. By incorporating a new CARConv module for rotational invariance and an AFGCAM attention mechanism for challenging lighting, the model achieves improved detection performance. Further optimization through knowledge distillation results in a lightweight YOLO11n version suitable for edge devices, doubling inference speed while maintaining high accuracy.

What Problem Does This Paper Address?

Automated apple harvesting relies heavily on accurate fruit detection. However, real-world orchards present significant challenges: varying illumination (dazzling sun, shadows, low light), complex backgrounds with branches and leaves, and diverse apple appearances (color, size, occlusion). Existing object detection models, even advanced ones like YOLO variants, struggle with these conditions, leading to insufficient recognition performance and poor generalization. This limits the practical deployment of autonomous apple-picking robots. The authors aim to develop a model that is both highly accurate and computationally efficient, making it suitable for deployment on resource-constrained edge devices commonly used in agricultural robotics.

Methods

The core of the proposed solution is an enhanced YOLO11 architecture, named YOLO11-ARAF. The key innovations are:

  • CARConv Module: This module replaces the standard C3k2 bottleneck in the YOLO11 backbone. It integrates Adaptive Rotational Convolution (ARConv), which allows the convolutional kernel to dynamically adapt to the orientation of objects. This is crucial for apples, which can appear at various angles due to natural growth and camera perspectives.
  • AFGCAM Attention Module: An enhanced version of the AFGCA attention mechanism, AFGCAM is incorporated into both the backbone and neck of the YOLO11 model. It uses a dual-pooling strategy (Global Average Pooling and Global Max Pooling) to capture both broad contextual features and fine-grained local details. This helps the model better discern apples under challenging lighting and occlusion.
  • Knowledge Distillation: To address the increased computational cost of the enhanced YOLO11-ARAF model, knowledge distillation is employed. A larger, more accurate "teacher" model (YOLO11-ARAF) is used to train a smaller, faster "student" model (YOLO11n). This process transfers the learned knowledge, enabling the student model to achieve high accuracy with significantly reduced parameters and improved inference speed.

Datasets

  • Custom Apple Dataset: The authors constructed a new dataset consisting of 3942 annotated images of apples. This dataset was specifically designed to capture diverse real-world orchard conditions, including varied illumination (normal, dazzling, night, complex, overexposure, backlighting), different shooting angles, and varying shading levels. This diverse dataset is crucial for training and validating the model's robustness.
  • Existing Datasets: While not explicitly detailed for training, the paper mentions comparative experiments against other YOLO series models and RTDETR, implying these models were likely evaluated on standard benchmarks or the authors' custom dataset.

Key Insights and Ideas

  • Rotational Invariance is Key: The success of CARConv highlights that standard convolutional layers can struggle with objects at varying orientations. Explicitly addressing rotational adaptivity is vital for robust detection in natural scenes.
  • Dual Attention for Robustness: Combining global and local feature extraction via AFGCAM's dual-pooling strategy proves more effective than single-pooling methods for handling complex visual challenges like lighting variations and occlusions.
  • Distillation for Practicality: Knowledge distillation is a powerful tool for bridging the gap between high-accuracy research models and deployable, efficient edge-device solutions. The YOLO11n model demonstrates that significant speedups are achievable without substantial accuracy loss.
  • Dataset Diversity Matters: The creation of a custom dataset reflecting diverse orchard conditions was essential for training a model that generalizes well beyond controlled environments.

Key Results

  • YOLO11-ARAF Performance: The improved YOLO11-ARAF model achieved 89.4% accuracy, 86% recall, 92.3% mAP@50, and 64.4% mAP@50:95. These metrics represent improvements of 0.3%, 1.1%, 0.72%, and 2% respectively, over the baseline YOLO11 model.
  • Lightweight YOLO11n: The distilled YOLO11n model significantly reduced parameters and doubled the inference speed (FPS) compared to the improved YOLO11-ARAF, making it suitable for edge deployment.
  • Robustness in Challenging Scenarios: The model demonstrated superior performance on challenging sub-validation sets, particularly in complex lighting conditions, showing a 0.7% and 2% accuracy improvement over the baseline in complex background and complex lighting scenarios, respectively.
  • Comparative Performance: YOLO11-ARAF outperformed other YOLO series models and RTDETR variants in key metrics, especially mAP@50:95, indicating better localization accuracy.

Limitations and Future Work

  • Dataset Specificity: The current dataset primarily features a single apple variety. The authors acknowledge that this might limit the model's generalization to other apple varieties with different visual characteristics. Future work should involve collecting diverse apple samples to retrain the model.
  • Model Size: While knowledge distillation improved efficiency, the YOLO11-ARAF model's parameter size is still larger than some typical convolutional models.
  • Future Directions: The authors suggest exploring model pruning techniques to eliminate redundant layers and investigating more lightweight distillation student models and algorithms for further efficiency gains. They also note that complex background conditions (severe occlusion) pose a greater challenge than complex illumination, suggesting this as a potential area for future optimization.

Summary updated

Abstract

Accurate object detection is a fundamental component of autonomous apple-picking systems. In response to the insufficient recognition performance and poor generalization capacity of existing detection algorithms under unstructured orchard scenarios, we constructed a customized apple image dataset captured under varying illumination conditions and introduced an improved detection architecture, YOLO11-ARAF, derived from YOLO11. First, to enhance the model’s ability to capture apple-specific features, we replaced the original C3k2 module with the CARConv convolutional layer. Second, to reinforce feature learning in visually challenging orchard environments, the enhanced attention module AFGCAM was embedded into the model architecture. Third, we applied knowledge distillation to transfer the enhanced model to a compact YOLO11n framework, maintaining high detection efficiency while reducing computational cost, and optimizing it for deployment on devices with limited computational resources. To assess our method’s performance, we conducted comparative experiments on the constructed apple image dataset. The improved YOLO11-ARAF model attained 89.4% accuracy, 86% recall, 92.3% mAP@50, and 64.4% mAP@50:95 in our experiments, which are 0.3%, 1.1%, 0.72%, and 2% higher than YOLO11, respectively. Furthermore, the distilled model significantly reduces parameters and doubles the inference speed (FPS), enabling rapid and precise apple detection in challenging orchard settings with limited computational resources.
BibTeX
@inproceedings{lin2025yolo,
  author = {Yuan Lin and Yu-Jun Xia and Pengcheng Xia and Zhengyang Liu and Haodi Wang and Chengjin Qin and Liang Gong and Chengliang Liu},
  title = {{YOLO11-ARAF: An Accurate and Lightweight Method for Apple Detection in Real-World Complex Orchard Environments}},
  booktitle = {Agriculture},
  year = {2025},
  doi = {10.3390/agriculture15101104},
}
Figure