A Visual Recognition Method for Gas Leak Detection Based on Motion Feature Fusion

By combining deep learning and traditional machine learning methods, using Few-Shot learning and image preprocessing technology, the existing gas leak detection methods are solved with low sensitivity and inapplicable to multiple scenarios, achieving fast real-time and high-precision gas leak detection.

CN119229251BActive Publication Date: 2025-07-01NANJING TETRAELC ELECTRONICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411756857.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-07-01
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

The existing gas leak detection methods have problems such as low sensitivity, susceptibility to environmental factors, difficulty in data collection, and inapplicable to multiple scenarios, resulting in poor detection results and waste of resources.

Method used

The visual recognition method of gas leakage detection based on motion feature fusion is adopted, combined with deep learning and traditional machine learning, and through Few-Shot learning and image preprocessing technology, the detection model is quickly trained, which reduces the difficulty of data collection and model training, and improves detection accuracy.

Benefits of technology

It realizes fast real-time detection and high-precision detection, which is suitable for most industrial application scenarios, reduces resource consumption and error detection rate, and has good generalization performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229251B_ABST
    Figure CN119229251B_ABST
Patent Text Reader

Abstract

The present invention discloses a visual recognition method for gas leakage detection based on motion feature fusion, including step S1: collecting infrared gas leakage image sample data; step S2: extracting frames and annotating positive and negative samples from the infrared gas leakage image sample data; step S3: image preprocessing to extract the motion features of gas leakage in the image; step S4: fusing the annotation data and motion features, based on the yolov5 infrared image detection method, and using a large number of pre-collected existing infrared gas leakage data sets to generate a pre-trained weight model in advance; on the basis of the pre-trained model, perform Few-Shot learning for the current scenario to obtain a fine-tuned model for infrared gas leakage detection; S5: use the trained fine-tuned model for infrared gas leakage video inference testing and output the gas leakage prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of fire detection and image-type fire detectors, and particularly to a visual recognition method for gas leakage detection based on motion feature fusion. Background Art

[0002] For traditional gas detection, it is required that personnel hold tools for detection at close range on site. In some places, due to narrow areas or dangerous factors, it is not convenient for personnel to approach, which brings certain difficulties to gas detection. Compared with traditional gas detection methods, infrared thermal imaging gas detection (OGI) has a large detection range, a long distance, high efficiency, and is intuitive and easy to understand. It can perform detection operations hundreds of meters away in dangerous or inaccessible areas, and provides better protection for personnel safety.

[0003] Infrared thermal imaging gas detection technology aims to quickly detect the presence of leaked gas and accurately locate the leakage source. Based on an infrared core, a thermal imaging module or a thermal imager, it designs a selective narrow-band wavelength window according to the characteristics of gas imaging. It only needs to detect and image one or several infrared wavelength bands covering the characteristic absorption peaks of the gas, and through special image filtering and enhancement processing, the gas leakage situation can be presented in a timely and intuitive manner in the output video image, helping the detection personnel to find the leakage source and evaluate the diffusion trend of the gas and the possible hazards. Such infrared detection devices are generally divided into two categories: cooled and uncooled. Uncooled infrared gas temperature detection devices are widely used in many fields due to their simple structure, low cost, and high reliability, and can be used in industries such as power, oil, natural gas, petrochemical, chemical, energy production, and environmental monitoring.

[0004] The current existing product research results include, but are not limited to, calculating the motion extraction of continuous video frames collected by infrared gas temperature detection devices through methods such as frame difference method, optical flow method, and background subtraction method based on traditional machine learning, and obtaining the pixel area where the leaked gas is located; detection methods based on deep learning, which extract gas features in infrared images by using CNN (Convolutional Neural Network) and train a visual detection algorithm model to predict gas leakage detection.

[0005] However, the inventors of the present application found that the above technologies have at least the following technical problems:

[0006] First, the methods adopted by existing products based on traditional machine learning are mainly the frame difference method and the optical flow method.

