Detection of Green Asparagus in Complex Environments Based on the Improved YOLOv5 Algorithm

Sensors (Basel). 2023 Feb 1;23(3):1562. doi: 10.3390/s23031562.

Abstract

An improved YOLOv5 algorithm for the efficient recognition and detection of asparagus with a high accuracy in complex environments was proposed in this study to realize the intelligent machine harvesting of green asparagus. The coordinate attention (CA) mechanism was added to the backbone feature extraction network, which focused more attention on the growth characteristics of asparagus. In the neck part of the algorithm, PANet was replaced with BiFPN, which enhanced the feature propagation and reuse. At the same time, a dataset of asparagus in complex environments under different weather conditions was constructed, and the performance variations of the models with distinct attention mechanisms and feature fusion networks were compared through experiments. Experimental results showed that the mAP@0.5 of the improved YOLOv5 model increased by 4.22% and reached 98.69%, compared with the YOLOv5 prototype network. Thus, the improved YOLOv5 algorithm can effectively detect asparagus and provide technical support for intelligent machine harvesting of asparagus in different weather conditions and complex environments.

Keywords: BiFPN; coordinate attention; detection; green asparagus; improved YOLOv5.