Please wait a minute...
工程设计学报  2026, Vol. 33 Issue (1): 44-55    DOI: 10.3785/j.issn.1006-754X.2026.05.134
机械设计理论与方法     
融合CNN与高低频聚焦注意力的TOFD焊缝缺陷识别方法
张俊辉1(),唐东林1(),王平杰2,胡远遥1,李渊博1
1.西南石油大学 机电工程学院,四川 成都 610500
2.四川省特种设备检验研究院,四川 成都 610000
TOFD weld defect identification method integrating CNN and high-low frequency focused attention
Junhui ZHANG1(),Donglin TANG1(),Pingjie WANG2,Yuanyao HU1,Yuanbo LI1
1.School of Mechanical and Electrical Engineering, Southwest Petroleum University, Chengdu 610500, China
2.Sichuan Special Equipment Inspection Institute, Chengdu 610000, China
 全文: PDF(6094 KB)   HTML
摘要:

针对TOFD(time of flight diffraction,衍射时差法)超声检测技术中焊缝缺陷图像受高噪声和干扰条纹影响的问题,以及当前深度学习模型在处理此类图像时面临的特征信息丢失与计算效率失衡的挑战,创新性地提出了一种融合卷积神经网络(convolutional neural network, CNN)与Transformer架构的缺陷识别模型,命名为MHLFNet(multi-scale high-low focused network,多尺度高低聚焦网络)。该模型通过引入多尺度特征融合(multi-scale feature fusion, MSFF)模块,显著增强了捕捉局部信息的能力;同时,设计了一种高低频聚焦线性(high-low focused linear, HLFL)模块,利用可调分配比对特征图的高低频信息进行动态注意力分配,并采用聚焦线性注意力代替传统多头自注意力,在有效降低计算复杂度的同时,增强了注意力机制的多样性与特征表达能力。为验证MHLFNet的性能,构建了TOFD焊缝缺陷图像数据集,并进行了系统的实验评估。结果表明,MHLFNet在焊缝缺陷识别任务中实现了98.6%的准确率,同时在模型参数量、浮点运算量以及推理时间方面表现优异。在可视化分析与识别验证中,MHLFNet对高危缺陷(如未熔合和裂纹)展现出卓越的识别能力,证明了其在工业检测中的可靠性与工程价值。

关键词: 衍射时差法焊缝缺陷识别卷积神经网络Transformer架构多尺度特征融合    
Abstract:

Aiming at the problem of weld defect images affected by high noise and interference fringes in TOFD (time of flight diffraction) ultrasonic detection technology, as well as the challenge of feature information loss and computational efficiency imbalance faced by current deep learning models in processing such images, an innovative defect identification model integrating convolutional neural network (CNN) and Transformer architecture is proposed, named MHLFNet (multi-scale high-low focused network). By introducing a multi-scale feature fusion (MSFF) module, this model significantly enhanced the ability of capturing local information. At the same time, a high-low focused linear (HLFL) module was designed, which used the adjustable allocation ratio to dynamically allocate the attention for the high and low frequency information of feature images, and adopted focused linear attention instead of traditional multi-head self-attention, effectively reducing the computational complexity while enhancing the diversity of attention mechanisms and the feature expression ability. In order to verify the performance of MHLFNet, a TOFD weld defect image dataset was constructed, and a systematic experimental evaluation was conducted. The results showed that MHLFNet achieved an accuracy of 98.6% in the weld defect identification task, and performed excellently in terms of model parameters, floating-point operations, and inference time. In visual analysis and identification validation, MHLFNet demonstrates excellent identification capabilities for high-risk defects (such as lack of fusion and cracks), proving its reliability and engineering value in industrial inspection.

Key words: time of flight diffraction (TOFD)    weld defect identification    convolutional neural network    Transformer architecture    multi-scale feature fusion
收稿日期: 2025-05-20 出版日期: 2026-03-01
CLC:  TG 441.7  
基金资助: 四川省自然科学基金资助项目(2024NSFSC2003);四川省市场监督管理总局科技项目(SCSJS2024006);南充市-西南石油大学市校科技战略合作项目(23XNSYSX0048);南充市-西南石油大学市校科技战略合作项目(23XNSYSX0061)
通讯作者: 唐东林     E-mail: zhangjh26100800@163.com;tdl840451816@163.com
作者简介: 张俊辉(2000—),男,硕士生,从事超声无损检测、模式识别等研究,E-mail: zhangjh26100800@163.com,https://orcid.org/0009-0005-7244-2793
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
RSS
作者相关文章  
张俊辉
唐东林
王平杰
胡远遥
李渊博

引用本文:

张俊辉,唐东林,王平杰,胡远遥,李渊博. 融合CNN与高低频聚焦注意力的TOFD焊缝缺陷识别方法[J]. 工程设计学报, 2026, 33(1): 44-55.

Junhui ZHANG,Donglin TANG,Pingjie WANG,Yuanyao HU,Yuanbo LI. TOFD weld defect identification method integrating CNN and high-low frequency focused attention[J]. Chinese Journal of Engineering Design, 2026, 33(1): 44-55.

链接本文:

https://www.zjujournals.com/gcsjxb/CN/10.3785/j.issn.1006-754X.2026.05.134        https://www.zjujournals.com/gcsjxb/CN/Y2026/V33/I1/44

图1  MHLFNet整体架构及其关键模块
图2  TOFD检测原理与成像过程
试块厚度/mm频率/MHz声束角度α/(°)晶片尺寸/mm
>15~355~1060~702~6
>35~503~560~703~6
表1  TOFD检测探头参数选择
图3  TOFD焊缝缺陷图像
图4  TOFD焊缝缺陷图像采集过程
数据集缺陷图像/张
裂纹未熔合气孔夹渣表面开口
训练集1 2001 2001 2001 2001 200
测试集300300300300300
表2  TOFD焊缝缺陷图像数据集划分
参数类型参数设置
优化算法AdamW
损失函数交叉熵函数
初始学习率0.000 1
学习率调整策略余弦退火,周期为30
批大小32
迭代数/次150
激活函数ReLU
表3  MHLFNet模型的超参数设置
图5  MHLFNet模型的分类性能验证
图6  t-SNE聚类分析结果
基线网络MSFF模块HLFL模块准确率/%损失值参数量/106 浮点运算量/109
96.10.37528.003.7
97.60.21728.845.3
97.20.27425.623.1
98.60.13328.114.2
表4  不同模块的消融实验结果
图7  分配比对MHLFNet模型性能的影响
图8  不同模型的分类准确率和计算性能参数对比
图9  不同模型的混淆矩阵比较
图10  MHLFNet模型的特征图可视化结果
图11  不同模型的类激活热力图
  