[0007] The frame difference method detects the leakage area by comparing the differences between two consecutive frames or multiple frames of images. This method has relatively low sensitivity and can only detect large gas leaks because small gas leaks may not cause sufficient differences between adjacent frames. At the same time, this method is vulnerable to environmental factors such as light changes and object movements, which may lead to large differences between adjacent frames and thus false alarms.

[0008] The optical flow method detects leaks by analyzing the motion patterns of objects in an image sequence. This method requires processing the entire video sequence, with high computational complexity, which may result in insufficient real-time performance. For non-rigid objects or scenes with large light changes, the performance of the optical flow method may be limited. If the motion of the gas leak is not obvious or similar to the background motion, it may be difficult for the optical flow method to accurately detect.

[0009] Secondly, existing deep learning-based detection methods require a large amount of high-quality training data. However, there is relatively little open-source infrared gas leakage data, and it is also very difficult to collect data, resulting in the inability to obtain sufficient sample data, and it is difficult to train a high-quality model. In addition, the contrast of infrared images is relatively low, the edges of the leaked gas are blurred, and it is difficult to distinguish from the background; the quality of infrared images is poor, and they are affected by temperature fluctuations, light changes, similar background objects, etc., making it difficult to effectively identify the leaked gas.

[0010] Finally, most existing products are designed for some customized detection and processing in a single specified scenario, and are not suitable for scenarios with large background environment changes and unclear motion of the leaked gas; some only use deep learning methods, which are not suitable for scenarios with a small amount of training data and difficult to distinguish between the target and the background. These algorithms do not have the generalization ability for multiple scenarios, and a large amount of data needs to be collected for each scenario, increasing a lot of workload.

[0011] Therefore, there is currently a lack of a complete set of mature, efficient, highly feasible, and practical overall solutions that can be applied to the vast majority of social production and life, as well as how this solution can truly achieve general and effective detection of infrared gas leakage in complex scenarios, give warnings in a timely manner, and escort safety. The present invention proposes a solution that can not only detect quickly in real time but also has high-precision detection based on the above technical problems. Summary of the Invention

[0012] In view of the above technical problems, the present application provides a visual recognition method for gas leakage detection based on motion feature fusion. By combining deep learning and traditional machine learning methods, in the context where it is difficult to collect infrared gas leakage data, only a small amount of current scene data needs to be collected for Few-Shot learning, and then a detection model adapted to the current scene can be quickly trained, greatly reducing the data collection and model training difficulties. Moreover, the obtained detection model has very high accuracy on the basis of meeting fast real-time detection and is applicable to most industrial application scenarios.

[0013] The present application provides a visual recognition method for gas leakage detection based on motion feature fusion, which is characterized by including:

[0014] Step S1: Collect infrared gas leakage image sample data;

[0015] Step S2: Extract frames and label positive and negative samples from the infrared gas leakage image sample data;

[0016] Step S3: Perform image preprocessing to extract the motion features of gas leakage in the image;

[0017] Step S4: Fuse the labeled data and motion features, and based on the yolov5 infrared image detection method, use a large number of pre-collected existing infrared gas leakage data sets to train and generate a pre-trained weight model; on the basis of the pre-trained weight model, perform Few-Shot learning on the current scene to obtain a fine-tuned model for infrared gas leakage detection;

[0018] Step S5: Use the trained fine-tuned model for infrared gas leakage video inference testing and output the gas leakage prediction result.

[0019] Preferably, in step S2, the frame extraction and annotation of the infrared gas leakage image sample data include the following steps:

[0020] S21: Perform frame extraction on all infrared gas leakage videos collected by the infrared camera to obtain infrared gas leakage images;

[0021] S22: Use the labelImg tool to draw rectangular box annotations for leakage gas and confusing backgrounds on all infrared gas leakage images to obtain positive and negative sample annotation data.

[0022] Preferably, step S3 includes:

[0023] S31: Use opencv image processing technology to perform denoising processing by bilateral filtering, and then improve the contrast of the image through the CLAHE image enhancement technology;

