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

• • 上一篇    下一篇

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

车国霖, 傅家辉   

  1. 昆明理工大学 信息工程与自动化学院, 昆明 650504
  • 收稿日期:2025-01-03 出版日期:2026-05-26 发布日期:2026-05-26
  • 通讯作者: 傅家辉 E-mail:1064084760@qq.com

Metal Surface Defect Detection Based on Improved YOLOX Model

CHE Guolin, FU Jiahui   

  1. Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming 650504, China
  • Received:2025-01-03 Online:2026-05-26 Published:2026-05-26

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

关键词: YOLOX模型, 注意力模块, 小波卷积, 损失函数, 金属表面缺陷

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.

Key words: YOLOX model, attention module, wavelet convolution, loss function, metal surface defect

中图分类号: 

  • TP183