An infrared imaging gas leakage detection method based on deep learning

CN122597368APending Publication Date: 2026-08-18BEIJING INFORMATION SCI & TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610789548.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-03
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0004]1.红外气体图像中气体对比度低,容易被背景热噪声掩盖;

Benefits of technology

[0042]上述说明仅是本发明技术方案的概述,为了能够更清楚地了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597368A_ABST
    Figure CN122597368A_ABST
Patent Text Reader

Abstract

The application provides an infrared imaging gas leakage detection method based on deep learning, which comprises the following steps: inputting a preprocessed infrared gas image into a preset lightweight encoder for layer-by-layer downsampling; obtaining coding features of corresponding scales through a multi-branch parallel feature extraction mechanism in each layer of downsampling; inputting the coding features of each scale into a preset plume enhancement denoising module according to the corresponding scales respectively to obtain plume feature maps of each scale after denoising enhancement; inputting the plume feature maps of each scale after denoising enhancement into a preset plume shape optimization module according to the corresponding scales respectively to obtain optimized plume feature maps of each scale; inputting the optimized plume feature maps of each scale into a preset fine decoder, upsampling deep features output by a previous decoding layer to a current scale, and performing edge sharpening and coordinate attention enhancement processing, and then fusing the deep features with the optimized plume feature maps of the corresponding level through cross-layer connection to reconstruct a gas leakage segmentation map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a deep learning-based infrared imaging gas leak detection method. Background Technology

[0002] In critical industrial sectors such as chemicals, petrochemicals, storage, and energy pipelines, gas leaks pose a significant and persistent safety threat. Such incidents not only cause environmental pollution and energy loss but also lead to catastrophic accidents such as fires and explosions, endangering production, public operations, and safety. Traditional infrared gas leak detection methods, such as fixed-point contact sensors or periodic manual inspections, have shortcomings. Contact sensors suffer from limited monitoring range and response lag, and are severely affected by environmental factors such as temperature, light reflection, and sudden disturbances, resulting in low detection reliability. Manual inspections, on the other hand, involve enormous labor intensity and time costs, falling far short of meeting the demands of modern industrial parks for remote, automated monitoring.

[0003] Infrared imaging technology, as a non-contact detection method, is widely used in gas leak detection due to its visualization, long-range, and all-weather characteristics. Gases typically exhibit plume diffusion characteristics in infrared gas images, but several technical challenges remain:

[0004] 1. Infrared gas images have low gas contrast and are easily masked by background thermal noise;

[0005] 2. After gas diffusion, the edge of the plume gradually changes, making it difficult to precisely segment;

[0006] 3. Dust, changes in light, and reflections in the industrial environment may affect the accuracy of the detection.

[0007] Traditional image processing-based detection methods, such as thresholding, background subtraction, or edge detection, achieve limited results under ideal conditions, but lack accuracy and stability in real-world industrial scenarios. In recent years, deep learning has been introduced into the field of infrared gas detection, enabling automatic feature extraction, enhanced gas region response, and capture of plume information at different scales through multi-layer convolutional networks. However, existing deep learning methods still have some shortcomings: complex network structures, large parameter counts, and slow inference speeds make them unsuitable for real-time online monitoring; fixed morphological processing may lead to plume edge contraction or over-expansion, making it difficult to accurately reproduce the gas morphology.

[0008] Therefore, current technologies are unable to achieve high-precision, real-time, lightweight, and interference-resistant infrared gas leak detection in complex industrial environments. There is an urgent need for a deep learning detection method that can accurately capture gas plume characteristics while ensuring lightweight design and real-time performance, in order to meet the intelligent monitoring and safety early warning needs of modern industry. Summary of the Invention

[0009] This invention proposes a deep learning-based infrared imaging gas leak detection method to solve or partially solve the above-mentioned problems.

[0010] This invention provides a deep learning-based infrared imaging gas leak detection method, the method comprising:

[0011] The original infrared gas image is preprocessed to unify the grayscale distribution of the infrared gas image, resulting in a preprocessed infrared gas image.

