A method for detecting abnormal state inside long-distance pipelines based on heterogeneous data association analysis

Through heterogeneous data correlation analysis and visual self-attention model, combined with infrared and visible light image registration and feature fusion technology, the problem of low accuracy of anomaly detection inside long-distance pipelines is solved, and more efficient abnormal state detection and classification are achieved.

CN118230059BActive Publication Date: 2024-08-27JIANGSU YOUAIWEI INTELLIGENT TECH CO LTD +2
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410445063.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-15
Publication Date
2024-08-27
Estimated Expiration
2044-04-15

AI Technical Summary

Technical Problem

The existing technology is difficult to detect internal anomalies in long-distance pipelines through a single visible light image, especially in complex environments. It is difficult to achieve accurate and efficient detection, and the registration of infrared images and visible light images is difficult, which affects detection accuracy.

Method used

The heterospectral data correlation analysis method is used to perform coarse registration, fine registration and local deformation through infrared and visible light image registration networks, combined with an image fusion subnetwork based on feature screening and a fusion-guided cross-complementary salient target detection subnetwork. Generate abnormal area detection maps and use the visual self-attention model for classification to improve detection accuracy.

Benefits of technology

It improves the accuracy of collaborative anomaly detection in infrared and visible light images, optimizes computing efficiency through fast Fourier transform, introduces fusion-guided saliency enhancement module and cross-complementary feature conversion layer, enhances cross-modal feature aggregation, and achieves more accurate abnormal status detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118230059B
    Figure CN118230059B
Patent Text Reader

Abstract

The present invention discloses a method for detecting abnormal conditions inside a long-distance pipeline by heterospectral data association analysis. First, an infrared and visible light registration network is used to realize fine registration of visible light images and infrared images; then, an infrared and visible light collaborative abnormal condition detection network is used to detect abnormal conditions inside the long-distance pipeline; finally, the abnormal conditions inside the pipeline are classified, and a pipeline internal abnormal condition classification network based on a visual self-attention model is used to classify the images into leakage and non-leakage abnormalities through binary classification, and further refine the identification of non-leakage abnormalities into four categories: plastic bags, soil blocks, concrete, and others. The method proposed in the present invention can jointly analyze the infrared temperature distribution data and visible light image data inside the pipeline, accurately identify the abnormal conditions and types inside the pipeline, and has important practical application engineering value for completing the task of detecting the internal state of the long-distance pipeline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of pipeline internal abnormal state detection, and in particular to a method for detecting the internal abnormal state of a long-distance pipeline by heterospectral data association analysis. Background Art

[0002] With the development of sensor technology, the detection of internal abnormal conditions of long-distance pipelines (pipelines longer than 10 meters) has entered the stage of heterospectral data association. High-precision and high-stability sensors can better capture subtle changes inside the pipeline and provide more accurate basic data for subsequent data analysis. The research can be used for the registration and fusion of multispectral images to complete the internal abnormality detection of long-distance pipelines.

[0003] The detection of abnormal conditions inside long-distance pipelines by heterospectral data association analysis is generally a process of judging abnormal areas from visible light images based on a deep learning network structure model. Therefore, it is necessary to perform preprocessing, feature extraction and recognition on visible light images. This requires the use of digital image processing techniques, such as graying, edge detection, feature extraction, etc. In addition, the application of machine vision technology also provides a more efficient and accurate method for the processing and analysis of visible light images. However, the above algorithm only detects abnormal conditions through visible light images, and it is difficult to obtain sufficient information by relying on a single image, which makes it difficult to achieve accurate and efficient abnormality detection and recognition in complex long-distance pipelines. However, through infrared images, the temperature distribution inside the long-distance pipeline can be obtained, and then the thermal state and abnormalities inside the pipeline can be analyzed. Therefore, how to better realize the registration of visible light images and infrared images, so that the detection accuracy of abnormalities inside long-distance pipelines can be improved in the subsequent infrared and visible light collaborative abnormality detection, is the key to the research. Summary of the invention

[0004] In view of this, the technical problem actually to be solved by the present invention is: how to accurately complete the registration of infrared images and optical images, how to better detect abnormal conditions, improve detection accuracy, and better and faster classify abnormal state images.

[0005] In view of this, the present invention provides a method for detecting abnormal state inside a long-distance pipeline by heterogeneous data association analysis, comprising the following steps:

[0006] 1) Given two input images, including a visible light image I vis ∈H vis ×W vis ×C vis and an infrared image I ir ∈H ir ×W ir ×C ir, input to the infrared and visible light image registration network, the two input images are successively subjected to coarse registration, fine registration and local deformation to obtain the registered infrared image I r ∈H r ×W r ×C r , where H vis , W vis , C vis are the height, width, and number of channels of the visible light image, respectively. ir , W ir , C ir are the height, width and number of channels of the infrared image, respectively. r , W r , C r The height, width and number of channels of the registered infrared images;

[0007] 2) The visible light image I vis And the registered infrared image I r After a feature-screening-based image fusion subnet FSFNet and a fusion-guided cross-complementary salient target detection subnet FGC2Net, the final accurate abnormal region detection map M is generated. ab ;

[0008] 3) The abnormal area detection map M ab The images are input into the abnormal state classification network inside the pipeline based on the visual self-attention model. The images are first divided into leakage and non-leakage abnormalities through binary classification, and then the non-leakage abnormalities are multi-classified.

[0009] Furthermore, the step 1) includes the following steps:

[0010] 11) Use the improved structural similarity index measure SSIM cs To measure the similarity between the scale feature maps of infrared images and visible light images:

