Distribution network uninterrupted operation safety monitoring method based on improved YOLOv8n algorithm

By improving the YOLOv8n algorithm and combining it with first-person perspective data collection and Shape-IoU loss function, the high cost and low efficiency problems of traditional monitoring methods are solved, real-time and accurate safety monitoring of distribution network operation sites without power outages is achieved, and the reliability of safety monitoring is improved.

CN120673339APending Publication Date: 2025-09-19SICHUAN UNIV +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510791131.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Traditional manual supervision and remote video monitoring have the problems of high cost, low efficiency and easy missed detection and false detection in the non-stop operation of distribution network, making it difficult to timely discover and prevent safety hazards at the operation site.

Method used

The improved YOLOv8n algorithm is adopted. By building an improved YOLOv8n model, combining first-person perspective data collection and segmented sampling method, using the Labelimg tool to generate annotation files, and using the Shape-IoU loss function for training, the accuracy and reliability of target detection are enhanced.

Benefits of technology

It realizes real-time and efficient safety monitoring of the distribution network's non-stop operation site, significantly improves the recognition accuracy of key targets such as insulating equipment and exposed wires, and enhances the reliability and practicality of safety monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120673339A_ABST
    Figure CN120673339A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power distribution network uninterruptible operation in the power industry, and particularly discloses a power distribution network uninterruptible operation safety monitoring method based on an improved YOLOv8n algorithm, and the method comprises the steps: carrying out the sample collection of a wearable device at a power distribution network uninterruptible operation first visual angle site, and extracting a video key frame through a segmented sampling method; on the basis of an existing YOLOv8n structure, a C2f module in a backbone network is replaced with a C2fCAS module, a C2f module in a neck network is replaced with a C2fSHViTBlock module, and an EFC module is added into the neck network; training the improved YOLOv8n model by adopting a training set and a verification set to obtain a target detection model; and inputting a to-be-detected image into the target detection model for detection, and outputting a distribution network non-power-cut operation safety monitoring result. The method has the advantages that the model can accurately recognize key targets such as insulation equipment and bare wires in real time on the power distribution network non-power-cut operation site, the reliability and practicability of safety monitoring are remarkably enhanced, and efficient and intelligent safety guarantee is provided for power distribution network non-power-cut operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of non-stop power operation of power distribution network in the electric power industry, and in particular to a distribution network non-stop power operation safety monitoring method based on an improved YOLOv8n algorithm. Background Art

[0002] With the continuous development of my country's economy, electricity demand for both residential and industrial use is increasing, and the reliability of power supply is becoming increasingly prominent. To maximize the protection of users' electricity supply, distribution network operations are gradually shifting towards a continuous power outage model. However, this places high demands on safety management during operations. If operators fail to properly wear and use safety insulation equipment or engage in other irregular operating behaviors, the continuous power supply of the power system will be affected, and even serious safety accidents may occur.

[0003] Traditional safety monitoring relies primarily on manual oversight. However, manual monitoring methods require excessively high labor costs, making them difficult to adapt to the future trend of intelligent and automated systems. Furthermore, judgments and decisions made through remote video monitoring are highly subjective, prone to missed detections and false positives. This results in various safety hazards at distribution network operation sites not being promptly identified and resolved, making it difficult to prevent accidents.

[0004] With the rapid development of computer vision and artificial intelligence technologies, video image recognition technology has made significant progress in multiple fields, providing new solutions for safety monitoring of distribution network non-stop operations. Therefore, this paper combines computer vision technology to design a method for safety monitoring of distribution network non-stop operations, enabling real-time and efficient safety monitoring of non-stop operations. Summary of the Invention