[0012] The preprocessed infrared gas image is input into a preset lightweight encoder for layer-by-layer downsampling. During each layer downsampling process, the corresponding scale coding features are obtained through a multi-branch parallel feature extraction mechanism. The coding features of each layer together constitute the multi-scale feature map output by the encoder.

[0013] The encoded features of each scale contained in the multi-scale feature map are input into the preset plume enhancement and denoising module according to the corresponding scale. The plume target features are enhanced by the spatial attention mechanism, and noise suppression and weak plume feature enhancement are completed by wavelet spatial-frequency joint processing to obtain the plume feature map after denoising and enhancement at each scale.

[0014] The denoised and enhanced plume feature maps at each scale are input into the preset plume morphology optimization module according to the corresponding scale. Through adaptive threshold segmentation, morphological processing and gradient edge clipping, the plume morphology is adaptively repaired, noise and false edges are eliminated, and the optimized plume feature maps corresponding to each scale are obtained.

[0015] The optimized plume feature maps at each scale are input into a preset fine decoder. The fine decoder performs upsampling layer by layer in order from low resolution to high resolution. During each layer upsampling process, the deep features output by the previous decoding layer are upsampled to the current scale, and edge sharpening and coordinate attention enhancement processing are performed. Then, they are fused with the optimized plume feature maps of the corresponding level through cross-layer connections to reconstruct a high-resolution gas leak segmentation map.

[0016] Further, the preprocessing of the original infrared gas image includes:

[0017] The original infrared gas image is normalized to obtain a fixed-size infrared gas image:

[0018] Calculate the global grayscale mean and standard deviation of each pixel in the fixed-size infrared gas image, and standardize the baseline grayscale value of each pixel in the fixed-size infrared gas image based on the global grayscale mean and standard deviation of each pixel to obtain the standardized grayscale value of each pixel.

[0019] Furthermore, the method also includes model training of the lightweight encoder, wherein during the model training phase, the lightweight encoder performs the following operations at each encoding level:

[0020] The preprocessed infrared gas image is subjected to channel compression and feature fusion based on a 1×1 convolutional branch.

[0021] Based on 3×3 convolutional branches, the preprocessed infrared gas image is used to capture local spatial features of the plume, enhancing the information of tiny leak points and edges.

[0022] Based on depthwise separable convolution branches, spatial features of preprocessed infrared gas images are extracted by combining channel-wise convolution with pointwise convolution.

[0023] The output features of the 1×1 convolutional branch, the 3×3 convolutional branch, and the depthwise separable convolutional branch are added together and fused, and then processed by batch normalization and activation to obtain the encoded feature map.

[0024] Furthermore, after the model training is completed, the method also includes:

[0025] The 1×1 convolutional branch, 3×3 convolutional branch, and depthwise separable convolutional branch, along with their corresponding batch normalization parameters, are fused using reparameterization techniques to obtain a single convolutional kernel.

[0026] The preprocessed infrared gas image is downsampled layer by layer using the single convolution kernel combined with layer-by-layer downsampling to output a multi-scale feature map.

[0027] Furthermore, the feather enhancement and denoising module is used to perform the following operations:

[0028] Global average pooling and global max pooling are performed on the encoded features at the corresponding scales respectively. A spatial attention map is generated by combining the sigmoid activation function. The spatial attention map is then multiplied pixel by pixel with the original encoded features to obtain a spatially weighted feature map.

[0029] A two-dimensional discrete wavelet transform is performed on the spatially weighted feature map to decompose it into low-frequency components and three sets of high-frequency components.

[0030] Deep convolution is used to enhance the features and suppress noise of high-frequency components, and residual fusion is completed by combining learnable scaling parameters;

[0031] By fusing the low-frequency components with the processed high-frequency components using inverse wavelet transform, a denoised and enhanced plume feature map is reconstructed.

[0032] Furthermore, the plume morphology optimization module is used to perform the following operations:

[0033] Perform grayscale adaptive threshold segmentation on the plume feature map to determine the plume candidate region;

[0034] Isolated noise points in the candidate region of the plume are removed by morphological operations, and morphological closing operations are used to fill the internal holes of the plume region to maintain the continuity of the plume structure.