[0024] S32: Select the first T frames of the video sequence and construct a background model based on the K-Nearest Neighbors algorithm. The construction method of the background model is as follows:

[0025] (1)

[0026] In the formula, is the estimated density, represents the sample set, , represents the background pixel, represents the foreground pixel, represents the number of frames in the sequence obtained forward in the video, is the volume of the hypersphere kernel with a radius of , is the kernel function. If , then , otherwise it is 0, is the diameter of the hypersphere, represents the kernel volume contains the number of samples. The size of the hypersphere diameter is related to the sample size. Centered on the current pixel sample, gradually expand the hypersphere diameter until it contains samples and fix nearest neighbors;

[0027] S33: At time t, the background model can determine whether each new pixel sample x belongs to the background or the foreground. The evaluation process is as follows:

[0028] (2)

[0029] Among them, is the estimated density, is proportional to and ; is approximately:

[0030] (3)

[0031] Among them, is the background model weight vector. At time m, use to represent the foreground of the sample, to represent the background of the sample;

[0032] S34: Update and ; Update by adding the current time sample and eliminating the earliest time sample. By judging Update B based on whether it belongs to the background;

[0033] S35: Through the above foreground detection algorithm based on K-Nearest Neighbors, obtain the foreground image after removing the background, and then use the image opening operation to remove noise, thereby obtaining the motion feature information.

[0034] Preferably, the step S4 includes:

[0035] S41: Fuse the convolution features extracted from the foreground motion image and the infrared image by the Add method into a two-layer network structure composed of convolution Conv, batch normalization BN, and activation function SiLU, and then splice the yolov5 network model structure to form a new network model structure that can simultaneously receive two parameters, namely the infrared image and the foreground motion image;

[0036] S42: Send a number of pre-collected infrared gas leakage data sets, which are processed in step S2 to obtain the foreground motion image and processed in step S3 to obtain the labeled image, into the new network model structure described in step S41 at the same time, and train to generate a general pre-trained weight model;

[0037] S43: Perform the same data processing and data fusion methods as the pre-training data in step S42 on a small amount of sample data collected in the current application scenario, and then send it into the new network model structure described in step S41 for Few-Shot fine-tuning training of the model to obtain a fine-tuning detection model suitable for the current scenario.

[0038] Preferably, in step S5, the inference test of the model includes the following steps:

[0039] S51: Input the infrared gas leakage video, perform frame-by-frame processing, perform background subtraction modeling, and extract motion feature information;

[0040] S52: Use the new network model structure obtained in S41 as the inference network structure and the fine-tuning detection model obtained in S43 as the inference model, read the input frame data and motion feature information, infer the gas leakage position rectangle box and confidence level in the current frame image, compare with the preset threshold, and judge whether infrared gas leakage occurs and the accurate position of the infrared gas leakage.

[0041] Preferably, in step S52,

[0042] According to the actual situation on site, if the leaked gas has a similar color to the background in the infrared video and the confidence threshold is high, then set the threshold 0.4 ≤ threshold ≤ 0.6;

[0043] According to the actual on-site situation, for an infrared video with a relatively low concentration of leaked gas and a relatively slow leakage change, if the confidence threshold is low, then set the threshold as 0.3 ≤ threshold < 0.4.

[0044] The present invention also discloses a background model for gas leakage detection, which is applicable to the above-mentioned visual recognition method for gas leakage detection, and is characterized in that: the model is:

[0045] (1)

[0046] In the formula, is the estimated density, represents the sample set, , represents the background pixel, represents the foreground pixel, represents the number of frames in the sequence obtained forward in the video, is the volume of the hypersphere kernel with a radius of , is the kernel function. If , then , otherwise it is 0; is the diameter of the hypersphere; represents the kernel volume containing the number of samples; the size of the hypersphere diameter is related to the sample size; with the current pixel sample as the center, gradually expand the hypersphere diameter until it contains samples; fix nearest neighbors and take .