[0011] SSIM cs (x,y)=[l(x,y)] α [c(x,y)] β ·[s(x,y)] γ

[0012] SSIM cs The index consists of three terms, namely, the brightness term l, the contrast term c, and the structure term s. α, β, and γ are the weights of the brightness, contrast, and structure components, respectively. x and y represent the scale feature map of the infrared image and the scale feature map of the visible light image, respectively.

[0013] 12) In the multimodal image, the brightness term l is removed, and the similarity between the scale feature maps of the infrared image and the visible light image is rewritten as:

[0014]

[0015] where σ is the standard deviation, σ xy represents the cross covariance of the input image, σ x Represents the standard deviation of the input infrared image, σ y Represents the standard deviation of the input visible light image. v is a normal number, which is divided by 0 in the formula to prevent abnormality. The value is 58.5225.

[0016] 13) The scaling parameter X of the improved structural similarity index measure is obtained by the following formula: scale and the scale parameter H of the input image scale :

[0017]

[0018] Where (p1, p2) is the range of the scaling parameter, a∈(p1, p2); vis and W vis are the height and width of the visible light image, H ir and W ir are the height and width of the infrared image, M max is the edge strength index;

[0019] 14) Calculate the translation parameters t1 and t2:

[0020]

[0021] t1 is the translation parameter of the width of the visible light image and the infrared image; t2 is the translation parameter of the height of the visible light image and the infrared image;

[0022] 15) Get the rough registration result I′ ir It is expressed as follows:

[0023]

[0024] 16) The infrared image phase consistency feature map M pc Divide into multiple non-overlapping blocks n×n, use fast key point search in each block, and set the maximum number of feature points extracted from each block to N pc , and extract n×n×N pc feature points; since the infrared image is rough, its size is the same as that of the visible light image, therefore, the feature points of the visible light image are initialized, assuming that the coordinates of the infrared feature points correspond to each other in the visible image, that is, P vis =Pir , where P vis Represents the feature points of the visible light image, P ir Indicates the feature points of infrared images;

[0025] 17) Use directional gradient CFGO to generate feature maps F of visible light images vis and the feature map F of the infrared image ir , the size of the feature map is the same as the input image, and each feature point corresponds to a feature map block F q ; The center of the feature map block is the coordinate of the feature point, and the size of the feature map block is B s ×B s , select the feature blocks corresponding to the initial matching point pairs, calculate the offset between them using the area-based matching algorithm, and obtain the exact matching relationship between the matching point pairs;

[0026] 18) Use fast Fourier transform SSD to calculate the visible image feature points P vis ;

[0027] 19) Using the local deformation d, the rough registration result I′ obtained in step 15) ir With visible light image I vis Alignment, calculation of local elastic deformation is defined as follows:

[0028]

[0029] where (ξ0, ψ0) is I′ ir point, (ξ1, ψ1) is the infrared image I after registration r The coordinates in ; where g(ξ0,ψ0) is the horizontal deformation and h(ξ0,ψ0) is the vertical deformation.

[0030] Furthermore, the step 2) includes the following steps:

[0031] 21) First use the coarse feature extractor F c (·) is used to extract coarse features, the coarse feature extractor F c (·) It consists of two convolutional layers and a Leaky ReLU activation function;

[0032]

[0033] in is the coarse feature of the visible light image, It is the coarse feature of infrared image;

[0034] 22) Convert the visible light image to YCbCr color space, and then use the Y channel image as the input of the visible branch;

[0035] 23) A dual attention-guided feature filtering module is deployed to filter out useless features and retain the precise features of saliency-related and texture information to meet the requirements of the anomaly detection task. Therefore, these precise features can be expressed as:

[0036]

[0037] Where SA(·) is spatial attention, CA(·) is channel attention, Conv 1×1 is a 1×1 convolutional layer, Represents the precise features of visible light images, Represents precise features of infrared images;

[0038] 24) Fusion of retained features in source images:

[0039]

[0040] In the formula represents the characteristics of the fused image, Represents element sum operation;

[0041] 25) A fusion-guided saliency enhancement module is introduced to aggregate cross-modal features and embed them into each feature scale of the backbone.

[0042] 26) Introduce a modality-specific group decoder to predict the abnormal region detection map M ab .

[0043] Furthermore, the step 3) includes the following steps:

[0044] 31) First, the abnormal region detection map M with a size of H×W×C is ab The image block slices are divided into image block slices of fixed size P×P×C, the number of which is Zhang, P is the height and width of the cropped image;

[0045] 32) performing linear mapping on the image block slice of fixed size P×P×C obtained in step 31), that is, transforming the dimension by matrix multiplication and converting it into a one-dimensional vector;

[0046] 33) adding position coding information to the image block slice obtained in step 32);

[0047] 34) Input the position encoding information into the Transformer encoder, and then use a multi-layer perceptron to classify the input image into leaky images and non-leakage images;

[0048] 35) performing data enhancement on the non-water leakage images through geometric transformation, wherein the geometric transformation includes translation, rotation, scaling and flipping;

[0049] 36) Perform feature extraction operation through ResNet50 to obtain a feature map with abnormal information;

[0050] 37) The feature map with abnormal information is passed through a fully connected layer. Since the image needs to be divided into four categories, the fully connected layer has four neurons;

[0051] 38) Finally, the non-leakage images are divided into four categories through the softmax classifier, namely plastic bags, soil blocks, concrete, and others.

[0052] Furthermore, the step 18) includes the following steps:

[0053] SSD is the image matching similarity evaluation matrix; the SSD between two images is represented as S Υ (v) is obtained by the following formula:

[0054]

