An intelligent detection method for reservoir piping phenomenon

By improving the YOLOv11s algorithm and integrating optical flow algorithm with gray-scale co-occurrence matrix technology, the problems of insufficient coverage and real-time performance of traditional piping detection methods have been solved, achieving high-precision and efficient reservoir piping detection.

CN121505240BActive Publication Date: 2026-03-24JIANGXI ACAD OF WATER RESOURCES (JIANGXI PROVINCE DAM SAFETY MANAGEMENT CENT JIANGXI PROVINCE WATER RESOURCES MANAGEMENT CENT) +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Traditional piping detection methods rely on manual inspections and distributed sensor monitoring, which suffer from limited coverage, insufficient real-time performance, high cost, difficult maintenance, and low spatial resolution, making it difficult to achieve high-precision, high-real-time piping detection.

Method used

An improved YOLOv11s detection algorithm is adopted, combined with the Farneback optical flow algorithm and gray-level co-occurrence matrix technology. Through a lightweight network structure and feature fusion learning module, water flow feature values ​​and texture contrast feature values ​​are calculated to achieve high-precision detection of candidate regions.

Benefits of technology

It significantly reduced the number of model parameters and computational complexity, improved detection accuracy, reduced false detection rate, enhanced the practicality and deployment efficiency of the model, and achieved high-precision, high-real-time piping detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121505240B_ABST
    Figure CN121505240B_ABST
Patent Text Reader

Abstract

The application discloses an intelligent detection method for reservoir piping phenomenon, and specific steps are as follows: firstly, aiming at different reservoir scenes, piping phenomenon pictures are collected, a training data set is constructed, and a piping identification model is obtained by training; secondly, for a video to be detected, a piping identification algorithm is used for candidate region detection to obtain a candidate region containing a potential water flow target; then, in each candidate region, a water flow velocity detection algorithm is used to obtain horizontal velocity characteristic values between continuous frames. Meanwhile, based on a texture analysis technology, texture contrast characteristic values are extracted; finally, a comprehensive scoring system is constructed by weighting and fusing the horizontal velocity characteristic values and the texture contrast characteristic values of the water flow, and only when the fusion score exceeds a preset threshold value, the effective piping detection result is confirmed. The method fuses deep learning and image analysis technology, effectively solves the limitation of single feature detection, and realizes accurate identification of the reservoir piping phenomenon.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer vision, in particular to an intelligent detection method for reservoir piping phenomenon. BACKGROUND

[0002] Piping phenomenon is a typical seepage failure form in water conservancy engineering, which refers to the movement and loss of fine particles in soil under the action of seepage flow in the pores formed by coarse particles, eventually leading to the formation of a through seepage channel in the soil. This phenomenon poses a serious threat to reservoirs, which may cause local deformation and leakage, or even overall instability. Traditional piping detection mainly relies on manual visual inspection and distributed sensor monitoring. However, manual inspection has limitations such as limited coverage and insufficient real-time performance. While sensor monitoring can provide point data, it has problems such as high cost, difficult maintenance and low spatial resolution in large area monitoring. Therefore, it is crucial to develop an intelligent detection method for piping phenomenon with high precision, high real-time performance and easy maintenance.

[0003] Therefore, the present application combines deep learning technology with traditional image processing technology, and provides an intelligent detection method for reservoir piping phenomenon, which realizes high-precision and high-real-time detection of piping phenomenon. SUMMARY

[0004] The present application provides an intelligent detection method for reservoir piping phenomenon, which first uses an improved YOLOv11s piping detection algorithm model for detection, reduces the number of training parameters, improves the detection accuracy, realizes algorithm lightweight, integrates Farneback optical flow algorithm and gray level co-occurrence matrix technology, calculates the horizontal velocity eigenvalue and texture contrast eigenvalue of water flow, determines the candidate region through the comprehensive score calculated by the weight fusion formula, and finally completes the detection.

[0005] The present application adopts the following technical scheme: an intelligent detection method for reservoir piping phenomenon, the method steps are as follows:

[0006] Step S1, image data set collection and production: collecting piping phenomenon pictures from different reservoir scenes; screening the piping phenomenon pictures, manually labeling the screened piping phenomenon pictures, producing piping area image data set, and dividing into training set, validation set and test set according to proportion;

[0007] Step S2, improved YOLOv11s detection algorithm: improving standard convolution module, designing lightweight residual module, constructing lightweight cross-layer feature fusion module and integrating feature fusion learning module;

[0008] Step S3, obtain the optimal weight by training the improved YOLOv11s detection algorithm: use the prepared pipe surge area image dataset to train the improved YOLOv11s detection algorithm, after the training is completed, select the weight file with the highest average precision mean value to obtain the improved YOLOv11s pipe surge detection algorithm model;

[0009] Step S4, use the improved YOLOv11s pipe surge detection algorithm model to perform frame-by-frame processing on the video to be detected: input the video to be detected into the improved YOLOv11s pipe surge detection algorithm model, perform candidate region identification on each frame of image, filter through a confidence threshold to obtain a boundary box region containing a potential water flow target, and output a preliminary detection result;

[0010] Step S5, based on the improved YOLOv11s pipe surge detection algorithm model, integrate the Farneback optical flow algorithm and the gray level co-occurrence matrix technology to calculate the horizontal velocity eigenvalue and the texture contrast eigenvalue of the water flow;