[0047] The present invention also relates to a pre-trained weight model for gas leakage detection, which is applicable to the above-mentioned visual recognition method for gas leakage detection, and is characterized in that it includes a network structure composed of two layers of convolution Conv, batch normalization BN, and activation function SiLU spliced with the yolov5 network model structure; one layer is used to input the foreground pixel image, and the other layer is used to input the infrared image. The convolutional features of the foreground pixel image and the infrared image are fused by the Add method in the two-layer network structure and then spliced to the yolov5 network model structure.

[0048] The technical solution provided by this application has at least the following technical effects or advantages:

[0049] 1. By using the background modeling method to extract foreground motion features, combining with the infrared image features, and using the deep learning method to transform and train the network model, the present invention not only retains the time series feature information of the video infrared image, but also has the advantage of the deep learning model to fully mine the spatial features of the infrared image, and improves the model detection efficiency in a parallel manner.

[0050] 2. Few-shot learning is a branch of machine learning that focuses on the ability to learn and predict with a small number of labeled samples. Traditional machine learning and deep learning usually require a large amount of labeled data for training, but in many practical application scenarios, especially in the infrared gas leakage detection scenario, it is difficult and expensive to obtain a large amount of labeled data. In this case, few-shot learning provides an alternative solution.

[0051] 3. The present invention does not rely on a large amount of scenario data. The fused and modified yolov5 network model structure can better retain the motion features between consecutive frames. A large amount of existing data used for pre-training contains many common scenarios, so the pre-trained model obtained by training has strong generalization ability. When used in different project scenarios, only a small amount of data of the current specific scenario needs to be collected for rapid few-shot learning to achieve high accuracy.

[0052] 4. In terms of detection effect, traditional machine learning methods and detection methods that only use deep learning methods can either achieve relatively good results only in a fixed background or a background with very little change, or have very poor detection effects with a large number of false detections and are greatly affected by the environment. This method uses image enhancement technology for image preprocessing, uses background modeling technology to obtain foreground motion images, and then sends the preprocessed images and foreground motion images into the modified yolov5 network model structure for pre-training at the same time. The model obtained by pre-training achieves the effect of fusing motion features, and can simultaneously possess the features of the current frame and the motion features of the previous frame under the condition of very small difference in the picture, and complete the effective identification of the leaked gas.

[0053] 5. This method combines pre-training and few-shot learning to ensure that the detection effect is not affected by scene changes and environmental changes, has good generalization performance, and can always maintain a very high detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is the workflow diagram of the method of the embodiment of the present invention;

[0055] Figure 2 is the network model structure diagram of the method of the embodiment of the present invention;

[0056] Figure 3 , Figure 4 is the effect diagram of the infrared gas leakage actually detected by the present invention in the industrial production task. DETAILED DESCRIPTION OF THE INVENTION

[0057] The present invention first collects infrared gas leakage sample data, performs image frame extraction and annotation on the data. Denoising processing is carried out using bilateral filtering, the contrast of the image is improved through the CLAHE image enhancement technology, and background subtraction is used for background modeling to obtain the moving image of the foreground target. Then, the yolov5 network model structure is modified, and the convolutional features of the infrared image and the foreground moving image obtained previously are fused by the Add method, and a large amount of infrared gas leakage data is used for pre-training to generate a pre-trained weight model. Finally, a small amount of sample data collected in the current application scenario is fed into the modified yolov5 network for Few-Shot fine-tuning training of the model to obtain an infrared gas leakage detection model suitable for the current scenario.

[0058] To better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings of the specification and specific implementation manners.

[0059] Example 1

[0060] This embodiment provides a visual recognition method for gas leakage detection based on motion feature fusion, as Figure 1 shown, including the following steps:

[0061] S1: Acquisition of infrared gas leakage image sample data;

[0062] S2: Frame extraction and positive and negative sample annotation of infrared gas leakage image sample data;

[0063] S3: Image preprocessing to extract the motion features of gas leakage in the image;

