针对当前热轧带钢表面缺陷检测中存在精度低及复杂背景干扰等问题,提出一种基于坐标注意力(coordinate attention,CA)的CA-YOLOv5缺陷检测方法.主要对YOLOv5的输入端、外加模块和检测端3个方面进行改进:在输入端,采用随机拼接4张或9张图片的方法对训练数据进行增广,并利用遗传算法(genertic algorithm,GA)对网络超参数进行寻优,使得YOLOv5更适用于带钢缺陷检测;在主干网络和外加模块之间引入CA机制,加强网络对缺陷深层特征的提取能力;最后,在检测端,对每一检测分支进行解耦,将检测的分类和位置回归两类任务分开,提升网络对缺陷的检测能力.在NEU-DET热轧带钢表面缺陷数据集上进行了验证实验,实验结果证.明,CA-YOLOv5 的均值平均精度(mean average precision,mAP)达到 84.36%,不仅较原 YOLOv5算法提升6.68%,而且优于其他先进的检测算法.
Abstract
The hot-rolled steel strip surface defects detection methods have low detection accuracy and suffer background clutters.To solve the issues mentioned above,this paper proposes a CA-YOLOv5 de-fects detection method based on coordinate attention(CA).The improvement of CA-YOLOv5 are three aspects.First,to make the YOLOv5 more suitable for strip defects detection,the data argumentation u-sing the 4 or 9 mosaic images randomly and hyperparameter optimization based on the genetic algorithm(GA)are employed in the input of the network.Second,the CA mechanism is introduced between the backbone and the neck model to improve the feature extracting ability of the network.Third,each detec-ting head is decoupled to separate the classification and regression tasks,which could further boost the accuracy of defects detection.Comparative experiments on NEU-DET dataset show that the proposed network obtains 84.36%mean average precision(mAP),which not only exceeds YOLOv5 by 6.68%,but also outperformances other state-of-the-art detectors.
关键词
缺陷检测/YOLOv5/坐标注意力(CA)/解耦检测头
Key words
defects detection/YOLOv5/coordinate attention(CA)/decoupled detection head