基于YOLOX改进模型的金属表面缺陷检测

车国霖 ,  傅家辉

吉林大学学报(理学版) ›› 2026, Vol. 64 ›› Issue (3) : 603 -616.

PDF (7336KB)
吉林大学学报(理学版) ›› 2026, Vol. 64 ›› Issue (3) : 603 -616. DOI: 10.13413/j.cnki.jdxblxb.2025002
计算机科学

基于YOLOX改进模型的金属表面缺陷检测

作者信息 +

Metal Surface Defect Detection Based on Improved YOLOX Model

Author information +
文章历史 +
PDF (7511K)

摘要

针对金属表面缺陷检测中模型精度与推理速度难以兼顾的问题,提出一种基于YOLOX模型改进的SWE-YOLOX检测算法.首先,为解决复杂背景干扰大及缺陷尺度变化显著的问题,引入混洗通道注意力模块,增强特征表达能力并抑制无关信息;其次,针对缺陷边缘模糊、纹理不清晰的问题,融合小波卷积以提升频域特征提取能力,从而强化细节信息表达;最后,将原有交并比(IoU)损失函数替换为EIoU损失函数,以优化预测框与真实框的回归精度.实验结果表明,该方法在数据集NEU-DET上平均表面精度(mAP)达76.3%,较YOLOX模型提升3.86百分点,且在参数量与计算复杂度基本不增加的前提下保持了较快的推理速度.

Abstract

Aiming at the challenge of balancing model accuracy and inference speed in metal surface defect detection, we proposed an improved SWE-YOLOX detection algorithm based on the YOLOX model. Firstly, in order to solve the problem of large interference of complex backgrounds and significant variation in defect scales, we introduced a channel shuffle attention module to enhance feature expression ability and suppress irrelevant information. Secondly, aiming at the problem of unclear defect edges and weak texture features, we incorporated wavelet convolution to improve the extraction ability of frequency-domain features, thereby enhancing the expression of detailed information. Finally, the original intersection over union (IoU) loss function was replaced with an enhanced intersection over union (EIoU) loss function to optimize the regression accuracy between predicted boxes and ground truth boxes. Experimental results show that the proposed method achieves a mean average precision (mAP) of 76.3% on the NEU-DET dataset, which is 3.86 percentage point higher than that of YOLOX model. It also maintains a fast inference speed without increasing the number of parameters and computational complexity.

关键词

YOLOX模型 / 注意力模块 / 小波卷积 / 损失函数 / 金属表面缺陷

Key words

YOLOX model / attention module / wavelet convolution / loss function / metal surface defect

引用本文

引用格式 ▾
车国霖,傅家辉. 基于YOLOX改进模型的金属表面缺陷检测[J]. 吉林大学学报(理学版), 2026, 64(3): 603-616 DOI:10.13413/j.cnki.jdxblxb.2025002

登录浏览全文

4963

注册一个新账户 忘记密码

参考文献

[1]

李少波, 杨静, 王铮, . 缺陷检测技术的发展与应用研究综述[J]. 自动化学报, 2020, 46(11):2319-2336.

[2]

(LI S B, YANG J, WANG Z, et al. Review of the Development and Application of Defect Detection Technology[J]. Acta Automatica Sinica, 2020, 46(11):2319-2336.)

[3]

LIU H W, LAN Y Y, LEE H W, et al. Steel Surface in-Line Inspection Using Machine Vision[C]// First International Workshop on Pattern Recognition.[S.l.]:SPIE, 2016:187-191.

[4]

LIANG Y, XU K, ZHOU P. Mask Gradient Response-Based Threshold Segmentation for Surface Defect Detection of Milled Aluminum ingot[J]. Sensors, 2020, 20(16):4519-1-4519-22.

[5]

刘金海, 付明芮, 唐建华. 基于漏磁内检测的缺陷识别方法[J]. 仪器仪表学报, 2016, 37(11):2572-2581.

[6]

(LIU J H, FU M R, TANG J H. Defect Recognition Method Based on Magnetic Flux Leakage Detection[J]. Journal of Instrumentation and Measurement, 2016, 37(11):2572-2581.)

[7]

TSAI D M, CHEN M C, LI W C, et al. A Fast Regularity Measure for Surface Defect detection[J]. Machine Vision and Applications, 2012, 23:869-886.

[8]

TIMM F, BARTH E. Non-parametric Texture Defect Detection Using Weibull Features[C]// Image Processing:Machine Vision Applications Ⅳ.[S.l.]:SPIE, 2011:150-161.

[9]

周恺, 张睿哲, 叶宽, . 基于同步压缩小波变换的接地扁钢缺陷电磁超声SH导波检测方法[J]. 清华大学学报(自然科学版), 2022, 62(12):2013-2020.

[10]

(ZHOU K, ZHANG R Z, YE K, et al. Grounding Flat Steel Defect Detection Method Based on Synchronous Compression Wavelet Transform[J]. Journal of Tsinghua University(Natural Science Edition), 2022, 62(12):2013-2020.)

[11]

孙力, 刘晨, 姚红兵. 基于机器视觉的树脂镜片水印疵病检测[J]. 江苏大学学报(自然科学版), 2018, 39(4):425-430.

[12]

(SUN L, LIU C, YAO H B. Detection of Watermark Defects on Resin Lenses Based on Machine Vision[J]. Journal of Jiangsu University(Natural Science Edition), 2018, 39(4):425-430.)

[13]

王红梅, 王晓鸽, 王晓燕. 基于深度学习的复杂背景下目标检测[J]. 控制与决策, 2022, 37(12):3115-3121.

[14]