[0011] Step S6, adopt normalized weighted fusion: normalize the horizontal velocity eigenvalue by dividing it by a horizontal maximum velocity threshold, normalize the texture contrast eigenvalue by dividing it by a maximum contrast threshold, and calculate a comprehensive score through equal-weight fusion;

[0012] Step S7, pipe surge phenomenon detection: use the improved YOLOv11s pipe surge detection algorithm model to detect the pipe surge phenomenon in the reservoir, and use the comprehensive score calculated in step S6 to determine whether the detection is valid.

[0013] Further, step S1, image dataset collection and preparation, the specific process is as follows:

[0014] Step S11, collect pipe surge phenomenon image data in different reservoir sites and obtain target detection pictures of pipe surge phenomenon under different environmental conditions, filter the collected target detection pictures, remove target detection pictures with unclear pipe surge characteristics, and arrange the remaining target detection pictures to form a pipe surge phenomenon image dataset;

[0015] Step S12, use the same target detection labeling method as the YOLO dataset, label the pipe surge phenomenon image dataset through the dataset labeling software Labelimg, label using a rectangular box, and label the pipe surge phenomenon category as "surge"; obtain a set of labeled txt files and corresponding dataset corresponding to the pictures;

[0016] Step S13, the data set with the completed label is randomly divided into a training set, a validation set and a test set in a ratio of 7:2:1, and the training set, the validation set and the test set respectively contain image files and label files, the image files are the pipe outburst image data set in step S11, and the label files are a group of labeled txt files obtained after the image data is labeled in step S12;

[0017] Step S14, the image files in step S13 are respectively stored in the train, val and test subfolders under the images directory, and the corresponding label files are respectively stored in the corresponding subfolders under the labels directory, so as to ensure the one-to-one correspondence between the image files and the label files;

[0018] Step S15, the image file path is saved in a txt file, and the improved YOLOv11s pipe outburst detection algorithm model is trained by reading the txt file to obtain the image path.

[0019] Further, the improved standard convolution module in step S2 is an improvement on the standard convolution module of the YOLOv11s detection algorithm, and the specific process is as follows:

[0020] Step S211, the input feature map is divided into a main branch and an auxiliary branch in a ratio of 1:1, the main branch is compressed in channel through 1x1 convolution to generate a basic feature representation, and the auxiliary branch further extracts detailed features based on the main branch through grouped convolution;

[0021] Step S212, the outputs of the main branch and the auxiliary branch are spliced in channel, and channel-level feature re-labeling is performed through an attention mechanism;

[0022] Step S213, a residual connection is added to obtain an improved deep lightweight convolution module, which enhances feature expression and reduces calculation amount and parameters.

[0023] Further, the lightweight residual module designed in step S2 is an improvement on the bottleneck module of the YOLOv11s detection algorithm, and the specific process is as follows:

[0024] Step S221, the input channel number is compressed to one half of the original number through 1x1 convolution, and a depth separable convolution decomposition is used to replace a 3x3 standard convolution;

[0025] Step S222, the depth separable convolution and the 1x1 convolution are combined in point-by-point series, and an adaptive residual connection mechanism is introduced.

[0026] Further, a lightweight cross-layer feature fusion module is constructed, and the specific process is as follows:

[0027] Step S231, on the basis of the cross-stage local network module of the YOLOv11s detection algorithm, remove the standard bottleneck structure, introduce a lightweight bottleneck module, and reduce the channel expansion ratio to 0.25;

[0028] Step S232, implement adaptive channel matching, perform 1x1 convolution adjustment when the input feature map channel number and the output feature map channel number are inconsistent, otherwise use identity mapping;

[0029] Step S233, use a progressive architecture for feature processing, the first lightweight bottleneck module first performs dimension reduction processing, then performs feature transformation through a lightweight residual module, and finally performs dimension increase processing, and the subsequent lightweight bottleneck modules keep the channel number unchanged and directly perform feature extraction through a lightweight residual module;

[0030] Step S234, introduce batch normalization and SiLU activation function to realize output regularization and global residual connection, and finally obtain a lightweight cross-layer feature fusion module.

[0031] Further, in step S2, the feature fusion learning module is integrated, specifically as follows:

[0032] Step S241, use a multi-dimensional attention mechanism to enhance the processing of the input feature map;

[0033] Step S242, extract multi-dimensional feature statistics through global average pooling, global maximum pooling, height pooling, and width pooling; the extracted features are divided into two processing paths: the first path uses 1x1 convolution to realize channel attention, and performs feature compression and recovery; the second path uses 3x3 convolution combined with spatial pooling features to perform spatial attention calculation;

[0034] S243, the outputs of the two paths of step S242 are passed through a Sigmoid activation function to generate attention weights, and the original features are adaptively modulated; finally, a residual connection is used to maintain gradient stability.

[0035] Further, in step S5, the Farneback optical flow algorithm and the gray level co-occurrence matrix technique are integrated, and the specific process is as follows:

[0036] Step S51, determine the detection result boundary box coordinates (x1, y1, x2, y2) of the improved YOLOv11s pipe flow detection algorithm model as the candidate region range; detect the size difference between the current frame candidate region range and the previous frame candidate region range, and when the size difference is not matched, adjust the size of the current frame candidate region to the size of the previous frame candidate region;

[0037] Step S52, introduce the Farneback optical flow algorithm in the candidate region range;

[0038] Step S521, using polynomial expansion technology to approximate the local image neighborhood with a quadratic polynomial, setting the multi-layer pyramid structure parameters: the number of image pyramid layers is 2, the scale reduction ratio between adjacent levels is 0.5, and the dense optical flow field is calculated by iterative optimization, and the horizontal flow component is extracted to form a horizontal velocity vector;

[0039] Step S522, based on the amplitude calculation of the horizontal velocity vector, a motion amplitude matrix is generated, and an effective motion region mask is established by an adaptive statistical threshold to filter noise from the original horizontal velocity vector;

[0040] Step S523, converting the horizontal velocity data in the effective motion region into physical velocity units through pixel-to-meter conversion, and extracting the horizontal velocity eigenvalue using median statistics;

[0041] Step S53, converting the detected candidate region range to a gray-scale image, and discretizing the gray-scale values of the gray-scale image using 16-level quantization; setting the gray-level co-occurrence matrix parameters: distance parameter d=1, angle parameter θ=0°; based on the set distance parameter and angle parameter, the co-occurrence probability distribution of pixel gray values is calculated, and a gray-level co-occurrence matrix is constructed to calculate the texture statistical feature and obtain the texture contrast eigenvalue.

[0042] Further, in step S6, the horizontal velocity eigenvalue is normalized by dividing it by the horizontal maximum velocity threshold, and the texture contrast eigenvalue is normalized by dividing it by the maximum contrast threshold, and the comprehensive score is calculated by an equal weight fusion formula; the specific steps are as follows:

[0043] Step S61, normalizing the horizontal velocity eigenvalue obtained in step S52 and the texture contrast eigenvalue obtained in step S53; setting the horizontal maximum velocity threshold V max =2.0 m / s, and the maximum contrast threshold C max =0.6, and dividing the horizontal velocity eigenvalue and the texture contrast eigenvalue by the corresponding maximum threshold to obtain the speed score and the contrast score;

[0044] Step S62, setting the speed weight and the contrast weight to be 0.5; multiplying the speed score and the contrast score in step S62 by the corresponding weight and summing them to calculate the final comprehensive score; the formula is as follows:

[0045] Speed normalization: (1) ;

[0046] Contrast normalization: (2) ;

[0047] Comprehensive score: (3) ;

[0048] wherein min represents the smaller value of the two numbers separated by a comma in the brackets, represents a horizontal maximum speed threshold value, represents a horizontal speed characteristic value, represents a texture contrast characteristic value, represents a maximum contrast threshold value.

[0049] Further, in step S7, the pipe gushing phenomenon is detected, and the specific process is as follows:

[0050] The final comprehensive score calculated in step S6 is used to judge whether the detection is valid detection; when the final comprehensive score is greater than 0.6, it is considered to be valid detection, and the detection result frame is output, and the speed score, the contrast score and the comprehensive score are marked; when the final comprehensive score is less than 0.6, it is considered to be invalid detection, and there will be no any display.

[0051] Advantages of the present application:

[0052] (1) The present application detects the candidate frame based on the improved YOLOv11s pipe gushing detection algorithm model, in the network structure of the model, by introducing a lightweight cross-layer feature fusion module, the model parameter quantity and the calculation complexity are significantly reduced while the detection accuracy is maintained;

[0053] (2) In the network structure of the model, the double-path design of the feature fusion learning module effectively enhances the spatial position perception ability of small targets while maintaining the sensitivity to the pipe gushing phenomenon;

[0054] (3) In the network structure of the model, the deep lightweight convolution module enhances the feature expression ability through the double-branch structure and the attention mechanism while realizing lightweight calculation;

[0055] (4) The improved YOLOv11s pipe gushing detection algorithm model is integrated with Farneback optical flow algorithm and gray level co-occurrence matrix technology, which first analyzes the features in the candidate region, and then displays the detection frame, so that the result is more accurate;

[0056] (5) The present application uses the improved YOLOv11s pipe gushing detection algorithm model for detection, which reduces the calculation parameter quantity by 20% while improving the detection accuracy. At the same time, the Farneback optical flow algorithm and the gray level co-occurrence matrix technology are integrated, which reduces the false detection rate by 22%, and significantly improves the practicability and deployment efficiency of the model. BRIEF DESCRIPTION OF DRAWINGS

[0057] Figure 1 is the overall flowchart of the invention.

[0058] Figure 2is the overall architecture diagram of the improved YOLOv11s algorithm network model of the application.

[0059] Figure 3 is the specific candidate region judgment process flowchart of the application. DETAILED DESCRIPTION

[0060] In order to better illustrate the characteristics and technical advantages of the application, the technical implementation scheme of the application will be described in detail below with reference to the relevant drawings of the specific embodiments of the application. It should be noted that the embodiments described herein are only part of the specific implementation of the application, and do not cover all possible embodiments. Any other implementation obtained by a person skilled in the art based on the disclosed embodiments of the application without creative effort shall be considered as falling within the scope of protection of the claims of the application.

[0061] Based on the intelligent detection method for the reservoir piping phenomenon, the process includes collecting piping phenomenon data set collection and division, training the improved YOLOv11s detection algorithm, obtaining the improved YOLOv11s piping detection algorithm model, obtaining the candidate region through the improved YOLOv11s piping detection algorithm model, integrating the Farneback optical flow algorithm and the gray level co-occurrence matrix technology, obtaining the horizontal velocity feature and the texture contrast feature of the water flow, weighting and fusing the obtained feature values, and performing piping detection. The application adopts the following technical scheme: an intelligent detection method for the reservoir piping phenomenon, the method steps are as follows:

[0062] Step S1, image data set collection and production: collecting piping phenomenon pictures from different reservoir scenes; screening the piping phenomenon pictures, manually labeling the screened piping phenomenon pictures, producing piping region image data set, and dividing into training set, verification set and test set according to proportion;

[0063] Step S2, improving YOLOv11s detection algorithm: improving standard convolution module, designing lightweight residual module, constructing lightweight cross-layer feature fusion module and integrating feature fusion learning module;

[0064] Step S3, obtaining the optimal weight by training the improved YOLOv11s detection algorithm: using the prepared piping region image data set to train the improved YOLOv11s detection algorithm, after the training is completed, selecting the weight file with the highest average precision mean value, and obtaining the improved YOLOv11s piping detection algorithm model;

[0065] Step S4, the improved YOLOv11s pipe surge detection algorithm model is used for frame-by-frame processing of the video to be detected: the video to be detected is input into the improved YOLOv11s pipe surge detection algorithm model, candidate region identification is performed on each frame of image, a boundary box region containing a potential water flow target is obtained through confidence threshold screening, and a preliminary detection result is output;

[0066] Step S5, based on the improved YOLOv11s pipe surge detection algorithm model, the Farneback optical flow algorithm and the gray level co-occurrence matrix technology are integrated, the horizontal velocity characteristic value and the texture contrast characteristic value of the water flow are calculated;

[0067] Step S6, normalized weighted fusion is adopted: the horizontal velocity characteristic value is divided by the horizontal maximum velocity threshold for normalization, the texture contrast characteristic value is divided by the maximum contrast threshold for normalization, and a comprehensive score is calculated through equal weight fusion;

[0068] Step S7, pipe surge phenomenon detection: the improved YOLOv11s pipe surge detection algorithm model is used to detect the reservoir pipe surge phenomenon, and the comprehensive score calculated in step S6 is used to judge whether the detection is effective.

[0069] Further, step S1, image data set collection and production, the specific process is as follows:

[0070] Step S11, collect pipe surge phenomenon image data in different reservoir sites and obtain target detection pictures of pipe surge phenomenon under different environmental conditions, screen the collected target detection pictures, remove target detection pictures with unclear pipe surge characteristics, and arrange the remaining target detection pictures to form a pipe surge phenomenon image data set;

[0071] Step S12, using the same target detection labeling method of YOLO data set, the pipe surge phenomenon image data set is labeled by using a data set labeling software Labelimg, and a rectangular frame is used for labeling, the pipe surge phenomenon category is labeled as "surge"; a group of labeled txt files and corresponding data sets corresponding to the pictures are obtained;

[0072] Step S13, the labeled data set is randomly divided into a training set, a validation set and a test set according to a ratio of 7:2:1, the training set, the validation set and the test set respectively contain image files and label files, the image files are the pipe surge phenomenon image data set in step S11, and the label files are a group of labeled txt files obtained after the image data is labeled in step S12;

[0073] Step S14, the image files in step S13 are respectively stored in the train, val, test subfolders under the images directory, and the corresponding label files are respectively stored in the corresponding subfolders under the labels directory, to ensure one-to-one correspondence between the image files and the label files;

[0074] Step S15, save the image file path in the txt file, and let the improved YOLOv11s pipe detection algorithm model train by reading the txt file to obtain the image path.

[0075] Further, in step S2, the improved standard convolution module is improved for the standard convolution module of the YOLOv11s detection algorithm; specifically as follows:

[0076] Step S211, the input feature map is divided into a main branch and an auxiliary branch in a 1:1 ratio, the main branch is compressed in channel through 1×1 convolution to generate a basic feature representation, and the auxiliary branch further extracts detailed features based on the main branch through grouped convolution;

[0077] Step S212, the outputs of the main branch and the auxiliary branch are channel spliced, and channel-level feature re-labeling is performed through an attention mechanism;

[0078] Step S213, add residual connection to obtain an improved deep lightweight convolution module, enhance feature expression, and reduce calculation amount and parameters.

[0079] Further, in step S2, the lightweight residual module is designed to improve the bottleneck module of the YOLOv11s detection algorithm, specifically as follows:

[0080] Step S221, compress the input channel number to half of the original through 1×1 convolution, and use depth separable convolution decomposition to replace 3×3 standard convolution;

[0081] Step S222, combine the depth separable convolution and the 1×1 convolution point by point in series, and finally introduce an adaptive residual connection mechanism.

[0082] Further, a lightweight cross-layer feature fusion module is constructed, specifically as follows:

[0083] Step S231, on the basis of the cross-stage local network module of the YOLOv11s detection algorithm, remove the standard bottleneck structure, introduce a lightweight bottleneck module, and reduce the channel expansion ratio to 0.25;

[0084] Step S232, implement adaptive channel matching, perform 1×1 convolution adjustment when the input feature map channel number and the output feature map channel number are inconsistent, otherwise use identity mapping;

[0085] Step S233, feature processing is performed using a progressive architecture, the first bottleneck block first performs dimension reduction processing, then performs feature transformation through a lightweight residual module, and finally performs dimension increase processing, and subsequent bottleneck blocks remain unchanged and directly pass through the lightweight residual module for feature extraction;