[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a distribution network non-stop operation safety monitoring method based on an improved YOLOv8n algorithm.

[0006] The purpose of the present invention is achieved through the following technical solutions: a method for monitoring the safety of distribution network without power outages based on an improved YOLOv8n algorithm, the method comprising:

[0007] Dataset construction: Using wearable devices to collect samples from the first-person perspective of workers performing live operations on the distribution network, we obtained a video stream of workers performing live operations from a first-person perspective. We also used a segmented sampling method to extract key frames from the video. We then used the Labelimg tool to generate a YOLO-format annotation file, which was then divided into a training set, a validation set, and a test set in an 8:1:1 ratio.

[0008] Build an improved YOLOv8n model; based on the existing YOLOv8n structure, replace the C2f module in the backbone network with the C2f_CAS module, replace the C2f module in the neck network with the C2f_SHViTBlock module, and replace the Concat module in the neck network with the EFC module, and use Shape-IoU as the loss function;

[0009] Model training: Use the training set and validation set to train the improved YOLOv8n model to obtain the target detection model;

[0010] The image to be tested is input into the target detection model for detection, and the live working behavior analysis detection results are output.

[0011] Specifically, the C2f_CAS module includes an integrated subnetwork, CATM and MLP connected in sequence; the integrated subnetwork includes three deep convolutional layers with a stride of 1, a normalization layer and an activation function layer; the CATM uses spatial attention branches and channel attention branches to capture global context information; the MLP includes two convolutional layers with a stride of 1, a normalization layer and an activation function layer to further integrate the global information output by CATM.

[0012] Specifically, for the spatial attention branch, the input The local feature information of each image block is first integrated through a 3×3 convolution layer, a batch normalization layer, and a linear rectification function layer ReLU, and then reduced to 1 by a 1×1 convolution layer, and then Sigmoid activation is performed in the spatial domain to output the attention map. ;

[0013] ;

[0014] Where x represents the feature map of the spatial attention branch input, and D represents the convolutional layer.

[0015] Specifically, for the channel attention branch, an adaptive pooling layer and a 1×1 convolution layer are used to integrate the information between channels, and then Sigmoid activation is performed in the channel domain to output the attention map. ;

[0016] ;

[0017] Where x represents the feature map of the channel attention branch input, P represents adaptive pooling, and D represents the convolutional layer.

[0018] Specifically, the output of the CATM is:

[0019] ;

[0020] Where, , Q, K, V represent the query vector, key vector, and value vector obtained by linear transformation, respectively. represents the context mapping function, represents a linear transformation used to incorporate contextual information.

[0021] Specifically, the C2f_SHViTBlock module includes a depthwise separable convolutional layer, a single-head self-attention layer, and a feedforward network; the depthwise separable convolutional layer consists of a 3×3 convolutional layer, which aggregates local features through local receptive fields; the single-head self-attention layer uses a single-head attention mechanism for some input channels, and directly retains the remaining channels.

[0022] Specifically, the EFC module includes a GFF module and an MFR module;

[0023] The GFF module uses low-resolution features After sampling and convolution, the processed features are combined with the high-resolution features Add together to obtain a coarse feature map , then, 1×1 convolution is used to compress the features into a single channel to aggregate spatial information, and Sigmoid activation is performed to generate spatial aggregation weights , output features containing spatial information ;

[0024] ;

[0025] ; In order to enhance the correlation between adjacent features, the spatially aggregated features Divide into n groups along the channel dimension, and refine each group through the convolution module Feature information of adjacent channels within the network is used to generate attention masks through global feature transformation ; Then, the features of each group are connected to form the aggregated adjacent features ;

[0026] ;

[0027] Where, Represents the feature information of each group after processing; Represents the sub-features after grouping; Represents the convolution operation; Represents a normalization operation.

[0028] Finally, the grouped aggregate features Embedded into the normalization layer of MFF. Normalize the features by the mean and standard deviation to obtain features with strong feature correlation and rich spatial information. ;

[0029] Specifically, the MFR module operates by upsampling, convolution, linear addition and batch normalization to extract feature maps of different resolutions and dimensions. Hezhong Get coarse feature map , then, the information weight of each channel is generated by average pooling and Sigmoid activation function, which is used as the feature weight threshold ;

[0030] ; The weight information of different stages and and feature weight threshold Compare and obtain the attention map that captures the strength of spatial information, and then aggregate the strong and weak feature information of each layer respectively; strong information attention map and And weak information attention map and Mapped to features Go up and get and ;

[0031] ;

[0032] ; For strong feature information, 1×1 convolution is used to retain the feature map details, and we get ; For weak features, feed them to the feature transformation unit FTU for processing, and obtain , weighted mapping is performed through adaptive average pooling and convolutional layers to enhance the information flow between channels;

[0033] Where, represents the mixed enhancement feature, and α represents the weighting coefficient of the weak feature.

[0034] Specifically, the improved YOLOv8n model is trained using the Shape-IoU loss function;

[0035] The weight coefficients ww and hh are introduced based on the shape and scale of the real box, and the weights are dynamically assigned according to its aspect ratio, with a greater penalty for deviations along the short side.

[0036] ;

[0037] ;

[0038] in, and Represent the width and height of the real box respectively, and scale represents the factor related to the target scale;

[0039] Combine the weighted shape center distance loss and aspect ratio loss to dynamically adjust the impact of center point distance and aspect ratio difference on the loss;

[0040] ;

[0041] ;

[0042] ;

[0043] in, represents the shape center distance loss, c represents the diagonal distance of the minimum bounding box, Represents the center coordinate of the prediction box, Represents the center coordinates of the real box; represents the sum of shape weights; Indicates the width-height difference weight;

[0044] The final loss function is:

[0045] The present invention has the following advantages:

[0046] Aiming at the scenario of non-stop power distribution network operation, the present invention improves the YOLOv8n model, introduces a dual-domain attention mechanism into the backbone network, integrates spatial and channel global information, and improves target perception capabilities in complex scenarios; adopts a lightweight single-head self-attention module to replace the traditional multi-head design, reducing computational redundancy and ensuring efficient operation of the model; adds a multi-scale feature fusion module to enhance the accuracy of small target detection through hierarchical feature reconstruction; optimizes the bounding box regression strategy, adaptively adjusts the loss weight based on the target shape, and improves positioning accuracy; combines first-person perspective data acquisition and dynamic keyframe extraction to effectively adapt to the movement trajectory of the operator and approach their actual perception and vision. These improvements enable the model to accurately identify key targets such as insulating equipment and exposed wires in real time at the site of non-stop power distribution network operation, significantly enhancing the reliability and practicality of safety monitoring, and providing efficient and intelligent safety protection for non-stop power distribution network operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 This is a schematic diagram of the existing YOLOv8n model structure;

[0048] Figure 2 A schematic diagram of the process for constructing a data set of the present invention;

[0049] Figure 3 This is the improved YOLOv8n structure diagram of the present invention;

[0050] Figure 4 This is a structural diagram of the C2f_CAS module of the present invention;

[0051] Figure 5 This is a structural diagram of the CAS module of the present invention;

[0052] Figure 6 This is a structural diagram of the C2f_SHViTBlock module of the present invention;

[0053] Figure 7 This is the improved structural diagram of the SHViTBlock module of the present invention;

[0054] Figure 8 This is a structural diagram of the EFC module of the present invention;

[0055] Figure 9 Schematic diagram of loss function bounding box regression of the present invention;

[0056] Figure 10 This is a schematic diagram of the improved YOLOv8n model training process of the present invention;

[0057] Figure 11 It is the confusion matrix of the improved YOLOv8n model of the present invention. DETAILED DESCRIPTION

[0058] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for the purpose of explaining the present invention and are not intended to limit the present invention. That is, the embodiments described herein are only some embodiments of the present invention, not all embodiments. Generally, the components of the embodiments of the present invention described and illustrated in the drawings herein can be arranged and designed in various different configurations.

[0059] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but is merely intended to represent selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.

[0060] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

[0061] The present invention will be further described below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following description.

[0062] like Figures 1 to 11 As shown, a method for monitoring live working safety during power operation and inspection based on an improved YOLOv8n algorithm is provided, the method comprising:

[0063] Dataset construction: wearable devices were used to collect samples from the first-person perspective of workers performing live operations in the distribution network. Video streams of workers performing live operations from the first-person perspective were obtained. First-person perspective videos have characteristics such as field of view jitter and motion blur, so a segmented sampling method was used to extract video key frames. The Labelimg tool was then used to generate YOLO format annotation files, which were divided into training, validation, and test sets in an 8:1:1 ratio. These images cover a variety of objects, including insulating gloves, ordinary gloves, hard insulating shields, exposed wires, and other object types.

[0064] An improved YOLOv8n model is constructed. Based on the existing YOLOv8n structure, the C2f module in the backbone network is replaced with the C2f_CAS module, and the C2f module in the neck network is replaced with the C2f_SHViTBlock module. While enhancing the local feature extraction capability, the global context capture capability is enhanced through the spatial and channel dual-domain attention branches, thereby improving the recognition accuracy of the first-person perspective object detection algorithm. The Concat module in the neck network is replaced with the EFC module, which also has a good detection effect on small targets such as exposed wires. Finally, Shape-IoU is used as the loss function, and the regression loss is calculated based on the shape and size of the bounding box itself to improve the bounding box regression accuracy.

[0065] The C2f_CAS module includes an integrated sub-network, a CATM and an MLP connected in sequence;

[0066] The integrated sub-network includes three deep convolutional layers with a stride of 1, a normalization layer, and an activation function layer; the receptive field of the model is expanded to integrate local feature information;

[0067] The CATM uses spatial attention branches and channel attention branches to capture global context information;

[0068] For the spatial attention branch, the input The local feature information of each image block is first integrated through a 3×3 convolution layer, a batch normalization layer, and a linear rectification function layer ReLU, and then reduced to 1 by a 1×1 convolution layer, and then Sigmoid activation is performed in the spatial domain to output the attention map. ;

[0069] ;

[0070] Where x represents the feature map of the spatial attention branch input, and D represents the convolutional layer.

[0071] For the channel attention branch, an adaptive pooling layer and a 1×1 convolution layer are used to integrate the information between channels, and then Sigmoid activation is performed in the channel domain to output the attention map. ;

[0072] ;

[0073] Where x represents the feature map of the channel attention branch input, P represents adaptive pooling, and D represents the convolutional layer. Dual-domain fusion is achieved through addition operations. This linear approach avoids the high complexity of matrix multiplication while preserving effective feature information.

[0074] The output of the CATM is:

[0075] ;

[0076] Where, , Q, K, and V represent the query vector, key vector, and value vector obtained by linear transformation, respectively; Represents the context mapping function; represents a linear transformation used to incorporate contextual information.

[0077] The default MLP expansion ratio is set to 4. The MLP includes two convolutional layers with a stride of 1, a normalization layer, and an activation function layer, which further integrates the global information output by CATM. This significantly improves the model's ability to perceive contextual information while effectively reducing the computational burden of the network.

[0078] The C2f_SHViTBlock module consists of a depthwise separable convolutional layer, a single-head self-attention layer, and a feedforward network. Its structural design aims to fully utilize the computing power of the GPU or CPU by minimizing memory-bound operations or applying them to fewer input channels. The depthwise separable convolutional layer consists of 3×3 convolutional layers, which aggregate local features through local receptive fields. The single-head self-attention layer uses a single-head attention mechanism for some input channels, while retaining the remaining channels directly. This avoids repeated calculations in the multi-head mechanism and reduces memory access. The formula is expressed as:

[0079] ;

[0080] Where, is the input channel calculated by the single-head attention mechanism, are the remaining channels that do not participate in the calculation, is the projection weight, Concat represents the connection operation;

[0081] By processing partial channels, the memory access cost is reduced, thereby improving the detection performance within the same amount of computing, making the model lightweight and conducive to deployment on edge devices with limited computing resources.

[0082] The EFC module includes a GFF module and an MFR module; it expands the conventional two-layer feature map fusion architecture, and by focusing on spatial context information and the commonality between inter-layer features, it enhances the semantic representation between features, promotes the extraction of multi-scale feature information and the recognition of small objects;

[0083] The GFF module is used to obtain global information and enhance the relevance of fused features. This solves the problem of poor feature relevance and matching in traditional fusion strategies, provides richer contextual information, and helps the model more accurately locate small targets. This process mainly includes spatial information aggregation, feature grouping and fusion, and spatial mapping normalization.

[0084] like As shown, , Represents feature maps from different resolutions and dimensions; for low-resolution features After sampling and convolution, the processed features are combined with the high-resolution features Add together to obtain a coarse feature map , then, 1×1 convolution is used to compress the features into a single channel to aggregate spatial information, and Sigmoid activation is performed to generate spatial aggregation weights , output features containing spatial information ;

[0085] ;

[0086] ; In order to enhance the correlation between adjacent features, the spatially aggregated features Divide into n groups along the channel dimension, and refine each group through the convolution module Feature information of adjacent channels within the network is used to generate attention masks through global feature transformation ; Then, the features of each group are connected to form the aggregated adjacent features ;

[0087] ;

[0088] Where, Represents the feature information of each group after processing, represents the sub-features after grouping, represents the convolution operation, Represents a normalization operation.

[0089] Finally, the grouped aggregate features Embedded into the normalization layer of MFF; normalized features by mean and standard deviation to obtain features with strong feature correlation and rich spatial information ;

[0090] The MFR module is used to separate and reconstruct the strong and weak feature information of different levels, reduce redundant calculations, and retain the details of small targets. The process mainly includes feature separation, directional fusion, and hierarchical fusion; the MFR module uses upsampling, convolution, linear addition, and batch normalization operations to extract the feature information from feature maps of different resolutions and dimensions. Hezhong Get coarse feature map , then, the information weight of each channel is generated by average pooling and Sigmoid activation function, which is used as the feature weight threshold ;

[0091] ; The weight information of different stages and and feature weight threshold Compare and obtain the attention map that captures the strength of spatial information, and then aggregate the strong and weak feature information of each layer respectively; strong information attention map and And weak information attention map and Mapped to features Go up and get and ;

[0092] ;

[0093] ; For strong feature information, 1×1 convolution is used to retain the feature map details, and we get ; For weak features, feed them to the feature transformation unit FTU for processing, and obtain , weighted mapping is performed through adaptive average pooling and convolutional layers to enhance the information flow between channels;

[0094] Where, represents the hybrid enhancement feature, Represents the weak feature weighting coefficient.

[0095] Model training: Use the training set and validation set to train the improved YOLOv8n model to obtain the target detection model;

[0096] The image to be tested is input into the target detection model for detection, and the safety monitoring results of the distribution network without power outage operation are output.

[0097] Furthermore, the improved YOLOv8n model is trained using the Shape-IoU loss function;

[0098] In the non-stop operation of the distribution network, the target objects of interest, such as insulating gloves, ordinary gloves, hard insulating shields, exposed wires, etc., have large differences in shape and size, and there are large changes in the first-person perspective live operation scene video stream. The original YOLOv8n model uses CIoU and DFL as the loss function for bounding box regression, which is not sensitive enough to certain specific shapes and aspect ratio changes, especially for targets with large size changes. To address the above problems, the present invention uses Shape-IoU as the loss function, focusing on the shape and scale calculation loss of the bounding box itself, thereby making the bounding box regression more accurate;

[0099] The weight coefficients ww and hh are introduced based on the shape and scale of the real box, and the weights are dynamically assigned according to its aspect ratio, with a greater penalty for deviations along the short side.

[0100] ;

[0101] ;

[0102] in, and Represent the width and height of the real box respectively, and scale represents the factor related to the target scale;

[0103] Combine the weighted shape center distance loss and aspect ratio loss to dynamically adjust the impact of center point distance and aspect ratio difference on the loss;

[0104] ;

[0105] ;

[0106] ;

[0107] in, represents the shape center distance loss, c represents the diagonal distance of the minimum bounding box, Represents the center coordinate of the prediction box, Represents the center coordinates of the real box; represents the sum of shape weights; Indicates the width-height difference weight;

[0108] The final loss function is:

[0109] During the training process of the improved YOLOv8n model, its target detection performance needs to be evaluated to obtain a model with excellent detection accuracy.

[0110] This paper verifies the excellent detection accuracy of the improved YOLOv8n algorithm through common evaluation indicators such as precision, recall, average precision mean, and parameter quantity.

[0111] Precision is used to measure the proportion of actual positive samples in the model to all samples identified as positive, and to a certain extent reflects the probability of false positives in the model.

[0112] ;

[0113] Among them, TP represents the number of positive samples that correctly detect the target object, and FP represents the number of negative samples that are not target objects but are misclassified.

[0114] The recall rate is used to measure the proportion of positive samples correctly identified by the model to all actual positive samples, and to a certain extent reflects the probability of missed detection by the model.

[0115] ;

[0116] Among them, FN represents the number of positive samples that the model failed to successfully identify as target objects.

[0117] Recall is usually considered together with precision to comprehensively evaluate the detection accuracy of the model.

[0118] mAP, mean Average Precision;

[0119] The area under the PR curve is defined as AP (Average Precision), which is used to comprehensively measure the target recognition effect.

[0120] ;

[0121] In the formula, mAP represents the average AP of multiple target categories, which can be used to evaluate the model's ability to detect multiple targets.

[0122] ;

[0123] Where n is the number of target categories.

[0124] Common metrics include mAP @0.5 and mAP @(0.5:0.95). mAP @0.5 indicates that a detection is successful when the IoU threshold between the prediction and the ground truth is greater than or equal to 0.5. mAP @(0.5:0.95) represents the average mAP value calculated by iterating over the IoU threshold from 0.5 to 0.95 in steps of 0.05.

[0125] The number of parameters can characterize the lightweightness and computational complexity of the target detection model.

[0126] After 300 epochs, the loss function converges, and the detection effect of the improved YOLOv8n is shown in Table 1 and Figure 11 shown.

[0127] Table 1 Improved YOLOv8n model detection performance

[0128]

[0129] It can be seen that the average accuracy of the model trained based on the improved YOLOv8n algorithm for insulating gloves, ordinary gloves, hard insulating shielding covers, and exposed wires is greater than 0.9, and the model can achieve good detection results.

[0130] Table 2 Improved YOLOv8n model target detection effect

[0131]

[0132] As can be seen from Table 2, the precision of the improved YOLOv8n algorithm is improved by 1.13%, the recall rate is improved by 4.07%, the average precision mAP(50) is improved by 2.61%, the number of parameters is reduced by 34.93%, and the comprehensive detection performance is significantly improved, which is conducive to identifying irregular operating behaviors at the operation site and ensuring the safety of the distribution network without power outages.

[0133] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Any person skilled in the art can, without departing from the scope of the technical solution of the present invention, make many possible changes and modifications to the technical solution of the present invention using the above technical content, or modify it into an equivalent embodiment with equivalent changes. Therefore, any changes, modifications, equivalent changes, and modifications made to the above embodiments based on the technology of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the present technical solution.

Claims

1. A method for monitoring power distribution network operation safety without power outage based on an improved YOLOv8n algorithm, characterized by: The method includes: Dataset construction: Using wearable devices to collect samples from the first-person perspective of workers performing live operations on the distribution network, we obtained a video stream of workers performing live operations from a first-person perspective. We also used a segmented sampling method to extract key frames from the video. We then used the Labelimg tool to generate a YOLO-format annotation file, which was then divided into a training set, a validation set, and a test set in an 8:1:1 ratio. Build an improved YOLOv8n model; based on the existing YOLOv8n structure, replace the C2f module in the backbone network with the C2f_CAS module, replace the C2f module in the neck network with the C2f_SHViTBlock module, and replace the Concat module in the neck network with the EFC module, and use Shape-IoU as the loss function; Model training: Use the training set and validation set to train the improved YOLOv8n model to obtain the target detection model; input the image to be tested into the target detection model for detection, and output the distribution network non-stop operation safety monitoring results.

2. The method for monitoring live working safety during power operation and inspection based on the improved YOLOv8n algorithm according to claim 1 is characterized in that: The C2f_CAS module includes an integrated sub-network, a CATM and an MLP connected in sequence; The integrated sub-network includes three depth convolution layers with a step size of 1, a normalization layer and an activation function layer; The CATM uses spatial attention branches and channel attention branches to capture global context information; The MLP includes two convolutional layers with a stride of 1, a normalization layer, and an activation function layer to further integrate the global information output by CATM.

3. The method for monitoring live working safety during power operation and inspection based on the improved YOLOv8n algorithm according to claim 2 is characterized in that: For the spatial attention branch, the input The local feature information of each image block is first integrated through a 3×3 convolution layer, a batch normalization layer, and a linear rectification function layer ReLU, and then reduced to 1 by a 1×1 convolution layer, and then Sigmoid activation is performed in the spatial domain to output the attention map. ; ; Where, The feature map representing the input of the spatial attention branch, Represents a convolutional layer.

4. The method for monitoring live working safety during power operation and inspection based on the improved YOLOv8n algorithm according to claim 3 is characterized in that: For the channel attention branch, an adaptive pooling layer and a 1×1 convolution layer are used to integrate the information between channels, and then Sigmoid activation is performed in the channel domain to output the attention map. ; ; Where x represents the feature map of the channel attention branch input, P represents adaptive pooling, and D represents the convolutional layer.

5. The method for monitoring live working safety during power operation and inspection based on the improved YOLOv8n algorithm according to claim 4 is characterized in that: The output of the CATM is: ; Where, , Q, K, and V represent the query vector, key vector, and value vector obtained by linear transformation, respectively; Represents the context mapping function; represents a linear transformation used to incorporate contextual information.

6. The method for monitoring live working safety during power operation and inspection based on the improved YOLOv8n algorithm according to claim 1, characterized in that: The C2f_SHViTBlock module includes a depthwise separable convolutional layer, a single-head self-attention layer, and a feedforward network. The depthwise separable convolutional layer consists of a 3×3 convolutional layer that aggregates local features through a local receptive field. The single-head self-attention layer uses a single-head attention mechanism for some input channels, while retaining the remaining channels directly.

7. The method for monitoring live working safety during power operation and inspection based on the improved YOLOv8n algorithm according to claim 1, characterized in that: The EFC module includes a GFF module and an MFR module; The GFF module uses low-resolution features After sampling and convolution, the processed features are combined with the high-resolution features Add together to obtain a coarse feature map , then, 1×1 convolution is used to compress the features into a single channel to aggregate spatial information, and Sigmoid activation is performed to generate spatial aggregation weights , output features containing spatial information ; ; ; In order to enhance the correlation between adjacent features, the spatially aggregated features Divide into n groups along the channel dimension, and refine each group through the convolution module Feature information of adjacent channels within the network is used to generate attention masks through global feature transformation ; Then, the features of each group are connected to form the aggregated adjacent features ; ; ; Where, Represents the feature information of each group after processing, represents the sub-features after grouping, represents the convolution operation, Represents normalization operation; Finally, the grouped aggregate features Embedded into the normalization layer of MFF; normalized features by mean and standard deviation to obtain features with strong feature correlation and rich spatial information ; 。 8. The method for monitoring live working safety during power operation and inspection based on the improved YOLOv8n algorithm according to claim 7 is characterized in that: The MFR module operates by upsampling, convolution, linear addition and batch normalization to obtain feature maps of different resolutions and dimensions. Hezhong Get coarse feature map , then, the information weight of each channel is generated by average pooling and Sigmoid activation function, which is used as the feature weight threshold ; ; The weight information of different stages and and feature weight threshold Compare and obtain the attention map that captures the strength of spatial information, and then aggregate the strong and weak feature information of each layer respectively; strong information attention map and And weak information attention map and Mapped to features Go up and get and ; ; ; For strong feature information, 1×1 convolution is used to retain the feature map details, and we get ; For weak features, feed them to the feature transformation unit FTU for processing, and obtain , weighted mapping is performed through adaptive average pooling and convolutional layers to enhance the information flow between channels; ; Where, represents the mixed enhancement feature, and α represents the weighting coefficient of the weak feature.

9. The method for monitoring live working safety during power operation and inspection based on the improved YOLOv8n algorithm according to claim 7, characterized in that: The improved YOLOv8n model is trained using the Shape-IoU loss function; The weight coefficients ww and hh are introduced based on the shape and scale of the real box, and the weights are dynamically assigned according to its aspect ratio, with a greater penalty for deviations along the short side. ; ; in, and Represent the width and height of the real box respectively, and scale represents the factor related to the target scale; Combine the weighted shape center distance loss and aspect ratio loss to dynamically adjust the impact of center point distance and aspect ratio difference on the loss; ; ; in, represents the shape center distance loss, c represents the diagonal distance of the minimum bounding box, Represents the center coordinate of the prediction box, Represents the center coordinates of the real box; represents the sum of shape weights; Indicates the width-height difference weight; The final loss function is: 。

Citation Information

Cited By

  • Water conservancy facility identification method based on improved real-time target detection model

    CN121213894A