Lawal Olarewaju Mubashiru, Zhu Shengyan, Cheng Kui
Sanjiang Institute of Artificial Intelligence and Robotics, Yibin University, Sichuan, China.
Front Plant Sci. 2023 Jun 26;14:1153505. doi: 10.3389/fpls.2023.1153505. eCollection 2023.
An improved YOLOv5s model was proposed and validated on a new fruit dataset to solve the real-time detection task in a complex environment. With the incorporation of feature concatenation and an attention mechanism into the original YOLOv5s network, the improved YOLOv5s recorded 122 layers, 4.4 × 10 params, 12.8 GFLOPs, and 8.8 MB weight size, which are 45.5%, 30.2%, 14.1%, and 31.3% smaller than the original YOLOv5s, respectively. Meanwhile, the obtained 93.4% of mAP tested on the valid set, 96.0% of mAP tested on the test set, and 74 fps of speed tested on videos using improved YOLOv5s is 0.6%, 0.5%, and 10.4% higher than the original YOLOv5s model, respectively. Using videos, the fruit tracking and counting tested on the improved YOLOv5s observed less missed and incorrect detections compared to the original YOLOv5s. Furthermore, the aggregated detection performance of improved YOLOv5s outperformed the network of GhostYOLOv5s, YOLOv4-tiny, and YOLOv7-tiny, including other mainstream YOLO variants. Therefore, the improved YOLOv5s is lightweight with reduced computation costs, can better generalize against complex conditions, and is applicable for real-time detection in fruit picking robots and low-power devices.
提出了一种改进的YOLOv5s模型,并在一个新的水果数据集上进行了验证,以解决复杂环境下的实时检测任务。通过将特征拼接和注意力机制融入原始的YOLOv5s网络,改进后的YOLOv5s有122层、4.4×10个参数、12.8 GFLOPs以及8.8 MB的权重大小,分别比原始的YOLOv5s小45.5%、30.2%、14.1%和31.3%。同时,在验证集上测试得到的93.4%的平均精度均值(mAP)、在测试集上测试得到的96.0%的mAP以及使用改进后的YOLOv5s在视频上测试得到的74帧每秒的速度,分别比原始的YOLOv5s模型高0.6%、0.5%和10.4%。使用视频时,与原始的YOLOv5s相比,在改进后的YOLOv5s上进行的水果跟踪和计数观察到更少的漏检和误检。此外,改进后的YOLOv5s的综合检测性能优于GhostYOLOv5s、YOLOv4-tiny和YOLOv7-tiny网络,以及其他主流的YOLO变体。因此,改进后的YOLOv5s轻量级且计算成本降低,能够更好地应对复杂条件,适用于水果采摘机器人和低功耗设备中的实时检测。