[0086] Step S234, batch normalization and SiLU activation function are introduced to realize output regularization and global residual connection, and finally a lightweight cross-layer feature fusion module is obtained.

[0087] Further, in step S2, the integrated feature fusion learning module is integrated, specifically as follows:

[0088] Step S241, a multi-dimensional attention mechanism is used to enhance the processing of the input feature map;

[0089] Step S242, multi-dimensional feature statistical information is extracted through global average pooling, global maximum pooling, height pooling and width pooling; the extracted features are divided into two processing paths: the first path uses 1x1 convolution to realize channel attention, and performs feature compression and recovery; the second path uses 3x3 convolution combined with spatial pooling features to calculate spatial attention;

[0090] S243, the outputs of the two paths of step S242 are generated through the Sigmoid activation function to generate attention weights, and the original features are adaptively modulated; finally, residual connection is used to maintain gradient stability.

[0091] Further, in step S5, the Farneback optical flow algorithm and the gray co-occurrence matrix technology are integrated, and the specific process is as follows:

[0092] Step S51, the detection result boundary box coordinates (x1, y1, x2, y2) of the improved YOLOv11s pipe surge detection algorithm model are determined as the candidate region range; the size difference between the current frame candidate region range and the previous frame candidate region range is detected, and when the size difference is not matched, the size of the current frame candidate region is adjusted to the size of the previous frame candidate region;

[0093] Step S52, the Farneback optical flow algorithm is introduced in the candidate region range;

[0094] Step S521, a polynomial expansion technique is used to perform quadratic polynomial approximation on the local image neighborhood, and a multi-layer pyramid structure parameter is set: the number of image pyramid layers is 2, the scale reduction ratio between adjacent levels is 0.5, the dense optical flow field is calculated through iterative optimization, and the horizontal direction optical flow component is extracted to form a horizontal velocity vector;

[0095] Step S522, generate a motion amplitude matrix based on the amplitude of the horizontal velocity vector, establish an effective motion region mask through an adaptive statistical threshold, and perform noise filtering on the original horizontal velocity vector;

[0096] Step S523, convert the horizontal velocity data in the effective motion region into physical speed units through pixel-to-meter conversion, and extract the horizontal velocity characteristic value using a median statistical quantity;

[0097] Step S53, convert the detected candidate region range into a gray-scale image, discretize the gray-scale values of the gray-scale image using 16-level quantization, set the gray-scale co-occurrence matrix parameters: distance parameter d = 1, angle parameter θ = 0°, and based on the set distance parameter and angle parameter, calculate the texture statistical feature to obtain the texture contrast feature value.

[0098] Further, in step S6, the horizontal velocity characteristic value is divided by the horizontal maximum speed threshold for normalization, and the texture contrast characteristic value is divided by the maximum contrast threshold for normalization, and the comprehensive score is calculated through an equal weight fusion formula. The specific steps are as follows:

[0099] Step S61, normalize the horizontal velocity characteristic value obtained in step S52 and the texture contrast characteristic value obtained in step S53; set the horizontal maximum speed threshold V max = 2.0 m / s, and the maximum contrast threshold C max = 0.6, and divide the horizontal velocity characteristic value and the texture contrast characteristic value by the corresponding maximum threshold to obtain the speed score and the contrast score.

[0100] Step S62, set the speed weight and the contrast weight to be 0.5; multiply the speed score and the contrast score in step S62 by the corresponding weight, and then sum them to calculate the final comprehensive score; the formula is as follows:

[0101] Speed normalization: (1) ;

[0102] Contrast normalization: (2) ;

[0103] Comprehensive score: (3) ;

[0104] Wherein, min represents the smaller value of the two numbers separated by the comma in the parentheses, represents the horizontal maximum speed threshold, represents the horizontal velocity characteristic value, represents the texture contrast characteristic value, represents the maximum contrast threshold.

[0105] Further, in step S7, the pipe gushing phenomenon is detected, and the specific process is as follows:

[0106] The final comprehensive score calculated in step S6 is used to determine whether the detection is valid detection; when the final comprehensive score is greater than 0.6, it is considered to be valid detection, and the detection result frame is output and the speed score, the contrast score and the comprehensive score are marked; when the final comprehensive score is less than 0.6, it is considered to be invalid detection, and there will be no any display.

[0107] Although the cross-stage local network module in the original YOLOv11s detection algorithm has good feature extraction capability, it has problems of parameter redundancy and high computational complexity in the single-class small target detection task, especially for small targets in the early stage of pipe gushing. The traditional double-path feature extraction is difficult to realize model lightweight deployment while maintaining detection accuracy; therefore, the improved lightweight cross-layer feature fusion module uses a single-path series architecture to replace the double-path design, reduces the expansion rate and uses a lightweight residual module. The module uses a depth separable convolution instead of a traditional reparameterization convolution inside, which significantly reduces the parameter amount while retaining more spatial detail information. The improved deep lightweight convolution module realizes accurate recalibration of features through optimized grouped convolution and attention mechanism. The improved feature fusion learning module extracts feature information through multi-dimensional pooling. And in the subsequent process, the Farneback optical flow algorithm and the gray level co-occurrence matrix technology are integrated, which reduces the error in detection and improves the accuracy of pipe gushing detection.