[0055] Where D1 and D2 are the pixel-by-pixel features corresponding to the input image; e represents the position of the pixel in feature D, v = 58.5225; Υ is the template window; T Υ is the masking function on D1. When the pixel is within the template window, T Υ =1, otherwise, it is equal to 0; the matching relationship between D1 and D2 can be obtained by minimizing the similarity function S Υ (v) obtain:

[0056]

[0057] Given a template window Υ, v Υ is an offset vector that matches D1 and D2;

[0058] The FFT technique is introduced, and the similarity function S is minimized Υ (v) can be rewritten as:

[0059]

[0060] By minimizing the similarity function S Υ The last two terms of (v) can obtain the matching relationship; in addition, since the spatial convolution is equal to the dot product in the frequency domain, the offset vector v Υ It can be derived from the following formula:

[0061]

[0062] Where F is the FFT, F -1 is the inverse transform of FFT, F * represents the complex conjugate of F.

[0063] Furthermore, the step 19) includes the following steps:

[0064] The local deformation d is as follows:

[0065]

[0066] where φ i (X) is the radial basis function, which indicates that the deformation of a point on the cusp is affected by the deformation of all control points; here, X represents any point on the warped surface; i = 1, ..., n, n represents the number of non-overlapping blocks obtained in step 16), w i Represents the weighting of different radial bases. These coefficients w and α can be calculated by solving a system of linear equations as follows:

[0067]

[0068] Where K is the radial basis function matrix, P is the control point matrix, which is composed of the feature points of the visible light image, f is the height matrix, the superscript T represents the transpose of the matrix and α is the fitting coefficient of the elastic deformation;

[0069] Using local deformation d, I′ ir Can be with I vis Alignment.

[0070] Furthermore, the step 25) includes the following steps:

[0071] FGSE consists of three steps: given the feature set of the skeleton at the (t-1)th scale First, the fusion features at the tth scale Under the guidance of , the significant enhanced infrared and visible light image features are obtained and expressed as:

[0072]

[0073] Where CR(·) is the convolution and ReLU function, CS(·) is the convolution and sigmoid function, and represent element-wise summation and multiplication, respectively. Represents the visible light image features with saliency enhancement, represents the visible light image feature set of the (t-1)th scale, represents the feature set of the visible light image at the t-th scale, Indicates the infrared image features with saliency enhancement, represents the infrared image feature set of the (t-1)th scale, represents the infrared image feature set of the t-th scale;

[0074] Based on the self-attention mechanism, the cross-complementary feature transformation layer (C2FTL) is introduced. Learn cross-modal structure sharpness and texture information features; before this, is transformed into Q vis and K vis ,V vis And at the same time Do the same transformation and it is transformed into Q r and K r ,V r ; C2FTL is used to generate complementary cross-modal features through the following formula:

[0075]

[0076]

[0077] Where S(·) is the sigmoid function, represents the transmembrane state features of the visible light image, represents the transmembrane state characteristics of the infrared image, where Q vis , K vis 、V vis and Q r , K r 、V r It is the QKV mechanism in the attention mechanism, where Q represents Query, K represents Key, and V represents Value;

[0078] A learnable feature selector is deployed to suppress features that are not related to saliency. The core of feature selection is to generate a weight vector based on the global average pooling operation and feature squeezing and excitation operations, and then generate two learnable parameters through the softmax function. The mathematical expression of this process is:

[0079]

[0080] Where P(·) is the global average pooling, [·] is the connection channel size, ω vis represents the visible light image parameters obtained by the softmax function, ω r represents the infrared image parameters obtained by the softmax function, Softmax(·) represents the softmax classification function, and SE represents the compression and excitation operation;

[0081] Using ω vis and ω r To re-weight and The reconstructed saliency enhanced cross-modal features are:

[0082]

[0083] Furthermore, the step 26) includes the following steps:

[0084] First, a hierarchical feature set is learned through the Siamese encoder Next, a modality-specific group decoder is introduced to predict the saliency map; only the features Input into MSGD; the group decoder consists of three modality-specific decoding branches, namely infrared decoding, visible decoding, and fusion decoding; among them, the fusion modality decoding branch only predicts the coarse explicit mapping of the Conv+BN+relu layer The infrared and visible mode decoding branches predict coarse and fine maps simultaneously. Finally, the modality-specific fine maps are aggregated to generate the final fine saliency map M ab .

[0085] Furthermore, the step 34) includes the following steps:

[0086] The Transformer encoder consists of L standard Transformer modules. Each module consists of layer normalization, multi-head self-attention module, multi-layer perception and residual connection. The specific calculation process is as follows:

[0087]

[0088] in, is the block slice of the input image, the formula po is the position code, Num is the number of image blocks, E is the matrix that implements the linear mapping, x class represents the learnable class label, z′ λ and z λ denote the output features of MHSA and MLP in the λth module, respectively, z′ λ-1 and z λ-1 They represent the output features of MHSA and MLP in the λ-1th module, λ∈[1,L], L is the number of Transformer modules, LN is the layer normalization function, MSA is multi-head attention, MLP is multi-layer perceptron, is the MLP header information of the last Transformer module, and L is the number of Transformer modules.

[0089] The beneficial effects brought by the technical solution provided by the present invention are:

[0090] (1) Fast Fourier Transform (SSD) is used to calculate the optimized visible image feature points. The traditional SSD template matching algorithm takes a long time because all candidate sliding windows need to be compressed, and the three-dimensional class feature map also means a large amount of data. In order to solve this shortcoming, FFT technology is introduced into the traditional SSD algorithm. Since spatial convolution is equal to dot product in the frequency domain, the use of FFT can improve computational efficiency.