[0035] Calculate the Sobel gradient map of the candidate plume region, retain pixels with gradient values ​​greater than a preset gradient threshold, remove overextended false edges, and generate an optimized plume feature map.

[0036] Furthermore, the fine decoder performs the following operations at each decoding level:

[0037] Upsampling is performed on the deep features in each level to obtain upsampled plume features;

[0038] The upsampled plume features are sharpened by using the Laplacian operator in combination with a preset edge enhancement coefficient;

[0039] Global average pooling is performed on the sharpened upsampled plume features in both horizontal and vertical directions. After channel compression and activation, attention weights are generated. The attention weights are then expanded and multiplied pixel by pixel with the sharpened upsampled plume features to complete coordinate attention enhancement.

[0040] The upsampled plume features enhanced with coordinate attention are fused with shallow features of the corresponding scale pixel by pixel to obtain the final feature map, thus completing the segmentation of the gas leak area.

[0041] This invention proposes a deep learning-based infrared imaging gas leak detection method, employing an end-to-end deep network architecture: first, a lightweight encoder (GLE) extracts multi-scale plume features while controlling model computational overhead; then, a GED module performs joint spatial-frequency domain enhancement and denoising to improve the ability to identify weak targets; a GMO module repairs the plume morphology and optimizes edge features; finally, a GPD decoder fuses multi-scale features and reconstructs high-resolution detection results. This method offers high detection accuracy, strong anti-interference capability, fast inference speed, and overall lightweight design, making it suitable for various industrial scenarios such as chemical, petrochemical, and natural gas pipelines. It enables real-time monitoring and intelligent early warning of gas leaks, demonstrating significant engineering application value.

[0042] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0043] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. In the drawings:

[0044] Figure 1 This is a flowchart of a deep learning-based infrared imaging gas leak detection method according to an embodiment of the present invention;

[0045] Figure 2 This is a network architecture diagram of the infrared imaging gas leak detection method based on deep learning according to an embodiment of the present invention. Detailed Implementation

[0046] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0047] Reference Figure 1 and Figure 2 The infrared imaging gas leak detection method based on deep learning provided by this invention specifically includes the following steps:

[0048] S1. Preprocess the original infrared gas image to unify the grayscale distribution of the infrared gas image and obtain a preprocessed infrared gas image.

[0049] In infrared gas leak detection, gas plumes typically exhibit low contrast, blurred boundaries, and localized diffusion characteristics, and are easily affected by ambient light, reflection, and noise. Preprocessing the original infrared gas image is crucial to ensure that subsequent deep networks can stably and accurately extract plume features.

[0050] S2. The preprocessed infrared gas image is input into a preset lightweight encoder for layer-by-layer downsampling. During each layer downsampling process, the corresponding scale coding features are obtained through a multi-branch parallel feature extraction mechanism. The coding features of each layer together constitute the multi-scale feature map output by the encoder.

[0051] To effectively extract weak plume features from infrared gas images and improve detection accuracy while ensuring real-time performance and lightweight design, this invention designs a lightweight encoder (GLE). GLE utilizes a "multi-branch parallel training—reparameterized inference fusion" structure to fully capture multi-scale, multi-level spatial features and semantic information of gas plumes, providing a reliable feature foundation for subsequent enhancement, morphological optimization, and fine decoding.

[0052] S3. Input the encoded features of each scale contained in the multi-scale feature map into the preset plume enhancement and denoising module according to the corresponding scale. Strengthen the plume target features through the spatial attention mechanism, and combine wavelet spatial frequency domain joint processing to complete noise suppression and weak plume feature enhancement, and obtain the plume feature map after denoising and enhancement at each scale.

[0053] To enhance the features of weak plumes in infrared gas images while suppressing background interference from industrial environments (such as dust, thermal noise, and light reflection), the GED module designed in this invention achieves joint feature enhancement and noise suppression in the spatial and frequency domains, thereby improving the detectability of minute leaks and edge plumes.

