English

中国农机化学报

中国农机化学报 ›› 2023, Vol. 44 ›› Issue (4): 153-158.DOI: 10.13733/j.jcam.issn.2095-5553.2023.04.021

• 农业智能化研究 • 上一篇    下一篇

基于轻量化YOLOv5s的花椒簇检测研究

李光明1,弓皓斌1,袁凯2   

  1. 1. 陕西科技大学电气与控制工程学院,西安市,710021; 
    2. 西安怀智电子科技有限公司,西安市,710068
  • 出版日期:2023-04-15 发布日期:2023-04-25
  • 基金资助:
    国家自然科学基金(62003201)

Research on lightweight pepper cluster detection based on YOLOv5s

Li Guangming1, Gong Haobin1, Yuan Kai2   

  • Online:2023-04-15 Published:2023-04-25

摘要: 针对现有花椒簇检测算法模型参数量多、计算量大、检测速度低、很难部署到嵌入式设备的问题,提出一种基于轻量化YOLOv5s的花椒簇检测算法模型。首先将ShuffleNet v2主干网络替代原YOLOv5s中的主干网络进行重构;同时将SPPF嵌入至ShuffleNet v2骨干中;其次引入轻量级注意力机制CBAM;最后使用SIoU_Loss代替CIoU_Loss作为回归损失函数。试验结果表明:改进后的轻量化YOLOv5s网络参数降低85.6%,计算量降低87.7%,对花椒簇的检测精度mAP@0.5达到92.6%,较原YOLOv5s模型提高3.4%,mAP@0.5:0.95达到61.4%,检测时间为11 ms,相比原模型16 ms缩短31.3%,可以满足在现场环境下对花椒簇的检测。

关键词: 花椒簇, YOLOv5s算法, 轻量化, 网络参数, 检测精度

Abstract: In order to solve the problem that the detection algorithm model of pepper cluster has large number of parameters, large amount of computation, low detection speed and difficult deployment to embedded devices, a lightweight detection algorithm model of pepper cluster based on YOLOv5s was proposed. Firstly, ShuffleNet v2 backbone network was reconstructed instead of the original backbone network in YOLOv5s; At the same time, SPPF was embedded into the backbone of ShuffleNet v2; Secondly, lightweight attention mechanism CBAM was introduced; Finally, SIoU_Loss was used instead of CIoU_Loss as regression loss function to further improve the detection accuracy. The results showed that the network parameters of the improved lightweight YOLOv5s model were decreased by 85.6%, the computational amount was decreased by 87.7%, and the detection accuracy of mAP@0.5 for pepper clusters was 92.6%, 3.4% higher than the original YOLOv5s model, and mAP@0.5: 0.95 was 61.4%, and detection time was 11 ms, 31.3% less than the original model of 16 ms, which can meet the requirements for the detection of pepper clusters in complex field environments.

Key words: pepper cluster, YOLOv5s algorithm, lightweight, network parameters, detection accuracy

中图分类号: