3.Xining Communication Department,China Railway Qinghai-Xizang Group Co. ,Ltd. ,Golmud 816000,China
Show less
文章历史+
Received
Published
2025-01-03
2026-04-25
Issue Date
2026-06-11
PDF (3774K)
摘要
动车组运行故障动态图像检测系统(trouble of moving electric multiple units dynamic image detection system, TEDS)需进行检测的部件形态多样、体积大小不一,导致既有的检测方法误报率、漏检率高,因此,本文提出一种伪缺陷多头深度可分离自注意力反向知识蒸馏网络进行TEDS图像的无监督缺陷检测.首先,通过深度可分离卷积取代矩阵生成自注意力头向量,并以聚焦函数调整相似度的尖锐分布,构建的多头深度可分离线性自注意力享有线性运算复杂度;其次,通过倒瓶颈残差模块和多头深度可分离线性自注意力模块构建以轻量级教师-学生模型为主干的反向知识蒸馏网络,在提高网络特征提取能力的同时,减少网络可训练参数量,加块检测速度;在教师网络各个模块后设置投影层,同时采用Simplex和随机裁剪伪缺陷机制来模拟训练过程中的伪缺陷样本,通过多重损失引导投影层从正常特征空间中推开缺陷信息,迫使投影层专注于探索正常特征的更深层表示,来限制缺陷信息流向学生网络, 使得教师、学生网络对缺陷有更大的特征差异.研究表明,改进后的网络能有效提高TEDS图片的缺陷检测能力,评价指标Sample-Auroc、pixel-Auroc、Aupro分别达到94.6%、91.71%、80.1%,和其他算法对比,分别提高3.3、3.8、4个百分点;且能够取得0.37 s/张的TEDS缺陷检测速度,满足TEDS系统的实时性需求.
Abstract
The trouble of moving electric multiple units dynamic image detection system (TEDS) needs to detect components with diverse shapes and sizes, which leads to high false positive and missed detection rates in the existing detection methods. Therefore, a pseudo anomaly multi-head depth separable self-attention reverse knowledge distillation network is proposed to achieve anomaly detection on TEDS images. Firstly, the self-attention head vector is generated by replacing the matrix with depthwise separable convolution, and the sharp distribution of similarity is adjusted with a focus function. The constructed multi-head depthwise separable linear self-attention enjoys linear computational complexity. Secondly,a lightweight attention teacher-student model based reverse knowledge distillation network is constructed using a bottleneck residual module and a multi-head depth separable linear self-attention module, which improves the network’s feature extraction ability while reducing the number of trainable parameters, and accelerates the detection speed. Projection layers are set after each module of the teacher network. Meanwhile, the Simplex and random cropping pseudo-defect mechanisms are employed to simulate pseudo-defect samples during training. Through multi-loss guidance, the projection layers are pushed away from the normal feature space to exclude defect information, forcing them to focus on exploring deeper representations of normal features and restricting the flow of defect information to the student network, resulting in greater feature differences between the teacher and student networks for anomaly. Research shows that the improved network can effectively enhance the anomaly detection capability of TEDS images; the evaluation metrics of image-Auroc, pixel-Auroc, and Aupro reach 94.6%, 91.71%, 80.1%, respectively. Compared with other algorithms, these metrics show improvements of 3.3, 3.8, 4 percentage points, respectively. This method can achieve a detection speed of 0.37 s per sheet, meeting the real-time requirements of TEDS systems.
式(4)没有了限制计算顺序, 根据矩阵乘法的结合性质, 可将 Q 、 K 、 V 的计算顺序从改为, 则形成线性注意力[30-31], 两者有相同的运算结果, 但运算复杂度减小为. 但上述线性注意力没有了Softmax函数的聚焦功能, 导致注意力分布过于松散, 性能较传统注意力明显下降. 采用式(5)所示的聚焦函数调整权重,可使得式(4)所示的线性注意力达到近似于Softmax函数一样的尖锐分布.
式中:表示逐元素计算 x 的p次方, 可证明, 说明特征向量 x 被变换后特征的范数不变, 而方向得到了调整.
图3(a)和图3(b)给出了将向量拉向靠近它的坐标轴的调整效果, 说明作用于特征向量 q 、 k 时,将其按坐标轴分为若干组且将其拉向靠近它的坐标轴.如图3(c)所示, 当按式(4)进行相似度计算时,使得 q 对更接近自己的特征 k 有更高的相似度,并减小和它远离特征 k 的相似度.图3中坐标轴为无量纲数据,取值范围为[0,1],根据颜色深浅表示相似度.由此利用式(5)可聚焦相似的特征, 实现相似和不相似特征间更尖锐的差异分布.
HUANGY Y, ZHOUH, CHENY H, et al .TEDS underbody fault location algorithm in virtue of weak texture matching[J].CAAI Transactions on Intelligent Systems, 2024, 19(3):670-678.(in Chinese)
LIP, WUB F, LIUM Y, et al. Vision-based fault detection for key components of railway train based on deep learning[J]. Journal of Railway Science and Engineering, 2019, 16(12): 3119-3125.(in Chinese)
[5]
SUNJ H, XIAOZ W, XIEY X. Automatic multi-fault recognition in TFDS based on convolutional neural network[J]. Neurocomputing, 2017, 222: 127-136.
ZHOUW, SHIT Y, LIP, et al. Defects detection and segmentation of operation safety image of EMU based on convolutional neural network[J]. Journal of the China Railway Society, 2019, 41(10): 76-83. (In Chinese)
JIAX F, JIANGZ L, ZHAOB T. Lightweight detection method for small crack target defects[J]. Journal of Hunan University(Natural Sciences), 2024, 51(6):52-62. (in Chinese)
[13]
ZHANGH, SONGY N, CHENY R, et al. MRSDI-CNN: multi-model rail surface defect inspection system based on convolutional neural networks[J]. IEEE Transactions on Intelligent Transportation Systems, 2022, 23(8): 11162-11177.
[14]
ZAVRTANIKV, KRISTANM, SKOČAJD. Reconstruction by inpainting for visual anomaly detection[J]. Pattern Recognition, 2021,112:107706.
[15]
RISTEAN C, MADANN, IONESCUR T, et al. Self-supervised predictive convolutional attentive block for anomaly detection[C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 18-24, 2022, New Orleans, LA, USA. IEEE, 2022:13566-13576.
[16]
SCHLEGLT, SEEBÖCKP, WALDSTEINS M, et al .Unsupervised anomaly detection with generative adversarial networks to guide marker discovery[C]//Information Processing in Medical Imaging.Cham:Springer, 2017:146-157.
[17]
SCHLEGLT, SEEBÖCKP, WALDSTEINS M, et al. F-AnoGAN: fast unsupervised anomaly detection with generative adversarial networks[J]. Medical Image Analysis, 2019, 54:30-44.
[18]
WYATTJ, LEACHA, SCHMONS M, et al .AnoDDPM:anomaly detection with denoising diffusion probabilistic models using simplex noise[C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW),June 19-20, 2022, New Orleans, LA, USA. IEEE, 2022:649-655.
[19]
ZHANGH, WANGZ, ZENGD, et al .DiffusionAD:norm-guided one-step denoising diffusion for anomaly detection[EB/OL]. 2023:arXiv:2303.08730.
[20]
SANDLERM, HOWARDA, ZHUM L, et al .MobileNetV2:inverted residuals and linear bottlenecks[C]//2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition,June 18-23, 2018, Salt Lake City, UT, USA. IEEE, 2018:4510-4520.
[21]
HOWARDA, SANDLERM, CHENB, et al. Searching for MobileNetV3[C]//2019 IEEE/CVF International Conference on Computer Vision (ICCV), October 27-November 2, 2019.Seoul, Korea. IEEE, 2019:1314-1324.
[22]
LIANGY C, LIJ Q, ZHUJ, et al .A lightweight network for defect detection in nickel-plated punched steel strip images[J].IEEE Transactions on Instrumentation and Measurement, 2023, 72:3505515.
[23]
GUOZ X, WANGC S, YANGG, et al. MSFT-YOLO:improved YOLOv5 based on transformer for detecting defects of steel surface[J].Sensors, 2022, 22(9):03467.
[24]
TAOX, ADAKC, CHUNP J, et al .ViTALnet:anomaly on industrial textured surfaces with hybrid transformer[J]. IEEE Transactions on Instrumentation and Measurement, 2023, 72:5009013.
[25]
GUOY H, JIANGM, HUANGQ H, et al. MLDFR:a multilevel features restoration method based on damaged images for anomaly detection and localization[J]. IEEE Transactions on Industrial Informatics, 2024, 20(2): 2477-2486.
[26]
WANGG D, HANS M, DINGE R, et al .Student-teacher feature pyramid matching for anomaly detection[C]//Proceedings of the British Machine Vision Conference 2021. British Machine Vision Association, 2021: 349.
[27]
YAMADA S、HOTTAK. Reconstruction student with attention for student-teacher pyramid matching. [EB/OL]. 2021:arXiv:2111.15376.
[28]
DENGH Q, LIX Y .Anomaly detection via reverse distillation from one-class embedding[C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 18-24, 2022, New Orleans, LA, USA. IEEE, 2022: 9727-9736.
[29]
LIC L, SOHNK, YOONJ, et al. CutPaste:self-supervised learning for anomaly detection and localization[C]//2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 20-25, 2021, Nashville, TN, USA. IEEE, 2021: 9659-9669.
[30]
LIUZ K, ZHOUY M, XUY S, et al. SimpleNet:a simple network for image anomaly detection and localization[C]//2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 17-24, 2023, Vancouver, BC, Canada. IEEE, 2023: 20402-20411.
[31]
TIENT D, NGUYENA T, TRANN H, et al .Revisiting reverse distillation for anomaly detection[C]//2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR),June 17-24, 2023, Vancouver, BC, Canada. IEEE, 2023:24511-24520.
[32]
PERLINK. Improving noise[C]//Proceedings of the 29th Annual Conference on Computer Graphics and Interactive Techniques,July 23 - 26, 2002, San Antonio, Texas. ACM, 2002:681-682.
[33]
CHENP G, LIUS, ZHAOH S, et al. Distilling knowledge via knowledge review[C]//2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 20-25, 2021.Nashville, TN, USA.IEEE, 2021: 5006-5015.
[34]
CAIY H, BIANH, LINJ, et al. Retinexformer:one-stage retinex-based transformer for low-light image enhancement[C]//2023 IEEE/CVF International Conference on Computer Vision (ICCV),October 1-6, 2023, Paris, France. IEEE, 2024:12470-12479.
[35]
HAND C, PANX R, HANY Z, et al .FLatten transformer:vision transformer using focused linear attention[C]//2023 IEEE/CVF International Conference on Computer Vision (ICCV), October 1-6, 2023, Paris, France. IEEE, 2024:5938-5948.
WANGD F, SUH S, CHENG W, et al. Real time low light enhancement method of TEDS images based on focused linear attention Retinexformer[J]. Journal of Railway Science and Engineering, 2024, 21(11): 4840-4850. (in Chinese)
基金资助
甘肃省教育厅高校教师创新基金项目(2024B-056)
University Teacher InnovationFund of Gansu Provincial Department of Education(2024B-056)
甘肃省科技厅科技重大专项(22ZD6GA063)
Major Science and Technology Projects of Gansu Province(22ZD6GA0 63)
兰州交通大学-西南交通大学联合创新基金(LH2024027)
Lanzhou Jiaotong University-Southwest Jiaotong University Joint Innovation Fund(LH2024027)