无线电工程2024,Vol.54Issue(2) :351-359.DOI:10.3969/j.issn.1003-3106.2024.02.014

基于YOLOv5的钢材表面缺陷检测算法

Steel Surface Defect Detection Algorithm Based on YOLOv5

徐明升 祝俊辉 干家欣 侯津津 王圆 周贤勇 陈琳
无线电工程2024,Vol.54Issue(2) :351-359.DOI:10.3969/j.issn.1003-3106.2024.02.014

基于YOLOv5的钢材表面缺陷检测算法

Steel Surface Defect Detection Algorithm Based on YOLOv5

徐明升 1祝俊辉 1干家欣 1侯津津 1王圆 1周贤勇 1陈琳1
扫码查看

作者信息

  • 1. 长江大学计算机科学学院,湖北荆州 434023
  • 折叠

摘要

针对目前钢材表面缺陷检测方法存在检测精度不高,易出现误检、漏检等问题,提出一种改进YOLOv5的钢材表面缺陷检测算法.在主干网络中引入坐标注意力(Coordinate Attention,CA)机制模块,提升模型关注钢材表面缺陷的能力,使用GhostBottleneck结构与主干网络中的部分卷积模块和C3模块进行替换,构建轻量化模型;在Neck层采用双向特征金字塔网络(Bidirectional Feature Pyramid Network,BiFPN)结构来提升检测效果;增加一个目标检测层来解决数据集中部分缺陷占比较大的问题.实验结果表明,改进的YOLOv5s-GCBD(GhostBottleneck-CA-BiFPN-Anchor)算法在NEU-DET数据集上的平均精度均值(mean Average Precision,mAP)达到80.2%,较原YOLOv5s算法提高了 3.5%.相比传统的钢材表面缺陷检测方法,提出的算法实现了更精准的钢材表面缺陷检测.

Abstract

In view of the existing steel surface defect detection methods,the detection accuracy is not high,easy to appear false detection,missing detection and other problems.An improved YOLOv5 steel surface defect detection algorithm is proposed.Firstly,a Coordinate Attention(CA)mechanism module is introduced into the backbone network,which enhances the model's ability to tend to steel surface defects,and replaces some convolutional modules and C3 modules in the backbone network with GhostBottleneck structure,to construct a lightweight model.Secondly,the Bidirectional Feature Pyramid Network(BiFPN)structure is used in the Neck layer to improve the detection effect.Finally,an object detection layer is added to solve the problem of large defects in the data set.The experimental results show that the mean Average Precision(mAP)of the improved YOLOv5s-GCBD(GhostBottleneck-CA-BiFPN-Anchor)algorithm on the NEU-DET data set reaches 80.2%,which is 3.5%higher than the previous YOLOv5s algorithm.Compared with traditional steel surface defect detection methods,the proposed algorithm can realize more accurate detection of steel surface defect.

关键词

缺陷检测/YOLOv5/注意力机制/轻量化模型/特征融合

Key words

defect detection/YOLOv5/attention mechanism/lightweight model/feature fusion

引用本文复制引用

基金项目

湖北省科技示范项目(2019ZYYD016)

出版年

2024
无线电工程
中国电子科技集团公司第五十四研究所

无线电工程

影响因子:0.667
ISSN:1003-3106
参考文献量5
段落导航相关论文