Valve pit gas leakage detection system based on image region segmentation
By employing a multimodal feature fusion and semantically guided segmentation mechanism, the problem of poor feature stability and false leak detection caused by uneven illumination, water vapor interference, and varying viewing angles in valve well gas leak detection is solved. This enables accurate gas leak identification and automated monitoring, improving the system's adaptability and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies for detecting gas leaks in valve wells suffer from problems such as poor feature stability, misjudgment of false leak areas, and insufficient adaptability of traditional segmentation algorithms due to uneven illumination, water vapor interference, complex backgrounds, and changing viewing angles.
Employing a multimodal feature fusion and semantically guided segmentation mechanism, this system achieves accurate leakage area identification and localization in complex environments through image acquisition, preprocessing, multi-scale feature extraction, semantic segmentation network, and pseudo-leakage suppression module.
It improves image quality, enhances semantic understanding of complex backgrounds, reduces false alarm rates, achieves fully automated monitoring, and provides reliable safety assurance for gas pipeline networks.
Smart Images

Figure CN121391880B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of image data processing, and particularly relates to a valve well gas leakage detection system based on image region segmentation. BACKGROUND
[0002] Computer vision technology plays an increasingly important role in industrial safety monitoring, which realizes the automatic perception of equipment state and environmental abnormalities through image analysis and pattern recognition. Vision-based gas leakage detection is a key technology for ensuring the safe operation of urban underground pipe networks. This technology aims to automatically identify and locate gas leakage caused by pipe corrosion or loose joints by analyzing the internal images of valve wells, thereby timely warning and eliminating safety hazards.
[0003] Existing technologies mainly use color segmentation based on fixed thresholds or traditional edge detection algorithms to extract suspected leakage areas. However, these methods face serious challenges in this specific application scenario of valve wells. Image acquisition is affected by uneven lighting, water vapor diffusion, and complex background structures, resulting in poor feature stability. Traditional segmentation algorithms are sensitive to threshold selection and lack semantic understanding, making it difficult to distinguish between false leakage areas caused by water reflection, oil stains, or equipment rust and real gas accumulation areas.
[0004] In addition, the narrow space and limited shooting angle of the well make the imaging angle variable, further exacerbating the lack of adaptability of traditional methods in feature extraction and area discrimination.
[0005] Therefore, under complex valve well environments, it is a technical problem to be solved in this field to achieve accurate segmentation and reliable identification of leakage areas. SUMMARY
[0006] The technical problem to be solved by the present application is to overcome the defects of poor feature stability, false leakage area misjudgment, and lack of adaptability of traditional segmentation algorithms caused by uneven lighting, water vapor interference, complex background, and variable viewing angles in valve well gas leakage detection. A valve well gas leakage detection system based on image region segmentation is provided. This system realizes accurate identification and positioning of real leakage areas in complex environments by constructing a multi-modal feature fusion and semantic guided segmentation mechanism.
[0007] The valve well gas leakage detection system based on image region segmentation provided by the present application includes an image acquisition module, a preprocessing and enhancement module, a multi-scale feature extraction module, a semantic segmentation network module, a false leakage suppression module, and a decision output module.
[0008] The image acquisition module is used to acquire visible light images and near-infrared images inside the valve well and complete spatio-temporal registration.
[0009] The pre-processing and enhancement module performs illumination compensation and fog removal on the registered images, and uses an adaptive contrast enhancement algorithm to improve the local detail visibility of the images.
[0010] The multi-scale feature extraction module receives the pre-processed image data, extracts the texture features, color distribution features and edge gradient features of the image through parallel convolution paths respectively, and fuses the feature maps of different scales across channels.
[0011] The semantic segmentation network module is based on an encoder-decoder architecture, and its encoder part uses deep separable convolution layers to downsample and semantically abstract the fused multi-scale features. The decoder part gradually restores the spatial resolution through skip connection and upsampling operation and outputs the pixel-level segmentation probability map.
[0012] The pseudo-leakage suppression module receives the segmentation probability map and the texture features output by the multi-scale feature extraction module, and performs secondary discrimination on suspected leakage areas by calculating regional texture consistency metrics and dynamic shape constraint functions to filter out false targets caused by water reflection or device rust.
[0013] The decision output module integrates the output results of the semantic segmentation network module and the pseudo-leakage suppression module. When an area is judged as a leakage and passes the pseudo-leakage check, a leakage alarm signal is generated and the leakage area coordinates are marked.
[0014] Further, the image acquisition module includes two synchronously triggered industrial cameras, each equipped with a visible light filter and a near-infrared filter, mounted on a waterproof gimbal pre-installed on the valve well side wall. The waterproof gimbal has a built-in high-precision level and angle locking mechanism, supporting ±0.1° fine adjustment. After installation, the optical axis angle is fixed by mechanical limiting to prevent offset caused by underground vibration. The camera optical axis angle is less than 15° to ensure that the field of view overlap rate is higher than 90%. The image resolution is set to 1920×1080 pixels, and the frame rate is configured to 5fps.
[0015] Further, the illumination compensation performed by the pre-processing and enhancement module uses a multi-scale illumination estimation method based on the Retinex theory. The image brightness component is decomposed by a Gaussian difference pyramid, and the local illumination distribution is estimated, and then the original image is normalized.
[0016] The fog removal processing uses the dark channel prior algorithm combined with guided filter optimization. The atmospheric light value is determined by the average value of the 0.1% brightest pixels in the image, and the transmittance map is smoothed by guided filter and used for image defogging.
[0017] The adaptive contrast enhancement algorithm dynamically adjusts the contrast gain coefficient of each pixel by calculating the local standard deviation and mean value in the neighborhood of the pixel. The gain coefficient is negatively correlated with the local standard deviation.
[0018] Further, the multi-scale feature extraction module contains 3 parallel convolution paths, corresponding to 3x3, 5x5 and 7x7 kernel sizes respectively, each path consisting of 2 convolution layers and 1 batch normalization layer, followed by a ReLU activation function.
[0019] After the feature maps of different scales are extracted through the convolution paths, they are weighted and fused through a channel attention mechanism, and the channel attention weights are calculated by a global average pooling layer and 2 fully connected layers. The final output is a fused feature map with 256 channels.
[0020] Further, the encoder part of the semantic segmentation network module contains 4 down-sampling stages, each consisting of 2 depthwise separable convolution layers and 1 max-pooling layer. The depthwise separable convolution layer uses a 3x3 kernel, and the pooling window size is 2x2.
[0021] The decoder part corresponds to 4 up-sampling stages, each of which enlarges the spatial size of the feature map by 2 times through bilinear interpolation, and then concatenates the channels with the feature map of the corresponding stage of the encoder through a skip connection. The concatenated feature map is reduced in dimension by a 1x1 convolution and then output.
[0022] The final layer of the network uses a Softmax activation function to generate probability values for each pixel belonging to the leakage area or the non-leakage area.
[0023] Further, the texture consistency measure of the pseudo-leakage suppression module is realized by calculating the contrast and correlation features of the gray level co-occurrence matrix within the suspected area. The contrast feature reflects the texture clarity of the area, and the correlation feature reflects the texture direction consistency. When the area contrast is less than the threshold of 0.2 or the correlation is higher than the threshold of 0.8, it is determined as a pseudo-leakage.
[0024] The dynamic shape constraint function is constructed based on the curvature variation and the area-perimeter ratio of the region boundary. The real leakage area usually presents an irregular cloud shape with a gentle curvature variation, while the water reflection area often presents a high-curvature sharp corner or an approximate circle. By joint discrimination of the curvature standard deviation and the area-perimeter ratio, pseudo-targets with abnormal shapes are filtered out.
[0025] Further, the decision output module receives the binary segmentation map output by the semantic segmentation network module and the verification mask generated by the pseudo-leakage suppression module, and performs a logical AND operation on the two. Only the areas that exist in both maps are retained as the final leakage area. The system then calculates the centroid coordinates and the bounding box of the leakage area. The system triggers the leakage alarm under the following conditions: the area of the same region is greater than 1000 pixels for 3 consecutive frames; the area of the same region shows an increasing trend for 5 consecutive frames (the area growth rate of each frame is greater than or equal to 10%), and the area of the final frame is greater than or equal to 500 pixels (covering the initial small-area diffusion scenario of the leakage). The alarm signal is uploaded to the monitoring center through the 4G communication module.
[0026] Compared with the prior art, the present application has the beneficial effects that:
[0027] 1. The present application overcomes the problem of image quality degradation caused by uneven lighting and water vapor interference in the valve well by constructing a multi-modal image acquisition and multi-scale feature fusion mechanism. The combination of visible light and near-infrared dual-band imaging with an adaptive enhancement algorithm improves the image detail retention capability in low light and foggy environments. The multi-scale parallel convolution path and channel attention weighting fusion ensure the completeness of feature expression in different size leakage areas, laying a solid foundation for subsequent accurate segmentation.
[0028] 2. The present application uses a semantic segmentation network with an encoder-decoder architecture, which reduces computational complexity through depth separable convolution and preserves spatial detail information through jump connection, achieving pixel-level leakage area segmentation. This network structure not only improves the semantic understanding ability of complex backgrounds, but also learns leakage feature expression in the valve well scene through end-to-end training, which is superior to traditional threshold-based segmentation methods.
[0029] 3. The present application innovatively introduces a pseudo-leakage suppression module, which distinguishes between real gas accumulation and pseudo-targets such as water reflection and oil contamination through a dual-discrimination mechanism of texture consistency measurement and dynamic shape constraint. This module performs secondary verification from two dimensions of texture characteristics and morphological features, significantly reducing the system false positive rate and solving the problem of specificity deficiency in complex underground environments.
[0030] 4. The entire system of the present application adopts modular design, and the modules are coupled through standardized data interfaces, with good scalability and engineering deployment convenience. From image data acquisition to image data processing, the whole process of automatic processing from image acquisition to decision output can be realized without human intervention, providing reliable technical support for the safe operation of urban underground gas pipeline network. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 is the overall technical scheme architecture diagram of the valve well gas leakage detection system based on image region segmentation proposed by the present application;
[0032] Figure 2 is the core principle framework diagram of the multi-modal feature fusion and semantic guided segmentation mechanism in the present application;
[0033] Figure 3 is the logic flow framework diagram of the pre-processing and enhancement module in the present application;
[0034] Figure 4is a multi-level interaction relationship and data flow diagram of the multi-scale feature extraction module and the semantic segmentation network module in the application;
[0035] Figure 5 is a joint processing flow framework diagram of the pseudo leakage suppression module and the decision output module in the application; DETAILED DESCRIPTION
[0036] Please refer to the attached Figures 1 to 5 The embodiment details the specific technical implementation of the valve well gas leakage detection system based on image region segmentation. The system is composed of an image acquisition module, a preprocessing and enhancement module, a multi-scale feature extraction module, a semantic segmentation network module, a pseudo leakage suppression module, and a decision output module connected in series. The processing results are transmitted between the modules through standardized data interfaces to ensure efficient data flow and logical consistency in the system.
[0037] The image acquisition module is responsible for acquiring dual-band image data inside the valve well. The module includes two industrial-grade cameras triggered synchronously, which are installed on waterproof gimbals on the side wall of the valve well. The waterproof gimbals have built-in high-precision levels and angle locking mechanisms, supporting ±0.1° fine adjustment. After installation, the optical axis angle is fixed by mechanical limiting to prevent offset caused by underground vibration.
[0038] One of the cameras is configured with a visible light filter, and the other is configured with a near-infrared filter. The optical axis angle of the two is controlled within 15° to ensure that the field of view overlap rate is higher than 90%. The camera image resolution is fixed at 1920×1080 pixels, and the frame rate is set to 5fps.
[0039] During image acquisition, the dual cameras achieve microsecond-level synchronous exposure through hardware trigger signals. The collected visible light and near-infrared images are time and space registered, and output as aligned multi-modal image pairs.
[0040] The time and space registration uses an affine transformation algorithm based on feature points. First, the scale-invariant feature transform descriptor is extracted from the dual images, then the transformation matrix is estimated by the random sample consensus algorithm, and finally the near-infrared image is mapped to the visible light image coordinate system.
[0041] The preprocessing and enhancement module receives the registered multi-modal image pairs and performs illumination compensation, fog removal, and adaptive contrast enhancement operations.
[0042] The module first converts the visible light image to the hue saturation lightness color space, and extracts the lightness component as the basis for illumination estimation.
[0043] The illumination compensation adopts a multi-scale illumination estimation method based on the Retinex theory, and the luminance component is decomposed in multiple scales by constructing a Gaussian difference pyramid. The Gaussian kernel size is set to 5, 15 and 30 respectively to estimate the illumination distribution at different scales.
[0044] The illumination component at each scale is obtained by convolution calculation, and then the original luminance component is normalized pixel by pixel to eliminate local shadows and overexposed areas.
[0045] The haze removal process is based on the dark channel prior algorithm. First, the dark channel map of the visible light image is calculated, and the dark channel is defined as the minimum value of the three channels in the neighborhood of each pixel, and the neighborhood size is set to 15x15 pixels.
[0046] The atmospheric light value is selected as the average value of the original image region corresponding to the 0.1% brightest pixels in the dark channel map. The transmittance map is preliminarily estimated by the ratio of the dark channel to the atmospheric light value, and then optimized and smoothed by guided filtering.
[0047] The guided filtering takes the luminance component of the original image as the guide image, the filtering radius is set to 60 pixels, and the regularization parameter is set to 0.001. The image after haze removal is reconstructed by the transmittance map and the atmospheric light value.
[0048] The adaptive contrast enhancement is implemented for the image after haze removal. This algorithm is based on the statistical properties of local images, and calculates the mean and standard deviation of gray values in a 31x31 neighborhood around each pixel. The gain coefficient is dynamically adjusted according to the local standard deviation, and the specific calculation formula is:
[0049] ;
[0050] where G(x, y) is the gain coefficient, σglobal is the global standard deviation, and σlocal(x, y) is the local standard deviation. The global standard deviation is the average of the standard deviation values of the entire image, and the local standard deviation is the statistical quantity in the neighborhood of the current pixel. The gain coefficient is negatively correlated with the local standard deviation, and the low texture area obtains a higher enhancement amplitude. The final enhanced image is obtained by multiplying the original pixel value and the gain coefficient.
[0051] The multi-scale feature extraction module receives the preprocessed dual-band image and extracts multi-scale features in parallel. This module contains 3 independent convolution paths, which use 3x3, 5x5 and 7x7 convolution kernel sizes respectively. Each path is composed of 2 convolution layers, 1 batch normalization layer and ReLU activation function in sequence. The output channel number of the first layer convolution is set to 64, and the output channel number of the second layer convolution is increased to 128.
[0052] The feature maps output by different convolution paths are fused by a channel attention mechanism. The calculation process of the channel attention weight is as follows: first, global average pooling is performed on each channel to compress the spatial features into a channel description vector; then, the inter-channel dependency is learned through two fully connected layers. The first fully connected layer compresses the channel number to 1 / 4 of the original channel number, and the second fully connected layer restores to the original channel number; finally, the weight coefficients of each channel are generated by a Sigmoid function.
[0053] The channel number of the fused feature map is 256, and the spatial size remains consistent with the input image.
[0054] The semantic segmentation network module is based on an encoder-decoder architecture, and the input is the fused feature map output by the multi-scale feature extraction module.
[0055] The encoder part includes 4 down-sampling stages, each of which consists of 2 deep separable convolution layers and 1 max pooling layer. The deep separable convolution uses a 3x3 convolution kernel, followed by a point-wise convolution. The output channel number of the point-wise convolution is set to 128, 256, 512, and 1024, respectively. The max pooling layer uses a 2x2 window with a step size of 2, and the spatial size of the feature map is halved every stage. The decoder part corresponds to 4 up-sampling stages, each of which enlarges the spatial size of the feature map by 2 times through bilinear interpolation.
[0056] The up-sampled feature map is concatenated with the feature map transmitted by the corresponding stage of the encoder through a jump connection. The channel number after concatenation is 1152, 768, 384, and 192, respectively. The concatenated feature map is reduced in dimension by a 1x1 convolution, and the output channel number is halved. The final layer of the network uses a Softmax activation function to generate the probability value of each pixel belonging to the leakage region or the non-leakage region. The probability map is binarized by a threshold of 0.5 to obtain the initial segmentation mask.
[0057] The pseudo-leakage suppression module receives the binarized segmentation mask output by the semantic segmentation network module and the texture feature map in the multi-scale feature extraction module.
[0058] This module performs a second discrimination on the suspected leakage region through texture consistency measurement and a dynamic shape constraint function. Texture consistency measurement is based on the calculation of a gray level co-occurrence matrix. First, the texture block corresponding to the suspected region is extracted from the texture feature map, and the texture block size is fixed at 16x16 pixels.
[0059] The gray level co-occurrence matrix is constructed along 0°, 45°, 90°, and 135° directions with a pixel spacing of 1.
[0060] The contrast feature is calculated by the product of the matrix elements and their position weight, and the correlation feature is calculated by the normalized value of the product of the matrix elements and the mean.
[0061] When the area contrast is less than the threshold 0.2 or the correlation is higher than the threshold 0.8, the area is determined as a water reflection or rust false target.
[0062] The dynamic shape constraint function is constructed based on the geometric characteristics of the region. First, the boundary pixel sequence of the suspected region is extracted, and the boundary curvature is calculated by the angle between the vectors formed by adjacent boundary points.
[0063] The curvature standard deviation reflects the degree of boundary fluctuation, and the curvature standard deviation of the real leakage region is usually less than 0.15.
[0064] The area perimeter ratio is calculated by the ratio of the number of region pixels to the number of boundary pixels, and the area perimeter ratio of circular false target is usually higher than 0.25.
[0065] When the region meets the curvature standard deviation ≤0.15 and the area perimeter ratio ≤0.25 at the same time, based on the statistical analysis of 5000 groups of valve well field collected images (including 3000 groups of real gas leakage samples and 2000 groups of false leakage samples), it is found that 92% of the real leakage samples meet the joint condition, and only 3% of the false leakage samples meet the condition.
[0066] The decision output module integrates the processing results of the semantic segmentation network module and the false leakage suppression module. First, the logical AND operation is performed on the binary segmentation mask and the false leakage check mask, and only the region marked in both masks is retained as the final leakage region.
[0067] Then the centroid coordinates and the minimum bounding rectangle of the leakage region are calculated.
[0068] The centroid coordinates are calculated by the arithmetic mean of all pixel coordinates of the region, and the bounding box is determined by the extreme points of the region. The system continuously monitors the area of the leakage region in consecutive frames, and the system triggers the leakage alarm when one of the following conditions is met: the area of the same region is greater than 1000 pixels for 3 consecutive frames; the area of the same region shows an increasing trend (the area growth rate of each frame is ≥10%) for 5 consecutive frames, and the area of the final frame is ≥500 pixels (covering the initial small area diffusion scenario of leakage).
[0069] The alarm signal contains the coordinates, area and confidence of the leakage region, which is packaged as a JSON format data packet through the 4G communication module and uploaded to the remote monitoring center in real time. After receiving the data, the monitoring center marks the leakage position on the electronic map and starts the emergency response process.
[0070] In this embodiment, the modules of the system are implemented using Python and the TensorFlow framework, and the model training data includes 5000 groups of valve well field collected images and synthesized leakage samples. During training, the Adam optimizer is used, the initial learning rate is set to 0.001, the batch size is set to 16, and the loss function uses the weighted sum of cross-entropy and Dice coefficient. The system is deployed on an embedded edge computing device, with an average processing delay of 180 ms, including the time consumed by image preprocessing, feature extraction, semantic segmentation, pseudo-leakage suppression, and decision output. The total process time does not include image acquisition and data transmission time, meeting the real-time monitoring requirements.
[0071] This embodiment provides an alternative implementation of a valve well gas leakage detection system based on image region segmentation, focusing on the optimization variants of the multi-scale feature extraction module and the pseudo-leakage suppression module. In the multi-scale feature extraction module, a dilated convolution path is introduced to replace the original large convolution kernel path. The dilated convolution path uses a 3x3 convolution kernel with expansion rates of 2, 4, and 6, corresponding to receptive field ranges equivalent to 5x5, 9x9, and 13x13 standard convolutions. Each dilated convolution path contains 2 convolution layers, with the first layer outputting 64 channels and the second layer outputting 128 channels.
[0072] In the feature fusion stage, both channel attention and spatial attention mechanisms are used. Spatial attention generates a two-dimensional weight map through a convolution layer, highlighting the salient regions in the feature map.
[0073] The pseudo-leakage suppression module enhances the temporal analysis capability in this embodiment by calculating the region stability index for 5 consecutive images. Region stability is evaluated by the overlap rate and shape change rate between adjacent frames. The overlap rate is defined as the ratio of the intersection area to the union area between two frames, and the shape change rate is calculated by the difference in Hu moments. Real leakage regions usually exhibit gradual diffusion characteristics, with an overlap rate above 0.7 and a shape change rate less than 0.1.
[0074] In addition, the texture consistency measure introduces the histogram of oriented gradients (HOG) feature to calculate the distribution entropy of gradient directions within the suspected region. The gradient direction distribution of real leakage regions is relatively uniform, with an entropy value higher than 2.5, while the gradient direction of regular pseudo-targets is concentrated, with an entropy value usually less than 1.8.
[0075] The decision output module integrates a confidence calibration mechanism in this embodiment, which calibrates the probability map output by the semantic segmentation network through temperature scaling, improving the reliability of the probability values. The calibration model uses the Platt scaling method to learn the scaling parameters on the validation set, with a temperature parameter set to 1.2.
[0076] The calibrated probability value is weighted and fused with the output of the pseudo-leakage suppression module, and the weight is dynamically adjusted according to the accuracy of each module on historical data. The final leakage judgment threshold is adaptively adjusted according to the ambient light condition. When the light is sufficient, the threshold is raised to 0.6, and when the light is low, the threshold is reduced to 0.4, to balance the recall rate and the precision rate.
[0077] The system of the embodiment adopts a curriculum learning strategy in the training stage, is pre-trained on synthetic data first, and gradually introduces difficult samples in real scenes. The optimizer adopts a stochastic gradient descent, the momentum is set to 0.9, and the learning rate is decayed according to a cosine annealing strategy. Model quantization technology is used when the system is deployed, converting floating-point weights to 8-bit integers, improving inference speed and reducing memory usage.
[0078] It should be noted that, in this article, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device.
[0079] Although embodiments of the present application have been shown and described, it will be understood by those having ordinary skill in the art that various changes, modifications, substitutions and alterations can be made hereto without departing from the principles and spirit of the present application, and the scope of the present application is defined by the appended claims and their equivalents.
Claims
1. A valve well gas leak detection system based on image region segmentation, characterized in that, include: The image acquisition module is used to acquire visible light and near-infrared images of the valve well and perform spatiotemporal registration. The preprocessing and enhancement module is used to perform illumination compensation and fog removal on the registered image, and to improve the visibility of local details in the image using an adaptive contrast enhancement algorithm. The multi-scale feature extraction module receives preprocessed image data, extracts texture features, color distribution features, and edge gradient features of the image through parallel convolutional paths, and fuses feature maps of different scales across channels. The semantic segmentation network module is built on an encoder-decoder architecture. Its encoder part uses depthwise separable convolutional layers to downsample and semantically abstract the fused multi-scale features, while the decoder part gradually restores the spatial resolution and outputs a pixel-level segmentation probability map through skip connections and upsampling operations. The pseudo-leakage suppression module receives the texture features output by the segmentation probability map and the multi-scale feature extraction module. It performs secondary discrimination on suspected leak areas by calculating the regional texture consistency metric and dynamic shape constraint function, and filters out pseudo targets caused by water reflection or equipment corrosion. The decision output module integrates the output results of the semantic segmentation network module and the pseudo-leakage suppression module. When a region is simultaneously determined to be a leak and passes the pseudo-leakage verification, a leak alarm signal is generated and the location coordinates of the leak region are marked. The image acquisition module includes two synchronously triggered industrial cameras, each equipped with a visible light filter and a near-infrared filter, and is mounted on a waterproof pan-tilt unit pre-installed on the side wall of the valve well. The waterproof pan-tilt unit has a built-in high-precision level and angle locking mechanism, supporting ±0.1° fine adjustment. After installation, the optical axis angle is fixed by mechanical limit to prevent displacement caused by vibration in the well. The illumination compensation performed by the preprocessing and enhancement module adopts a multi-scale illumination estimation method based on Retinex theory. It decomposes the image brightness components through the difference of Gaussian pyramid and estimates the local illumination distribution, and then normalizes the illumination of the original image. The fog removal process employs a dark channel prior algorithm combined with guided filtering optimization. The adaptive contrast enhancement algorithm dynamically adjusts the contrast gain coefficient of each pixel by calculating the local standard deviation and mean in the neighborhood of each pixel. The gain coefficient is negatively correlated with the local standard deviation. The multi-scale feature extraction module contains three parallel convolutional paths. Each path includes a convolutional layer and a batch normalization layer, with a ReLU activation function following the convolutional layer. After feature maps of different scales are extracted by the convolutional paths, they are weighted and fused through a channel attention mechanism. The channel attention weights are calculated by global average pooling and fully connected layers, and the final output is a fused feature map. The decoder part of the semantic segmentation network module corresponds to four upsampling stages. In each stage, the feature map spatial size is enlarged through bilinear interpolation and concatenated with the feature map of the corresponding stage of the encoder through skip connections. The concatenated feature map is then output after dimensionality reduction by convolution. The final layer of the network uses the Softmax activation function to generate the probability value of each pixel belonging to the leaked region and the non-leaked region. The texture consistency measure of the pseudo-leakage suppression module is achieved by calculating the contrast and correlation features of the gray-level co-occurrence matrix within the suspected region. The contrast feature reflects the texture clarity of the region, and the correlation feature reflects the consistency of the texture direction. The decision output module receives the binary segmentation map output by the semantic segmentation network module and the verification mask generated by the pseudo-leakage suppression module, performs a logical AND operation on the two, and retains only the region that exists in both maps as the final leakage region. The system then calculates the centroid coordinates and bounding box of the leakage region. When a leakage alarm is triggered, the alarm signal is uploaded to the monitoring center through the 4G communication module.
2. The valve well gas leak detection system based on image region segmentation according to claim 1, characterized in that, The encoder part of the semantic segmentation network module includes four downsampling stages, each stage including a depthwise separable convolutional layer and a max pooling layer.
3. The valve well gas leak detection system based on image region segmentation according to claim 2, characterized in that, The dynamic shape constraint function is constructed based on the curvature change of the region boundary and the area-to-perimeter ratio. It filters out false targets with abnormal shapes by jointly judging the standard deviation of curvature and the area-to-perimeter ratio.
4. The valve well gas leak detection system based on image region segmentation according to claim 3, characterized in that, The image region segmentation-based valve well gas leak detection system adopts a modular design, with each module coupled through a standardized data interface to achieve fully automated processing from image acquisition to decision output.
Citation Information
Patent Citations
Inspection robot based on multi-dimensional optical information fusion
CN120588171A