Preprocessing method for selecting gas region of interest data based on neural network

Through pre-processing methods based on neural networks and clustering algorithms, gas samples in infrared gas images are extracted and decomposed, and the problem of leakage and error detection in the prior art is solved, achieving higher detection accuracy and safety.

CN119091112BActive Publication Date: 2025-04-15SOUTH CHINA NORMAL UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410928955.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2025-04-15
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

The prior art is prone to mis-checking problems when detecting weak leaked gases, especially when the gas is close to the background temperature, it is difficult for the human eye to accurately select the analysis area, which increases safety risks.

Method used

Using a neural network-based preprocessing method, the gas samples are decomposed by obtaining infrared gas images, extracting gas samples, and using clustering algorithms (such as K-means), the leakage source area, the central area and the edge area are obtained, and these areas are used as the regions of interest (ROI) for analysis.

Benefits of technology

It effectively reduces the false detection rate and missed detection rate of gas detection, avoids the safety risks brought by artificial selection of ROI, and improves the real-time performance of gas detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091112B_ABST
    Figure CN119091112B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of neural network technology, and more specifically, to a preprocessing method for selecting gas region of interest data based on a neural network. The method includes: feature extraction, accurately finding and locating leaked gas through a neural network, and segmenting it; eliminating the background, retaining the segmented gas, and separating the gas from the background; using a clustering algorithm to classify the retained gas; after the gas is classified, removing the gas edge part, retaining the part close to the leak source and the leaking gas center. The present invention avoids artificial selection of RIO; effectively reduces the false detection rate and missed detection rate of the network; and improves the real-time performance of gas detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of neural network technology, and in particular to a preprocessing method for selecting gas region of interest (ROI) data based on a neural network. Background Art

[0002] In the field of neural network technology, ROI is selected for quantitative analysis. In the prior art, due to the development of neural networks, ROI selection based on neural networks has become an indispensable part of quantitative gas pre-data processing.

[0003] However, in actual use, when the leaking gas flow is too weak or the temperature difference between the gas and the background is small, there will be problems of missed detection or false detection. Internal factors: First, because the infrared gas image is a grayscale image, when the temperature of the gas is close to that of the surrounding environment, the gas image taken by the thermal imager has a similar pixel value to the surrounding environment, which may lead to missed detection or false detection. External factors: Gas is different from other objects, such as cars. The characteristic pixel points of cars are basically unchanged during movement, while gas has no fixed movement form during movement, and as the gas diffuses, the grayscale of the gas also changes rapidly. The extracted area of ​​interest is too large or too small and there is no standard reference.

[0004] In view of the above situation, currently, the leaking gas is found and located by human eyes, and the analysis area is selected manually, which is easy to implement. However, if the gas is harmful or explosive, it is easy to cause casualties. Summary of the invention

[0005] The present invention provides a preprocessing method for selecting gas ROI data based on a neural network, which can overcome certain or some defects of the prior art.

[0006] According to the present invention, a preprocessing method for selecting gas ROI data based on a neural network includes:

[0007] Acquire infrared gas images to be processed;

[0008] Process the infrared gas image to be processed and extract the gas sample;

[0009] The gas samples are processed based on the clustering algorithm to obtain the leakage source area, leakage center area and leakage edge area;

[0010] The leakage center area and leakage edge area are used as ROI areas

[0011] Preferably, the step of processing the infrared gas image to be processed and extracting the gas sample comprises:

[0012] Based on the deeplabv3+ neural network, the infrared gas image to be processed is processed, the pixels representing the gas are extracted and marked in red, and the identified gas image is obtained;

[0013] The identified gas image is set to 1 in red and 0 in other parts, and then multiplied with the infrared gas image to be processed, the background part of the infrared gas image to be processed is removed, and the gas part of the infrared gas image to be processed is retained to obtain a gas sample.