[0091] (2) A fusion-guided saliency enhancement (FGSE) module is introduced to aggregate cross-modal features and embed them into each feature scale of the backbone. First, the infrared and visible light image features with saliency enhancement are obtained under the guidance of the fusion features, and a cross-complementary feature transformation layer (C2FTL) is introduced based on the self-attention mechanism to learn cross-modal structural sharpness and texture information features. A learnable feature selector (LFS) is deployed to suppress features that are not related to saliency. The core of feature selection is to generate a weight vector based on the global average pooling operation, and then generate two learnable parameters through the softmax function.

[0092] (3) In the Vision Transformer (ViT) model, each Transformer encoder processes all elements in the sequence to capture the interactions between them; the self-attention mechanism is a key component that allows the model to better understand the dependencies and importance between different elements in the sequence when processing the sequence. BRIEF DESCRIPTION OF THE DRAWINGS

[0093] Figure 1 The present invention is a flow chart of the method for detecting abnormal conditions inside a long-distance pipeline by heterospectral data association analysis.

[0094] Figure 2 This is a network structure diagram of infrared and visible light image registration of the method for detecting abnormal conditions inside a long-distance pipeline by heterospectral data association analysis of the present invention.

[0095] Figure 3 This is a network structure diagram of infrared and visible light coordinated abnormal situation detection of the long-distance pipeline internal abnormal state detection method based on heterospectral data association analysis of the present invention.

[0096] Figure 4 The FGSE module structure diagram is proposed in the infrared and visible light collaborative abnormal situation detection network of the abnormal state detection method inside the long-distance pipeline based on heterospectral data association analysis of the present invention.

[0097] Figure 5 This is a schematic diagram of a modal specific group decoder (MSGD) in an infrared and visible light collaborative abnormal situation detection network of a long-distance pipeline internal abnormal state detection method based on heterospectral data association analysis of the present invention.

[0098] Figure 6 A network diagram of abnormal state classification inside a pipeline based on a visual self-attention model (Vision Transformer, ViT) of the method for detecting abnormal state inside a long-distance pipeline by heterospectral data association analysis of the present invention. DETAILED DESCRIPTION

[0099] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0100] like Figure 1 As shown, the present invention provides a method for detecting abnormal state inside a long-distance pipeline by heterogeneous data association analysis, and the specific process is as follows:

[0101] 1) Given two input images, including a visible light image I vis ∈H vis ×W vis ×C vis and an infrared image I ir ∈H ir ×W ir ×C ir , input to the infrared and visible light image registration network, the two input images are successively subjected to coarse registration, fine registration and local deformation to obtain the registered infrared image I r ∈H r ×W r ×C r , where H vis H vis , W vis W vis , C vis C vis are the height, width, and number of channels of the visible light image, respectively. ir , W ir , C ir are the height, width and number of channels of the infrared image, respectively. r , W r , C r The height, width, and number of channels of the infrared image after registration are shown in the following figure. Figure 2 shown.

[0102] 11) Use the improved structural similarity index measure SSIM cs To measure the similarity between the scale feature maps of infrared images and visible light images:

[0103] SSIM cs (x,y)=[l(x,y)] α [c(x,y)]β ·[s(x,y)] γ

[0104] SSIM cs The index consists of three terms, namely, the brightness term l, the contrast term c, and the structure term s. α, β, and γ are the weights of the brightness, contrast, and structure components, respectively. Generally speaking, α = β = γ = 1. x and y represent the scale feature map of the infrared image and the scale feature map of the visible light image, respectively.

[0105] 12) In the multimodal image, the brightness term l is removed and the formula is rewritten as:

[0106]

[0107] where σ is the standard deviation, σ xy represents the cross covariance of the input image, σ x Represents the standard deviation of the input infrared image, σ y Represents the standard deviation of the input visible light image. v is a normal number, which is divided by 0 in the formula to prevent abnormality. The value is 58.5225.

[0108] 13) The scaling parameter X of the improved structural similarity index measure is obtained by the following formula: scale and the scale parameter H of the input image scale :

[0109]

[0110] Where (p1, p2) is the range of the scaling parameter, a∈(p1, p2); vis and W vis are the height and width of the visible light image, H ir and W ir are the height and width of the infrared image, M max is the edge strength index;

[0111] 14) Calculate the translation parameters t1 and t2:

[0112]

[0113] t1 is the translation parameter of the width of the visible light image and the infrared image; t2 is the translation parameter of the height of the visible light image and the infrared image;

[0114] 15) Get the rough registration result I′ ir , which can be expressed as follows:

[0115]

[0116] 16) The infrared image phase consistency feature map Mpc Divide into multiple non-overlapping blocks n×n, use fast key point search in each block, and set the maximum number of feature points extracted from each block to N pc , and extract n×n×N pc feature points; since the infrared image is rough, its size is the same as that of the visible light image, therefore, the feature points of the visible light image are initialized, assuming that the coordinates of the infrared feature points correspond to each other in the visible image, that is, P vis =P ir , where P vis Represents the feature points of the visible light image, P ir Indicates the feature points of infrared images;

[0117] 17) Use directional gradient CFGO to generate feature maps F of visible light images vis and the feature map F of the infrared image ir , the size of the feature map is the same as the input image, the dimension of the feature map is generally set to 6, and each feature point corresponds to a feature map block F q ; The center of the feature map block is the coordinate of the feature point, and the size of the feature map block is B s ×B s , select the feature blocks corresponding to the initial matching point pairs, and use the area-based matching (i.e., template matching) algorithm to calculate the offset between them to obtain the exact matching relationship between the matching point pairs.