[0054] S4. Input the denoised and enhanced plume feature maps of each scale into the preset plume morphology optimization module according to the corresponding scale. Through adaptive threshold segmentation, morphological processing and gradient edge clipping, the plume morphology is adaptively repaired, noise and false edges are eliminated, and the optimized plume feature maps corresponding to each scale are obtained.

[0055] S5. Input the optimized plume feature maps at each scale into a preset fine decoder. The fine decoder performs layer-by-layer upsampling in order from low resolution to high resolution. During each layer upsampling process, the deep features output by the previous decoding layer are upsampled to the current scale, and edge sharpening and coordinate attention enhancement processing are performed. Then, they are fused with the optimized plume feature maps of the corresponding level through cross-layer connections to reconstruct a high-resolution gas leak segmentation map.

[0056] The decoder and encoder provided in this embodiment of the invention adopt a cross-layer connection method, inputting the optimized plume feature maps of each layer into the corresponding decoding layer. The specific structure is as follows: Figure 2 As shown.

[0057] This invention aims to achieve high-precision, rapid, and lightweight gas leak monitoring in industrial environments. Firstly, by utilizing a lightweight encoder and a plume enhancement and denoising module, the response intensity of the gas plume region in infrared gas images can be significantly improved, while effectively suppressing complex backgrounds and environmental noise, enabling reliable identification of minute leaks and low-contrast plumes.

[0058] Further, the preprocessing of the acquired raw infrared gas image in step S1 includes: normalizing the size of the raw infrared gas image to obtain a fixed-size infrared gas image; calculating the global grayscale mean and standard deviation of each pixel in the fixed-size infrared gas image, and standardizing the baseline grayscale value of each pixel in the fixed-size infrared gas image based on the global grayscale mean and standard deviation of each pixel to obtain the standardized grayscale value of each pixel.

[0059] Specifically, in order to ensure consistent image input from different infrared acquisition devices or different scenarios, the original image... The size is normalized and adjusted to a fixed resolution of 640×640, i.e., a fixed size.

[0060] Furthermore, in the size normalization stage, this invention employs bilinear interpolation to calculate the grayscale value of each target pixel in a fixed-size infrared gas image:

[0061] (1)

[0062] In the above formula, The coordinates of the target image in a fixed-size infrared gas image. These are the floating-point coordinates of the corresponding original infrared gas image. , .

[0063] This method uses a weighted average of pixels around the original infrared gas image during scaling, which can preserve the spatial distribution characteristics of the plume to the maximum extent and avoid distortion of tiny leak points or plume boundaries due to scaling, thus providing reliable input for subsequent feature extraction.

[0064] Furthermore, in infrared gas images, the grayscale of the plume is typically lower than that of the background and varies only slightly. To eliminate illumination differences and sensor sensitivity biases, the pixels in the infrared gas image are standardized to stabilize the grayscale distribution and enable efficient learning by the network. Specifically:

[0065] Calculate the global grayscale mean and standard deviation of each pixel in the fixed-size infrared gas image:

[0066] (2)

[0067] In the above formula, μ represents the global grayscale mean, σ represents the standard deviation, H' represents the height of the image after size normalization, W' represents the width of the image after size normalization, i represents the row number, j represents the column number, and I'(i,j) represents the reference grayscale value at coordinate (i,j) after size normalization.

[0068] Then, each pixel is standardized:

[0069] (3)

[0070] In the above formula, The gray value at coordinates (i,j) after standardization.

[0071] Furthermore, the method provided by the present invention includes model training of the lightweight encoder, wherein each level of the model training stage is used to perform the following operations: channel compression and feature fusion of the preprocessed infrared gas image based on a 1×1 convolution branch; capturing local spatial features of the plume in the preprocessed infrared gas image based on a 3×3 convolution branch, enhancing small leak points and edge information; extracting spatial features of the preprocessed infrared gas image by combining channel-wise convolution and point-wise convolution based on a depthwise separable convolution branch; and performing additive fusion of the output features of the 1×1 convolution branch, the 3×3 convolution branch, and the depthwise separable convolution branch, and obtaining the encoded feature map after batch normalization and activation processing.