[0064] S4: Fuse the annotation data and motion features, based on the yolov5 infrared image detection method, and use a large amount of pre-collected existing infrared gas leakage data sets to generate a pre-trained weight model in advance; on the basis of the pre-trained model, perform Few-Shot learning in the current scenario to obtain a fine-tuned model for infrared gas leakage detection;

[0065] S5: Use the trained model to perform inference testing on the infrared gas leakage video and output the gas leakage prediction result.

[0066] Preferably, in step S1, the acquisition of image sample data includes the following steps:

[0067] S11: Prepare devices such as an infrared camera, a tripod, and a power supply;

[0068] S12: Determine the position and angle of the detection target and set up the infrared camera;

[0069] S13: Start the infrared camera, collect the required infrared video, and save it to a specified location.

[0070] Preferably, in step S2, the extraction and annotation of image sample data include the following steps:

[0071] S21: Perform frame extraction on all infrared gas leakage videos collected by the infrared camera to obtain infrared gas leakage images;

[0072] S22: Use the labelImg tool to draw rectangular box annotations for the leakage gas and confusing backgrounds in all infrared gas leakage images to obtain positive and negative sample annotation data.

[0073] Preferably, in step S3, the image preprocessing and extraction of motion features include the following steps:

[0074] S31: Use opencv image processing technology to perform denoising through bilateral filtering and improve the contrast of the image through CLAHE image enhancement technology;

[0075] S32: Select the first T frames of the video sequence to construct a background model based on the K-Nearest Neighbors (KNN) algorithm. The construction process is as follows:

[0076] (1)

[0077] In the formula, is the estimated density. represents the sample set, . represents the background pixel, represents the foreground pixel, represents the number of frames of the sequence obtained by the video moving forward, is the radius of the volume of the hypersphere kernel. is the kernel function. If , then , otherwise it is 0. is the diameter of the hypersphere. represents the kernel volume the number of samples contained in. The hypersphere diameter is related to the sample size. With the current pixel sample as the center, gradually expand the hypersphere diameter until it contains samples. Fix the number of the nearest neighbors, generally take .

[0078] S33: At time t, the background model can determine whether each new pixel sample x belongs to the background or the foreground. The evaluation process is as follows:

[0079] (2)

[0080] Among them, is the estimated density, is proportional to and is directly proportional to. can be approximated as:

[0081] (3)

[0082] Among them, B is the background model weight vector. At time m, use to represent the foreground of the sample, to represent the background of the sample.

[0083] S34: Update and B. Update by adding the current time sample and eliminating the earliest time sample. Update B by judging whether belongs to the background.

[0084] S35: Through the above foreground detection algorithm based on KNN, a foreground image after removing the background can be obtained, and then the image opening operation is used to remove noise, so as to obtain the motion feature information.

[0085] Preferably, in step S4, the feature fusion and Few-Shot learning include the following steps:

[0086] S41: In order to combine the features extracted from the foreground motion image and the infrared image, this embodiment designs a feature fusion module, as shown in Figure 2 The two leftmost inputs are the foreground motion image and the infrared image respectively. CBS_2 is a network structure composed of 2 layers of convolution Conv, batch normalization BN and activation function SiLU. The convolution features of the two images are fused by the Add method, and then the yolov5 network model structure is spliced behind, so as to form a new network model structure that can receive two parameters of the infrared image and the foreground motion image at the same time;

[0087] S42: Hundreds of thousands of infrared gas leakage data sets collected in advance are processed through the processing in step S2 to obtain the foreground motion image, and the processed in step S3 to obtain the labeled image, and are sent into the new network model structure obtained in S41 at the same time to train and generate a general pre-trained weight model;

[0088] S43: The small amount of sample data collected in the current application scenario is processed and data fused in the same way as the pre-trained data, and is sent into the new network model structure obtained in S41 for Few-Shot fine-tuning training of the model to obtain a detection model suitable for the current scenario;