[0118] 18) Use fast Fourier transform SSD to calculate the visible image feature points P vis ;

[0119] SSD is the image matching similarity evaluation matrix; the SSD between two images is represented as S Υ (v) can be obtained by the following formula:

[0120]

[0121] Where D1 and D2 are the pixel-by-pixel features corresponding to the input image; e represents the position of the pixel in feature D, v = 58.5225; Υ is the template window; T Υ is the masking function on D1. When the pixel is within the template window, T Υ =1, otherwise, it is equal to 0; the matching relationship between D1 and D2 can be obtained by minimizing the similarity function S Υ (v) obtain:

[0122]

[0123] Given a template window Υ, v Υ is an offset vector that matches D1 and D2;

[0124] The traditional SSD template matching algorithm takes a long time because all candidate sliding windows need to be compressed, and the three-dimensional class feature map also means a large amount of data. In order to solve this shortcoming, FFT technology is introduced, and the similarity function S is minimized. Υ (v) can be rewritten as

[0125]

[0126] By minimizing the similarity function S Υ The last two terms of (v) can obtain the matching relationship; in addition, since the spatial convolution is equal to the dot product in the frequency domain, the use of FFT can improve the computational efficiency; therefore, the offset vector v Υ It can be derived from the following formula:

[0127]

[0128] where F is the FFT, F -1 is the inverse transform of FFT, F * represents the complex conjugate of F.

[0129] 19) In order to improve the accuracy of registration, some local transformation-based methods are proposed, using local distortion fields instead of global transformation matrices. The present invention adopts a robust local elastic deformation method to achieve high-speed and high-quality image deformation. Specifically, the local deformation d is as follows:

[0130]

[0131] where φ i (X) is the radial basis function, which indicates that the deformation of a point on the cusp surface is affected by the deformation of all control points. Here, X represents any point on the warped surface. i = 1, ..., n, where n represents the phase consistency feature map M obtained in step 16) pc The number of non-overlapping blocks in each row and column. These coefficients ω and α can be calculated by solving a system of linear equations as follows:

[0132]

[0133] Where K is the radial basis function matrix, P is the control point matrix, which is composed of the feature points of the visible light image, f is the height matrix, the superscript T represents the transpose of the matrix and α is the fitting coefficient of the elastic deformation;

[0134] Using local deformation d, I′ ir Can be with I vis Alignment, calculation of local elastic deformation is defined as follows:

[0135]

[0136] where (ξ0, ψ0) is I′ ir point, (ξ1, ψ1) is the infrared image I after registration r where g(ξ0,ψ0) is the horizontal deformation and h(ξ0,ψ0) is the vertical deformation

[0137] 2) The visible light image I vis And the registered infrared image I r The input is fed into the infrared and visible light collaborative anomaly detection network, and then passes through a feature-screening-based image fusion subnet (FSFNet) and a fusion-guided cross-complementary salient target detection subnet (FGC2Net) to generate the final accurate anomaly region detection map M. ab , the infrared and visible light collaborative abnormal situation detection network structure diagram is as follows Figure 3 shown.

[0138] 21) First use the coarse feature extractor F c (·) is used to extract coarse features, the coarse feature extractor F c (·) It consists of two convolutional layers and a Leaky ReLU activation function;

[0139]

[0140] in is the coarse feature of the visible light image, It is the coarse feature of infrared image;

[0141] 22) Convert the visible image to YCbCr color space, and then use the Y channel image as the input of the visible branch;

[0142] 23) A dual attention-guided feature filtering module (DAFS) is deployed to filter out useless features and retain the precise features of saliency-related and texture information to meet the requirements of the anomaly detection task. Therefore, these precise features can be expressed as:

[0143]

[0144] Where SA(·) is spatial attention, CA(·) is channel attention, Conv 1×1 is a 1×1 convolutional layer, Represents the precise features of visible light images, Represents precise features of infrared images;

[0145] 24) Fusion of retained features in source images:

[0146]

[0147] In the formula represents the characteristics of the fused image, Represents element sum operation;

[0148] 25) After introducing the fusion-guided saliency enhancement module (FGSE) to aggregate cross-modal features and embed them into each feature scale of the backbone, the FGSE module structure is shown in the figure below: Figure 4 As shown;

[0149] FGSE consists of three steps: given the feature set of the skeleton at the (t-1)th scale First, the fusion features at the tth scale Under the guidance of , the significant enhanced infrared and visible light image features are obtained and expressed as:

[0150]

[0151] Where CR(·) is the convolution and ReLU function, CS(·) is the convolution and sigmoid function, and represent element-wise summation and multiplication, respectively. Represents the visible light image features with saliency enhancement, represents the visible light image feature set of the (t-1)th scale, represents the feature set of the visible light image at the t-th scale, Indicates the infrared image features with saliency enhancement, represents the infrared image feature set of the (t-1)th scale, represents the infrared image feature set of the t-th scale;

[0152] The present invention introduces a cross-complementary feature transformation layer (C2FTL) based on the self-attention mechanism. Learn cross-modal structure sharpness and texture information features; before this, is transformed into Q vis and K vis ,V vis And at the same time Do the same transformation and it is transformed into Q r and K r ,V r ; The present invention adopts C2FTL to generate complementary cross-modal features, through the following formula:

[0153]

[0154]

[0155] Where S(·) is the sigmoid function, represents the transmembrane state features of the visible light image, represents the transmembrane state characteristics of the infrared image, where Q vis , K vis 、V vis and Q r , K r 、V r It is the QKV mechanism in the attention mechanism, where Q represents Query, K represents key, and V represents value;