[0072] Specifically, the 1×1 convolutional branch is used for channel compression and feature fusion, and its mathematical expression is:

[0073] (4)

[0074] In the above formula, Y 1×1 W represents the output feature map of a 1×1 convolution branch. 1×1 b represents the weight matrix of a 1×1 convolution branch; 1×1 represents the bias term of the 1×1 convolution branch, and X represents the input feature of the 1×1 convolution branch.

[0075] The 3×3 convolutional branch is used to capture local spatial features of the plume, enhancing information on tiny leak points and edges. The mathematical expression is:

[0076] (5)

[0077] In the above formula, Y 3×3 W represents the output feature map of the 3×3 convolution branch. 3×3 b represents the weight matrix of the 3×3 convolution branch; 3×3 represents the bias term of the 3×3 convolution branch, and X represents the input feature of the 3×3 convolution branch.

[0078] The depthwise separable convolution branch consists of channel-wise convolution and pointwise convolution, used to efficiently extract spatial features while significantly reducing computational cost. The mathematical expression is:

[0079] (6)

[0080] In the above formula, Y DW W represents the output feature map of channel-wise convolution. DW The weight matrix Y of channel-wise convolution PW W represents the output feature map of pointwise convolution. PW represents the weight matrix of pointwise convolution, used for channel fusion, and X represents the input features of the depthwise separable convolution branch.

[0081] The outputs of each branch's convolution are added together during the training phase:

[0082] (7)

[0083] Then, batch normalization (BN) and the activation function (GELU) are applied:

[0084] (8)

[0085] In the above formula, F represents the final feature map after batch normalization and activation function. This process ensures that the GLE encoder can simultaneously capture both shallow edge details and deep semantic information of the plume.

[0086] To reduce computational and memory overhead during the inference phase, the multi-branch convolutions during the training phase are merged into a single convolutional kernel using reparameterization techniques. After model training is complete, the method further includes: fusing the 1×1 convolutional branches, 3×3 convolutional branches, and depthwise separable convolutional branches and their corresponding batch normalization parameters using reparameterization techniques to obtain a single convolutional kernel; and using the single convolutional kernel in conjunction with layer-by-layer downsampling to perform layer-by-layer downsampling on the preprocessed infrared gas image to output a multi-scale feature map.

[0087] Specifically, let the output of each branch convolution be:

[0088] (9)

[0089] Furthermore, the batch normalization parameters corresponding to the 1×1 convolutional branch, the 3×3 convolutional branch, and the depthwise separable convolutional branch during the training phase specifically include the feature mean of the BN statistics for that branch. , characteristic variance BN scaling factor and BN offset The equivalent convolution weights and biases are:

[0090] (10)

[0091] Furthermore, multiple branch convolutional kernels are merged into a single convolutional kernel:

[0092] (11)

[0093] The inference stage uses a single convolution operation, which retains the feature representation capability of the multi-branch training stage and achieves lightweight inference, meeting the requirements of real-time industrial detection.

[0094] Furthermore, the GLE module generates encoded features at various scales through progressive downsampling: (12)

[0095] in, It uses shallow coding features to preserve local information about plume edges and tiny leak points; Deep coding features are used to extract the overall morphology, diffusion distribution, and semantic information of plumes. Multi-scale features provide a multi-level information foundation for subsequent enhancement, morphological optimization, and fine decoding, improving the detection capability of low-contrast, blurred-boundary plumes.

[0096] Furthermore, the feather enhancement and denoising module described in step S3 is used to perform the following operations:

[0097] S31. Perform global average pooling and global max pooling on the encoded features at the corresponding scales respectively, and generate a spatial attention map by combining the Sigmoid activation function. Multiply the spatial attention map with the original encoded features pixel by pixel to obtain the spatially weighted feature map.

[0098] In infrared gas images, plume regions are typically small and low in brightness. To highlight target features, GED generates spatial attention maps. For feature maps Weighting:

[0099] (13)

[0100] In the above formula, GAP and GMP are the global average pooling and global max pooling operations, respectively, σ is the sigmoid activation function, and F... i This represents the encoded feature of the i-th layer.

