Please wait a minute...
浙江大学学报(工学版)  2027, Vol. 61 Issue (1): 86-98    DOI: 10.3785/j.issn.1008-973X.2027.01.009
计算机技术     
基于动态加权与跨尺度交互的钢材表面缺陷高效检测算法
梁礼明(),余洪亮,王灵亮,吴周亿,蔡锦辉
江西理工大学 电气工程与自动化学院,江西 赣州 341000
Efficient steel surface defect detection algorithm based on dynamic weighting and cross-scale interaction
Liming Liang(),Hongliang Yu,Lingliang Wang,Zhouyi Wu,Jinhui Cai
School of Electrical Engineering and Automation, Jiangxi University of Science and Technology, Ganzhou 341000, China
 全文: PDF(7078 KB)   HTML
摘要:

针对钢材表面缺陷检测中关键特征表达不足、现有模型结构复杂和检测精度低等问题,提出基于动态加权与跨尺度交互的改进检测算法. 构建特征增强模块,通过可学习加权卷积动态调整通道与空间权重,强化关键缺陷区域的特征识别与表达能力;设计动态统计感知交互模块,借助多尺度卷积与快速傅里叶变换实现空间-频域协同建模,在降低计算冗余的基础上,高效捕获局部细节与全局语义信息;构建轻量化跨尺度检测头,在简化模型结构的同时,提升复杂缺陷的检测精度与计算效率. 实验结果表明,所构算法在NEU-DET、Severstal数据集上的mAP较基线模型分别提升2.4、3.9个百分点,参数量降至2.2 ×106,推理速度达188、192 帧/s,在精度、轻量化与实时性方面达到最优平衡. 在GC10-DET与PCB数据集上的实验进一步佐证该算法具备优异的泛化能力,充分满足钢材表面缺陷检测的实际需求.

关键词: 缺陷检测;  可学习加权卷积;  跨尺度交互;  频域增强;  轻量化检测头    
Abstract:

An enhanced detection algorithm based on dynamic weighting and cross-scale interaction was proposed, to address insufficient feature representation, complex model structures, and low detection accuracy in steel surface defect detection. A feature enhancement module was constructed using learnable weighted convolutions to dynamically adjust channel and spatial weights, thereby strengthening the recognition and representation of key defect regions. A dynamic statistical perception interaction module was designed, which integrated multi-scale convolution and fast Fourier transform to achieve spatial-frequency cooperative modeling, efficiently capturing both local details and global semantic information while reducing computational redundancy. A lightweight cross-scale detection head was introduced to improve detection accuracy and computational efficiency while simplifying the overall model structure. Experimental results demonstrated that the proposed method improved mAP by 2.4 percentage points and 3.9 percentage points on the NEU-DET and Severstal datasets respectively, reduced parameters to 2.2 ×106, and achieved inference speeds of 188 frames per second and 192 frames per second, attaining an optimal balance of accuracy, lightweight design, and real-time performance. Additional tests on the GC10-DET and PCB datasets further confirmed the strong generalization capability of the algorithm, adequately meeting practical requirements for steel surface defect inspection.

Key words: defect detection    learnable weighted convolution    cross-scale interaction    frequency-domain enhancement    lightweight detection head
收稿日期: 2025-11-04 出版日期: 2026-11-25
CLC:  TP 391  
基金资助: 国家自然科学基金资助项目(51365017,61463018);江西省自然科学基金资助项目(20192BAB205084);江西省教育厅科学技术研究资助项目(GJJ2200848).
作者简介: 梁礼明(1967—),男,教授,硕导,从事机器学习、模式识别与图像处理研究. orcid.org/0009-0004-5278-5249. E-mail:9119890012@jxust.edu.cn
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
作者相关文章  
梁礼明
余洪亮
王灵亮
吴周亿
蔡锦辉

引用本文:

梁礼明,余洪亮,王灵亮,吴周亿,蔡锦辉. 基于动态加权与跨尺度交互的钢材表面缺陷高效检测算法[J]. 浙江大学学报(工学版), 2027, 61(1): 86-98.

Liming Liang,Hongliang Yu,Lingliang Wang,Zhouyi Wu,Jinhui Cai. Efficient steel surface defect detection algorithm based on dynamic weighting and cross-scale interaction. Journal of ZheJiang University (Engineering Science), 2027, 61(1): 86-98.

链接本文:

https://www.zjujournals.com/eng/CN/10.3785/j.issn.1008-973X.2027.01.009    或    https://www.zjujournals.com/eng/CN/Y2027/V61/I1/86

