重庆理工大学学报(自然科学) ›› 2023, Vol. 37 ›› Issue (12): 244-251.

• 智能技术 • 上一篇    下一篇

改进YOLOv5s的轻量化目标检测算法研究

龙邹荣, 蔡林峰, 叶彬强, 汤斌, 赵明富, 唐跃林, 王建旭, 周密   

  1. 重庆理工大学重庆市光纤传感与光电检测重点实验室; 重庆理工大学两江人工智能学院; 重庆市特种设备检测研究院; 国家市场监管重点实验室
  • 出版日期:2024-02-04 发布日期:2024-02-04
  • 作者简介:龙邹荣,男,博士,讲师,主要从事工业检测和光电检测研究,E-mail:longzourong@cqut.edu.cn;通信作者 叶彬强,男,博士,讲师,主要从事智能信息处理与分析研究,E-mail:ybq@cqut.edu.cn

Research on improved YOLOv5s lightweight target detection algorithm

  • Online:2024-02-04 Published:2024-02-04

摘要: 针对当前YOLOv5s目标检测网络复杂、参数多、部署所需配置高,难以在嵌入式平台上获得优质识别结果的问题,设计了一种轻量化目标检测算法YOLOv5s_GCB。算法使用GhostNet作为主干特征提取网络,充分发挥其计算量少、特征图不冗余的优势,从而降低算法的复杂度,提高检测速度;引入CA(coordinate attention)注意力机制,将空间坐标信息与注意力图有效整合,有助于网络快速提取有用特征,进一步增强算法的特征提取能力;借助双向特征金字塔网络(Bi-FPN)结构代替原始算法的路径聚合网络(path aggregation network)结构,对多个尺度的特征进行融合,以此构建新轻量化网络模型YOLOv5s_GCB。与原始算法相比,改进后的算法在保持目标检测精确的同时精简了模型参数,降低了运行YOLOv5算法所需的硬件要求。在VOC2007数据集中,YOLOv5s_GCB算法的平均准确率(mAP)达到75.2%,模型体积为10.6 MB,浮点计算量11.3GFLOPs(giga floating-point operations per second),与原始算法相比,参数量降低了30%,权重模型减少了20%。实验结果表明:YOLOv5s_GCB算法在保证检测精确度的同时实现了模型的轻量化,为其在性能较弱的嵌入式平台上的部署与应用提供了一定的理论依据

关键词: 轻量化网络, YOLOv5s, 注意力机制, GhostNet, 加权双向金字塔

Abstract: To remedy the problems of current YOLOv5s, including complex target detection network, many parameters and high configuration for training, a lightweight target detection algorithm-YOLOv5s_GCB, is proposed in this paper. First, the algorithm employs GhostNet as the backbone feature extraction network, taking full advantage of its less amount of computation and non-redundancy of feature graphs and thus reducing the complexity of the algorithm and improving its detection efficiency. Second, CA (Coordinate Attention) mechanism is introduced to effectively integrate the spatial coordinate information with the attention map, allowing the network to quickly extract useful features and further enhance the feature extraction ability of the algorithm. Finally, the bi-directional feature pyramid network (Bi-FPN) structure replaces the path aggregation network structure of the original algorithm, a new lightweight network model YOLOv5s_GCB is built with the fusion of multi-scale features. Compared with the original algorithm, the upgraded one maintains the target detection accuracy, but it significantly reduces the model parameters and lowers the hardware requirements for running YOLOv5 algorithm. In the VOC2007 data set, the average accuracy (mAP) of the YOLOv5s_GCB algorithm reaches 74.2%, the model volume 10.6 MB, and the amount of floating-point computation 11.3 GFLOPs (Giga Floating-point Operations Per Second). Compared with the original algorithm, the proposed one cuts the number of parameters by 30% and the weight model by 20%. The experimental results show the YOLOv5s_GCB algorithm not only maintains the detection accuracy, but also allows the model to become lightweight. Therefore, it lays some theoretical foundation for its deployment and application on the under-performing embedded platforms.

中图分类号: 

  • TP391.4