Hydropower station leakage identification method, training method, device and equipment
The improved YOLOv8 model is used to automatically identify leakage in hydropower stations, solving the problem of low efficiency in manual monitoring, achieving efficient and accurate automatic identification, and reducing safety hazards.
Patent Information
- Application Number
- CN202510761668.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-09-19
AI Technical Summary
Leakage in hydropower stations relies on manual monitoring and inspection, which leads to waste of human resources, low identification efficiency, and safety hazards.
An improved YOLOv8 model is used for leak detection. The training set is marked by box selection and the permutation attention mechanism and SIoU loss function are introduced, combined with historical feature images for identification.
It realizes the automatic identification of leaks, improves the accuracy and efficiency of identification, reduces the waste of human resources, and reduces safety hazards.
Smart Images

Figure CN120673033A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, training method, device and equipment for identifying leakage in a hydropower station. Background Art
[0002] The production site environment and equipment conditions of hydropower stations are extremely complex, involving a variety of key equipment such as butterfly valves, technical water supply pipes, and turbines. These devices are prone to so-called "leakage" during operation, i.e., air, water, dripping, and leakage. These problems not only waste energy and materials, increasing operating costs, but can also cause equipment failures and even accidents, posing serious risks and threats to the production environment and the safety of on-site personnel.
[0003] Currently, hydropower stations rely primarily on manual video surveillance and on-site inspections to identify safety hazards. On-site staff regularly conduct inspections and monitor video footage to identify and warn of leaks. However, due to a lack of intelligent support, monitoring and inspection tasks often consume significant human resources. Frequent on-site inspections are not only labor-intensive but also inefficient in terms of time and human resources. Furthermore, this manual approach requires inspectors and monitors to possess a high level of responsibility and expertise. Any oversight could result in safety hazards not being detected in a timely manner, impacting the normal operation of the entire power plant. Summary of the Invention
[0004] This application proposes a method, training method, device and equipment for identifying leakage in a hydropower station, which can solve one of the problems existing in the background technology.
[0005] To achieve the above objectives, this application adopts the following technical solutions:
[0006] In a first aspect, a method for training a hydropower station leakage recognition model is provided, the training method comprising:
[0007] Collect original images of pipeline leakage at the hydropower station site;
[0008] Selecting the target location of leakage in the original image and marking it with a label to form a training set; and
[0009] The training set is used to train the hydropower station leakage recognition model.
[0010] The hydropower station leakage identification model adopts the YOLOv8 model, which includes: a backbone network, a neck network and a detection head. The backbone network is used to extract feature maps at different levels, the neck network is used to splice the upsampled feature maps with feature maps from lower levels to obtain fused features at different levels, and the detection head is used to perform regression and classification tasks on the fused features. The regression task is used to predict the position of the bounding box, and the classification task is used to identify the object category within the bounding box.
[0011] Based on this technical solution, a model for identifying leaks in hydropower stations is trained to identify leaks and the areas where they occur. During training, the original image is first framed and marked to create a training set. This training set is then fed into the YOLOv8 model, which comprises a backbone network, a neck network, and a detection head. This model can perform both classification and regression tasks. This approach can be applied to robotic inspections to automatically identify leaks in pipelines, saving human resources, improving recognition accuracy and efficiency, and ensuring the normal operation of hydropower stations.
[0012] In a possible design of the first aspect, the backbone network includes: a number of convolutional layers arranged at different levels and cross-stage connection c2f modules arranged between convolutional layers at different levels, and the neck network includes: a number of splicing layers arranged between different levels and a c2f module arranged after the splicing layer. The c2f module of the backbone network is also connected to the splicing layer of the neck network. A permutation attention mechanism is introduced after the c2f module. The permutation attention mechanism is used to apply a channel attention mechanism to a part of the features and a spatial attention mechanism to another part of the features, and to shuffle them on the channel.
[0013] Based on the above technical solution, introducing the permutation attention mechanism after the c2f module can enhance the model's perception of local and global information, and further improve the quality and efficiency of vital sign extraction.
[0014] In a possible design manner of the first aspect, a C3 module with a residual connection is used in the neck network.
[0015] In a possible design manner of the first aspect, the detection head includes a 3×3 convolution layer, a 1×1 convolution layer, a batch normalization layer, and a SiLU activation function layer connected in sequence.
[0016] In a possible design method of the first aspect, the regression task adopts the SIoU loss function, the classification task adopts the FocalLoss loss function, the SIoU loss function includes: angle loss term, distance loss term and shape loss term, and the YOLOv8 model calculates the overall loss based on the difference between the prediction result generated by forward propagation and the true label.
[0017] Based on the above technical solution, the regression loss function of the YOLOv8 model is improved by introducing the SIoU loss function, and adding angle loss terms, distance loss terms, and shape loss terms. This makes the loss function more sensitive to the position and size errors of the bounding box, thereby more accurately adjusting the position and size of the prediction box. This not only reduces the positioning deviation, especially when the target scale changes greatly, but also improves the convergence speed of the model.
[0018] In a possible design manner of the first aspect, the training method further includes:
[0019] Adding a historical feature to the fusion feature, wherein the historical image corresponding to the historical feature defines a light and shadow area; and
[0020] During inference, the intersection over union (IoU) of the recognition result and the illuminated shadow area is calculated to remove areas in the recognition result that highly overlap with the illuminated shadow area.
[0021] Based on the above technical solution, during inference, a historical shadow template image is set, the intersection-over-union ratio of the prediction result and the shadow area is calculated, and the areas in the inspection results that highly overlap with the shadow part are eliminated, thereby reducing the model's misrecognition.
[0022] In a second aspect, a method for identifying leakage in a hydropower station is provided, the method comprising:
[0023] Obtain images of pipelines at the hydropower station to be treated; and
[0024] The trained hydropower station leakage recognition model is used to process the on-site pipeline image of the hydropower station to be processed to obtain a recognition result.
[0025] In a third aspect, a training device for a hydropower station leakage identification model is provided, the training device comprising:
[0026] The acquisition unit is used to collect original images of leakage in the pipelines at the hydropower station site;
[0027] a marking unit, configured to select a target location of leakage in the original image and mark it with a label to form a training set; and
[0028] The training unit uses the training set to train the hydropower station leakage recognition model.
[0029] The hydropower station leakage identification model adopts the YOLOv8 model, which includes: a backbone network, a neck network and a detection head. The backbone network is used to extract feature maps at different levels, the neck network is used to splice the upsampled feature maps with feature maps from lower levels to obtain fused features at different levels, and the detection head is used to perform regression and classification tasks on the fused features. The regression task is used to predict the position of the bounding box, and the classification task is used to identify the object category within the bounding box.
[0030] In a fourth aspect, a device for identifying leakage in a hydropower station is provided, the device comprising:
[0031] an acquisition unit, for obtaining an image of a pipeline on site of a hydropower station to be processed; and
[0032] The recognition unit is used to process the on-site pipeline image of the hydropower station to be processed using the hydropower station leakage recognition model trained as above to obtain a recognition result.
[0033] In a fifth aspect, an electronic device is provided, comprising: a processor, and a memory coupled to the processor, the memory being used to store a computer program; the processor being used to execute the computer program stored in the memory, so that the electronic device performs the training method as any possible implementation in the first aspect, or performs the recognition method as described in the second aspect.
[0034] In a sixth aspect, a computer-readable storage medium is provided, comprising a computer program or instructions, which, when executed on a computer, enables the computer to execute the training method as described in any possible implementation of the first aspect, or to execute the recognition method as described in the second aspect.
[0035] In the seventh aspect, a computer program product is provided, comprising: a computer program or instructions, which, when the computer program or instructions are run on a computer, enables the computer to execute the training method as any possible implementation method in the first aspect, or execute the recognition method as described in the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0037] Figure 1 This is a flow chart of leak detection based on improved YOLOv8 provided in an embodiment of the present application;
[0038] Figure 2 This is a scene diagram of leakage provided by the embodiment of the present application;
[0039] Figure 3 This is a diagram of the improved model network structure provided by an embodiment of the present application;
[0040] Figure 4 This is a diagram of the replacement attention network structure provided by an embodiment of the present application;
[0041] Figure 5 This is a schematic diagram of the angle loss of the regression loss function provided in an embodiment of the present application;
[0042] Figure 6 Schematic diagram of distance loss of the regression loss function provided in the embodiment of the present application;
[0043] Figure 7 It is a predefined shaded area diagram in the historical data template provided in the embodiment of the present application;
[0044] Figure 8 This is a test result diagram before the network model is improved according to an embodiment of the present application;
[0045] Figure 9 This is a test result diagram after improving the network model provided by the embodiment of the present application;
[0046] Figure 10 This is an inference model based on historical feature supplementation provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0048] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0050] like Figure 1 As shown, the main process of the leakage identification method based on improved YOLOv8 in the embodiment of the present application is as follows: first, on-site shooting is carried out and a leakage dataset is produced, then the model is improved, the substitution attention mechanism SIoU loss function is introduced, and the improved model is trained until convergence. Finally, historical data template images are introduced during model inference deployment to reduce false detections.
[0051] 1. Photograph and create a leak dataset
[0052] Deep learning target detection algorithms require a large amount of data for training. We used the inspection robot's camera to collect images of pipeline leaks at a hydropower station. The camera was about 4 meters away from the target. We used labelImg to select the leaking target. Figure 2 After labeling the objects, the images and corresponding label files are divided into training set, validation set and test set in a ratio of 7:2:1.
[0053] 2. Build an improved model
[0054] 2.1 Build an improved YOLOv8s model. Build CSPDarknet and modify CSPDarknet. The improved model is as follows Figure 3As shown. The YOLOv8 model includes: a backbone network, a neck network and a detection head. The backbone network is used to extract feature maps of different levels. The neck network is used to splice the upsampled feature maps with the feature maps from the lower levels to obtain fused features of different levels. The detection head is used to process the fused features for regression and classification tasks. The regression task is used to predict the position of the bounding box, and the classification task is used to identify the object category within the bounding box. The backbone network includes: a number of convolutional layers set at different levels and a cross-stage connection c2f module set between convolutional layers at different levels. The neck network includes: a number of splicing layers set between different levels and a c2f module set after the splicing layer. The c2f module of the backbone network is also connected to the splicing layer of the neck network. The permutation attention mechanism is introduced after the cross-stage connection module c2f, where the structural diagram of the permutation attention is shown as follows. Figure 4 As shown in Figure 2, it groups the input feature map into multiple sub-feature units and processes the sub-feature units in two parallel parts. One part uses the channel attention mechanism:
[0055]
[0056] X′ k1 =σ(F c (s))·X k1 =σ(W1x+b1)·X k1 (2)
[0057] Among them, x represents the feature vector output by the channel attention mechanism, X kl represents the feature attention neutron feature unit, H and W represent the feature map height and width respectively, i and j are the indexes of height and width on the feature map respectively, σ represents the sigmoid function, W1 represents the weight, b1 represents the bias, F c represents the fully connected layer, F gp Represents global average pooling (GlobalAverage Pooling).
[0058] Use spatial attention for the other part as follows:
[0059] X″ k1 =σ(W2·GN(X k1 )+b2)·X k1 (3)
[0060] Among them, σ represents the sigmoid function, W2 represents the weight, b2 represents the bias, GN represents group normalization, X kl ” represents the feature unit in feature attention.
[0061] Finally, the two feature maps are concatenated along the channel dimension, all subunits are aggregated, and the channels are shuffled to obtain the final feature map. By introducing permutation attention in the backbone network, the model's focus on leaky targets is improved.
[0062] 2.2 Constructing the neck network. Based on the feature pyramid network (FPN) structure, a path aggregation-based convolutional neural network (PAFPN) is used to further optimize the feature fusion and transmission process. By using the nearest neighbor interpolation algorithm for upsampling, the upsampled feature map is spliced with the feature map from the lower layer, which enhances the feature richness and the detection ability of multi-scale targets. At the same time, the C3 module is introduced to further process the features, and the residual structure is used to maintain the gradient flow and enhance the feature expression, thereby improving the overall performance of the model.
[0063] 2.3 Constructing the detection head. Each detection head is designed to contain two independent branches, one for the regression task (i.e., predicting the location of the bounding box) and the other for the classification task (determining the object category within the bounding box). The two branches do not share parameters, ensuring the specificity of each task and avoiding possible interference between tasks. Each branch consists of a series of convolution operations. First, a 3×3 convolution layer is used to capture deeper spatial relationships, and then a 1×1 convolution layer is used to change the number of channels of the features, which helps to improve the ability to understand complex patterns. This is followed by a batch normalization (BN) layer, which can accelerate the training process and stabilize the learning dynamics of the model while reducing the problem of internal covariate shift. Finally, SiLU (Sigmoid Linear Unit) is used as the activation function. Compared with traditional activation functions such as ReLU, SiLU can provide smoother nonlinear transformations, which helps to improve the generalization ability of the model and the gradient flow during the optimization process.
[0064] 3. Constructing loss function
[0065] 3.1 Constructing Class Loss. Focal Loss is used for class loss. It is a loss function designed to address class imbalance and is suitable for situations where the number of foreground and background samples is extremely asymmetric in object detection tasks. When dealing with such imbalanced datasets, traditional cross-entropy loss may cause the model to overemphasize the predominant background class and neglect the minority class. Focal Loss introduces a modulation factor to dynamically reduce the weight of easily classified samples and a balancing factor FL to adjust the ratio between positive and negative samples, further helping to address the class imbalance problem. This is shown below:
[0066] FL(pt )=-α t (1-p t ) λ log(p t ) (4)
[0067] Among them, p t represents the predicted probability of the model, α t represents the modulation factor, which is 0.75; λ represents the balance factor, which is 2.
[0068] 3.2 Construct the regression loss of the bounding box branch. The SIoU loss function is used for the regression loss, which mainly includes angle loss, distance loss, shape loss, and IoU intersection-over-union ratio. The angle loss is defined as follows:
[0069]
[0070] Among them, c h is the height difference between the center of the real box and the predicted box, and σ is the distance between the center of the real box and the predicted box. By connecting the center points of the real and predicted boxes, a center point vector can be formed, where α and β represent the direction of the vector, B represents the predicted bounding box, and B gt Represents the bounding box of the ground truth. Figure 5 shown.
[0071] The distance loss is defined as follows:
[0072]
[0073] in,
[0074]
[0075] c w 、c y The width and height of the minimum bounding rectangle of the real box and the predicted box. b cx Refers to the actual ground truth value and predicted value of the horizontal coordinate in the bounding box boudingbox; b cy , refers to the groundtruth value and predicted value of the vertical coordinate in the boudingbox. A is a preset 16 fixed reference value: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15].
[0076] The shape loss is defined as follows:
[0077]
[0078] in,
[0079]
[0080] (w,h) and (w gt ,h gt ) are the width and height of the predicted box and the real box respectively, and θ controls the degree of attention to the shape loss, such as Figure 6 shown.
[0081] The final loss function is defined as follows:
[0082]
[0083] (4) Model training
[0084] During training using the improved YOLOv8 model, the image is first fed into the backbone network to extract feature maps at three different scales. These feature maps correspond to objects of different sizes in the image and provide the basis for subsequent multi-scale detection. Next, these feature maps at three different scales are fed into the neck network, where features are fused across different layers. This cross-scale information exchange enhances the expressive power of the feature maps at each scale, significantly improving the detection of small objects. The fused feature maps are then fed into the detection head, which consists of two independent branches: one for class prediction and the other for bounding box regression. Each branch contains multiple convolutional layers to extract more abstract and useful information from the feature maps. In the class prediction branch, Focal Loss is used as the loss function to address class imbalance and improve the detection accuracy of rare classes. In the bounding box regression branch, the SIoU loss function is used to precisely adjust the position and size of the predicted boxes. During training, the model calculates the overall network loss based on the difference between the predictions generated during the forward pass and the true labels. This loss value not only reflects the model's current prediction error but also serves as a key signal guiding the update of model parameters. Through the backpropagation algorithm, the model parameters will be adjusted according to the calculated loss value, gradually optimizing the model's predictive ability.
[0085] (5) Inference deployment combined with historical image data
[0086] After the model is trained, the weight file with the highest verification accuracy is used to perform inference prediction on the on-site image. Considering that the inspection scene is indoors, the shadows caused by the lights or the colors of certain floors are highly similar to floor leaks, the historical data template image is introduced and the shadow area is predefined, such as Figure 7 Therefore, in order to combine the characteristics of time series to better alleviate the impact of light shadows, we built a supplementary reasoning model based on historical features, such as Figure 10As shown: During the inference process, we will pass the intermediate layer features extracted from the YOLOv8 neck part on the time series. This time series feature will supplement the historical information with the features of the current frame. Figure 10 The historical features are represented by the blue module. It can be seen intuitively that the historical features of the first two frames complement ( Figure 10 The two blue modules in the upper row are added to the current frame to form a fusion feature ( Figure 10 The third row of blue modules) increases the accuracy of the network.
[0087] Furthermore, during inference, by calculating the intersection-over-union ratio between the prediction result and the shadow area, areas in the inspection results that highly overlap with the shadow area are removed, thereby reducing the model's misidentification. Furthermore, when adjusting on-site lighting or the inspection robot's route or location, the template image can be manually adjusted to set a new shadow area.
[0088] The embodiments of the present application have at least the following advantages:
[0089] Advantage 1: The backbone network of YOLOv8 is improved, and a permutation attention mechanism is introduced after the c2f module in each stage, aiming to further improve the quality and efficiency of feature extraction by enhancing the model's perception of local and global information.
[0090] Advantage 2: The YOLOv8 regression loss function is improved by introducing the SIoU loss function and adding a scale factor, making the loss function more sensitive to the position and size errors of the bounding box, thereby more accurately adjusting the position and size of the predicted box. This not only reduces positioning bias, especially when the target scale varies greatly, but also improves the model's convergence speed.
[0091] Advantage 3: During inference, a shadow template image is set, the intersection-over-union ratio of the prediction result and the shadow area is calculated, and areas in the inspection results that highly overlap with the shadow part are eliminated, thereby reducing the model's misrecognition.
[0092] Effect: A set of ablation experiments was conducted to verify the effectiveness of the improvement. The experimental results are shown in Table 1 below:
[0093] Table 1 Ablation experiment
[0094]
[0095] Through ablation experiments, it can be seen that the YOLOv8 model performs quite well on the dataset, with its AP50, mAP and Recall indicators being 92.5%, 86.8% and 94.4% respectively; the AP50, mAP and Recall indicators of the backbone network after the permutation attention increased by 1.6%, 0.7% and 0.8% respectively, indicating that the permutation attention mechanism can effectively enhance the model's perception of local and global information and improve the quality of feature extraction; on this basis, the SIoU loss function is introduced, and the AP50, mAP and Recall indicators of the model increased to 95.4%, 87.9% and 95.4% respectively, and the performance has continued to increase, indicating that the SIoU loss function further optimizes the detection accuracy and robustness of the model in the bounding box regression task, especially in the performance under high thresholds and multi-scale target detection.
[0096] The improved algorithms are tested on the test set, and the results are as follows: Figure 8 、 Figure 9 The improved models accurately identified three leaks at the site. However, the previous model misidentified the blackened floor as a leak. The improved model, by incorporating historical data template images, effectively avoided this misdetection and achieved higher confidence levels for the leaks it detected.
[0097] The present application also provides a training device for a hydropower station leakage recognition model, the training device comprising:
[0098] The acquisition unit is used to collect original images of leakage in the pipelines at the hydropower station site;
[0099] a marking unit, configured to select a target location of leakage in the original image and mark it with a label to form a training set; and
[0100] The training unit uses the training set to train the hydropower station leakage recognition model.
[0101] The hydropower station leakage identification model adopts the YOLOv8 model, which includes: a backbone network, a neck network and a detection head. The backbone network is used to extract feature maps at different levels, the neck network is used to splice the upsampled feature maps with feature maps from lower levels to obtain fused features at different levels, and the detection head is used to perform regression and classification tasks on the fused features. The regression task is used to predict the position of the bounding box, and the classification task is used to identify the object category within the bounding box.
[0102] The present application also provides a device for identifying leakage in a hydropower station, the device comprising:
[0103] an acquisition unit, for obtaining an image of a pipeline on site of a hydropower station to be processed; and
[0104] The recognition unit is used to process the on-site pipeline image of the hydropower station to be processed using the hydropower station leakage recognition model trained as above to obtain a recognition result.
[0105] An embodiment of the present application also provides an electronic device, comprising: a processor, and a memory coupled to the processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method described in any one of the above embodiments.
[0106] The electronic device may be a computing device such as a desktop computer, a notebook computer, a PDA, a cloud server, etc. The electronic device may include, but is not limited to, a processor and a memory.
[0107] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, connecting various parts of the entire device using various interfaces and lines.
[0108] The memory may be used to store the computer program, and the processor implements various functions of the electronic device by running or executing the computer program stored in the memory and calling the data stored in the memory.
[0109] The memory may primarily include a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application required for a function, and the like; and the data storage area may store data created based on the use of the mobile phone, and the like. Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a SmartMedia Card (SMC), a Secure Digital (SD) card, a flash memory card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0110] The embodiment of the present application also provides a storage medium, which is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0111] An embodiment of the present application further provides a computer program product, including: a computer program or instructions, which, when executed on a computer, causes the computer to execute any of the above-mentioned possible implementation methods.
[0112] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications are also considered to be within the scope of protection of the present application.
Claims
1. A training method for a hydropower station leakage recognition model, characterized in that: The training method comprises: Collect original images of pipeline leakage at the hydropower station site; Selecting the target location of leakage in the original image and marking it with a label to form a training set; and The training set is used to train the hydropower station leakage recognition model. The hydropower station leakage identification model adopts the YOLOv8 model, which includes: a backbone network, a neck network and a detection head. The backbone network is used to extract feature maps at different levels, the neck network is used to splice the upsampled feature maps with feature maps from lower levels to obtain fused features at different levels, and the detection head is used to perform regression and classification tasks on the fused features. The regression task is used to predict the position of the bounding box, and the classification task is used to identify the object category within the bounding box.
2. The training method according to claim 1, wherein: The backbone network includes: several convolutional layers arranged at different levels and cross-stage connection c2f modules arranged between convolutional layers at different levels. The neck network includes: several splicing layers arranged between different levels and c2f modules arranged after the splicing layers. The c2f module of the backbone network is also connected to the splicing layer of the neck network. A permutation attention mechanism is introduced after the c2f module. The permutation attention mechanism is used to apply a channel attention mechanism to some features and a spatial attention mechanism to another part of the features, and to shuffle them on the channel.
3. The training method according to claim 1, wherein: The neck network adopts the C3 module with residual connection.
4. The training method according to claim 1, wherein: The detection head includes a 3×3 convolution layer, a 1×1 convolution layer, a batch normalization layer, and a SiLU activation function layer connected in sequence.
5. The training method according to claim 1, wherein: The regression task adopts the SIoU loss function, and the classification task adopts the FocalLoss loss function. The SIoU loss function includes: angle loss term, distance loss term and shape loss term. The YOLOv8 model calculates the overall loss based on the difference between the prediction result generated by forward propagation and the true label.
6. The training method according to claim 1, wherein: The training method further comprises: Adding a historical feature to the fusion feature, wherein the historical image corresponding to the historical feature defines a light and shadow area; and During inference, the intersection over union (IoU) of the recognition result and the illuminated shadow area is calculated to remove areas in the recognition result that highly overlap with the illuminated shadow area.
7. A method for identifying leakage in a hydropower station, characterized in that: The identification method comprises: Obtain images of pipelines at the hydropower station to be treated; and The hydropower station leakage recognition model trained according to any one of claims 1 to 6 is used to process the on-site pipeline image of the hydropower station to be processed to obtain a recognition result.
8. A training device for a hydropower station leakage identification model, characterized in that: The training device comprises: The acquisition unit is used to collect original images of leakage in the pipelines at the hydropower station site; a marking unit, configured to select a target location of leakage in the original image and mark it with a label to form a training set; and The training unit uses the training set to train the hydropower station leakage recognition model. The hydropower station leakage identification model adopts the YOLOv8 model, which includes: a backbone network, a neck network and a detection head. The backbone network is used to extract feature maps at different levels, the neck network is used to splice the upsampled feature maps with feature maps from lower levels to obtain fused features at different levels, and the detection head is used to perform regression and classification tasks on the fused features. The regression task is used to predict the position of the bounding box, and the classification task is used to identify the object category within the bounding box.
9. A device for identifying leakage in a hydropower station, characterized in that: The identification device comprises: an acquisition unit, configured to obtain an image of a pipeline on site of a hydropower station to be processed; and The recognition unit is used to process the on-site pipeline image of the hydropower station to be processed using the hydropower station leakage recognition model trained according to any one of claims 1 to 6 to obtain a recognition result.
10. An electronic device, characterized in that: The electronic device includes: a processor, and a memory coupled to the processor, The memory is used to store computer programs; and The processor is configured to execute the computer program stored in the memory, so that the electronic device executes the training method according to any one of claims 1 to 6, or executes the recognition method according to claim 7.
Citation Information
Cited By
Pumped storage power station leakage identification method, system and device and storage medium
CN122265906A