Search

CN-122023304-A - Methane gas infrared image segmentation detection method based on improved YOLOv-seg

CN122023304ACN 122023304 ACN122023304 ACN 122023304ACN-122023304-A

Abstract

The invention discloses a methane gas infrared image segmentation detection method based on an improvement YOLOv-seg, and aims to solve the problems of low segmentation accuracy and low detection speed in the existing invisible methane gas infrared image segmentation detection. The method comprises the steps of firstly improving a backbone network of a YOLOv-seg algorithm model, replacing an original C2PSA module with a C2PSAiEMA module fused with a iEMA attention mechanism, enhancing the capability of the model for extracting methane gas infrared image characteristic information, secondly optimizing a neck network of the model, adopting a Slim-neg structure to replace the original neck network, reducing the calculation data amount of the model and accelerating the detection speed, finally acquiring a methane gas infrared image by using an infrared camera in a laboratory to manufacture a dataset, expanding the dataset by using image enhancement methods such as contrast enhancement, noise addition and the like, and improving the segmentation performance of the model.

Inventors

  • JIANG ZHENGLIANG
  • LI XINGBO
  • FAN YONGJIE
  • TAO ZHE
  • YANG CHUNFENG

Assignees

  • 昆明理工大学

Dates

Publication Date
20260512
Application Date
20260122

Claims (8)

  1. 1. An infrared image segmentation detection method for methane gas based on improvement YOLOv-seg, which is characterized by comprising the following steps: S1, constructing and expanding a data set, namely acquiring methane gas infrared images with certain concentration and background containing portrait interference through a laboratory infrared camera to form an initial data set, expanding the initial data set by adopting an image enhancement method for enhancing contrast and adding noise to obtain a final data set, and dividing the final data set into a training set, a verification set and a test set according to a certain proportion; S2, constructing an improved YOLOv-seg model, namely improving a main network and a neck network of the model based on the YOLOv11-seg model to obtain an improved YOLOv11-seg model; S21, improving a backbone network, namely replacing a C2PSA module in a YOLOv-seg model backbone network with a C2PSAiEMA module, wherein the C2PSAiEMA module introduces a iEMA attention module into a PSABlock structure of an original C2PSA module, reserves an input-output channel processing and multi-branch feature fusion basic structure of the original C2PSA module for channel expansion and compression through convolution, optimizes feature distribution of an input infrared image through iEMA normalization pretreatment, adopts deep separable convolution for dimension reduction and dynamically adjusts channel weight by combining an extrusion excitation method; S22, neck network improvement, namely replacing a neck network of a YOLOv11-seg model with a Slim-neg structure, wherein the Slim-neg structure is composed of a GSConv module and a VoV-GSCSP module, an GSConv module divides input features into two paths of parallel processing, one path is used for reserving dense connection among channels through standard convolution, the other path is used for reducing calculated amount through depth separable convolution and generating space sparse features, and feature fusion is realized through uniform channel shuffling after two paths of output splicing; S3, model training and testing, namely setting training parameters of the improved YOLOv-seg model, training the improved YOLOv-seg model by using the training set obtained in the step S1, adjusting the model parameters by using the verification set, performing performance test on the trained model by using the testing set, and outputting a segmentation detection result of the methane gas infrared image.
  2. 2. The method for detecting methane gas infrared image segmentation based on the improvement YOLOv-seg according to claim 1, wherein in S21, the specific working procedure of the iEMA attention module includes: s211, expanding the input characteristic channel through 1X 1 convolution to form a high-dimensional characteristic space; S212, grouping, namely dividing the normalized feature map into 32 groups according to channels to perform independent calculation; S213, feature compression, namely adopting depth separable convolution to reduce the dimension of the grouped features, and dynamically adjusting the channel weight by combining an extrusion excitation method.
  3. 3. The method for detecting the segmentation of the methane gas infrared image based on the improvement YOLOv-seg according to claim 1, wherein in S21, a iEMA attention module in the C2PSAiEMA module works cooperatively with a feed-forward neural network FNN, a iEMA attention module focuses on features through a spatial channel attention mechanism, the FNN enhances iEMA focused features through feature transformation, and key information is recovered through dimension increase and dimension reduction when iEMA loses details.
  4. 4. The method for detecting methane gas infrared image segmentation based on the improvement YOLOv-seg according to claim 1, wherein in the step S22, the specific structure of the GSConv module comprises a convolution layer, a deep convolution layer, a splicing layer and a channel random arrangement layer, input features are processed through the convolution layer, the number of output channels is C2/2, each channel is independently convolved through the deep convolution layer, the convolution layer and the output of the deep convolution layer are spliced through the splicing layer, and finally feature channels are rearranged through the channel random arrangement layer, so that a feature map with C2 channels is output.
  5. 5. The method for detecting the segmentation of the infrared image of the methane gas based on the improvement YOLOv-seg according to claim 1, wherein in the step S22, the VoV-GSCSP module comprises a GS bottleneck module, and the GS bottleneck module is constructed based on GSConv and is used for improving the nonlinear expression and the information multiplexing capability of the feature.
  6. 6. The method for detecting methane gas infrared image segmentation based on the improvement YOLOv-seg according to claim 1, wherein in S1, the final dataset contains 2000 methane gas infrared images, wherein training set 1400, validation set 300 and test set 300.
  7. 7. The method for detecting the segmentation of the methane gas infrared image based on the improvement YOLOv-seg according to claim 1, wherein in the step S3, a BOX-mAP of average precision of detection frame, MASK-mAP of average precision of MASK-mAP, parameter Parameters, model Size and detection speed FPS are used as Model performance evaluation indexes.
  8. 8. The method for detecting methane gas infrared image segmentation based on the improvement YOLOv-seg according to claim 1, wherein the hardware environment for model training and testing is CPU model i7-14650HX, GPU model NVIDIA RTX 4060, CUDA version 11.8, operating system Windows 11 and software environment Pytorch 2.0.0,Python 3.9.0.