[0014] Preferably, the gas sample is processed based on a clustering algorithm to obtain a leakage source area, a leakage center area and a leakage edge area; comprising:

[0015] Clustering operation is performed based on the K-means clustering algorithm to perform similarity matching between the gas samples and the HI of the predicted object.

[0016] Preferably, the clustering operation is performed based on the K-means clustering algorithm to perform similarity matching between the gas sample and the HI of the predicted object; comprising:

[0017] Based on the K-means clustering algorithm, each extracted gas pixel is divided into a cluster closest to the cluster centroid;

[0018] Among them, k means that the clustering is divided into 3 clusters, and means means taking the mean of the data values ​​in each cluster as the centroid of the cluster.

[0019] Preferably, the K-means clustering algorithm is used to classify each extracted gas pixel into a cluster closest to the cluster centroid; including:

[0020] Use Euclidean distance in Euclidean space or Manhattan distance as a metric; use cosine similarity function in processing documents;

[0021] Based on the nearest neighbor measurement strategy, three new clusters are obtained, and each gas pixel is assigned to one of the three clusters.

[0022] Based on the three new clusters obtained, recalculate the new centroid of each new cluster.

[0023] Preferably, the method recalculates the new centroid of each new cluster based on the obtained three new clusters; including:

[0024] Based on the three new clusters obtained, the point with the smallest mean distance to other points in the cluster is taken as the centroid; the expression is as follows:

[0025]

[0026] Among them, c i To randomly select K samples from the data set as the initial cluster centroids;

[0027] Randomly initialize the K-means clustering algorithm to find the best cluster.

[0028] Preferably, the randomly initialized K-means clustering algorithm to find the best cluster includes:

[0029] Randomly initialize 100 times, and the loop operation is as follows:

[0030]

[0031] When the centroid of each cluster no longer changes or the number of loops exceeds the maximum number of loopLimit, stop k-means;

[0032] If k-means is not finished, the K-means clustering algorithm will continue to be executed to divide each extracted gas pixel into the cluster closest to the cluster centroid;

[0033] When k-means is finished, the clusters and centroids are printed.

[0034] Preferably, the method of removing the background part in the infrared gas image to be processed and retaining the gas part in the infrared gas image to be processed to obtain the gas sample comprises:

[0035] Identify and segment gases using the neural network Unet.

[0036] Preferably, the method adopts Euclidean distance in Euclidean space; comprising:

[0037] The Euclidean distance formula is:

[0038]

[0039] Among them, x i Represents the sample point.

[0040] Preferably, the Manhattan distance is used as a metric; including:

[0041] The Manhattan distance formula is:

[0042]

[0043] Preferably, the method of using a cosine similarity function in processing documents comprises:

[0044] The formula of cosine similarity function is:

[0045]

[0046] Where A and B represent vectors (x1, y1) and (x2, y2).

[0047] The present invention uses a clustering algorithm to cluster gases and select ROIs to avoid artificial selection of ROIs; introduces an attention mechanism to enable the network to focus on information that is more critical to the current task among a large amount of input information, and reduce the attention to other information, with the ultimate effect of reducing the false detection rate and missed detection rate of the network; uses a small feature extraction network to replace the original Xception backbone network, thereby improving the real-time performance of gas detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a flow chart of this embodiment;

[0049] Figure 2 is the original image of this embodiment;

[0050] Figure 3 is the network segmentation image of this embodiment;

[0051] Figure 4 is a grayscale image after background removal in this embodiment;

[0052] Figure 5 This is the K-means clustering grayscale image of this embodiment. DETAILED DESCRIPTION

[0053] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the embodiments. It should be understood that the embodiments are only for explaining the present invention and are not intended to limit it.

[0054] Example 1

[0055] Combination Figure 1 This embodiment provides a preprocessing method for selecting gas ROI data based on a neural network, which includes the following steps:

[0056] Acquire infrared gas images to be processed;

[0057] Process the infrared gas image to be processed and extract the gas sample;

[0058] The gas samples are processed based on the clustering algorithm to obtain the leakage source area, leakage center area and leakage edge area;

[0059] The leakage center area and leakage edge area are used as ROI areas

[0060] The method of processing the infrared gas image to be processed and extracting the gas sample comprises:

[0061] Based on the deeplabv3+ neural network, the infrared gas image to be processed is processed, the pixels representing the gas are extracted and marked in red, and the identified gas image is obtained;

[0062] The identified gas image is set to 1 in red and 0 in other parts, and then multiplied with the infrared gas image to be processed, the background part of the infrared gas image to be processed is removed, and the gas part of the infrared gas image to be processed is retained to obtain a gas sample.

[0063] The gas sample is processed based on the clustering algorithm to obtain the leakage source area, the leakage center area and the leakage edge area; including:

[0064] Clustering operation is performed based on the K-means clustering algorithm to perform similarity matching between the gas samples and the HI of the predicted object.

[0065] The clustering operation is performed based on the K-means clustering algorithm to perform similarity matching between the gas sample and the HI of the predicted object; including:

[0066] Based on the K-means clustering algorithm, each extracted gas pixel is divided into a cluster closest to the cluster centroid;

[0067] Among them, k means that the clustering is divided into 3 clusters, and means means taking the mean of the data values ​​in each cluster as the centroid of the cluster.

[0068] The K-means clustering algorithm is used to divide each extracted gas pixel into a cluster closest to the cluster centroid; including:

[0069] Use Euclidean distance in Euclidean space or Manhattan distance as a metric; use cosine similarity function in processing documents;

[0070] Based on the nearest neighbor measurement strategy, three new clusters are obtained, and each gas pixel is assigned to one of the three clusters.

[0071] Based on the three new clusters obtained, recalculate the new centroid of each new cluster.

[0072] Based on the obtained three new clusters, the new centroid of each new cluster is recalculated; including:

[0073] Based on the three new clusters obtained, the point with the smallest mean distance to other points in the cluster is taken as the centroid; the expression is as follows:

[0074]

[0075] Among them, c i To randomly select K samples from the data set as the initial cluster centroids;

[0076] Randomly initialize the K-means clustering algorithm to find the best cluster.

[0077] The randomly initialized K-means clustering algorithm to find the best cluster includes:

[0078] Randomly initialize 100 times, and the loop operation is as follows:

[0079]

[0080] When the centroid of each cluster no longer changes or the number of loops exceeds the maximum number of loopLimit, stop k-means;

[0081] If k-means is not finished, the K-means clustering algorithm will continue to be executed to divide each extracted gas pixel into the cluster closest to the cluster centroid;

[0082] When k-means is finished, the clusters and centroids are printed.

[0083] The method of removing the background part in the infrared gas image to be processed, retaining the gas part in the infrared gas image to be processed, and obtaining the gas sample comprises:

[0084] Identify and segment gases using the neural network Unet.

[0085] The method of using Euclidean distance in Euclidean space includes:

[0086] The Euclidean distance formula is:

[0087]

[0088] Among them, x i Represents the sample point.

[0089] The Manhattan distance is used as a metric; including:

[0090] The Manhattan distance formula is:

[0091]

[0092] The method of using a cosine similarity function in processing documents includes:

[0093] The formula of cosine similarity function is:

[0094]

[0095] Where A and B represent vectors (x1, y1) and (x2, y2).

[0096] Other clustering algorithms can be used to cluster gases, such as the DBSCAN clustering algorithm.

[0097] The present invention uses a clustering algorithm to cluster gases and select ROIs to avoid artificial selection of ROIs; introduces an attention mechanism to enable the network to focus on information that is more critical to the current task among a large amount of input information, and reduce the attention to other information, with the ultimate effect of reducing the false detection rate and missed detection rate of the network; uses a small feature extraction network to replace the original Xception backbone network, thereby improving the real-time performance of gas detection.

[0098] It is easy to understand that those skilled in the art can combine, split, reorganize, etc. the embodiments of the present application to obtain other embodiments based on one or several embodiments provided in the present application, and these embodiments do not exceed the protection scope of the present application.

[0099] The present invention and its implementation methods are described schematically above, and the description is not restrictive. The embodiments shown in the embodiments are only part of the implementation methods of the present invention, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired by the embodiments and designs a structure and an implementation method similar to the technical solution without creativity without departing from the purpose of the invention, they should all fall within the protection scope of the present invention.

Claims

1. A preprocessing method for selecting gas ROI data based on a neural network, characterized in that: include, Acquire infrared gas images to be processed; Process the infrared gas image to be processed and extract the gas sample; The gas samples are processed based on the clustering algorithm to obtain the leakage source area, leakage center area and leakage edge area; The leakage center area and leakage edge area are taken as ROI areas; The method of processing the infrared gas image to be processed and extracting the gas sample comprises: Based on the deeplabv3+ neural network, the infrared gas image to be processed is processed, the pixels representing the gas are extracted and marked in red, and the identified gas image is obtained; The identified gas image is set to 1 in red and 0 in other parts, and then multiplied with the infrared gas image to be processed, the background part of the infrared gas image to be processed is removed, and the gas part of the infrared gas image to be processed is retained to obtain a gas sample.

2. The method for preprocessing gas ROI data based on neural network selection according to claim 1 is characterized in that: The gas sample is processed based on the clustering algorithm to obtain the leakage source area, the leakage center area and the leakage edge area; including: Clustering operation is performed based on the K-means clustering algorithm to perform similarity matching between the gas samples and the HI of the predicted object.

3. The method for preprocessing gas ROI data based on neural network selection according to claim 2 is characterized in that: The clustering operation is performed based on the K-means clustering algorithm to perform similarity matching between the gas sample and the HI of the predicted object; including: Based on the K-means clustering algorithm, each extracted gas pixel is divided into a cluster closest to the cluster centroid; Among them, k means that the clustering is divided into 3 clusters, and means means taking the mean of the data values ​​in each cluster as the centroid of the cluster.

4. The method for preprocessing gas ROI data based on neural network selection according to claim 3 is characterized in that: Based on the K-means clustering algorithm, each extracted gas pixel point is divided into a cluster closest to the cluster centroid; include, Use Euclidean distance in Euclidean space or Manhattan distance as the metric; The cosine similarity function is used in processing documents; Based on the nearest neighbor measurement strategy, three new clusters are obtained, and each gas pixel is assigned to one of the three clusters. Based on the three new clusters obtained, recalculate the new centroid of each new cluster.

5. The method for preprocessing gas ROI data based on neural network selection according to claim 4 is characterized in that: Based on the obtained three new clusters, a new centroid of each new cluster is recalculated; include, Based on the three new clusters obtained, the point with the smallest mean distance to other points in the cluster is taken as the centroid; The expression is as follows: Among them, c i To randomly select K samples from the data set as the initial cluster centroids; Randomly initialize the K-means clustering algorithm to find the best cluster.

6. The method for preprocessing gas ROI data based on neural network selection according to claim 4 is characterized in that: The Euclidean distance is used in the Euclidean space; include, The Euclidean distance formula is: Among them, x i Represents the sample point.

7. The method for preprocessing gas ROI data based on neural network selection according to claim 4 is characterized in that: The Manhattan distance is used as the metric; include, The Manhattan distance formula is:

8. The method for preprocessing gas ROI data based on neural network selection according to claim 4 is characterized in that: The cosine similarity function is used in processing documents; include, The formula of cosine similarity function is: Where A and B represent vectors (x1, y1) and (x2, y2).

Citation Information

Patent Citations

  • Ammonia gas leakage shuffling self-attention lightweight infrared detection method and system

    CN114964628A