摘要
针对传统的螺纹钢表面缺陷检测方法效率低、检测精度差、漏检误检率高等问题,提出了一种基于YOLOv3改进的螺纹钢表面缺陷检测算法。首先在主干网络中引入了强化模型特征提取能力的密集连接方式,有效避免了信息在多层传递过程中的丢失和模糊,确保了信息在深度网络结构中依然能够保持清晰和有效地表达,提高了小目标缺陷的检测精确度;利用k-means++算法对螺纹钢的缺陷数据集进行重聚类分析,确保预设锚框能更精确地匹配缺陷的多尺度特性;在损失函数中采用SIoU算法,在改善预测框与真实框不重合时无法梯度回传问题的同时加快收敛速度;最后在预测阶段采用softer-NMS算法替换NMS算法,能够有效优化边界框的位置回归,从而提高对重叠目标的辨识率。实验结果表明,在自建的螺纹钢数据集中,改进后的网络使模型的平均精度均值mAP在保持较高FPS的情况下提高了7.7%,其指标能够满足实时检测的需求,针对螺纹钢常见的锈迹、裂痕、擦伤等7种表面缺陷,其平均检测精度达到87.4%。
In order to address the challenges of low efficiency,poor detection accuracy,and high rates of missed and false detections in traditional methods for detecting surface defects in rebar,we propose an improved defect detection algorithm based on YOLOv3.First,we introduce a dense connection method in the backbone network to enhance the model′s feature extraction capabilities.This effectively prevents the loss and blurriness of information during multi-layer transmission,ensuring that information remains clear and effectively expressed in the deep network structure.This improvement increases the detection accuracy of small defects.Next,we employ the k-means++algorithm for re-clustering analysis of the rebar defect dataset,ensuring that the predefined anchor boxes can more accurately match the multi-scale characteristics of the defects.We also adopt the SIoU algorithm in the loss function.This not only addresses the gradient backpropagation issue when the predicted boxes do not overlap with the ground truth boxes but also accelerates the convergence speed.Finally,during the prediction phase,we replace the NMS algorithm with the softer-NMS algorithm.This effectively optimizes the bounding box regression,improving the identification rate of overlapping targets.Experimental results show that,on our self-built rebar dataset,the improved network increases the model′s mAP by 7.7%while maintaining a high FPS,meeting the requirements for real-time detection.The average detection accuracy for seven common surface defects,including rust,cracks,and scratches,reaches 88.7%.
作者
马保亮
李建达
李仟
徐紫琪
肖剑
MA Baoliang;LI Jianda;LI Qian;XU Ziqi;XIAO Jian(CCCC Second Highway Engineering Bureau,Dongmeng Engineering,Shaanxi Xi′an 710064,China)
出处
《工业仪表与自动化装置》
2025年第3期87-92,114,共7页
Industrial Instrumentation & Automation