Computer Engineering and Applications ›› 2021, Vol. 57 ›› Issue (19): 252-258.DOI: 10.3778/j.issn.1002-8331.2104-0324

Previous Articles     Next Articles

Research on Metal Surface Defect Detection by Improved YOLOv3

CHENG Jingyi, DUAN Xianhua, ZHU Wei   

  1. School of Computer Science, Jiangsu University of Science and Technology, Zhenjiang, Jiangsu 212100, China
  • Online:2021-10-01 Published:2021-09-29

改进YOLOv3的金属表面缺陷检测研究

程婧怡,段先华,朱伟   

  1. 江苏科技大学 计算机学院,江苏 镇江 212100

Abstract:

Aiming at the problems of missing detection caused by small target size and unclear features in metal surface defect detection, an improved metal defect detection algorithm based on YOLOv3 is proposed. Firstly, the shallow features of the 11th layer are fused with the deep features of the network to generate a new scale of 104×104 feature layer on the basis of the network structure of YOLOv3. Its purpose is to extract more features of small defects. Secondly, it uses DIoU as the bounding box regression loss function to provide the moving direction and more accurate position information for the bounding box to accelerate the convergence of model. Finally, K-Means++ is used to analyze the size information of the Anchor Box on the dataset. The optimal Anchor Box is selected to make the positioning more accurate and reduce the network loss. The performance of the improved algorithm is compared with other detection algorithms on NEU-DET dataset. Experimental analysis shows that the average detection rate of the improved YOLOv3 is 31.6 frame/s. Its average detection accuracy is 67.64%, which is 7.49 percentage points higher than that of YOLOv3. Compared with Faster R-CNN and other algorithms, it also has a greater detection accuracy advantage. The results show that the improved YOLOv3 can make the location information and accuracy of small defect target more accurate.

Key words: target detection, metal surface defects, YOLOv3, K-Means++, Distance Intersection over Union(DIoU)

摘要:

针对金属表面缺陷检测中目标尺寸小和特征不清晰导致漏检的问题,提出一种改进YOLOv3的金属缺陷检测算法。在YOLOv3网络结构的基础上,将第11层浅层特征与网络深层特征融合,生成一个新的尺度为104×104特征图层,提取更多小缺陷目标特征。加入DIoU边框回归损失,为边界框提供移动方向以及更准确的位置信息,加快模型收敛。利用K-Means++聚类分析数据集上的先验框尺寸信息,筛选出最优的Anchor Box,使定位更加精准,降低网络损失。将改进后的算法与其他检测算法在NEU-DET数据集上进行检测性能对比。实验分析表明改进后的YOLOv3平均检测速率为31.6?frame/s;平均检测精度为67.64%,比YOLOv3提高了7.49个百分点,相较于Faster R-CNN等算法也有较大的检测精度优势。结论表明,改进后的YOLOv3可以使小缺陷目标的位置信息和精度更加准确。

关键词: 目标检测, 金属表面缺陷, YOLOv3, K-Means++, 距离交并比(DIoU)