基于深度学习的管道热图像泄漏识别

陈秋艳, 张新燕, 贺敏, 田义春, 刘宁, 郭瑞, 王晓辉, 游思源, 张修坤

陈秋艳, 张新燕, 贺敏, 田义春, 刘宁, 郭瑞, 王晓辉, 游思源, 张修坤. 基于深度学习的管道热图像泄漏识别[J]. 红外技术, 2024, 46(5): 522-531.
引用本文: 陈秋艳, 张新燕, 贺敏, 田义春, 刘宁, 郭瑞, 王晓辉, 游思源, 张修坤. 基于深度学习的管道热图像泄漏识别[J]. 红外技术, 2024, 46(5): 522-531.
CHEN Qiuyan, ZHANG Xinyan, HE Min, TIAN Yichun, LIU Ning, GUO Rui, WANG Xiaohui, YOU Siyuan, ZHANG Xiukun. Identification of Pipeline Thermal Image Leakage Based on Deep Learning[J]. Infrared Technology , 2024, 46(5): 522-531.
Citation: CHEN Qiuyan, ZHANG Xinyan, HE Min, TIAN Yichun, LIU Ning, GUO Rui, WANG Xiaohui, YOU Siyuan, ZHANG Xiukun. Identification of Pipeline Thermal Image Leakage Based on Deep Learning[J]. Infrared Technology , 2024, 46(5): 522-531.

基于深度学习的管道热图像泄漏识别

基金项目: 

国家自然科学基金 51904170

山东省自然科学基金博士基金 ZR2019BEE041

详细信息
    作者简介:

    陈秋艳(1996-),女,硕士研究生,主要从事红外图像处理方面的研究。E-mail: chenqiuyanjiayou@163.com

    通讯作者:

    张新燕(1987-),女,副教授,博士, 主要从事粉尘爆炸与防治、安全监测与检测等研究。E-mail: xyzhang_safety@sdust.edu.cn

    贺敏(1989-),男,讲师,博士,主要从事红外热成像无损定量检测研究。E-mail: hemin2009mail@163.com

  • 中图分类号: TP391