[0101] Spatial attention map Multiply pixel-by-pixel with the original encoded features:

[0102] (14)

[0103] In the above formula This represents the spatially weighted feature map in the i-th layer. This method can highlight the response of the plume region in infrared gas images, suppress background interference, and improve the spatial saliency of the plume region.

[0104] S32. Perform a two-dimensional discrete wavelet transform on the spatially weighted feature map to decompose it into low-frequency components and three sets of high-frequency components.

[0105] To preserve both the overall structure and edge details of the plume, GED performs a two-dimensional discrete wavelet transform (DWT) on the spatially weighted feature map, decomposing it into one low-frequency component and three high-frequency components:

[0106] (15)

[0107] In the above formula, the low-frequency component LL retains the overall structure and contour information of the plume; the three high-frequency components (LH, HL, HH) contain information about the plume edge, tiny leak points, and noise, respectively.

[0108] S33. Use deep convolution to enhance features and suppress noise in high-frequency components, and combine it with learnable scaling parameters to complete residual fusion;

[0109] High-frequency components are enhanced and noise suppressed using depthwise convolution (DWConv).

[0110] (16)

[0111] Simultaneously perform residual fusion: It is a learnable scaling parameter used to adjust the balance between high-frequency characteristics and noise suppression.

[0112] S34. By fusing the low-frequency component with the processed high-frequency component through inverse wavelet transform, the denoised and enhanced plume feature map is reconstructed.

[0113] The spatial feature map is reconstructed from the low-frequency components and the enhanced high-frequency components using inverse wavelet transform (IDWT):

[0114] (17)

[0115] In the above formula, The above processing is used to highlight the plume edge and tiny leak points in the infrared gas image, while effectively suppressing complex background noise.

[0116] Further, in step S4, the plume morphology optimization module performs the following operations: performs grayscale adaptive threshold segmentation on the plume feature map to determine the plume candidate region; removes isolated noise points in the plume candidate region through morphological operations, and fills the internal holes of the plume region with morphological closing operations to maintain the continuity of the plume structure; calculates the Sobel gradient map of the plume candidate region, retains pixels with gradient values ​​greater than a preset gradient threshold, removes overextended false edges, and generates an optimized plume feature map.

[0117] Specifically, the features output by the plume enhancement and denoising module are subjected to grayscale adaptive threshold segmentation to determine the plume candidate region as follows:

[0118] (18)

[0119] (19)

[0120] In the above formula, This is used to initially binarize candidate regions for plumes, ensuring the distinction between low-brightness plumes and the background.

[0121] Furthermore, the removal of isolated noise points in the candidate region of the plume is represented as follows:

[0122] (20)

[0123] In the above formula, For corrosion, For expansion, As a structural element, it eliminates tiny noise points and maintains the dimensional stability of the plume region.

[0124] Furthermore, by filling the internal pores of the plume region using morphological closing operations, it can be represented as:

[0125] (twenty one)

[0126] Furthermore, the Sobel gradient map is calculated. Represented as:

[0127] (twenty two)

[0128] Preserve gradient values ​​greater than the threshold The pixels, represented by cropped false edges, are as follows:

[0129] (twenty three)

[0130] The final optimized plume feature map output by the i-th layer With clear boundaries and a complete structure, even the smallest leaks are effectively preserved, providing reliable input for a fine decoder to generate high-precision segments.

[0131] Furthermore, in this embodiment of the invention, each decoding step of the fine decoder is used to perform the following operations: upsampling the deep features in each level to obtain upsampled plume features; sharpening the edges of the upsampled plume features using the Laplacian operator combined with a preset edge enhancement coefficient; performing global average pooling in the horizontal and vertical directions on the sharpened upsampled plume features respectively, generating attention weights after channel compression and activation, expanding the attention weights and multiplying them pixel-by-pixel with the sharpened upsampled plume features to complete coordinate attention enhancement; and fusing the coordinate attention-enhanced upsampled plume features with the corresponding scale shallow features through pixel-by-pixel addition to obtain the final feature map, thus completing the gas leak area segmentation.

