Next Article in Journal
Effective Control of the Nitrogen Gap—Higher Yields and Reduced Environmental Risk
Previous Article in Journal
A Greener Approach to Spinach Farming: Drip Nutrigation with Biogas Slurry Digestate
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Detection of Orchard Apples Using Improved YOLOv5s-GBR Model

College of Engineering, Anhui Agricultural University, Hefei 230036, China
*
Author to whom correspondence should be addressed.
Agronomy 2024, 14(4), 682; https://doi.org/10.3390/agronomy14040682
Submission received: 1 March 2024 / Revised: 21 March 2024 / Accepted: 24 March 2024 / Published: 27 March 2024
(This article belongs to the Section Precision and Digital Agriculture)

Abstract

The key technology of automated apple harvesting is detecting apples quickly and accurately. The traditional detection methods of apple detection are often slow and inaccurate in unstructured orchards. Therefore, this article proposes an improved YOLOv5s-GBR model for orchard apple detection under complex natural conditions. First, the researchers collected photos of apples in their natural environments from different angles; then, we enhanced the dataset by changing the brightness, rotating the images, and adding noise. In the YOLOv5s network, the following modules were introduced to improve its performance: First, the YOLOv5s model’s backbone network was swapped out for the GhostNetV2 module. The goal of this improvement was to lessen the computational burden on the YOLOv5s algorithm while increasing the detection speed. Second, the bi-level routing spatial attention module (BRSAM), which combines spatial attention (SA) with bi-level routing attention (BRA), was used in this study. By strengthening the model’s capacity to extract important characteristics from the target, its generality and robustness were enhanced. Lastly, this research replaced the original bounding box loss function with a repulsion loss function to detect overlapping targets. This model performs better in detection, especially in situations involving occluded and overlapping targets. According to the test results, the YOLOv5s-GBR model improved the average precision by 4.1% and recall by 4.0% compared to those of the original YOLOv5s model, with an impressive detection accuracy of 98.20% at a frame rate of only 101.2 fps. The improved algorithm increases the recognition accuracy by 12.7%, 10.6%, 5.9%, 2.7%, 1.9%, 0.8%, 2.6%, and 5.3% compared to those of YOLOv5-lite-s, YOLOv5-lite-e, yolov4-tiny, YOLOv5m, YOLOv5l, YOLOv8s, Faster R-CNN, and SSD, respectively, and the YOLOv5s-GBR model can be used to accurately recognize overlapping or occluded apples, which can be subsequently deployed in picked robots to meet the realistic demand of real-time apple detection.
Keywords: apple detection; GhostNetV2; bi-level routing spatial attention module (BRSAM); repulsion loss; YOLOv5s apple detection; GhostNetV2; bi-level routing spatial attention module (BRSAM); repulsion loss; YOLOv5s

Share and Cite

MDPI and ACS Style

Sun, X.; Zheng, Y.; Wu, D.; Sui, Y. Detection of Orchard Apples Using Improved YOLOv5s-GBR Model. Agronomy 2024, 14, 682. https://doi.org/10.3390/agronomy14040682

AMA Style

Sun X, Zheng Y, Wu D, Sui Y. Detection of Orchard Apples Using Improved YOLOv5s-GBR Model. Agronomy. 2024; 14(4):682. https://doi.org/10.3390/agronomy14040682

Chicago/Turabian Style

Sun, Xingdong, Yukai Zheng, Delin Wu, and Yuhang Sui. 2024. "Detection of Orchard Apples Using Improved YOLOv5s-GBR Model" Agronomy 14, no. 4: 682. https://doi.org/10.3390/agronomy14040682

APA Style

Sun, X., Zheng, Y., Wu, D., & Sui, Y. (2024). Detection of Orchard Apples Using Improved YOLOv5s-GBR Model. Agronomy, 14(4), 682. https://doi.org/10.3390/agronomy14040682

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop