Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2027, Vol. 61 Issue (1): 86-98    DOI: 10.3785/j.issn.1008-973X.2027.01.009
Computer Technology     
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
Download: HTML     PDF(7078KB) HTML
Export: BibTeX | EndNote (RIS)      

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     
Received: 04 November 2025      Published: 25 November 2026
CLC:  TP 391  
Cite this article:

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.

URL:

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


基于动态加权与跨尺度交互的钢材表面缺陷高效检测算法

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


关键词: 缺陷检测,  可学习加权卷积,  跨尺度交互,  频域增强,  轻量化检测头 
Fig.1 ECC-YOLO network structure
Fig.2 ELWC network structure
Fig.3 E-C3k2 network structure
Fig.4 C2DSAI network structure
Fig.5 CDCSDH network structure
参数设置参数设置
图像大小640×640权重衰减因子0.0005
优化器SGD轮次300
学习率0.01图像批次16
动量0.937——
Table 1 Training hyperparameter configuration for steel surface defect detection model
Fig.6 Illustration before and after data augmentation
模型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
Table 2 Ablation performance comparison of E-C3k2 module at different network locations
密度值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
Table 3 Performance comparison of E-C3k2 module under different density parameters
模型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
Table 4 Comparative experimental results on detection performance of different detection head structures
数据集编号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
Table 5 Ablation experimental results of different algorithms on NEU-DET and Severstal datasets
Fig.7 Comparison of average precision for each defect category between proposed algorithm and baseline algorithm
数据集模型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
Table 6 Comparative experimental results of different algorithms on NEU-DET and Severstal datasets
Fig.8 Comparison of detection results between original algorithm and improved algorithm
Fig.9 Comparison of heatmaps between original algorithm and improved algorithm
数据集模型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
Table 7 Detection results of GC10-DET and PCB datasets
[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] Jian XIAO,Xiaoyuan YANG,Xinze HE,Lin CHEN,Xin HU. Lightweight rebar surface defect detection algorithm based on global information perception[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(7): 1438-1451.
[2] Wei TIAN,Linhong ZHOU,Xinyang LI,Jianming WANG,Yukang HUANG. 3D-printed concrete apparent defect detection method based on improved YOLOv8[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(4): 833-843.
[3] Ming CAO,Daokuan CHEN,Pengfei YUAN,Jinpeng ZHOU,Kui ZHOU. Real-time optimization method for desktop level 3D printing parameters based on deep learning[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(11): 2355-2363.
[4] Chunjuan LIU,Yihang BAO,Xiaosuo WU,Haowen YAN,Tieshuan ZHU,Haoran ZHAO. PCB defect detection algorithm based on detail enhancement and cross-scale attention fusion[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(11): 2431-2441.
[5] Tengfei HUANG,Jiuyuan HUO,Fang CAO,Zeyu WU,Chuile KONG. Framework for railway defect detection oriented to small and blurry object[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(11): 2453-2461.
[6] Tao ZHOU,Pengfei WANG,Weijie GAO. Device defect detection based on intrinsic rotational symmetry[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(9): 1856-1863.
[7] Zihao LIU,Jiaxin ZHANG,Feng XUE,Jun ZHANG,Weijie CHEN,Yebo LU. Surface defect detection method of precision pipe fittings based on improved YOLO-v8[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(7): 1514-1522.
[8] Wenbo JU,Huajun DONG. Motherboard defect detection method based on context information fusion and dynamic sampling[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(6): 1159-1168.
[9] Gengliang LIANG,Shuguang HAN. Denim fabric defect detection algorithm based on improved RT-DETR[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(6): 1169-1178.
[10] Liming LIANG,Pengwei LONG,Jiaxin JIN,Renjie LI,Lu ZENG. Steel surface defect detection algorithm based on improved YOLOv8s[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(3): 512-522.
[11] Shancheng TANG,Jianhui LU,Ying ZHANG,Zicheng JIN,Anxin ZHAO. Unsupervised surface defect detection of magnetic tile for repair of suspected area defects[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(4): 718-728.
[12] Kun LIU,Ding WANG,Jingkai WANG,Haiyong CHEN,Weipeng LIU. Feature filtering and feature decoupling based domain generalization model[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(3): 459-467.
[13] Anjing WANG,Julong YUAN,Yongjian ZHU,Cong CHEN,Jinjin WU. Drum roller surface defect detection algorithm based on improved YOLOv8s[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(2): 370-380.
[14] Qing-lin AI,Jing-rui CUI,Bing-hai LV,Tong TONG. Surface defect detection method for bearing drum-shaped rollers based on fusion transformation of defective area[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(5): 1009-1020.
[15] Bai-cheng BIAN,Tian CHEN,Ru-jun WU,Jun LIU. Improved YOLOv3-based defect detection algorithm for printed circuit board[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(4): 735-743.