(WANG H M, WANG X G, WANG X Y. Target Detection in Complex Background Based on Deep Learning[J]. Control and Decision, 2022, 37(12):3115-3121.)

[15]

YAN Y H, JIA X J, SONG K C, et al. Specificity Autocorrelation Integration Network for Surface Defect Detection of No-Service Rail[J]. Optics and Lasers in Engineering, 2024,172:107862-1-107862-10.

[16]

ZHANG N X, ZHONG Y Z, DIAN S Y. Rethinking Unsupervised Texture Defect Detection Using PCA[J]. Optics and Lasers in Engineering, 2023,163:107470-1-107470-11.

[17]

CAO Y L, ZHU W B, YANG J X, et al. An Effective Industrial Defect Classification Method under the Few-Shot Setting via Two-Stream Training[J]. Optics and Lasers in Engineering, 2023,161:107294-1-107294-12.

[18]

张慧, 王坤峰, 王飞跃. 深度学习在目标视觉检测中的应用进展与展望[J]. 自动化学报, 2017, 43(8):1289-1305.

[19]

(ZHANG H, WANG K F, WANG F Y. Progress and Prospect of Deep Learning in Target Visual Detection[J]. Acta Automatica Sinica, 2017, 43(8):1289-1305.)

[20]

郑明明, 刘胜全, 马前. 基于可变形卷积融合双注意力机制的缺陷检测方法[J]. 东北师大学报(自然科学版), 2023, 55(2):52-61.

[21]

(ZHENG M M, LIU S Q, MA Q. Defect Detection Method Based on Deformable Convolution Fused with Dual Attention Mechanism[J]. Journal of Northeast Normal University(Natural Science Edition), 2023, 55(2):52-61.)

[22]

李宗祐, 高春艳, 吕晓玲, . 基于深度学习的金属材料表面缺陷检测综述[J]. 制造技术与机床, 2023(6):61-67.

[23]

(LI Z Y, GAO C Y, LV X L, et al. Review of Surface Defect Detection Methods for Metallic Materials Based on Deep Learning[J]. Manufacturing Technology & Machine Tool, 2023(6):61-67.)

[24]

郭龙源, 段厚裕, 周武威, . 基于Mask R-CNN的磁瓦表面缺陷检测算法[J]. 计算机集成制造系统, 2022, 28(5):1393-1400.

[25]

(GUO L Y, DUAN H Y, ZHOU W W, et al. Surface Defect Detection Algorithm of Magnetic Tile Based on Mask R-CNN[J]. Computer Integrated Manufacturing Systems, 2022, 28(5):1393-1400.)

[26]

KOU X P, LIU S J, CHENG K Q, et al. Development of a YOLO-V3-Based Model for Detecting Defects on Steel Strip Surface[J]. Measurement, 2021,182:109454-1-109454-9.

[27]

SHI W, LU Z S, WU W, et al. Single-Shot Detector with Enriched Semantics for PCB Tiny Defect Detection[J]. The Journal of Engineering, 2020, 13:366-372.

[28]

刘培勇, 董洁, 谢罗峰, . 基于多支路卷积神经网络的磁瓦表面缺陷检测算法[J]. 吉林大学学报(工学版), 2023, 53(5):1449-1457.

[29]

(LIU P Y, DONG J, XIE L F, et al. Surface Defect Detection Algorithm for Magnetic Tiles Based on Multi-branch Convolutional Neural Network[J]. Journal of Jilin University(Engineering and Technology Edition), 2023, 53(5):1449-1457.)

[30]

刘兰兰, 万旭东, 汪志刚, . 基于超分辨率重建与多尺度特征融合的输电线路缺陷检测方法[J]. 电子测量与仪器学报, 2023, 37(1):130-139.

[31]

(LIU L L, WAN X D, WANG Z G, et al. Transmission Line Defect Detection Method Based on Super-resolution Reconstruction and Multi-scale Feature Fusion[J]. Journal of Electronic Measurement and Instrumentation, 2023, 37(1):130-139.)

[32]

耿志强, 陈威, 马波, . 基于连续小波卷积神经网络的轴承智能故障诊断方法[J]. 浙江大学学报(工学版), 2024, 58(10):2069-2075.

[33]

(GENG Z Q, CHEN W, MA B, et al. Intelligent Fault Diagnosis Method for Bearings Based on Continuous Wavelet Convolutional Neural Networks[J]. Journal of Zhejiang University(Engineering Science), 2024, 58(10):2069-2075.)

[34]

FINDER S E, AMOYAL R, TREISTER E, et al. Wavelet Convolutions for Large Receptive Fields[EB/OL].(2024-07-08)[2025-03-12]. https://arxiv.org/abs/2407.05848.

[35]

GOODFELLOW I, BENGIO Y, COURVILLE A. Deep Learning[M]. Cambridge: MIT Press, 2016:1-800.

[36]

刘毅, 蒋三新. 基于改进YOLOX的钢材表面缺陷检测研究[J]. 现代电子技术, 2024, 47(9):131-138.

[37]

(LIU Y, JIANG S X. Research on Steel Surface Defect Detection Based on Improved YOLOX[J]. Modern Electronics Technology, 2024, 47(9):131-138.)

[38]

HE Y, SONG K C, MENG Q G, et al. An End-to-End Steel Surface Defect Detection Approach via Fusing Multiple Hierarchical Features[J]. IEEE Transactions on Instrumentation and Measurement, 2019, 69(4):1493-1504.

基金资助

国家重点研发计划子课题项目(2017YFB0306405)

AI Summary AI Mindmap
PDF (7336KB)

79

访问

0

被引

详细

导航
相关文章

AI思维导图

/