[0156] In order to prevent interference information and In the further forward propagation of , the present invention deploys a learnable feature selector (LFS) to suppress features that are not related to saliency; the core of feature selection is to generate a weight vector based on the global average pooling operation and feature squeezing and excitation operations, and then generate two learnable parameters through the softmax function. The mathematical expression of this process is:

[0157]

[0158] Where P(·) is the global average pooling, [·] is the connection channel size, ω vis represents the visible light image parameters obtained by the softmax function, ω r represents the infrared image parameters obtained by the softmax function, Softmax(·) represents the softmax classification function, and SE represents the compression and excitation operation;

[0159] The present invention uses ω vis and ω r To re-weight and The reconstructed saliency enhanced cross-modal features are:

[0160]

[0161] It should be noted that after concatenation, a 1×1 convolutional code is followed to reduce the dimensionality of the features to make them consistent with the input (i.e. ) matches.

[0162] 26) A modality-specific group decoder (MSGD) is introduced to predict the abnormal region M p , the MSGD principle is as follows Figure 5 As shown;

[0163] First, a hierarchical feature set is learned through the Siamese encoder Next, the present invention introduces a modality-specific group decoder (MSGD) to predict the saliency map; in order to reduce the computational burden, the present invention only converts the feature Input into MSGD; the group decoder consists of three modality-specific decoding branches, namely infrared decoding, visible decoding, and fusion decoding; among them, the fusion modality decoding branch only predicts the coarse explicit mapping of the Conv+BN+relu (CBR) layer The infrared and visible mode decoding branches simultaneously predict coarse maps (e.g., coarse maps of visible light images) Infrared image coarse mapping ) and accurate mapping (e.g. accurate mapping of visible light images Infrared image precise mapping Finally, the modality-specific exact mapping (i.e. ) to generate the final accurate saliency map M ab ; Note that all features to be decoded pass through a global Conext module and cascaded CBR layers to generate saliency maps in the MSGD module.

[0164] 3) The abnormal area detection map M ab The image is input into the pipeline internal abnormal state classification network based on the visual self-attention model (Vision Transformer, ViT). First, the image is divided into leakage and non-leakage abnormalities through binary classification. Then, the non-leakage abnormalities are multi-classified into four categories: plastic bags, soil blocks, concrete, and others. The structure of the pipeline internal abnormal state classification network based on the visual self-attention model is shown in the figure. Figure 6 As shown;

[0165] 31) First, the abnormal region detection map M with a size of H×W×C is ab The image block slices are divided into image block slices of fixed size P×P×C, the number of which is Zhang, P is the height and width of the cropped image;

[0166] 32) performing linear mapping on the image block slice of fixed size P×P×C obtained in step 31), that is, transforming the dimension by matrix multiplication and converting it into a one-dimensional vector;

[0167] 33) adding position coding information to the image block slice obtained in step 32);

[0168] 34) Input the position encoding information into the Transformer encoder, and then use a multi-layer perceptron to classify the input image into leaky images and non-leakage images;

[0169] The Transformer encoder consists of L standard Transformer modules, each of which consists of layer normalization (LN), multi-head self-attention module (MHSA), multi-layer perceptron (MLP) and residual connection. The specific calculation process is as follows:

[0170]

[0171] in, is the block slice of the input image, the formula po is the position code, Num is the number of image blocks, E is the matrix that implements the linear mapping, x class represents the learnable class label, z′ λ and z λ denote the output features of MHSA and MLP in the λth module, respectively, z′ λ-1 and z λ-1 They represent the output features of MHSA and MLP in the λ-1th module, λ∈[1,L], and L is the number of Transformer modules. LN is the layer normalization function, MSA is multi-head attention, and MLP is a multi-layer perceptron. is the MLP header information of the last Transformer module, and L is the number of Transformer modules.

[0172] 35) Data enhancement was performed on non-water leakage images through geometric transformations such as translation, rotation, scaling and flipping;

[0173] 36) Perform feature extraction operation through ResNet50 to obtain a feature map with abnormal information;

[0174] 37) Pass the feature map through a fully connected layer. Since the image needs to be classified into four categories, the fully connected layer has four neurons;

[0175] 38) Finally, the non-leakage images are divided into four categories through the softmax classifier, namely plastic bags, soil blocks, concrete, and others.

Claims

1. A method for detecting abnormal conditions inside long-distance pipelines based on heterogeneous data association analysis. Features: The following steps are involved: 1) Given two input images, including a visible light image I vis ∈H vis ×W vis ×C vis and an infrared image I ir ∈H ir ×W ir ×C ir , input to the infrared and visible light image registration network, the two input images are successively subjected to coarse registration, fine registration and local deformation to obtain the registered infrared image I r ∈H r ×W r ×C r , where H vis , W vis , C vis are the height, width, and number of channels of the visible light image, respectively. ir , W ir , C ir are the height, width and number of channels of the infrared image, respectively. r , W r , C r The height, width and number of channels of the registered infrared images; 2) The visible light image I vis And the registered infrared image I r After a feature-screening-based image fusion subnet FSFNet and a fusion-guided cross-complementary salient target detection subnet FGC2Net, the final accurate abnormal region detection map M is generated. ab , including the following steps: 21) First use the coarse feature extractor F c (·) is used to extract coarse features, the coarse feature extractor F c (·) It consists of two convolutional layers and a Leaky ReLU activation function; in is the coarse feature of the visible light image, It is the coarse feature of infrared image; 22) Convert the visible light image to YCbCr color space, and then use the Y channel image as the input of the visible branch; 23) A dual attention-guided feature filtering module is deployed to filter out useless features and retain the precise features of saliency-related and texture information to meet the requirements of the anomaly detection task. Therefore, these precise features can be expressed as: Where SA(·) is spatial attention, CA(·) is channel attention, Conv 1×1 is a 1×1 convolutional layer, Represents the precise features of visible light images, Represents precise features of infrared images; 24) Fusion of retained features in source images: In the formula represents the characteristics of the fused image, Represents element sum operation; 25) A fusion-guided saliency enhancement module is introduced to aggregate cross-modal features and embed them into each feature scale of the backbone. 26) Introduce a modality-specific group decoder to predict the abnormal region detection map M ab ; 3) The abnormal area detection map M ab The images are input into the abnormal state classification network inside the pipeline based on the visual self-attention model. The images are first divided into leakage and non-leakage abnormalities through binary classification, and then the non-leakage abnormalities are multi-classified.

