浙江理工大学学报2024,Vol.51Issue(5) :389-398.DOI:10.3969/j.issn.1673-3851(n).2024.03.013

基于改进YOLOv5s的轻量化布匹瑕疵检测算法

A lightweight fabric defect detection algorithm based on improved YOLOv5s

邹宏睿 任佳 潘海鹏 周传辉
浙江理工大学学报2024,Vol.51Issue(5) :389-398.DOI:10.3969/j.issn.1673-3851(n).2024.03.013

基于改进YOLOv5s的轻量化布匹瑕疵检测算法

A lightweight fabric defect detection algorithm based on improved YOLOv5s

邹宏睿 1任佳 2潘海鹏 2周传辉1
扫码查看

作者信息

  • 1. 浙江理工大学信息科学与工程学院,杭州 310018
  • 2. 浙江理工大学信息科学与工程学院,杭州 310018;浙江理工大学常山研究院有限公司,衢州 324299
  • 折叠

摘要

针对纺织生产中布匹瑕疵检测高精度、实时性的需求,提出了一种基于改进YOLOv5s的轻量化布匹瑕疵检测算法(GhostNet-CBAM-Partial convolution-YOLOv5s,GCP-YOLOv5s).该算法首先引入 GhostNet 中的GhostConv模块,对原主干网络进行优化重构,大幅减少网络参数;其次,在主干特征提取网络中加入CBAM(Convolutional block attention module)注意力机制,增加网络的特征提取能力;最后,设计了基于Partial convolution的改进C3模块(C3-Partial convolution,C3-P),在降低模型参数量的同时提高特征融合能力.在自建布匹瑕疵数据集上进行了对比测试,结果表明:与基准模型YOLOv5s相比,GCP-YOLOv5s的参数量降低了 41.6%,计算量降低了 43.1%,检测速度提高了 12 FPS,检测精度提升了 1.7%.GCP-YOLOv5s算法在保证模型轻量化的同时具有较高的检测精度,可以满足布匹瑕疵检测的高精度和实时性要求.

Abstract

A lightweight fabric defect detection algorithm,GhostNet-CBAM-Partial convolution-YOLOv5s(GCP-YOLOv5s)based on improved YOLOv5s was proposed to meet the high-precision and real-time requirements of fabric defect detection in textile production.Firstly,this algorithm introduced the GhostConv module in GhostNet to optimize and reconstruct the original backbone network,significantly reducing network parameters.Secondly,CBAM(convolutional block attention module)attention mechanism was incorporated into the backbone network to increase its feature extraction capability.Finally,an improved C3 module C3-P(C3-Partial convolotion)module based on Partial convolution was designed to reduce the number of model parameters while improving the feature fusion capability.Comparative tests were conducted on a dataset of self-built fabric defects on site,and the results showed that compared with the benchmark model YOLOv5s,the parameters and computational complexity of GCP-YOLOv5s were reduced by 41.6%and 43.1%,respectively,while the detection speed and detection accuracy were increased by 12 FPS and 1.7%,respectively.The GCP-YOLOv5s algorithm has high detection accuracy while ensuring model lightweighting,meeting the requirements of high precision and real-time performance in fabric defect detection at the same time.

关键词

布匹瑕疵检测/YOLOv5s/GhostNet/注意力机制/高精度/实时性

Key words

fabric defect detection/YOLOv5s/GhostNet/attention mechanism/high-precision/real-time

引用本文复制引用

基金项目

浙江省"尖兵"研发攻关计划(2023C01002)

浙江省教育厅一般科研项目(Y202147717)

浙江理工大学研究生优秀学位论文培育基金(LW-YP2022080)

出版年

2024
浙江理工大学学报
浙江理工大学

浙江理工大学学报

影响因子:0.311
ISSN:1673-3851
参考文献量21
段落导航相关论文