Identification of Pipeline Thermal Image Leakage Based on Deep Learning

  • 摘要:

    为了降低输液管道多泄漏点微小泄漏的检测难度,提高输液管道无损检测的检测精度与检测速度,通过搭建水循环管道泄漏实验系统,改变管道泄漏点尺寸、泄漏点数量及输送介质温度,应用红外热像仪实时采集红外图像,提出基于非线性平稳小波和双边滤波算法实现图像降噪;并结合红外检测技术和YOLO(You Only Look Once)v4模型实现输液管道单、多漏点的自动化智能检测。结果表明,与传统滤波算法相比,该降噪方法的峰值信噪比、结构相似性均有所提升;该模型能够快速且准确地检测管道单、多漏点,检测精度(mAP)分别达到了0.9822及0.98,准确率分别达到了98.3%及98.36%,单帧检测时间分别达到了0.3021 s及0.3096 s,实现了在复杂背景干扰下对单、多泄漏点的识别。通过与YOLO v3、Faster R-CNN和SSD 300这3种算法比较发现,YOLO v4算法对管道单一漏点及多泄漏点检测的准确率、mAP和检测时间均更佳,具有更高的检测准确性与检测效率。

    Abstract:

    To reduce the difficulty of detecting tiny leakages at multiple leakage points in liquid pipelines, it is necessary to improve the detection accuracy and speed of the leakage points. Bilateral filtering based on nonlinear stationary wavelets is proposed to achieve image noise reduction by building a water circulation pipeline leakage experiment system, changing the sizes and number of the leakage points, changing the temperature of the conveying medium, and applying an infrared thermal imager to monitor the small leakage of the single and complex leakage points. Combined with infrared nondestructive testing technology and a YOLO v4 network model, this study realized the automatic intelligent detection of single and multiple leakage points of liquid pipelines. The results show that compared with the traditional filtering algorithm, the peak signal to noise ratio and structural similarity evaluation indexes of the noise reduction method are improved. The model can quickly and accurately detect and locate single and multiple leakage points of pipelines. The average detection accuracy (mAP) values of the single and multiple leakage points in complex environment reach 0.9822 and 0.98, respectively. Further, the accuracy rates reach 98.3% and 98.36%, and the single frame detection times reach 0.3021 s and 0.3096 s, respectively. This helps realize the identification of leakage points under complex background interference. In comparison with YOLO v3, Faster R-CNN, and SSD 300, the YOLO v4 algorithm has better accuracy, mAP, and t for the detection of single and multiple leakage points and has a higher detection accuracy and detection efficiency.

  • 工业生产中的金属材料在使用过程中可能会产生划痕、裂纹等损伤缺陷,从而影响设备的正常运行,甚至危及人身安全,因而对金属材料中的损伤缺陷进行检测具有重要意义。涡流脉冲热成像检测作为新兴的无损检测技术,具有非接触性、检测速度快等优点[1],因而被广大研究者应用于工业中金属材料的探伤检测。如Peng等[2]采用快速傅里叶变换和主成分分析消除非均匀加热影响来增强红外图像的裂纹特征,成功检测出铜棒裂纹位置和形状。Yi等[3]通过涡流热成像检测技术,提出用核主成分分析和低秩稀疏建模方法,增强缺陷区域特征,实现了金属表面裂纹深度的检测。

    因此基于图像分析的检测方法能够有效识别设备的金属裂纹,但上述文献无法实现自适应地提取缺陷图像的特征信息。近年来深度学习方法在图像识别、缺陷检测等方向取得了较好的效果,它能够自动地学习输入数据的深度特征。但深度学习方法的训练需要足量的数据,且训练的数据和测试的数据要具有相同的分布[4],实际的工业生产中,工况多变,训练和测试样本数据同分布的要求难以得到满足。

    为解决以上问题,多种深度迁移学习方法被提出,例如基于特征迁移的深度学习方法。特征迁移的核心思路是通过适当的特征变换将源域和目标域的数据映射到一个公共的特征空间,并通过特征对齐来减小领域间的分布差异,然后利用源域的标签数据训练目标域的分类器[5]。特征迁移学习方法在许多领域得到发展和应用,例如Long等[6]提出的DAN深度适配网络同时适配3个全连接层,且提出了多核MMD(Maximum mean discrepancy)来度量两域之间的分布差异。Ganin等[7]引入生成对抗网络(Generative adversarial networks, GAN)[8]思想提出领域对抗神经网络(Domain adversarial neural network, DANN),将生成对抗网络的生成器视为特征提取器,将生成对抗网络的判别器视为域适应器,因而提取出源域和目标域的共同特征实现迁移。王等[9]联合生成对抗网络和多核MMD最小化域间距离,提出了基于生成对抗网络和距离度量的联合分类模型。

    以上文献聚焦于源域和目标域进行全局特征对齐研究,缺乏对源域和目标域相同类别间关系的深入研究,故本文在特征提取网络ResNet50的基础上引入CBAM注意力机制,使得网络更加关注图像的重点区域,以此来提高网络的特征提取能力,并引用局部最大均值差异(Local maximum mean discrepancy, LMMD)[10]作为子领域自适应对齐算法,用来度量源域和目标域特征的分布差异,通过最小化该差异损失优化训练模型,并将得到的特征迁移深度学习模型应用于金属板材料缺陷的检测问题。

    领域自适应实质就是把提取的源域和目标域数据特征映射到可再生核希尔伯特空间(Reproducing kernel Hilbert space, RKHS)中来减小两领域间的分布差异。实行全局域自适应后,源域和目标域的全局特征得到对齐,但两域间不同类别的特征样本并没有明显地分开,影响了分类的准确性。而经过子领域自适应后,源域和目标域不仅全局特征得到对齐,而且两域中不同类别的特征很好地得以分开,且同类别间的特征分布更为紧密,因此子领域自适应可以改善全局域自适应分类精度较差的情况。两种领域自适应的思想如图 1所示。

    图  1  领域自适应示意图
    Figure  1.  Schematic diagram of domain adaptation

    最大均值差异[11]是迁移学习领域应用较多的一种度量准则,它是一种度量数据集之间分布差异的非参数距离指标。对于源域${D_{\text{s}}} = \left\{ {x_i^{\text{s}}, y_i^{\text{s}}} \right\}_{i = 1}^{{n_{\text{s}}}}$,其中xisyis分别为源域的第i个样本及对应标签,ns为源域样本个数,目标域${D_{\text{t}}} = \left\{ {x_j^{\text{s}}} \right\}_{j = 1}^{{n_{\text{t}}}}$,xjt为目标域的第j个样本,nt为目标域的样本个数,两域之间的MMD平方可表示为:

    $$ \begin{array}{l} {\text{MM}}{{\text{D}}^2}\left( {{X^{\text{s}}}, {X^{\text{t}}}} \right) = \left\| {\frac{1}{{{n_{\text{s}}}}}\sum\limits_{i = 1}^{{n_{\text{s}}}} {\phi \left( {x_i^{\text{s}}} \right)} - \frac{1}{{{n_{\text{t}}}}}\sum\limits_{j = 1}^{{n_{\text{t}}}} {\phi \left( {x_j^{\text{t}}} \right)} } \right\|_H^2 \hfill \\ = \frac{1}{{n_{\text{s}}^2}}\sum\limits_{i, j = 1}^{{n_{\text{s}}}} {\left\langle {\phi \left( {x_i^{\text{s}}} \right), \phi \left( {x_j^{\text{s}}} \right)} \right\rangle + } \frac{1}{{n_{\text{t}}^2}}\sum\limits_{i, j = 1}^{{n_{\text{t}}}} {\left\langle {\phi \left( {x_i^{\text{t}}} \right), \phi \left( {x_j^{\text{t}}} \right)} \right\rangle } \hfill \\ - \frac{2}{{{n_{\text{s}}}{n_{\text{t}}}}}\sum\limits_{i, j = 1}^{{n_{\text{s}}}, {n_{\text{t}}}} {\left\langle {\phi \left( {x_i^{\text{s}}} \right), \phi \left( {x_j^{\text{t}}} \right)} \right\rangle } \hfill \\ \end{array} $$ (1)

    式中:H是可再生核希尔伯特空间;ϕ是该空间的一个非线性映射函数,其内积可用核函数看k(, )来计算,即${\left\langle {\phi \left( {x_i^{\text{s}}} \right), \phi \left( {x_j^{\text{s}}} \right)} \right\rangle _{{H_k}}} = k\left( {x_i^{\text{s}}, x_j^{\text{s}}} \right)$,由此式(1)可写为:

    $$ \begin{array}{l} {\text{MM}}{{\text{D}}^2}\left( {{X^{\text{s}}}, {X^{\text{t}}}} \right) = \frac{1}{{n_{\text{s}}^2}}\sum\limits_{i, j = 1}^{{n_{\text{s}}}} {k\left( {x_i^{\text{s}}, x_j^{\text{s}}} \right)} \hfill \\ + \frac{1}{{n_{\text{t}}^2}}\sum\limits_{i, j = 1}^{{n_{\text{t}}}} {k\left( {x_i^{\text{t}}, x_j^{\text{t}}} \right) - } \frac{2}{{{n_{\text{s}}}{n_{\text{t}}}}}\sum\limits_{i, j = 1}^{{n_{\text{s}}}, {n_{\text{t}}}} {k\left( {x_i^{\text{s}}, x_j^{\text{t}}} \right)} \hfill \\ \end{array} $$ (2)

    卷积注意力模块(Convolutional block attention module, CBAM)[12]是一种结合了通道注意力和空间注意力的综合注意力模块,CBAM结构如图 2所示[13]。输入特征图FRC×H×W,先经过通道注意力模块得到其权值MC(F),再经过空间注意力模块得到其权值MS(F),整个过程计算公式如(3)、(4)所示。

    $$ F^{\prime}=M_{\mathrm{C}}(F) \otimes F $$ (3)
    $$ F^{\prime \prime}=M_{\mathrm{S}}\left(F^{\prime}\right) \otimes F^{\prime}$$ (4)
    图  2  CBAM模块结构图
    Figure  2.  Structure diagram of CBAM module

    由于随着网络模型的加深,会相继出现梯度消失和网络退化的问题,因此本文选择了采用残差块的ResNet50[14]网络模型,残差块的存在使得网络层之间能够进行短连接,缓解了梯度爆炸和梯度消失问题,提高了模型的稳定性。

    ResNet50网络在提取特征中没有重点的关注喜好,本文希望网络模型在对工件进行检测训练时能更多地关注缺陷的部位,而忽略不重要的背景信息,从而提高模型检测识别的正确率。因此本文将CBAM注意力模块引入ResNet50网络中,实验采用在ImageNet上预训练的ResNet50网络,在引入CBAM模块时不改变ResNet50的残差结构,所以分别在第一层卷积和最后一层卷积后面加入CBAM模块,融合CBAM机制的ResNet50网络结构参数如表 1所示。

    表  1  添加CBAM的ResNet50网络结构
    Table  1.  ResNet50 network structure with CBAM added
    Network layer Parameters Activation function
    Conv1 64×7×7 Relu
    CBAM 64×1×1
    7×7
    Sigmoid
    Conv2_x $ \left. {\begin{array}{*{20}{c}} {64 \times 1 \times 1} \\ {64 \times 3 \times 3} \\ {256 \times 1 \times 1} \end{array}} \right\} \times 3 $ Relu
    Conv3_x $ \left. {\begin{array}{*{20}{c}} {128 \times 1 \times 1} \\ {128 \times 3 \times 3} \\ {512 \times 1 \times 1} \end{array}} \right\} \times 4 $ Relu
    Conv4_x $ \left. {\begin{array}{*{20}{c}} {256 \times 1 \times 1} \\ {256 \times 3 \times 3} \\ {1024 \times 1 \times 1} \end{array}} \right\} \times 6 $ Relu
    Conv5_x $ \left. {\begin{array}{*{20}{c}} {512 \times 1 \times 1} \\ {512 \times 3 \times 3} \\ {2048 \times 1 \times 1} \end{array}} \right\} \times 3 $ Relu
    CBAM 2048×1×1
    7×7
    Sigmoid
    FC 2 Softmax
    下载: 导出CSV 
    | 显示表格

    本文使用局部最大均值差异来测量两领域间相关子领域的分布差异,其公式为:

    $$ \begin{array}{l} {\text{LMM}}{{\text{D}}^2}\left( {{X^{\text{s}}}, {X^{\text{t}}}} \right) = \hfill \\ \frac{1}{C}\sum\limits_{c = 1}^C {\left\| {\sum\limits_{i = 1}^{{n_{\text{s}}}} {w_{c, i}^{\text{s}}\phi \left( {x_i^{\text{s}}} \right)} - \sum\limits_{j = 1}^{{n_{\text{t}}}} {w_{c, j}^{\text{t}}\phi \left( {x_j^{\text{t}}} \right)} } \right\|_H^2} \hfill \\ \end{array} $$ (5)

    式中:C是两域的类别数;wc, jt和分别是样本xisxjt属于类别c的权重,其计算公式为:

    $$ {\omega _{c, i}} = \frac{{{y_{c, i}}}}{{\sum\limits_{\left( {{x_j}, {y_j}} \right) \in D} {{y_{c, j}}} }} $$ (6)

    式中:yc, i是向量yi的第c项,$\sum\limits_{\left( {{x_j}, {y_j}} \right) \in D} {{y_{c, j}}} $是属于类别c的全部样本总和[15]

    本文使用真实标签yis的one-hot得出源域中c类样本的权重wc, is。目标域中样本由于没有标签,故无法使用yjt来计算目标域中对应的权重,但卷积神经网络的输出是概率分布,它可以表示样本xi属于某个类别的概率大小,故而使用卷积神经网络的Softmax分类器来预测目标域中的标签,从而得出样本xjtc类的权重wc, jt

    对于输入的源域和目标域数据,经过本文改进的ResNet50网络的全连接层中提取得到对应特征ziszjt,于是将其映射到可再生核希尔伯特空间进行特征对齐,因此可将公式(5)重新计算得到:

    $$ \begin{array}{l} {\text{LMM}}{{\text{D}}^2}\left( {z_i^{\text{s}}, z_j^{\text{t}}} \right) = \frac{1}{C}\sum\limits_{c = 1}^C {\left\{ {\sum\limits_{i, j = 1}^{{n_{\text{s}}}} {\omega _{c, i}^{\text{s}}\omega _{c, j}^{\text{s}}\left\langle {\phi \left( {z_i^{\text{s}}} \right), \phi \left( {z_j^{\text{s}}} \right)} \right\rangle } } \right.} \hfill \\ + \sum\limits_{i, j = 1}^{{n_{\text{t}}}} {\omega _{c, i}^{\text{t}}\omega _{c, j}^{\text{t}}\left\langle {\phi \left( {z_i^{\text{t}}} \right), \phi \left( {z_j^{\text{t}}} \right)} \right\rangle } \hfill \\ - \left. {2\sum\limits_{i, j = 1}^{{n_{\text{s}}}, {n_{\text{t}}}} {\omega _{c, i}^{\text{s}}\omega _{c, j}^{\text{t}}\left\langle {\phi \left( {z_i^{\text{s}}} \right), \phi \left( {z_j^{\text{t}}} \right)} \right\rangle } } \right\} \hfill \\ = \frac{1}{C}\sum\limits_{c = 1}^C {\left\{ {\sum\limits_{i, j = 1}^{{n_{\text{s}}}} {\omega _{c, i}^{\text{s}}\omega _{c, j}^{\text{s}}} k\left( {z_i^{\text{s}}, z_j^{\text{s}}} \right) + } \right.} \sum\limits_{i, j = 1}^{{n_{\text{t}}}} {\omega _{c, i}^{\text{t}}\omega _{c, j}^{\text{t}}k\left( {z_i^{\text{t}}, z_j^{\text{t}}} \right)} \hfill \\ - \left. {2\sum\limits_{i, j = 1}^{{n_{\text{s}}}, {n_{\text{t}}}} {\omega _{c, i}^{\text{s}}\omega _{c, j}^{\text{t}}} k\left( {z_i^{\text{s}}, z_j^{\text{t}}} \right)} \right\} \hfill \\ \end{array} $$ (7)

    本文通过融合CBAM注意力的ResNet50特征提取网络模块和子领域自适应模块,搭建了工件的缺陷检测模型,其结构如图 3所示,首先将注意力机制CBAM模块添加到ResNet50中,提取源域和目标域数据的深度特征,并将网络的参数共享,同时将子领域自适应层设在网络的全连接层[10],以便在此层中使用局部最大均值差异来实现两域中相关子领域的特征对齐,最后用网络模型中的Softmax分类器对金属板材料的红外热图像进行缺陷的检测识别。

    图  3  CBAM_ResNet50和子域自适应网络模型
    Figure  3.  CBAM_ResNet50 and subdomain adaptive network model

    通过2.3节介绍的模型结构可以知道在Softmax分类器中可以得到目标域的预测类别标签${\hat y^{\text{t}}}$,以此构建目标域的损失函数,并将LMMD作为子领域自适应层的损失函数,因此本文优化的目标函数为:

    $$ \begin{array}{l} \min \frac{1}{{{n_{\text{s}}}}}\sum\limits_{i = 1}^{{n_{\text{s}}}} {J\left( {f\left( {x_i^{\text{s}}} \right), y_i^{\text{s}}} \right)} + \frac{1}{{{n_{\text{t}}}}}\sum\limits_{j = 1}^{{n_{\text{t}}}} {J\left( {f\left( {x_j^{\text{t}}} \right), \hat y_j^{\text{t}}} \right)} \hfill \\ + \lambda \sum {{d_{{\text{lmmd}}}}\left( {z_i^{\text{s}}, z_j^{\text{t}}} \right)} \hfill \\ \end{array} $$ (8)

    式中:J(, )是交叉熵损失函数;dlmmd(, )是子领域自适应的分布距离函数;λ>0,是权衡超参数。

    涡流热成像实验平台由涡流加热装置和红外热像仪组成,图 4为实验的涡流加热设备和有缺陷的金属板材料。实验时给装置通电,给被测金属材料涡流加热,然后用红外热像仪拍摄金属板材料的红外图像,从而得到实验的红外图像数据。

    图  4  涡流加热设备(左)和缺陷金属板(右)
    Figure  4.  Eddy current heating equipment (left) and defective metal plate (right)

    本文实验模拟工业生产设备的金属材料工件,选用并加工了有裂纹缺陷的金属板和无缺陷的完好的金属板作为实验中的两大类别,以此来验证本文提出网络模型的性能优劣。对工件材料加工时分别设置了有缺陷的裂纹长度为4 mm、8 mm、10 mm、20 mm,以满足不同长度裂纹缺陷的检测实验,提高实验的丰富性和可靠性,裂纹的宽度均为1.5 mm,考虑到加工误差,裂纹缺陷的尺寸会和标注数据有0.2 mm的误差,本实验加工的裂纹缺陷均在金属材料的表面。通过涡流设备对金属材料的加热和红外热像仪采集图像数据,本实验采集得到的红外图像分辨率为320×240,红外图像集分别有裂纹缺陷和无裂纹缺陷两种类型。在实际的机械设备运行过程中,工况多变,标记的故障样本量小,为此本文提出一种结合深度学习与域自适应的工件涡流热成像的缺陷检测方法,所以还需要选择一个相似的领域数据集来进行实验,于是选择了中科院自动化所收集的磁瓦数据集[16]作为其相似领域来进行迁移学习的实验。因本实验采集的数据集有无裂纹缺陷和有裂纹缺陷两种类别,所以从磁瓦数据集中也选用了对应的类别进行实验。同时由于实验采集的图像是彩色的RGB图像,因此需要先对磁瓦数据集的两种类型的黑白图像进行处理转化为RGB图像后再进行本文模型方法的相关实验,根据源域数据集相关资料,尽量还原了真实的RGB色彩,以便和本文的红外图像进行领域适应的迁移学习。如图 5为实验数据集示例。

    图  5  实验数据集示例
    Figure  5.  Example of experimental data set

    本文中实验的两个领域的样本存在数目不均衡的问题,为了更好地训练模型,验证实验方法的性能,因此使用翻转、缩放、裁剪,旋转等一些数据增强的方式得到了相对均衡的数据样本。故最后得到磁瓦数据集的裂纹缺陷图像460张,无裂纹缺陷图像434张,本实验得到的金属板红外图像数据集的裂纹缺陷图像380张,无裂纹缺陷图像320张。将两域的数据集根据有无裂纹缺陷各自按照8:1:1的比例划分训练集,验证集和测试集。实验包含两种域迁移:磁瓦数据集→金属板数据集,金属板数据集→磁瓦数据集,因本文主要应用网上公开的缺陷数据集来实现对我所实验的金属材料红外图像的缺陷检测识别,所以更多关注的是从磁瓦数据集到金属板数据集的迁移任务的准确率。

    本文实验都使用基于Python 3.7的Pytorch深度学习框架,CPU为i5-11400H,GPU为GeForce RTX 3060,RAM为16 GB。模型训练的迭代轮数保持一致,使用随机梯度下降法(Stochastic gradient descent,SGD),动量设置为0.9,学习率的调整公式为ρθρ0/(1+αθ)β,其中训练时θ服从0到1的线性变化,ρ0=0.01, α=10, β=0.75。

    为对比证明本文方法的优越性,于是设置了几组不同方法的模型来进行对比实验。一是经过网络数据集预训练后的微调ResNet50网络模型,二是度量距离为多核最大均值差异(Multipe Kernel Maximum Mean Discrepancy,MK-MMD)的DAN模型,三是未添加注意力机制,采用局部最大均值差异(Local Maximum Mean Discrepancy,LMMD)度量距离的ResNet50_LMMD模型,四是本文的添加CBAM注意力模块的改进ResNet50网络,用局部最大均值差异度量距离的模型。几种模型实验的环境条件和配置相同,实验设定100轮次,本文方法训练集和测试集的检测精度如图 6所示。可以看出,训练集和测试集在30轮左右达到稳定,且精度相差不大,说明模型是稳定可靠的。

    图  6  训练集和测试集精度对比图
    Figure  6.  Accuracy comparison diagram of training set and test set

    各个不同模型的检测精度对比如表 2所示,可以明显看出本文提出的方法平均精度为88.52%,好于对比的其他模型,表明本文提出的模型通过对齐同类子领域,能得到领域间更细节的信息,使得不同领域间同类别联系更为紧密,不同类别间的类间距分得更开,同时和方法3相比可知添加注意力机制后检测精度得到大约1.3%的提升,验证了模型的优越性。同时图 7展示了磁瓦数据集到金属板数据集训练得到的准确率的对比效果,相同轮次下,可以看到其余方法在20个epoch左右达到收敛,随后细微振荡,而本文提出的方法收敛速度较慢,原因是在ResNet50网络基础上加入了CBAM注意力模块,增加了网络的复杂度,所以检测消耗的时间较不添加CBAM模块的时间增加了大约2.5 s,但是检测缺陷的准确率得到了提升。

    表  2  不同模型的检测精度
    Table  2.  Detection accuracy of different models %
    Methods Magnetic tile→sheet metal Sheet metal→magnetic tile Average accuracy
    ResNet50 63.93 59.18 61.56
    DAN 78.19 73.53 75.86
    ResNet50_LMMD 88.29 86.10 87.20
    This paper 90.11 86.93 88.52
    下载: 导出CSV 
    | 显示表格
    图  7  不同方法的精确度对比图
    Figure  7.  Accuracy comparison chart of different methods
    Magnetic tile data set→sheet metal data set

    为了更加直观地体现出本文方法的优点,实验选择了源域为磁瓦数据集,目标域为本文采集的金属板的红外图像数据集作为可视化对比,利用t-SNE(t-distributed stochastic neighbor embedding)算法[17]将源域和目标域部分数据的特征值映射为二维空间,然后在二维空间里将其特征可视化。几种对比方法的特征可视化效果如图 8所示,其中S代表源域,T代表目标域,S-0表示源域中无缺陷的样本,S-1表示源域中裂纹缺陷的样本。由图可知,仅采用经过预训练微调的ResNet50模型提取通用特征能力强,一个域内的同类别间的聚类效果好,但不同领域相同类别就没有很好地聚类。采用多核MMD(MK-MMD)的DAN模型展现出一定的特征对齐能力,但未考虑两域子领域的分布对齐,不同领域的同类别间聚类效果不是很好。而采用子领域自适应模型的ResNet50_LMMD和本文方法在对齐全局域分布的同时还实现了对齐同类子领域的分布,另外本文方法融入注意力机制,提升了特征提取能力,可以看出两域间相同类别密切地聚集在一起,得到了不错的聚类效果,充分证实了本文方法的有效性和优越性。

    图  8  不同方法的t-SNE特征可视化
    Figure  8.  Visualization of t-SNE features by different methods

    通过引入特征迁移学习思想,建立局部最大均值差异衡量指标,缩小了源域和目标域数据特征间的分布差异,实现了相关子域的分布对齐。基于特征迁移学习思想建立的金属板材料裂纹的缺陷识别模型,解决了数据集中裂纹缺陷样本量少,训练和测试样本难以同分布的问题。提出的基于深度学习与子领域自适应的工件涡流热成像的缺陷检测模型,在ResNet50网络添加CBAM注意力机制,提高了模型对于缺陷区域特征的关注度,可以聚焦于缺陷特征的提取,提升模型缺陷检测能力。通过相关实验对比,并使用t-SNE算法对几种对比实验提取的特征进行可视化,验证了所提模型的有效性,提升了金属板材料裂纹缺陷的检测精度。

  • 图  1   基于非线性平稳小波和双边滤波的降噪过程

    Figure  1.   Noise reduction process based on nonlinear stationary wavelets and bilateral filtering

    图  2   基于YOLO v4的管道泄漏检测原理图

    Figure  2.   Schematic of pipeline leakage detection based on YOLO v4

    图  3   水循环管道泄漏实验系统实物图

    Figure  3.   Photo of water circulation pipe leakage experiment system

    图  4   水循环管道泄漏实验系统示意图

    Figure  4.   Schematic diagram of water circulation pipe leakage experiment system

    图  5   管道单一漏点位置示意图

    Figure  5.   Schematic diagram of single leakage point

    图  6   管道多泄漏点位置示意图

    Figure  6.   Schematic diagram of multiple leakage points

    图  7   输液管道泄漏检测整体流程

    Figure  7.   Overall process of liquid pipeline leakage detection

    图  8   不同泄漏工况下单一漏点管段红外图像

    Figure  8.   Infrared image of a single leakage point pipe section under different leakage conditions

    图  9   不同泄漏工况下多泄漏点管段红外图像

    Figure  9.   Infrared image of multiple leakage points pipe section under different leakage conditions

    图  10   降噪前后管道泄漏部分示例图

    Figure  10.   Example diagram of pipeline leakage before and after noise reduction

    图  11   单一漏点不同算法P-R曲线图

    Figure  11.   P-R plot of different algorithms for single leakage

    图  12   多泄漏点不同算法P-R曲线图

    Figure  12.   P-R plot of different algorithms for multiple leakage points

    表  2   管道单一漏点图像不同算法评价指标结果

    Table  2   Different algorithms evaluate the index results of the pipeline single leakage point images

    Algorithms 40℃ image 50℃ image 60℃ image
    PSNR/dB SSIM PSNR/dB SSIM PSNR/dB SSIM
    Mean filtering 33.1973 0.6361 32.0505 0.7035 31.8188 0.7090
    Median filtering 31.7137 0.4941 31.8480 0.6074 31.8348 0.6098
    Nonlinear smooth wavelet 30.6688 0.5267 30.1091 0.5329 30.0417 0.5449
    Bilateral filtering 34.4566 0.7285 33.5595 0.8230 33.4039 0.8399
    Nonlinear smooth wavelet + Bilateral filtering 36.9294 0.8747 34.6604 0.8631 33.9055 0.8647
    下载: 导出CSV

    表  3   管道多泄漏图像不同算法评价指标结果

    Table  3   Different algorithms evaluate the index results of the pipeline multi-leakage images

    Algorithms 40℃ image 50℃ image 60℃ image
    PSNR/dB SSIM PSNR/dB SSIM PSNR/dB SSIM
    Mean filtering 32.6347 0.7257 32.5378 0.7233 31.7827 0.7395
    Median filtering 31.724 0.6547 31.7715 0.6338 31.6588 0.6362
    Nonlinear smooth wavelet 30.3137 0.5603 30.2969 0.5515 29.9108 0.5786
    Bilateral filtering 32.5065 0.8041 32.5169 0.8047 32.4259 0.8335
    Nonlinear smooth wavelet + Bilateral filtering 36.6188 0.8883 36.5284 0.8921 34.5147 0.8900
    下载: 导出CSV

    表  4   四种算法对管道单一漏点的性能测试结果

    Table  4   Performance test results of four algorithms on single leak points of pipelines

    Model Train time/s mAP Precision/% Detection time/(s/f)
    YOLO v4 2764.5149 0.9822 98.3 0.3021
    YOLO v3 4372.9816 0.9700 98.2 0.3681
    SSD 300 2778.0019 0.9800 96.6 0.8946
    Faster
    R-CNN
    40383.878 0.8000 69.1 1.7956
    下载: 导出CSV

    表  5   四种算法对管道多泄漏点的性能测试结果

    Table  5   Performance test results of four algorithms on multiple leak points of pipelines

    Model Train time/s mAP Precision/% Detection time/(s/f)
    YOLO v4 2074.8823 0.98 98.36 0.3096
    YOLO v3 3460.6947 0.97 92.80 0.4733
    SSD 300 1642.4262 0.91 98.30 0.9182
    Faster
    R-CNN
    23405.0819 0.88 54.80 1.8671
    下载: 导出CSV
  • [1]

    Adegbove M A, Fung W K, Karnik A. Recent advances in pipeline monitoring and oil leakage detection technologies: principles and approaches[J]. Sensors, 2019, 19(11): 2548. DOI: 10.3390/s19112548

    [2]

    ZHOU S J, LIU C, ZHAO Y E, et al. Leakage diagnosis of heating pipe-network based on BP neural network[J]. Sustainable Energy, Grids and Networks, 2022, 32: 100869. DOI: 10.1016/j.segan.2022.100869

    [3] 孙宗康, 饶睦敏, 曹裕灵, 等. 基于小样本不均衡数据的供水管道泄漏智能检测算法[J]. 图学学报, 2022, 43(5): 825-831. https://www.cnki.com.cn/Article/CJFDTOTAL-GCTX202205008.htm

    SUN Z K, RAO M M, CAO Y L, et al. Water supply pipeline leakage intelligent detection algorithm based on small and unbalanced data [J]. Journal of Graphics, 2022, 43(5): 825-831. https://www.cnki.com.cn/Article/CJFDTOTAL-GCTX202205008.htm

    [4] 石光辉, 齐卫雪, 陈鹏, 等. 负压波与小波分析定位供热管道泄漏[J]. 振动与冲击, 2021, 40(14): 212-218. https://www.cnki.com.cn/Article/CJFDTOTAL-ZDCJ202114028.htm

    SHI G H, QI W X, CHEN P, et al. Negative pressure wave and wavelet analysis to locate the heating pipeline leakage[J]. Journal of Vibration and Impact, 2021, 40(14): 212-218. https://www.cnki.com.cn/Article/CJFDTOTAL-ZDCJ202114028.htm

    [5] 薛田甜, 刘永莉, 陈智, 等. 基于分布式光纤测温技术的管廊管道泄漏检测设计[J]. 中国科技论文, 2023, 18(8): 867-874, 889. DOI: 10.3969/j.issn.2095-2783.2023.08.008

    XUE T T, LIU Y L, CHEN Z, et al. Design of pipeline leakage detection based on distributed temperature sensing technology[J]. China Science Paper, 2023, 18(8): 867-874, 889. DOI: 10.3969/j.issn.2095-2783.2023.08.008

    [6] 高琳, 曹建国. 基于输气管道泄漏声发射信号特征的小波基构造研究[J]. 振动与冲击, 2023, 42(10): 128-135. https://www.cnki.com.cn/Article/CJFDTOTAL-ZDCJ202310016.htm

    GAO L, CAO J G. Research on wavelet basis construction based on the characteristics of acoustic emission signals in gas pipe leakage [J]. Journal of Vibration and Impact, 2023, 42(10): 128-135. https://www.cnki.com.cn/Article/CJFDTOTAL-ZDCJ202310016.htm

    [7] 徐志远, 肖奇. 基于脉冲远场涡流的管道缺陷外检测与定量评估[J]. 电子测量与仪器学报, 2019, 33(2): 80-87. https://www.cnki.com.cn/Article/CJFDTOTAL-DZIY201902011.htm

    XU Z Y, XIAO Q. Outside inspection and quantitative evaluation of pipe defects based on pulsed remote field eddy currents[J]. Journal of Electronic Measurement and Instrumentation, 2019, 33(2): 80-87. https://www.cnki.com.cn/Article/CJFDTOTAL-DZIY201902011.htm

    [8] 李甲振, 余弘婧, 郭新蕾, 等. 管道系统泄漏的可控低强度瞬变流检测法[J]. 应用基础与工程科学学报, 2022, 30(4): 873-882. https://www.cnki.com.cn/Article/CJFDTOTAL-YJGX202204007.htm

    LI J Z, YU H J, GUO X L, et al. Leak detection in pipe using controllable and low-pressure transient analysis method[J]. Journal of Basic Science and Engineering, 2022, 30(4): 873-882. https://www.cnki.com.cn/Article/CJFDTOTAL-YJGX202204007.htm

    [9]

    Fahimipirehgalin M, Trunzer E, Odenweller M, et al. Automatic visual leakage detection and localization from pipelines in chemical process plants using machine vision techniques[J]. Engineering, 2021, 7(6): 758-776. DOI: 10.1016/j.eng.2020.08.026

    [10] 张丽珍, 徐长航, 陈国明. 基于红外成像技术的高温管道泄漏检测研究[C]//第二届CCPS中国过程安全会议, 2014: 389-394.

    ZHANG L Z, XU C H, CHEN G M. The detection of high-temperature pipe leakage by infrared thermography[C]//Proceedings of the 2nd CCPS China Process Safety Conference, 2014: 389-394.

    [11] 张艳博, 任瑞峰, 梁鹏, 等. 基于热成像的埋地热力管道缺陷检测试验研究[J]. 仪器仪表学报, 2020, 41(6): 161-170. https://www.cnki.com.cn/Article/CJFDTOTAL-YQXB202006019.htm

    ZHANG Y B, REN R F, LIANG P, et al. Experimental study on flaw detection of buried heat pipeline based by infrared thermal[J]. Chinese Journal of Scientific Instrument, 2020, 41(6): 161-170. https://www.cnki.com.cn/Article/CJFDTOTAL-YQXB202006019.htm

    [12]

    Yahia M, Gawai R, Ali T, et al. Non-destructive water leak detection using multitemporal infrared thermography[J]. IEEE Access, 2021, 9: 72556-72567. DOI: 10.1109/ACCESS.2021.3078415

    [13]

    XIE J, ZHANG Y, HE Z, et al. Automated leakage detection method of pipeline networks under complicated backgrounds by combining infrared thermography and Faster R-CNN technique[J]. Process Safety and Environmental Protection, 2023, 174: 39-52. DOI: 10.1016/j.psep.2023.04.006

    [14]

    ZHOU R L, WEN Z P, SU H Z. Detect submerged piping in river embankment by passive infrared thermography[J]. Measurement, 2022, 202: 111873. DOI: 10.1016/j.measurement.2022.111873

    [15] 翟潘, 王平. 自适应维纳滤波在钢水红外图像去噪中的应用[J]. 红外技术, 2021, 43(7): 665-669. http://hwjs.nvir.cn/cn/article/id/0a8e3190-fcd2-405b-9b8f-0cd65fb70cd5

    ZHAI P, WANG P. Application of the adaptive wiener filter in infrared image denoising for molten steel [J]. Infrared Technology, 2021, 43(7): 665-669. http://hwjs.nvir.cn/cn/article/id/0a8e3190-fcd2-405b-9b8f-0cd65fb70cd5

    [16] 郭晨龙, 赵旭阳, 郑海燕, 等. 一种基于改进非局部均值滤波算法的红外图像去噪[J]. 红外技术, 2018, 40(7): 638-641. http://hwjs.nvir.cn/cn/article/id/hwjs201807003

    GUO C L, ZHAO X Y, ZHENG H Y, et al. Infrared image denoising method based on improved non-local means filter[J]. Infrared Technology, 2018, 40(7): 638-641. http://hwjs.nvir.cn/cn/article/id/hwjs201807003

    [17]

    ZHAO X H, LI M X, NIE T, et al. An innovative approach for removing stripe noise in infrared images[J]. Sensors, 2023, 23: 6786. DOI: 10.3390/s23156786

    [18]

    ZHANG X, SANIIE J, BAKHTIARI S, et al. Unsupervised learning for detection of defects in pulsed infrared thermography of metals[C]// IEEE International Conference on Electro Information Technology (EIT), 2022: 330-334.

    [19]

    ZHANG X, SANIIE J, BAKHTIARI S, et al. Compression of pulsed infrared thermography data with unsupervised learning for nondestructive evaluation of additively manufactured metals[J]. IEEE Access, 2022, 10: 9094-9107. DOI: 10.1109/ACCESS.2022.3141654

    [20]

    WANG H, HOU Y, HE Y, et al. A physical-constrained decomposition method of infrared thermography: pseudo restored heat flux approach based on ensemble bayesian variance tensor fraction[J]. IEEE Transactions on Industrial Informatics, 2023, 20(3): 3413-3424.

    [21] Kumar A, Tomar H, Mehla Kumar V, et al, Stationary wavelet transform based ECG signal denoising method[J]. ISA Transactions, 2021, 114: 251-262. https://www.cnki.com.cn/Article/CJFDTOTAL-NYJX202403024.htm
    [22]

    Kumar S, Alam K, Chauhan A. Fractional derivative based nonlinear diffusion model for image denoising[J]. SeMA Journal, 2022, 79: 355-364. DOI: 10.1007/s40324-021-00255-0

    [23] 王玉灵. 基于双边滤波的图像处理算法研究[D]. 西安: 西安电子科技大学, 2010.

    WANG Y L. Study of algorithm in image processing based on the bilateral filter[D]. Xi'an: XiDian University, 2010.

    [24]

    Bochkovskiy A, WANG C Y, LIAO H Y M. Yolov4: Optimal speed and accuracy of object detection[C]//IEEE Conference Computer Vision and Pattern Recognition, 2020: 10934-10951.

    [25] 中华人民共和国住房和城乡建设部. 建筑给水排水设计标准GB50015-2019[S]. 北京: 中国计划出版社, 2019.

    Ministry of Housing and Urban-Rural Development of the People's Republic of China. Standard for design of building water supply and drainage[S]. Beijing: China Planning Press, 2019.

    [26]

    LIU R C, LI Y F, WANG H D, et al. A noisy multi-objective optimization algorithm based on mean and Wiener filters[J]. Knowledge-Based Systems, 2021, 228: 107215. DOI: 10.1016/j.knosys.2021.107215

    [27]

    Verma, K, Singh K B, Thoke A. S. An enhancement in adaptive median filter for edge preservation[J]. Procedia Computer Science, 2015, 48: 29-36. DOI: 10.1016/j.procs.2015.04.106

    [28] 魏明强, 冯一箪, 王伟明, 等. 基于区间梯度的联合双边滤波图像纹理去除方法[J]. 计算机科学, 2018, 45(3): 31-36. https://www.cnki.com.cn/Article/CJFDTOTAL-JSJA201803005.htm

    WEI M Q, FENG Y D, WANG W M, et al. Interval gradient based joint bilateral filtering for image texture removal[J]. Computer Science, 2018, 45(3): 31-36. https://www.cnki.com.cn/Article/CJFDTOTAL-JSJA201803005.htm

    [29]

    REN S, HE K, GIRSHICK R, et al. Faster R-CNN: towards real-time object detection with region proposal networks [J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149. DOI: 10.1109/TPAMI.2016.2577031

    [30]

    LIU W, Anguelov D, Erhan D, et al. SSD: single shot multi-box detector[C]//Proceedings of the IEEE European Conference on Computer Vision, 2016: 21-37.

    [31]

    Redmon J, Farhad A. Yolov3: an incremental improvement[C]// Computer Vision and Pattern Recognition, 2018: 1068-1076.

  • 期刊类型引用(1)

    1. 翁岩松,杨洁. 基于深度学习的改进卫星检测方法. 航空电子技术. 2024(04): 1-8 . 百度学术

    其他类型引用(0)

图(12)  /  表(4)
计量
  • 文章访问数:  107
  • HTML全文浏览量:  23
  • PDF下载量:  29
  • 被引次数: 1
出版历程
  • 收稿日期:  2023-09-07
  • 修回日期:  2024-01-18
  • 网络出版日期:  2024-05-23
  • 刊出日期:  2024-05-19

目录

/

返回文章
返回