[0132] Specifically, in the i-th decoding layer, the deep features are the features output by the previous decoding layer, represented as:

[0133] (twenty four)

[0134] The shallow features are the optimized plume feature maps output by the plume morphology optimization module corresponding to the current decoding layer scale, represented as:

[0135] (25)

[0136] The size of the deep feature map is smaller than that of the shallow feature map. To achieve pixel-by-pixel feature alignment, bilinear interpolation upsampling is performed on the deep features:

[0137] (26)

[0138] In the above formula, For the upsampled deep features, ensure that they are consistent with the shallow feature map. Consistent dimensions.

[0139] Furthermore, to enhance plume edge information while suppressing background interference and thermal noise in the infrared gas image, the Laplacian operator is applied to the upsampled deep features for edge sharpening:

[0140] (27)

[0141] In the above formula, This represents the Laplacian operator (i.e., the second-order spatial gradient). The edge enhancement coefficient is determined through statistical analysis of training data. It makes the local edges of tiny leak points more obvious, which helps with subsequent segmentation.

[0142] Furthermore, to preserve the global semantic information of deep features and complement the shallow spatial detail features, a coordinate attention mechanism is added to the GPD module. First, the feature map... Perform global average pooling in both the horizontal and vertical directions:

[0143] (28)

[0144] Then, a 1×1 convolution is used to compress the number of channels and generate an attention weight vector. Then normalized using the Sigmoid activation function:

[0145] (29)

[0146] By extending the attention weights along the corresponding dimensions and multiplying them pixel-by-pixel with the feature map, spatial location and global semantic information are enhanced.

[0147] (30)

[0148] This is to highlight the response of the core region of the infrared plume, suppress background interference, and improve the detectability of tiny leaks.

[0149] Furthermore, the enhanced deep features Corresponding shallow features Pixel-by-pixel additive fusion enables multi-scale information complementarity:

[0150] (31)

[0151] After upsampling, edge sharpening, and coordinate attention enhancement, the final feature map is obtained directly. Its spatial size and number of channels are consistent with the shallow features, while preserving both deep global semantics and shallow local detail features.

[0152] This invention proposes a deep learning-based infrared imaging gas leak detection method. The method employs an end-to-end deep network architecture: first, a lightweight encoder (GLE) extracts multi-scale plume features and controls model computational overhead; then, a GED module performs joint spatial-frequency domain enhancement and denoising to improve the ability to identify weak targets; a GMO module repairs the plume morphology and optimizes edge features; finally, a GPD decoder fuses multi-scale features and reconstructs high-resolution detection results. This method offers high detection accuracy, strong anti-interference capability, fast inference speed, and overall lightweight design, making it suitable for various industrial scenarios such as chemical, petrochemical, and natural gas pipelines. It enables real-time monitoring and intelligent early warning of gas leaks, demonstrating significant engineering application value.

[0153] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art and should not be interpreted in an idealized or overly formal sense unless specifically defined.

[0154] For the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0155] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, any of the claimed embodiments can be used in any combination.