[0108] In order to further understand the reasoning process of the intelligent detection method for the pipe gushing phenomenon of the reservoir, the input video is recognized and processed, and a pipe gushing phenomenon picture of 640x640x3 in one frame of the video is described in detail. The detection and recognition process is as follows:

[0109] Step 1: one frame of the input video is a pipe gushing phenomenon picture of 640x640x3.

[0110] Step 2: the image data passes through the first standard convolution module, which has 64 output channels, uses a 3x3 convolution kernel, and has a step of 2, to generate a feature map P1 with a size of 320x320x64.

[0111] Step 3: the feature map P1 passes through the second standard convolution module, the number of output channels increases to 128, uses a 3x3 convolution kernel, and has a step of 2, to generate a feature map P2 with a size of 160x160x128.

[0112] Step 4: The feature map P2 passes through the first lightweight cross-layer feature fusion module, which contains 2 lightweight residual modules. The output channel number increases to 256, and the output feature map size is 160x160x256.

[0113] Step 5: After passing through the third standard convolution module, the output channel number remains 256, using a 3x3 convolution kernel with a step of 2, the output feature map size is 80x80x256.

[0114] Step 6: After passing through the second lightweight cross-layer feature fusion module, which contains 2 lightweight residual modules, further extract features, the output channel number increases to 512, and the output feature map size is 80x80x512. This layer is named as P3 feature layer.

[0115] Step 7: After passing through the fourth standard convolution module, the output channel number remains 512, using a 3x3 convolution kernel with a step of 2, the feature layer shape is 40x40x512.

[0116] Step 8: After passing through the third lightweight cross-layer feature fusion module, which contains 2 lightweight residual modules, further extract features, the output feature map size is 40x40x512. This layer is named as P4 feature layer.

[0117] Step 9: After passing through the fifth standard convolution module, the output channel number increases to 1024, using a 3x3 convolution kernel with a step of 2, the output feature map size is 20x20x1024.

[0118] Step 10: After passing through the fourth lightweight cross-layer feature fusion module, which contains 2 lightweight residual modules, the output feature map size is 20x20x1024.

[0119] Step 11: Next, pass through the pyramid pooling module, use a 5x5 pooling kernel for multi-scale feature extraction, capture richer spatial context information, get a feature map of size 20x20x1024 as output.

[0120] Step 12: After passing through the cross-stage local self-attention module, the output feature map size is 20x20x1024, and this layer is named as P5 feature layer. So far, the feature extraction of the backbone network is completed, and the next step is the feature fusion part.

[0121] Step 13: The P5 feature layer is upsampled by 2 times, and the feature map shape becomes 40x40x1024.

[0122] Step 14: The upsampled result of step 13 is concatenated with the P4 feature layer of the backbone network in the channel dimension, and a feature map of size 40x40x1536 is obtained.

[0123] Step 15: After the fifth lightweight cross-layer feature fusion module, containing 2 lightweight residual modules, a feature map of 40x40x512 shape is obtained.

[0124] Step 16: 2 times upsampling operation is performed on step 15, and a feature map of 80x80x512 shape is obtained.

[0125] Step 17: The channel dimension of step 16 and the P3 feature layer of the backbone network are spliced, and a feature map of 80x80x1024 shape is obtained.

[0126] Step 18: After the sixth lightweight cross-layer feature fusion module, containing 2 lightweight residual modules, a feature map of 80x80x256 size is obtained.

[0127] Step 19: After the feature fusion learning module, the multi-dimensional attention mechanism is used to enhance the small target feature expression, and the output feature map of 80x80x256 is output as the detection head P3_out.

[0128] Step 20: The output feature map of step 18 is passed through the deep lightweight convolution module, the channel number is adjusted to 512, and an enhanced feature map of 80x80x512 is obtained.

[0129] Step 21: After 2x2 maximum pooling downsampling operation, the output feature map size is 40x40x512.

[0130] Step 22: The channel dimension splicing operation is performed on the feature map of step 21 and step 15, and the output feature map size is 40x40x1024.

[0131] Step 23: After the seventh lightweight cross-layer feature fusion module, containing 2 lightweight residual modules, a feature map of 40x40x512 size is output as the detection head P4_out.

[0132] Step 24: The feature map of step 23 is passed through the deep lightweight convolution module, and the spatial and channel re-labeling is used to enhance the feature expression, the output channel number is adjusted to 1024, and the output feature map of 40x40x1024 is obtained.

[0133] Step 25: After 2x2 maximum pooling downsampling operation, the output feature map size is 20x20x1024.

[0134] Step 26: The channel dimension splicing operation is performed on step 25 and the P5 feature layer of step 12, and the feature map size is 20x20x2048.

[0135] Step 27: After passing through the eighth lightweight cross-layer feature fusion module, 2 lightweight residual modules are included, and a feature map with a size of 20x20x1024 is obtained as the output of the detection head P5_out. The final network outputs three detection heads with different scales for multi-scale target detection.

[0136] Step 28: The multi-scale feature maps of the detection head P3_out, the detection head P4_out and the detection head P5_out are taken as the output of the feature fusion network and sent to the detection head network for target detection.

[0137] Step 29: It is judged whether there is a candidate region, if not, no operation is performed; if there is a candidate region, the Farneback optical flow algorithm and the gray co-occurrence matrix method are integrated, and the horizontal velocity feature value and the texture contrast feature value of the water flow are calculated according to the comparison of the candidate region of the current frame and the previous frame.