2. According to claim 1, the method for detecting abnormal state inside a long-distance pipeline by heterogeneous data association analysis, It is characterized in that The step 1) comprises the following steps: 11) Use the improved structural similarity index measure SSIM cs To measure the similarity between the scale feature maps of infrared images and visible light images: SSIM cs (x,y)=[l(x,y)] α ·[c(x,y)] β ·[s(x,y)] γ SSIM cs The index consists of three terms, namely, the brightness term l, the contrast term c, and the structure term s. α, β, and γ are the weights of the brightness, contrast, and structure components, respectively. x and y represent the scale feature map of the infrared image and the scale feature map of the visible light image, respectively. 12) In the multimodal image, the brightness term l is removed, and the similarity between the scale feature maps of the infrared image and the visible light image is rewritten as: where σ is the standard deviation, σ xy represents the cross covariance of the input image, σ x Represents the standard deviation of the input infrared image, σ y Represents the standard deviation of the input visible light image. v is a normal number, which is divided by 0 in the formula to prevent abnormality. The value is 58.5225. 13) The scaling parameter X of the improved structural similarity index measure is obtained by the following formula: scale and the scale parameter H of the input image scale : Where (p 1 ,p 2 ) is the range of the scaling parameter, a∈(p 1 ,p 2 ), i∈(p l ,p r );H vis and W vis are the height and width of the visible light image, H ir and W ir are the height and width of the infrared image, M max is the edge strength index; 14) Calculate the translation parameter t 1 and t 2 : t 1 is the translation parameter of the visible light image and the infrared image width; t 2 is the translation parameter between the visible light image and the infrared image; 15) Get the rough registration result I′ ir It is expressed as follows: 16) The infrared image phase consistency feature map M pc Divide into multiple non-overlapping blocks n×n, use fast key point search in each block, and set the maximum number of feature points extracted from each block to N pc , and extract n×n×N pc feature points; since the infrared image is rough, its size is the same as that of the visible light image, therefore, the feature points of the visible light image are initialized, assuming that the coordinates of the infrared feature points correspond to each other in the visible image, that is, P vis =P ir , where P vis Represents the feature points of the visible light image, P ir Indicates the feature points of infrared images; 17) Use directional gradient CFGO to generate feature maps F of visible light images vis and the feature map F of the infrared image ir , the size of the feature map is the same as the input image, and each feature point corresponds to a feature map block F q ; The center of the feature map block is the coordinate of the feature point, and the size of the feature map block is B s ×B s , select the feature blocks corresponding to the initial matching point pairs, calculate the offset between them using the area-based matching algorithm, and obtain the exact matching relationship between the matching point pairs; 18) Use fast Fourier transform SSD to calculate the visible image feature points P vis ; 19) Using the local deformation d, the rough registration result I′ obtained in step 15) ir With visible light image I vis Alignment, calculation of local elastic deformation is defined as follows: Among them (ξ 0 , ψ 0 ) is I′ ir point, (ξ 1 , ψ 1 ) is the infrared image after registration I r The coordinates in g(ξ 0 , ψ 0 ) is the horizontal deformation, h(ξ 0 , ψ 0 ) is the vertical deformation.

3. According to claim 1, the method for detecting abnormal state inside a long-distance pipeline by heterogeneous data association analysis, It is characterized in that The step 3) comprises the following steps: 31) First, the abnormal region detection map M with a size of H×W×C is ab The image block slices are divided into image block slices of fixed size P×P×C, the number of which is Zhang, P is the height and width of the cropped image; 32) performing linear mapping on the image block slice of fixed size P×P×C obtained in step 31), that is, transforming the dimension by matrix multiplication and converting it into a one-dimensional vector; 33) adding position coding information to the image block slice obtained in step 32); 34) Input the position encoding information into the Transformer encoder, and then use a multi-layer perceptron to classify the input image into leaky images and non-leakage images; 35) performing data enhancement on the non-water leakage images through geometric transformation, wherein the geometric transformation includes translation, rotation, scaling and flipping; 36) Perform feature extraction operation through ResNet50 to obtain a feature map with abnormal information; 37) The feature map with abnormal information is passed through a fully connected layer. Since the image needs to be divided into four categories, the fully connected layer has four neurons; 38) Finally, the non-leakage images are divided into four categories through the softmax classifier, namely plastic bags, soil blocks, concrete, and others.