[0089] S44: During the inference of the detection model, based on the current video frame image, the foreground motion image is calculated in real time, and then the rectangular frame and confidence level of the gas leakage position in the current frame image are inferred. By setting an appropriate threshold (according to the actual situation on site, the threshold range is generally preset between 0.3 and 0.6), it is determined whether infrared gas leakage occurs and the accurate position of the infrared gas leakage.

[0090] Preferably, in step S5, the model inference test includes the following steps:

[0091] S51: Input the infrared gas leakage video, perform frame division processing, perform background subtraction modeling, and extract motion feature information;

[0092] S52: Use the new network structure obtained in step S41 as the inference network structure, and the fine-tuned detection model obtained in step S43 as the inference model. Read the input frame data and motion feature information, infer the rectangular frame and confidence level of the gas leakage position in the current frame image, compare with the preset threshold, and determine whether infrared gas leakage occurs and the accurate position of the infrared gas leakage.

[0093] According to the actual situation on site, for infrared videos where the leaked gas is similar in color to the background, the confidence threshold is relatively high, and the threshold can be set as 0.4 ≤ threshold ≤ 0.6. The detection effect is as shown in the appendix. Figure 3 According to the actual situation on site, for infrared videos where the change of the leaked gas is not obvious (the concentration of the leaked gas is relatively light and the leakage change is relatively slow), the confidence threshold is relatively low, and the threshold can be set as 0.3 ≤ threshold < 0.4. The detection effect is as shown in the appendix. Figure 4 as shown. Figure 3 and Figure 4 indicate that the leaked gas in the device is successfully detected and a rectangular frame is drawn. At the same time, Figure 3 the confidence level of the detection result is relatively high, which can effectively distinguish the background with similar colors and reduce background interference. Figure 4 The gas leakage with slow change can be detected, and a small amount of gas leakage can be effectively detected before the gas leakage range becomes larger, informing the customer to take protective measures in advance to avoid causing large losses.

[0094] The above is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, several improvements can be made without departing from the principle of the present invention, and these improvements should also be regarded as the protection scope of the present invention.

Claims

1. A visual recognition method for gas leak detection based on motion feature fusion, characterized in that: include: Step S1: Collect infrared gas leakage image sample data; Step S2: extracting frames and labeling positive and negative samples of the infrared gas leakage image sample data; Step S3: Image preprocessing, extracting motion features of gas leakage in the image; the specific steps include: S31: Use opencv image processing technology and bilateral filtering to perform denoising, and then use CLAHE image enhancement technology to improve the image contrast; S32: Select the first T frames of the video sequence and construct a background model based on the K-Nearest Neighbors algorithm. The method for constructing the background model is as follows: (1) In the formula, To estimate the density, represents the sample set, , represents background pixels, represents the foreground pixel, T represents the number of sequential frames acquired from the video, V is the volume of the hypersphere kernel with a radius of D / 2, is a kernel function, if ,but , otherwise 0, D is the diameter of the hypersphere, Represents the number of samples contained in the core volume V. The size of the hypersphere diameter D is related to the sample size. With the current pixel sample as the center, the hypersphere diameter D is gradually expanded until it contains samples, fixed nearest neighbors; S33: At time t, the background model can determine whether each new pixel sample x belongs to the background or the foreground. The evaluation process is as follows: (2) in, To estimate the density, represents the estimated density threshold, and and Directly proportional relationship; Approximately: (3) in, is the background model weight vector, at time m, using represents the foreground of the sample, Indicates the background of the sample; S34: Update and ; Update by adding the current time sample and eliminating the oldest time sample , by judging Is it background? Update ; S35: obtaining a foreground image after removing the background through the foreground detection algorithm based on K-Nearest Neighbors, and then removing noise through an image opening operation to obtain motion feature information; Step S4: Fusing the annotated data and motion features, based on the YOLOv5 infrared image detection method, a large number of pre-collected infrared gas leakage data sets are used to train and generate a pre-trained weight model; based on the pre-trained weight model, Few-Shot learning of the current scene is performed to obtain a fine-tuning model for infrared gas leakage detection; Step S5: Use the trained fine-tuning model for infrared gas leakage video inference test and output the gas leakage prediction result.