[0138] Step 30: The calculated horizontal velocity feature value and the texture contrast feature value are normalized to obtain the speed score and the contrast score, and then the respective weights are set to 0.5, and then each is multiplied by 0.5 and summed to obtain a comprehensive score.

[0139] Step 31: It is judged whether the comprehensive score is greater than 0.6, when the comprehensive score is greater than 0.6, the detection result is output, and if the comprehensive score is less than 0.6, it is invalid detection and no display.

[0140] Compared with the YOLOv11s algorithm model, the improved YOLOv11s pipe surge detection algorithm model improves the overall average precision by 1.3%; the parameter amount is reduced from 9.43 million to 7.57 million, a total of 20% of the parameter amount. In addition, compared with the YOLOv11s detection method, the false detection rate of the intelligent detection method for the reservoir pipe surge phenomenon is reduced from 25% to 3%.

[0141] The above describes in detail the intelligent detection method for the reservoir pipe surge phenomenon provided by the application, and the principles and implementation methods of the application are described by applying specific examples. The above examples are only used to help understand the method and core idea of the application, and the above description should not be understood as limiting the application.

Claims

1. An intelligent detection method for piping phenomena in reservoirs, characterized by: Methods and Steps as follows: Step S1, Image Dataset Collection and Creation: Collect images of piping phenomena from different reservoir scenes; filter the piping phenomenon images, manually annotate the filtered piping phenomenon images, and create a piping area image dataset, which is divided into training set, validation set and test set according to the proportion. Step S2, improve the YOLOv11s detection algorithm: improve the standard convolution module, design a lightweight residual module, construct a lightweight cross-layer feature fusion module and an integrated feature fusion learning module; Step S3: Obtain the optimal weights by training the improved YOLOv11s detection algorithm: Train the improved YOLOv11s detection algorithm using the prepared piping area image dataset. After training, select the weight file with the highest average accuracy to obtain the improved YOLOv11s piping detection algorithm model. Step S4: The improved YOLOv11s piping detection algorithm model is used to process the video to be detected frame by frame: The video to be detected is input into the improved YOLOv11s piping detection algorithm model, candidate regions are identified for each frame image, and bounding box regions containing potential water flow targets are obtained by filtering through confidence thresholds, and preliminary detection results are output. Step S5: Based on the improved YOLOv11s piping detection algorithm model, integrate the Farneback optical flow algorithm and gray-level co-occurrence matrix technology to calculate the horizontal velocity feature value and texture contrast feature value of the water flow. Step S6, normalized weighted fusion is adopted: the horizontal velocity feature value is normalized by dividing it by the maximum horizontal velocity threshold, the texture contrast feature value is normalized by dividing it by the maximum contrast threshold, and the comprehensive score is calculated by equal weighted fusion. Step S7, Piping Phenomenon Detection: The improved YOLOv11s piping detection algorithm model is used to detect piping phenomena in the reservoir, and the comprehensive score calculated in step S6 is used to determine whether the detection is effective. Step S5 integrates the Farneback optical flow algorithm and gray-level co-occurrence matrix technology. The specific process is as follows: Step S51: Determine the bounding box coordinates (x1, y1, x2, y2) of the detection result of the improved YOLOv11s piping detection algorithm model as the candidate region range; detect the size difference between the candidate region range of the current frame and the candidate region range of the previous frame; when a size difference mismatch is detected, adjust the size of the candidate region of the current frame to the size of the candidate region of the previous frame. Step S52: Introduce the Farneback optical flow algorithm within the candidate region. Step S521: The local image neighborhood is approximated by a second polynomial using polynomial expansion technology. The multi-layer pyramid structure parameters are set as follows: the number of layers in the image pyramid is 2, and the scale scaling ratio between adjacent layers is 0.

5. The dense optical flow field is calculated by iterative optimization, and the horizontal optical flow component is extracted to form the horizontal velocity vector. Step S522: Calculate the motion amplitude matrix based on the magnitude of the horizontal velocity vector, establish an effective motion region mask through an adaptive statistical threshold, and filter noise from the original horizontal velocity vector. Step S523: Convert the horizontal velocity data within the effective motion area into physical velocity units using a pixel-to-meter conversion ratio, and extract the horizontal velocity feature value using median statistics; Step S53: Convert the detected candidate region range into a grayscale image, and use 16-level quantization to discretize the grayscale values ​​of the grayscale image; set the grayscale co-occurrence matrix parameters: distance parameter d=1, angle parameter θ=0°; based on the set distance and angle parameters, statistically analyze the co-occurrence probability distribution of pixel pairs of grayscale values, construct the grayscale co-occurrence matrix, and calculate texture statistical features to obtain texture contrast feature values.

2. The intelligent detection method for reservoir piping phenomenon as described in claim 1, characterized in that, Step S1, image dataset collection and creation, the specific process is as follows: Step S11: Collect image data of piping phenomena at different reservoir sites and obtain target detection images of piping phenomena under different environmental conditions. Filter the collected target detection images, remove target detection images with indistinct piping features, and organize the remaining target detection images into a piping phenomenon image dataset. Step S12: Using the same object detection labeling method as the YOLO dataset, label the piping phenomenon image dataset with the dataset labeling software Labelimg, using rectangular boxes for labeling, and label the piping phenomenon category as "surge"; obtain a set of labeled txt files and the corresponding datasets of the images; Step S13: The labeled dataset is randomly divided into a training set, a validation set, and a test set in a ratio of 7:2:

1. The training set, validation set, and test set contain image files and label files, respectively. The image files are the piping phenomenon image dataset in step S11, and the label files are a set of labeled txt files obtained after labeling the image data in step S12. Step S14: Store the image files from step S13 into the train, val, and test subfolders under the images directory, and store the corresponding label files into the corresponding subfolders under the labels directory, ensuring a one-to-one correspondence between the image files and the label files. Step S15: Save the image file path in a txt file, so that the improved YOLOv11s surge detection algorithm model can be trained by reading the image path from the txt file.

3. The intelligent detection method for reservoir piping phenomenon as described in claim 2, characterized in that, Step S2 involves improving the standard convolutional module, which is an improvement on the standard convolutional module of the YOLOv11s detection algorithm; the details are as follows: Step S211: The input feature map is divided into a main branch and an auxiliary branch in a 1:1 ratio. The main branch is compressed through 1×1 convolution to generate basic feature representation. The auxiliary branch is further extracted from the main branch through group convolution. Step S212: The outputs of the main branch and the auxiliary branch are concatenated by channel, and channel-level feature recalibration is performed through an attention mechanism; Step S213: Add residual connections to obtain an improved deep lightweight convolutional module.

4. The intelligent detection method for reservoir piping phenomenon as described in claim 3, characterized in that, Step S2 involves designing a lightweight residual module, which improves upon the bottleneck module of the YOLOv11s detection algorithm. Specifically: Step S221: The number of input channels is compressed to half of the original number by 1×1 convolution, and depthwise separable convolution is used to replace the standard 3×3 convolution. Step S222: The depthwise separable convolution and the 1×1 convolution are sequentially concatenated and combined to introduce an adaptive residual connection mechanism.

5. The intelligent detection method for reservoir piping phenomenon as described in claim 4, characterized in that, Construct a lightweight cross-layer feature fusion module, specifically as follows: Step S231: Based on the cross-stage local network module of the YOLOv11s detection algorithm, the standard bottleneck structure is removed, a lightweight bottleneck module is introduced, and the channel expansion ratio is reduced to 0.

25. Step S232: Implement adaptive channel matching. When the number of channels in the input feature map is inconsistent with the number of channels in the output feature map, perform 1×1 convolution adjustment; otherwise, use identity mapping. Step S233: A progressive architecture is used for feature processing. The first lightweight bottleneck module first performs dimensionality reduction, then performs feature transformation through the lightweight residual module, and finally performs dimensionality increase. Subsequent lightweight bottleneck modules keep the number of channels unchanged and directly extract features through the lightweight residual module. Step S234 introduces batch normalization and SiLU activation function to achieve output regularization and global residual connection, finally obtaining a lightweight cross-layer feature fusion module.

6. The intelligent detection method for reservoir piping phenomenon as described in claim 5, characterized in that, Step S2 integrates the feature fusion learning module, as follows: Step S241: The input feature map is enhanced using a multidimensional attention mechanism; Step S242: Extract multi-dimensional feature statistics through global average pooling, global max pooling, height pooling and width pooling; divide the extracted features into two processing paths: the first path uses 1×1 convolution to implement channel attention, and performs feature compression and recovery; The second path uses 3×3 convolution combined with spatial pooling features to calculate spatial attention. S243, The outputs of the two paths in step S242 are used to generate attention weights through the Sigmoid activation function to adaptively modulate the original features; Finally, residual connections are used to maintain gradient stability.

7. The intelligent detection method for piping phenomena in reservoirs as described in claim 6, characterized in that, Step S6 employs normalized weighted fusion, normalizing the horizontal velocity feature value by dividing it by the maximum horizontal velocity threshold, and normalizing the texture contrast feature value by dividing it by the maximum contrast threshold. The comprehensive score is then calculated using an equal-weighted fusion formula. The specific steps are as follows: Step S61: Normalize the horizontal velocity feature value obtained in step S52 and the texture contrast feature value obtained in step S53; set the maximum horizontal velocity threshold V. max =2.0 m / s, maximum contrast threshold C max =0.6, divide the horizontal velocity feature value and texture contrast feature value by the corresponding maximum threshold respectively to obtain the velocity score and contrast score; Step S62: Set both the speed weight and contrast weight to 0.5; multiply the speed score and contrast score from step S62 by their respective weights and sum them to calculate the final comprehensive score; the formula is as follows: Speed ​​normalization: (1); Contrast normalization: (2); Overall rating: (3); Where, min represents taking the smaller of the two numbers separated by the comma in the parentheses. Represents the maximum horizontal speed threshold. Represents the characteristic value of horizontal velocity. Represents texture contrast feature value, This represents the maximum contrast threshold.

8. The intelligent detection method for reservoir piping phenomenon as described in claim 7, characterized in that, In step S7, the piping phenomenon is detected, and the specific process is as follows: The final comprehensive score calculated in step S6 is used to determine whether the detection is valid. When the final comprehensive score is greater than 0.6, it is considered a valid detection, and the detection result frame is output with the speed score, contrast score, and comprehensive score marked. When the final comprehensive score is less than 0.6, it is considered an invalid detection, and no display will be made.

Citation Information

Patent Citations

  • Improved YOLOv11s safety helmet wearing detection model and optimization method thereof

    CN120356237A

  • Lightweight detection method for small defect targets in complex industrial scene

    CN121190920A