Description

Methane gas infrared image segmentation detection method based on improved YOLOv-seg Technical Field The invention relates to the technical field of infrared image processing and target detection, in particular to a methane gas infrared image segmentation detection method based on an improved YOLOv-seg, which is suitable for real-time monitoring of invisible methane gas leakage in industrial scenes. Background With the rapid development of industrial automation, potential safety hazards caused by leakage of chemicals and industrial gases are increasingly prominent, wherein methane gas is used as common industrial gas, has inflammable and explosive characteristics, and timely and accurately detecting the leakage condition is important to guaranteeing industrial production safety. Traditional methane gas detection techniques rely primarily on sensor monitoring or manual inspection. The sensor detection method has the advantages of slow response time, difficulty in capturing the initial state of gas leakage, limited resolution capability on complex gas components due to the influence of the performance and the use environment of the sensor on the detection precision, low efficiency, strong subjectivity and incapability of realizing all-weather monitoring when in manual inspection. In recent years, a target detection technology based on deep learning provides a new direction for gas monitoring, wherein an infrared camera can realize non-contact and large-range invisible dangerous gas detection by combining a target detection algorithm. Compared with target level detection, the image segmentation detection can more accurately position an infrared small target through pixel-by-pixel classification, but most of the existing image segmentation algorithms (such as YOLOv-seg, MASK-RCNN, SOLOv2 and the like) have the problems of low segmentation accuracy, low detection speed and large parameter quantity, and are difficult to deploy to edge equipment when processing a methane gas infrared image with low contrast and weak edge, and cannot meet the requirements of real-time and accurate monitoring in industrial scenes. Therefore, a method for improving the accuracy and the detection speed of the methane gas infrared image segmentation is needed. . Disclosure of Invention The invention aims to solve the technical problems that the segmentation accuracy is low, the detection speed is low, and the number of model parameters is large, which is not beneficial to the deployment of edge equipment in the existing invisible methane gas infrared image segmentation detection. In order to achieve the aim, the invention provides a methane gas infrared image segmentation detection method based on improvement YOLOv-seg, which comprises the following steps: S1, data set construction and expansion, namely taking the fact that the existing public data set lacks methane gas infrared images containing portrait interference into consideration, acquiring methane gas infrared images with a certain concentration of 120ml and a background containing portrait interference through a laboratory infrared camera to form an initial data set, expanding the initial data set by adopting an image enhancement method for enhancing contrast (such as histogram equalization and gamma correction) and adding noise (such as Gaussian noise and spiced salt noise) to avoid model overfitting, and finally forming a data set containing 2000 images, dividing the data set into 1400 training sets, 300 verification sets and 300 test sets according to the proportion of 7:1.5:1.5, and providing data support for model training and performance verification. S2, constructing an improved YOLOv-seg model, namely, based on the YOLOv-seg model, respectively improving a main network and a neck network to obtain an improved YOLOv-seg model aiming at the problems of insufficient feature extraction capability and large calculation amount in methane gas infrared image segmentation; S21, improving a backbone network, namely replacing a C2PSA module in a YOLOv-seg model backbone network with a C2PSAiEMA module, wherein the C2PSAiEMA module introduces a iEMA attention module into a PSABlock structure of an original C2PSA module, reserves an input-output channel processing and multi-branch feature fusion basic structure of the original C2PSA module for channel expansion and compression through convolution, optimizes feature distribution of an input infrared image through iEMA normalization pretreatment, adopts deep separable convolution for dimension reduction and dynamically adjusts channel weight by combining an extrusion excitation method; S22, neck network improvement, namely replacing a neck network of a YOLOv11-seg model with a Slim-neg structure, wherein the Slim-neg structure is composed of a GSConv module and a VoV-GSCSP module, an GSConv module divides input features into two paths of parallel processing, one path is used for reserving dense connection among channels through stand