Skip to main content
QUICK REVIEW

[Paper Review] YOLOv5s-BC: An improved YOLOv5s-based method for real-time apple detection

Jingfan Liu, Zhaobing Liu|arXiv (Cornell University)|Nov 10, 2023
Smart Agriculture and AI4 citations
TL;DR

This paper proposes YOLOv5s-BC, an enhanced YOLOv5s-based model for real-time apple detection, integrating a Coordinate Attention block in the backbone, a BiFPN neck for improved feature fusion, and a modified head for better detection of small and distant apples. The model achieves a 4.6% mAP improvement over YOLOv5s and maintains real-time inference at 0.018 seconds per image with a 16.7 Mb model size.

ABSTRACT

To address the issues associated with the existing algorithms for the current apple detection, this study proposes an improved YOLOv5s-based method, named YOLOv5s-BC, for real-time apple detection, in which a series of modifications have been introduced. Firstly, a coordinate attention (CA) block has been incorporated into the backbone module to construct a new backbone network. Secondly, the original concatenation operation has been replaced with a bidirectional feature pyramid network (BiFPN) in the neck module. Lastly, a new detection head has been added to the head module, enabling the detection of smaller and more distant targets within the field of view of the robot. The proposed YOLOv5s-BC model was compared to several target detection algorithms, including YOLOv5s, YOLOv4, YOLOv3, SSD, Faster R-CNN (ResNet50), and Faster R-CNN (VGG), with significant improvements of 4.6%, 3.6%, 20.48%, 23.22%, 15.27%, and 15.59% in mAP, respectively. The detection accuracy of the proposed model is also greatly enhanced over the original YOLOv5s model. The model boasts an average detection speed of 0.018 seconds per image, and the weight size is only 16.7 Mb with 4.7 Mb smaller than that of YOLOv8s, meeting the real-time requirements for the picking robot. Furthermore, according to the heat map, our proposed model can focus more on and learn the high-level features of the target apples, and recognize the smaller target apples better than the original YOLOv5s model. Then, in other apple orchard tests, the model can detect the pickable apples in real time and correctly, illustrating a decent generalization ability.

Motivation & Objective

  • To address the limitations of existing YOLO-based models in detecting small and distant apples in real-world orchard environments.
  • To improve detection accuracy for small targets while maintaining real-time inference speed for robotic picking applications.
  • To enhance feature representation and feature fusion in the network architecture for better generalization in complex orchard scenes.
  • To reduce model size without sacrificing performance, enabling deployment on resource-constrained robotic systems.

Proposed method

  • Incorporated a Coordinate Attention (CA) block into the YOLOv5s backbone to enhance feature learning by focusing on spatial coordinates of target objects.
  • Replaced the original feature fusion operation in the neck with a Bidirectional Feature Pyramid Network (BiFPN) to improve multi-scale feature aggregation.
  • Designed a new detection head to better localize and classify small and distant apples by enhancing receptive field and feature sensitivity.
  • Optimized the entire network architecture for real-time inference, ensuring low latency and compact model size suitable for embedded robotic systems.
  • Utilized a combination of attention mechanisms and feature pyramid refinement to improve detection robustness under challenging lighting and occlusion conditions.

Experimental results

Research questions

  • RQ1Can the integration of Coordinate Attention into YOLOv5s improve detection accuracy for small and distant apples in orchard settings?
  • RQ2Does replacing the original feature fusion with BiFPN lead to better multi-scale feature representation and detection performance?
  • RQ3To what extent does the redesigned detection head enhance the localization of small targets compared to the original YOLOv5s head?
  • RQ4How does the overall YOLOv5s-BC architecture compare in mAP and inference speed to state-of-the-art detectors like YOLOv4, YOLOv3, SSD, and Faster R-CNN variants?
  • RQ5Does the proposed model maintain real-time inference speed while achieving higher accuracy and smaller model size?

Key findings

  • YOLOv5s-BC achieved a 4.6% absolute improvement in mAP over the original YOLOv5s model on apple detection benchmarks.
  • The model demonstrated a 3.6% mAP gain over YOLOv4, 20.48% over YOLOv3, 23.22% over SSD, 15.27% over Faster R-CNN (ResNet50), and 15.59% over Faster R-CNN (VGG).
  • The model achieved an average inference speed of 0.018 seconds per image, meeting real-time requirements for robotic picking systems.
  • The model size was reduced to 16.7 Mb, which is 4.7 Mb smaller than YOLOv8s, enhancing deployability on edge devices.
  • Heatmap visualization confirmed that YOLOv5s-BC focuses more on high-level features of target apples, especially small and distant ones, compared to the original YOLOv5s.
  • Field tests in real orchard environments confirmed the model’s ability to detect pickable apples accurately and in real time, demonstrating strong generalization capability.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.