摘要
为解决钢丝帘布表面缺陷检测准确率低且泛化能力不强的问题,提出了一种基于DCGAN和改进YOLOv5s的缺陷检测方法。首先,通过调整DCGAN网络参数并优化超参数,使生成器能够生成具有丰富特征和清晰纹理的钢丝帘布缺陷图像,从而扩充数据集;其次,采用K-means++算法对钢丝帘布缺陷数据重新聚类锚框,以获得更优的锚框参数,实现锚框与实际缺陷的精确匹配;然后,在YOLOv5s主干网络中的C3模块添加坐标注意力机制,以增强模型的特征提取能力和精确定位能力;最后,引入MPDIoU损失函数替换YOLOv5s原损失函数,进一步提高检测精度。实验结果表明,在实测钢丝帘布缺陷数据集上,采用DCGAN数据增强和改进后的YOLOv5s检测模型,缺陷检测平均精度提高了6.6%,达到了89.4%,并且检测准确率和召回率也有所提高。与其他主流检测模型相比,该模型不仅在检测速度上提高了约30%,还保持较高的检测精度。在公开的NEU-DET数据集上,该模型的mAP值达到了82.6%,较原始YOLOv5s模型提高了3.8%。
In order to solve the problems of low detection accuracy and weak generalization ability of steel cord surface defects,a steel cord defect detection method based on DCGAN and improved YOLOv5s was proposed.Firstly,by adjusting DCGAN network parameters and optimizing hyperparameters,the generator can generate steel cord defect images with rich features and clear texture,thus expanding the data set.Secondly,the K-Means++algorithm is used to re-cluster the anchor frame to obtain better anchor frame parameters and achieve accurate matching between anchor frame and actual defects.Then,coordinate attention mechanism was added to C3 module of YOLOv5s backbone network to enhance the feature extraction capability and accurate localization capability of the model.Finally,MPDIoU loss function is introduced to replace YOLOv5s original loss function to further improve the detection accuracy.The experimental results show that on the measured steel cord defect data set,the average accuracy of defect detection is increased by 6.6%,reaching 89.4%by using the YOLOv5s detection model enhanced and improved by DCGAN data,and the detection accuracy and recall rate are also improved.Compared with other mainstream detection models,this model not only improves the detection speed by about 30%,but also maintains high detection accuracy.On the publicly available NEU-DET dataset,the mAP value of this model reaches 82.6%,which is 3.8%higher than that of the original YOLOv5s model.
作者
黄鹏
蔡露
陈彬
周益航
易冬旺
Huang Peng;Cai Lu;Chen Bin;Zhou Yihang;Yi Dongwang(School of Mechanical and Control Engineering,Guilin University of Technology,Guilin 541000,China)
出处
《电子测量技术》
北大核心
2024年第3期144-155,共12页
Electronic Measurement Technology
基金
国家自然科学基金(72001054)
广西科技计划项目(桂科AB22035041)
桂林市科学研究与技术开发计划项目(20210217-14)
桂林理工大学科研启动基金(GUTQDJJ20160140)项目资助。