[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A deep learning-based infrared imaging gas leak detection method, characterized in that, The method includes: The original infrared gas image is preprocessed to unify the grayscale distribution of the infrared gas image, resulting in a preprocessed infrared gas image. The preprocessed infrared gas image is input into a preset lightweight encoder for layer-by-layer downsampling. During each layer downsampling process, the corresponding scale coding features are obtained through a multi-branch parallel feature extraction mechanism. The coding features of each layer together constitute the multi-scale feature map output by the encoder. The encoded features of each scale contained in the multi-scale feature map are input into the preset plume enhancement and denoising module according to the corresponding scale. The plume target features are enhanced by the spatial attention mechanism, and noise suppression and weak plume feature enhancement are completed by wavelet spatial-frequency joint processing to obtain the plume feature map after denoising and enhancement at each scale. The denoised and enhanced plume feature maps at each scale are input into the preset plume morphology optimization module according to the corresponding scale. Through adaptive threshold segmentation, morphological processing and gradient edge clipping, the plume morphology is adaptively repaired, noise and false edges are eliminated, and the optimized plume feature maps corresponding to each scale are obtained. The optimized plume feature maps at each scale are input into a preset fine decoder. The fine decoder performs upsampling layer by layer in order from low resolution to high resolution. During each layer upsampling process, the deep features output by the previous decoding layer are upsampled to the current scale, and edge sharpening and coordinate attention enhancement processing are performed. Then, they are fused with the optimized plume feature maps of the corresponding level through cross-layer connections to reconstruct a high-resolution gas leak segmentation map.

2. The method according to claim 1, characterized in that, The preprocessing of the original infrared gas image includes: The original infrared gas image is normalized to obtain a fixed-size infrared gas image: Calculate the global grayscale mean and standard deviation of each pixel in the fixed-size infrared gas image, and standardize the baseline grayscale value of each pixel in the fixed-size infrared gas image based on the global grayscale mean and standard deviation of each pixel to obtain the standardized grayscale value of each pixel.

3. The method according to claim 1, characterized in that, The method further includes training a model on the lightweight encoder, wherein during the model training phase, the lightweight encoder performs the following operations at each encoding level: The preprocessed infrared gas image is subjected to channel compression and feature fusion based on a 1×1 convolutional branch. Based on 3×3 convolutional branches, the preprocessed infrared gas image is used to capture local spatial features of the plume, enhancing the information of tiny leak points and edges. Based on depthwise separable convolution branches, spatial features of preprocessed infrared gas images are extracted by combining channel-wise convolution with pointwise convolution. The output features of the 1×1 convolutional branch, the 3×3 convolutional branch, and the depthwise separable convolutional branch are added together and fused, and then processed by batch normalization and activation to obtain the encoded feature map.

4. The method according to claim 3, characterized in that, After the model training is complete, the method further includes: The 1×1 convolutional branch, 3×3 convolutional branch, and depthwise separable convolutional branch, along with their corresponding batch normalization parameters, are fused using reparameterization techniques to obtain a single convolutional kernel. The preprocessed infrared gas image is downsampled layer by layer using the single convolution kernel combined with layer-by-layer downsampling to output a multi-scale feature map.

5. The method according to claim 1, characterized in that, The feather enhancement and noise reduction module is used to perform the following operations: Global average pooling and global max pooling are performed on the encoded features at the corresponding scales respectively. A spatial attention map is generated by combining the sigmoid activation function. The spatial attention map is then multiplied pixel by pixel with the original encoded features to obtain a spatially weighted feature map. A two-dimensional discrete wavelet transform is performed on the spatially weighted feature map to decompose it into low-frequency components and three sets of high-frequency components. Deep convolution is used to enhance the features and suppress noise of high-frequency components, and residual fusion is completed by combining learnable scaling parameters; By fusing the low-frequency components with the processed high-frequency components using inverse wavelet transform, a denoised and enhanced plume feature map is reconstructed.

6. The method according to claim 1, characterized in that, The plume morphology optimization module is used to perform the following operations: Perform grayscale adaptive threshold segmentation on the plume feature map to determine the plume candidate region; Isolated noise points in the candidate region of the plume are removed by morphological operations, and morphological closing operations are used to fill the internal holes of the plume region to maintain the continuity of the plume structure. Calculate the Sobel gradient map of the candidate plume region, retain pixels with gradient values ​​greater than a preset gradient threshold, remove overextended false edges, and generate an optimized plume feature map.

7. The method according to claim 1, characterized in that, The fine decoder performs the following operations at each decoding level: Upsampling is performed on the deep features in each level to obtain upsampled plume features; The upsampled plume features are sharpened by using the Laplacian operator in combination with a preset edge enhancement coefficient; Global average pooling is performed on the sharpened upsampled plume features in both horizontal and vertical directions. After channel compression and activation, attention weights are generated. The attention weights are then expanded and multiplied pixel by pixel with the sharpened upsampled plume features to complete coordinate attention enhancement. The upsampled plume features enhanced with coordinate attention are fused with shallow features of the corresponding scale pixel by pixel to obtain the final feature map, thus completing the segmentation of the gas leak area.