2. The method for visual identification of gas leakage detection based on motion feature fusion according to claim 1 is characterized in that: In step S2, the frame extraction and labeling of the infrared gas leakage image sample data includes the following steps: S21: performing frame extraction processing on all infrared gas leakage videos collected by the infrared camera to obtain infrared gas leakage images; S22: Use the labelImg tool to draw and annotate all infrared gas leakage images with rectangular boxes of leaking gas and easily confused background to obtain positive and negative sample annotation data.

3. The method for visual identification of gas leakage detection based on motion feature fusion according to claim 1 is characterized in that: The step S4 comprises: S41: The convolution features extracted from the foreground motion image and the infrared image are fused into a two-layer network structure consisting of convolution Conv, batch normalization BN and activation function SiLU by adding, and then the yolov5 network model structure is spliced ​​to form a new network model structure that can simultaneously receive two parameters of the infrared image and the foreground motion image; S42: several infrared gas leakage data sets collected in advance are processed in step S2 to obtain foreground motion images, and processed in step S3 to obtain labeled images, and are simultaneously sent to the new network model structure described in step S41 to train and generate a universal pre-trained weight model; S43: A small amount of sample data collected for the current application scenario is subjected to the same data processing and data fusion method as the pre-trained data in step S42, and then sent to the new network model structure described in step S41 to perform Few-Shot fine-tuning training of the model to obtain a fine-tuned detection model suitable for the current scenario.

4. The method for visual identification of gas leakage detection based on motion feature fusion according to claim 3 is characterized in that: In step S5, the model is subjected to inference testing, including the following steps: S51: Input the infrared gas leakage video, perform frame processing, perform background subtraction modeling, and extract motion feature information; S52: Use the new network model structure obtained in S41 as the inference network structure, and the fine-tuned detection model obtained in S43 as the inference model, read the input frame data and motion feature information, infer the gas leakage position rectangle and confidence in the current frame image, compare with the preset threshold, and determine whether infrared gas leakage occurs and the exact position of the infrared gas leakage.

5. The method for visual identification of gas leakage detection based on motion feature fusion according to claim 4 is characterized in that: In step S52, According to the actual situation on site, if the infrared video with leaking gas and background color is similar, the confidence threshold is high, so the threshold is set to 0.4≤threshold≤0.6; According to the actual situation on site, if the concentration of leaked gas is relatively low and the leak changes slowly in the infrared video, the confidence threshold is low, so the threshold is set to 0.3≤threshold<0.

4.

6. A gas leak detection background model, applicable to the gas leak detection visualization identification method according to any one of claims 1 to 5, characterized in that: The model is: (1) In the formula, To estimate the density, represents the sample set, , represents background pixels, represents the foreground pixel, T represents the number of sequential frames acquired from the video, V is the volume of the hypersphere kernel with radius D / 2, is a kernel function, if ,but , otherwise 0; D is the diameter of the hypersphere; represents the number of samples contained in the core volume V; the size of the hypersphere diameter D is related to the sample size; with the current pixel sample as the center, the hypersphere diameter D is gradually expanded until it contains samples; fixed nearest neighbors, take .

7. A pre-trained weight model for gas leak detection, applicable to the gas leak detection visualization identification method according to any one of claims 1 to 5, characterized in that: The method comprises two layers of network structures consisting of convolution Conv, batch normalization BN and activation function SiLU, and splicing the yolov5 network model structure; one layer is used to input a foreground pixel image, and the other layer is used to input an infrared image. The two-layer network structure fuses the convolution features of the foreground pixel image and the infrared image by Add and splices them into the yolov5 network model structure.

Citation Information

Patent Citations

  • Faster R-CNN-based VOCs gas leakage detection method and system, storage medium and equipment

    CN113963154A

  • Infrared image gas leakage and liquid leakage detection method and system based on deep learning

    CN114627052A