Apple stem/calyx real-time recognition using YOLO-v5 algorithm for fruit automatic loading system
Zhipeng Wang,Luoyi Jin,Shuai Wang,Huirong Xu
DOI: https://doi.org/10.1016/j.postharvbio.2021.111808
IF: 6.751
2022-03-01
Postharvest Biology and Technology
Abstract:Fruit loading and packaging are still labor-intensive tasks during postharvest commercialization, of which the key issues is to realize the real-time detection and adjustment of fruit posture. However, fruit stem/calyx position is a key structural characteristic for fruit posture and will also affect fruit internal quality detection. In this paper, an image acquisition system based on fruit posture adjustment equipment was set up, and the YOLO-v5 algorithm based on deep learning was used to study the real-time recognition of stem/calyx of apples. First, hyperparameters were determined, and the training method of transfer learning was used to obtain better detection performance; then the networks with different widths and depths were trained to find the best baseline detection net; finally, the YOLO-v5 algorithm was optimized for this task by using detection head searching, layer pruning and channel pruning. The results showed that under the same setting conditions, YOLO-v5s had a more superior usability and could be selected as the baseline network considering detection performance, model weight size, and detection speed. After optimization, the complexity of the algorithm was further reduced. The model parameters and weight volume were decreased by about 71 %, while mean Average Precision (mAP) and F1-score (F 1) were only decreased by 1.57 % and 2.52 %, respectively. The optimized algorithm could achieve real-time detection under CPU condition at a speed of 25.51 frames per second (FPS). In comparison with other deep learning target detection algorithms, the algorithm used in this paper was similar to other lightweight networks in complexity. Its mAP and F 1 were 0.880 and 0.851, respectively. This was better than other one-stage object detection algorithms in detection ability, only lower than that of Faster R-CNN. The optimized YOLO-v5s achieved 93.89 % accuracy in fruit stem/calyx detection for different cultivars of apples. This research could lay the foundation for the automation of fruit loading and packing systems.
food science & technology,horticulture,agronomy