基于YOLOv8的钢结构焊缝表面缺陷检测系统
Steel structure weld surface defect detection system based on YOLOv8
摘要 [目的]为了提高焊缝表面质量检测的效率和精度,该文提出了基于 YOLOv8 深度学习模型的钢结构焊缝表面缺陷检测系统.[方法]该模型通过改进网络结构与训练策略,优化了工业场景下的检测性能.采用 CSPDarknet53 骨干网络融合C2f 模块,增强多尺度特征融合能力;引入无锚点解耦检测头结构,将分类与回归任务解耦,减少模型对先验参数的依赖;结合Varifocal Loss(VFL)与 Distribution Focal Loss(DFL)优化损失函数,提升小目标缺陷的检测灵敏度.[结果]试验采用 ZEDmini相机采集真实样本,自建钢结构焊缝数据集,其中良好焊缝识别准确率为 96.2%,不良焊缝检测精度 82.5%.训练过程曲线表明,box_loss 和 cls_loss 分别在 120 和 150 轮次后收敛,验证集 mAP50 指标稳定在 76.7%,mAP50-95 指标稳定在 65.5%.测试结果显示,模型在 640×640 分辨率图像中推理速度达 45 帧/秒,即每张图像的推理时间约为 22.2 ms.[结论]基于 YOLOv8 深度学习模型的钢结构焊缝表面缺陷检测系统能够满足实时检测需求,为焊接质量智能检测提供了可靠技术支撑.
Abstract:
[Objective]To improve efficiency and accuracy of weld surface quality inspection,a steel structure weld surface defect detection system based on YOLOv8 deep learning model is proposed in the paper.[Methods]By improving network structure and training strategy,the model optimizes detection performance in industrial scenarios.It adopts CSPDarknet53 backbone network integrated with C2f module to enhance multi-scale feature fusion capability.It introduces an anchor-free decoupled detection head structure to decouple classification and regression tasks,reducing the model's dependence on prior parameters.It combines Varifocal Loss(VFL)and Distribution Focal Loss(DFL)to optimize loss function,improving detection sensitivity for small target defects.[Results]In the experiment,ZEDmini camera was used to collect real samples,and a self-built steel structure weld dataset was created.Among them,recognition accuracy of good welds reached 96.2%,and detection accuracy of defective welds stood at 82.5%.The training process curves show that box_loss and cls_loss converged after 120 and 150 epochs respectively.The mAP50 index of validation set stabilized at 76.7%,and mAP50-95 index stabilized at 65.5%.Test results indicate that the model achieves an inference speed of 45 frames per second in 640×640 resolution images,inference time per image is approximately 22.2 ms.[Conclusion]The steel structure weld surface defect detection system based on YOLOv8 deep learning model can meet requirements of real-time detection and provide reliable technical support for intelligent inspection of welding quality.
刊 名 焊接 ISTIC
年,卷(期): 2026, (10)
分类号: TG441.7 TP183
机标分类号: TP391 S X591
在线出版日期: 2026年11月6日
基金项目: SR2022003:新疆生产建设兵团第十二师重大科技项目:丝绸之路经济带创新驱动发展试验区2023LQ03010:乌昌石国家自主创新示范区科技发展计划项目,