[1] LIU T Y, ZHENG P, BAO J S. Deep learning-based welding image recognition: a comprehensive review[J]. Journal of Manufacturing Systems, 2023, 68: 601-625.
[2] 纪晓东, 程天宇, 华亮, 等. 基于声信号识别的水下焊接质量检测方法研究[J]. 工程设计学报, 2023, 30(5): 562-570. doi:10.3785/j.issn.1006-754X.2023.00.066
JI X D, CHENG T Y, HUA L, et al. Research on detection method of underwater welding quality based on acoustic signal recognition[J]. Chinese Journal of Engineering Design, 2023, 30(5): 562-570.
doi: 10.3785/j.issn.1006-754X.2023.00.066
[3] ZHANG X B, FENG J, LU S X, et al. FMD-framework: a size estimation method for pipeline defects in weld-affected zones[J]. IEEE Transactions on Instrumentation and Measurement, 2023, 72: 3508711.
[4] YANG L, SONG S A, FAN J F, et al. An automatic deep segmentation network for pixel-level welding defect detection[J]. IEEE Transactions on Instrumentation and Measurement, 2022, 71: 5003510.
[5] 陈涛, 董袁航, 张赛, 等. 高压电缆铝护套焊缝缺陷ACFM检测方法及检测系统的研究[J]. 工程设计学报, 2022, 29(3): 394-400.
CHEN T, DONG Y H, ZHANG S, et al. Research on ACFM detection method and detection system for weld defects of aluminum sheath of high voltage cable[J]. Chinese Journal of Engineering Design, 2022, 29(3): 394-400.
[6] LIU T Y, ZHENG P, BAO J S, et al. A state-of-the-art survey of welding radiographic image analysis: challenges, technologies and applications[J]. Measurement, 2023, 214: 112821.
[7] 陈振华, 郑志远, 卢超. 不锈钢焊缝中超声传播特性及TOFD检测方法研究[J]. 电子测量与仪器学报, 2017, 31(7): 1129-1136.
CHEN Z H, ZHENG Z Y, LU C. Research on wave propagation characteristics in austenite stainless steel weld andultrasonic TOFD testing technique[J]. Journal of Electronic Measurement and Instrumentation, 2017, 31(7): 1129-1136.
[8] HABIBPOUR-LEDARI A, HONARVAR F. Three dimensional characterization of defects by ultrasonic time-of-flight diffraction (ToFD) technique[J]. Journal of Nondestructive Evaluation, 2018, 37(1): 14.
[9] TANG D L, ZHANG J H, WANG P J, et al. Weld TOFD defect classification method based on multi-scale CNN and cascaded focused attention[J]. Journal of Manufacturing Processes, 2025, 138: 157-168.
[10] AL-ATABY A, AL-NUAIMY W, BRETT C R, et al. Automatic detection and classification of weld flaws in TOFD data using wavelet transform and support vector machines[J]. Insight: Non-Destructive Testing and Condition Monitoring, 2010, 52(11): 597-602.
[11] 林乃昌, 杨晓翔, 林文剑, 等. 基于改进的KPCA的TOFD图像缺陷识别方法[J]. 福州大学学报(自然科学版), 2014, 42(2): 277-281.
LIN N C, YANG X X, LIN W J, et al. Research on defect recognition of TOFD image based on improved KPCA[J]. Journal of Fuzhou University (Natural Science Edition), 2014, 42(2): 277-281.
[12] THERESA CENATE C F, SHEELA RANI B, RAMADEVI R, et al. Optimization of the cascade feed forward back propagation network for defect classification in ultrasonic images[J]. Russian Journal of Nondestructive Testing, 2016, 52(10): 557-568.
[13] NI X F, LIU H L, MA Z J, et al. Detection for rail surface defects via partitioned edge feature[J]. IEEE Transactions on Intelligent Transportation Systems, 2022, 23(6): 5806-5822.
[14] GONG X Y, SU H, XU D, et al. Contour extraction and quality inspection for inner structure of deep hole components[J]. IEEE Transactions on Components, Packaging and Manufacturing Technology, 2019, 9(3): 575-585.
[15] LIANG Y, XU K, ZHOU P, et al. Automatic defect detection of texture surface with an efficient texture removal network[J]. Advanced Engineering Informatics, 2022, 53: 101672.
[16] JHA S B, BABICEANU R F. Deep CNN-based visual defect detection: survey of current literature[J]. Computers in Industry, 2023, 148: 103911.
[17] ROCA BARCELÓ F, JAÉN DEL HIERRO P, RIBES LLARIO F, et al. Development of an ultrasonic weld inspection system based on image processing and neural networks[J]. Nondestructive Testing and Evaluation, 2018, 33(2): 229-236.
[18] 黄焕东, 胡利晨, 李斌彬, 等. 基于区域的快速卷积神经网络的焊缝TOFD检测缺陷识别[J]. 无损检测, 2019, 41(7): 12-18.
HUANG H D, HU L C, LI B B, et al. Recognition of defect in TOFD image based on faster region convolutional neural networks[J]. Nondestructive Testing, 2019, 41(7): 12-18.
[19] 支泽林, 姜洪权, 杨得焱, 等. 图谱数据深度学习融合模型及焊缝缺陷识别方法[J]. 西安交通大学学报, 2021, 55(5): 73-82.
ZHI Z L, JIANG H Q, YANG D Y, et al. A deep learning fusion model of wave and image data for weld defect recognition[J]. Journal of Xi’an Jiaotong University, 2021, 55(5): 73-82.
[20] ZHI Z L, JIANG H Q, YANG D Y, et al. An end-to-end welding defect detection approach based on titanium alloy time-of-flight diffraction images[J]. Journal of Intelligent Manufacturing, 2023, 34(4): 1895-1909.
[21] LIU Z, LIN Y T, CAO Y, et al. Swin Transformer: hierarchical vision Transformer using shifted windows[EB/OL]. (2021-08-17) [2025-03-20]. .
[22] ZHU L, WANG X J, KE Z H, et al. BiFormer: vision Transformer with bi-level routing attention[EB/OL]. (2023-03-15) [2025-03-20]. .
[23] TAY Y, DEHGHANI M, BAHRI D, et al. Efficient Transformers: a survey[J]. ACM Computing Surveys, 2022, 55(6): 1-28.
[24] ALI A M, BENJDIRA B, KOUBAA A, et al. Vision Transformers in image restoration: a survey[J]. Sensors, 2023, 23(5): 2385.
[25] REN H Y, DAI H J, DAI Z H, et al. Combiner: full attention Transformer with sparse computation cost[EB/OL]. (2021-10-28) [2025-03-20]. .
[26] YU T, KHALITOV R, CHENG L, et al. Paramixer: parameterizing mixing links in sparse factors works better than dot-product self-attention[EB/OL]. (2022-04-22) [2025-03-20]. .
[27] 全国锅炉压力容器标准化技术委员会. 承压设备无损检测 第10部分: 衍射时差法超声检测: NB/T 47013.10—2015 [S]. 北京: 新华出版社, 2015.
National Standardization Technical Committee for Boilers and Pressure Vessels. Nondestructive testing of pressure equipments: Part 10: ultrasonic time of flight diffraction technique: NB/T 47013.10—2015 [S]. Beijing: Xinhua Publishing House, 2015.
[1] 王开松,魏一鸣,唐威,郭旭华,李朝阳,邹俊. 基于CNN-LSTM-Attention模型的湿喷台车泵送系统堵管故障预测方法[J]. 工程设计学报, 2025, 32(6): 759-768.
[2] 曾妮,马宗方,宋琳,段明. 3D打印混凝土界面孔隙智能检测方法研究[J]. 工程设计学报, 2025, 32(1): 11-22.
[3] 谢苗,孟庆爽,李博,卢进南,李玉岐,杨志勇. 融合短时傅里叶变换和卷积神经网络的托辊故障诊断方法[J]. 工程设计学报, 2024, 31(5): 565-574.
[4] 沈剑雄,刘迎圆,王乐勤. 基于深度学习的翼型参数化建模方法[J]. 工程设计学报, 2024, 31(3): 292-300.