图1  ECC-YOLO网络结构
图2  ELWC网络结构
图3  E-C3k2网络结构
图4  C2DSAI网络结构
图5  CDCSDH网络结构
参数设置参数设置
图像大小640×640权重衰减因子0.0005
优化器SGD轮次300
学习率0.01图像批次16
动量0.937——
表1  钢材表面缺陷检测模型训练超参数配置
图6  数据增强前、后图示
模型P/%R/%F1/%mAP/%Par/106FLOPs/109FPS/(帧·s?1)
YOLOv11n71.874.072.976.92.586.3172
+Backbone76.669.272.777.72.585.8161
+Neck68.873.771.277.32.585.8158
+Both75.971.873.877.52.585.4182
表2  E-C3k2模块在不同网络位置的消融性能对比
密度值P/%R/%F1/%mAP/%Par/106FLOPs/109FPS/(帧?s?1)
基线71.874.072.976.92.586.3172
D=0.573.373.173.276.42.586.3169
D=0.673.671.672.676.72.586.3173
D=0.771.373.372.377.12.585.4159
D=0.873.871.672.777.22.585.4161
D=0.975.971.873.877.52.585.4182
D=1.073.872.072.977.42.585.4147
D=1.168.873.771.277.32.585.4170
D=1.272.372.972.677.22.585.4165
D=1.372.270.971.577.02.585.4168
表3  不同密度参数下E-C3k2模块的性能对比
模型P/%R/%F1/%mAP/%Par/106FLOPs/109FPS/(帧?s?1)
V11head71.874.072.976.92.586.3172
Dyhead77.570.173.678.23.107.5131
LSCD75.771.373.476.82.425.6167
LSCSBD72.775.574.177.02.466.2154
Efficienthead76.769.873.177.92.315.1172
MShead76.071.473.677.04.606.0148
CDCSDH80.271.575.678.42.266.0177
表4  不同检测头结构的检测性能对比实验结果
数据集编号BaselineABCP/%R/%F1/%mAP/%Par/106FLOPs/109FPS/((帧?s?1)
NEU-DET1√———71.874.072.976.92.586.3172
2√√——75.971.873.877.52.585.4182
3√—√—76.872.274.478.62.666.4164
4√——√80.271.575.678.42.266.0177
5√√√—73.774.774.277.92.655.4171
6√√—√75.971.873.877.42.265.5154
7√—√√75.872.974.378.62.336.1169
8√√√√76.573.775.179.32.245.1188
Severstal1√———83.175.879.383.22.586.3180
2√√——80.778.379.584.42.585.4178
3√—√—83.276.479.784.62.666.4182
4√——√83.675.279.284.12.266.0176
5√√√—83.779.381.486.42.655.4183
6√√—√82.977.279.985.82.265.5171
7√—√√81.878.980.385.42.336.1187
8√√√√81.082.481.787.12.245.1192
表5  NEU-DET和Severstal数据集上的消融实验结果
图7  本研究算法与基线算法各类别缺陷平均精度对比
数据集模型P/%R/%F1/%mAP/%Par/106FLOPs/109FPS/(帧?s?1)
NEU-DETFaster R-CNN42.985.357.173.072.0167.324
SSD75.154.863.469.441.4145.338
YOLOv3-tiny58.469.163.365.512.118.9156
YOLOv5n72.771.171.975.42.57.1185
YOLOv7-tiny77.765.070.861.16.013.1114
YOLOv8n71.972.672.275.83.08.1172
YOLOv9-tiny72.069.570.775.22.37.6152
YOLOv10n68.472.270.274.22.78.2175
YOLOv11n71.874.072.976.92.66.3172
YOLOv12n73.272.072.676.62.66.3133
YOLOv13n73.773.473.677.82.46.1116
MBAC-YOLO[13]69.774.672.177.111.17.5185
DFD-YOLOv11n[14]73.172.472.777.12.79.4116
GLF-NET[15]———79.212.034.695
NGD-YOLO[16]76.473.574.979.28.818.3109
ECC-YOLO76.573.775.179.32.25.1188
SeverstalSSD76.868.572.472.541.4145.357
YOLOv3-tiny69.774.271.974.212.118.9182
YOLOv4-tiny82.563.571.863.75.916.1132
YOLOv5n78.174.576.380.72.57.1207
YOLOv6n81.077.477.681.84.211.8178
YOLOv7-tiny74.766.470.361.96.013.1143
YOLOv8n79.278.078.683.03.08.1192
YOLOv9-tiny80.375.277.782.52.37.6175
YOLOv10n81.773.177.282.12.78.2198
YOLOv11n83.175.879.383.22.66.3180
YOLOv12n81.174.677.782.82.66.3158
ECC-YOLO81.082.481.787.12.25.1192
表6  不同算法在NEU-DET和Severstal数据集上的对比实验结果
图8  原算法与改进算法检测结果对比
图9  原算法与改进算法热力图对比
数据集模型P/%R/%F1/%mAP/%Par/106FLOPs/109FPS/(帧?s?1)
GC10-DETYOLOv11n66.561.764.062.32.66.3163
ECC-YOLO68.563.465.965.22.25.1188
PCBYOLOv11n94.486.791.591.52.66.3100
ECC-YOLO95.292.394.694.62.25.1133
表7  GC10-DET和PCB数据集检测结果
1 Wang S, Fan X, Zhao Z, et al. Research on steel surface defect detection system based on YOLOv5s-SE-CA model and BEMD image enhancement. Nondestructive Testing and Evaluation, 2025, 40 (7): 3080- 3099.
doi: 10.1080/10589759.2024.2393205
2 王浚银, 文斌, 沈艳军, 等. 基于改进YOLOv7-tiny的铝型材表面缺陷检测方法. 浙江大学学报(工学版), 2025, 59 (3): 523- 534.
Wang Junyin, Wen Bin, Shen Yanjun, et al. Surface defect detection method for aluminum profiles based on improved YOLOv7-tiny. Journal of Zhejiang University (Engineering Science), 2025, 59 (3): 523- 534.
doi: 10.3785/j.issn.1008-973X.2025.03.010
3 Zhou M, Ye G, Yuen K V, et al. A graph attention reasoning model for prefabricated component detection. Computer-Aided Civil and Infrastructure Engineering, 2025, 40 (12): 1606- 1626.
doi: 10.1111/mice.13373
4 Wang Q, Paynabar K, Pacella M. Online automatic anomaly detection for photovoltaic systems using thermography imaging and low rank matrix decomposition. Journal of Quality Technology, 2022, 54 (5): 503- 516.
doi: 10.1080/00224065.2021.1948372
5 Cheng S, Zhu M, Yang F, et al. Radiomics models predict early neurodevelopment in infants with congenital cardiac septal defects. Quantitative Imaging in Medicine and Surgery, 2025, 15 (10): 10168- 10179.
doi: 10.21037/qims-2025-565
6 Yu M, Fang M, Guo G. Combined failure identification of intermediate bearing in aeroengine based on wavelet transform, second-order difference, and 1D-LBP. Structural Health Monitoring, 2025, 24 (6): 3617- 3636.
doi: 10.1177/14759217241270747
7 Girshick R. Fast R-CNN [C]// Proceedings of the IEEE International Conference on Computer Vision. Santiago: IEEE, 2016: 1440–1448.
8 Ren S, He K, Girshick R, et al. Faster R-CNN: towards real-time object detection with region proposal networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39 (6): 1137- 1149.
doi: 10.1109/TPAMI.2016.2577031
9 Liu W, Anguelov D, Erhan D, et al. SSD: single shot MultiBox detector [C]// European Conference on Computer Vision. Cham: Springer, 2016: 21–37.
10 Dai N, Hu X, Xu K, et al. A study on lightweight algorithms for fabric defect detection. Textile Research Journal, 2025, 95 (21/22): 2553- 2569.
11 Bin F, Hou F, Chen D, et al. BCM-YOLO: an improved YOLOv8-based lightweight porcelain insulator defect detection model. High Voltage, 2025, 10 (4): 876- 889.
doi: 10.1049/hve2.70080
12 梁礼明, 龙鹏威, 金家新, 等. 基于改进YOLOv8s的钢材表面缺陷检测算法. 浙江大学学报(工学版), 2025, 59 (3): 512- 522.
Liang Liming, Long Pengwei, Jin Jiaxin, et al. Steel surface defect detection algorithm based on improved YOLOv8s. Journal of Zhejiang University (Engineering Science), 2025, 59 (3): 512- 522.
doi: 10.3785/j.issn.1008-973X.2025.03.009
13 仵大奎, 葛承昆, 周文举, 等. 工业场景下的钢材表面缺陷实时检测网络. 计算机工程与应用, 2026, 62 (7): 85- 95.
Wu Dakui, Ge Chengkun, Zhou Wenju, et al. Real-time detection network for steel surface defects in industrial scenarios. Computer Engineering and Applications, 2026, 62 (7): 85- 95.
doi: 10.3778/j.issn.1002-8331.2505-0316
14 雷富强, 马刘文, 关鹏, 等. 基于DFD-YOLOv11n的钢材装备表面缺陷检测算法研究. 计算机工程与应用, 2026, 62 (2): 92- 102.
Lei Fuqiang, Ma Liuwen, Guan Peng, et al. Research on surface defect detection algorithm of steel equipment based on DFD-YOLOv11n. Computer Engineering and Applications, 2026, 62 (2): 92- 102.
15 Ma Y, Zhang Z, Ma S, et al. GLF-NET: global and local dynamic feature fusion network for real-time steel strip surface defect detection. IEEE Access, 2025, 13, 26063- 26078.
doi: 10.1109/ACCESS.2025.3539350
16 Li B, Xiao A, Hu X, et al. NGD-YOLO: an improved real-time steel surface defect detection algorithm. Electronics, 2025, 14 (14): 2859.
doi: 10.3390/electronics14142859
17 Li C, Zhou A, Yao A. Omni-dimensional dynamic convolution [PP/OL]. arXiv (2022−09−16) [2025−10−31]. https://doi.org/10.48550/arXiv.2209.07947.
18 Oluwasanmi A, Aftab M U, Qin Z, et al. Multi-head spatiotemporal attention graph convolutional network for traffic prediction. Sensors, 2023, 23 (8): 3836.
doi: 10.3390/s23083836
[1] 肖剑,杨小苑,何昕泽,陈林,胡欣. 基于全局信息感知的轻量级螺纹钢表面缺陷检测算法[J]. 浙江大学学报(工学版), 2026, 60(7): 1438-1451.
[2] 田卫,周菻鈜,李欣阳,王建明,黄余康. 基于改进YOLOv8的3D打印混凝土表观缺陷检测方法[J]. 浙江大学学报(工学版), 2026, 60(4): 833-843.
[3] 曹铭,谌道宽,原鹏飞,周锦鹏,周奎. 基于深度学习的桌面级3D打印参数实时优化方法[J]. 浙江大学学报(工学版), 2026, 60(11): 2355-2363.
[4] 刘春娟,包易航,吴小所,闫浩文,朱铁栓,赵浩然. 基于细节增强和跨尺度注意力融合的PCB缺陷检测算法[J]. 浙江大学学报(工学版), 2026, 60(11): 2431-2441.
[5] 黄腾飞,火久元,曹芳,武泽宇,孔垂乐. 面向小目标与模糊目标的轨道缺陷检测框架[J]. 浙江大学学报(工学版), 2026, 60(11): 2453-2461.
[6] 刘子豪,张佳欣,薛峰,张俊,陈伟杰,鹿业波. 基于改进YOLO-v8的精密管件表面缺陷检测方法[J]. 浙江大学学报(工学版), 2025, 59(7): 1514-1522.
[7] 鞠文博,董华军. 基于上下文信息融合与动态采样的主板缺陷检测方法[J]. 浙江大学学报(工学版), 2025, 59(6): 1159-1168.
[8] 梁耕良,韩曙光. 基于改进RT-DETR的牛仔面料疵点检测算法[J]. 浙江大学学报(工学版), 2025, 59(6): 1169-1178.
[9] 梁礼明,龙鹏威,金家新,李仁杰,曾璐. 基于改进YOLOv8s的钢材表面缺陷检测算法[J]. 浙江大学学报(工学版), 2025, 59(3): 512-522.
[10] 唐善成,逯建辉,张莹,金子成,赵安新. 修复缺陷嫌疑区域的无监督磁瓦表面缺陷检测[J]. 浙江大学学报(工学版), 2024, 58(4): 718-728.
[11] 刘坤,王丁,王静凯,陈海永,刘卫朋. 基于特征过滤与特征解耦的域泛化模型[J]. 浙江大学学报(工学版), 2024, 58(3): 459-467.
[12] 王安静,袁巨龙,朱勇建,陈聪,吴金津. 基于改进YOLOv8s的鼓形滚子表面缺陷检测算法[J]. 浙江大学学报(工学版), 2024, 58(2): 370-380.
[13] 卞佰成,陈田,吴入军,刘军. 基于改进YOLOv3的印刷电路板缺陷检测算法[J]. 浙江大学学报(工学版), 2023, 57(4): 735-743.
[14] 兰欢,余建波. 基于深度学习三维成型的钢板表面缺陷检测[J]. 浙江大学学报(工学版), 2023, 57(3): 466-476.
[15] 袁天乐,袁巨龙,朱勇建,郑翰辰. 基于改进YOLOv5的推力球轴承表面缺陷检测算法[J]. 浙江大学学报(工学版), 2022, 56(12): 2349-2357.