4. According to claim 2, the method for detecting abnormal state inside a long-distance pipeline by heterogeneous data association analysis, It is characterized in that The step 18) includes the following steps: SSD is the image matching similarity evaluation matrix; the SSD between two images is represented as S γ (v) is obtained by the following formula: Where D 1 and D 2 is the pixel-by-pixel feature corresponding to the input image; e represents the position of the pixel in the feature D, v = 58.5225; γ is the template window; T γ Yes D 1 The masking function on the template window is: γ =1, otherwise, it is equal to 0; D 1 and D 2 The matching relationship between them can be obtained by minimizing the similarity function S γ (v) obtain: Given a template window γ, v γ Is a D 1 and D 2 The offset vector of the match; The FFT technique is introduced, and the similarity function S is minimized γ (v) can be rewritten as: By minimizing the similarity function S γ The last two terms of (v) can obtain the matching relationship; in addition, since the spatial convolution is equal to the dot product in the frequency domain, the offset vector v γ It can be derived from the following formula: where F is the FFT, F -1 is the inverse transform of FFT, F * represents the complex conjugate of F.

5. According to claim 2, the method for detecting abnormal state inside a long-distance pipeline by heterogeneous data association analysis, It is characterized in that The step 19) includes the following steps: The local deformation d is as follows: where φ i (X) is the radial basis function, which indicates that the deformation of a point on the cusp is affected by the deformation of all control points; here, X represents any point on the warped surface; i = 1, ..., n, n represents the number of non-overlapping blocks obtained in step 16), w i Represents the weighting of different radial bases. These coefficients w and α can be calculated by solving a system of linear equations as follows: Where K is the radial basis function matrix, P is the control point matrix, which is composed of the feature points of the visible light image, f is the height matrix, the superscript T represents the transpose of the matrix and α is the fitting coefficient of the elastic deformation; Using local deformation d, I′ ir Can be with I vis Alignment.

6. The method for detecting abnormal state inside a long-distance pipeline by heterogeneous data association analysis according to claim 1, It is characterized in that The step 25) includes the following steps: FGSE consists of three steps: given the feature set of the skeleton at the (t-1)th scale First, the fusion features at the tth scale Under the guidance of , the significant enhanced infrared and visible light image features are obtained and expressed as: Where CR(·) is the convolution and ReLU function, CS(·) is the convolution and sigmoid function, and represent element-wise summation and multiplication, respectively. Represents the visible light image features with saliency enhancement, represents the visible light image feature set of the (t-1)th scale, represents the feature set of the visible light image at the t-th scale, Indicates the infrared image features with saliency enhancement, represents the infrared image feature set of the (t-1)th scale, represents the infrared image feature set of the t-th scale; Based on the self-attention mechanism, the cross-complementary feature transformation layer (C2FTL) is introduced. Learn cross-modal structure sharpness and texture information features; before this, is transformed into Q vis and K vis ,V vis And at the same time Do the same transformation and it is transformed into Q r and K r ,V r ; C2FTL is used to generate complementary cross-modal features through the following formula: Where S(·) is the sigmoid function, represents the transmembrane state features of the visible light image, represents the transmembrane state characteristics of the infrared image, where Q vis , K vis 、V vis and Q r , K r 、V r It is the QKV mechanism in the attention mechanism, where Q represents Query, K represents Key, and V represents Value; A learnable feature selector is deployed to suppress features that are not related to saliency. The core of feature selection is to generate a weight vector based on the global average pooling operation and feature squeezing and excitation operations, and then generate two learnable parameters through the softmax function. The mathematical expression of this process is: Where P(·) is the global average pooling, [·] is the connection channel size, ω vis represents the visible light image parameters obtained by the softmax function, ω r represents the infrared image parameters obtained by the softmax function, Softmax(·) represents the softmax classification function, and SE represents the compression and excitation operation; Using ω vis and ω r To re-weight and The reconstructed saliency enhanced cross-modal features are:

7. The method for detecting abnormal state inside a long-distance pipeline by heterogeneous data association analysis according to claim 1, It is characterized in that The step 26) includes the following steps: First, a hierarchical feature set is learned through the Siamese encoder Next, a modality-specific group decoder is introduced to predict the saliency map; only the features Input into MSGD; the group decoder consists of three modality-specific decoding branches, namely infrared decoding, visible decoding, and fusion decoding; among them, the fusion modality decoding branch only predicts the coarse explicit mapping of the Conv+BN+relu layer The infrared and visible mode decoding branches predict coarse and fine maps simultaneously. Finally, the modality-specific fine maps are aggregated to generate the final fine saliency map M ab .

8. The method for detecting abnormal state inside a long-distance pipeline by heterogeneous data association analysis according to claim 3, It is characterized in that The step 34) includes the following steps: The Transformer encoder consists of L standard Transformer modules. Each module consists of layer normalization, multi-head self-attention module, multi-layer perception and residual connection. The specific calculation process is as follows: in, is the block slice of the input image, the formula po is the position code, Num is the number of image blocks, E is the matrix that implements the linear mapping, x class represents the learnable class label, z′ λ and z λ denote the output features of MHSA and MLP in the λth module, respectively, z′ λ-1 and z λ-1 They represent the output features of MHSA and MLP in the λ-1th module, λ∈[1,L], L is the number of Transformer modules, LN is the layer normalization function, MSA is multi-head attention, MLP is multi-layer perceptron, is the MLP header information of the last Transformer module, and L is the number of Transformer modules.

Citation Information

Patent Citations

  • Circuit board fault infrared image automatic detection method

    CN107025648A

  • Multi-spectral pedestrian detection method based on cross Transform fusion

    CN116580425A

  • Visible light and infrared thermal imaging image registration method based on graph neural network

    CN116681742A

  • Cross-modal pedestrian re-identification method based on spectrum perception and attention mechanism

    CN116798070A

  • Method for re-recognizing object image based on multi-feature information capture and correlation analysis

    US20220415027A1