Improved YOLOv8-based high-voltage transmission line defect detection algorithm
Through the improved YOLOv8 network model, the Mamba-Block module and the focused diffusion pyramid network structure are used to solve the problem of small defect detection under the complex background of high-voltage transmission lines, achieving higher detection accuracy and lower leakage detection rate.
Patent Information
- Application Number
- CN202411575777.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-25
AI Technical Summary
The existing high-voltage transmission line defect detection technology is difficult to effectively detect small defects in complex backgrounds, resulting in missed inspection problems.
The improved YOLOv8 network model is adopted, feature extraction is performed through the Mamba-Block module, a dynamic weight selection mechanism and a focused diffusion pyramid network structure are introduced, and the model's detection ability of small defects is enhanced.
It significantly improves the ability to detect small defects in the complex context of high-voltage transmission lines, reduces the leakage detection rate, and meets the needs of high-voltage transmission lines defect detection tasks.
Smart Images

Figure CN119515821A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect detection, and in particular to a high-voltage transmission line defect detection algorithm based on improved YOLOv8. Background Art
[0002] With the rapid development of my country's national economy and science and technology, electricity consumption has gradually increased, and the scale of high-voltage transmission lines has also been expanding; insulators are crucial components in overhead transmission lines, with excellent mechanical strength and electrical insulation performance. Their main function is to provide necessary support and electrical isolation for current-carrying conductors. Grading rings play a role in dispersing the electric field strength on cables in transmission lines, which can effectively reduce the concentration of local power plants, thereby reducing the risk of electrical breakdown and improving the reliability of lines; the main function of high-voltage cables is to transmit electrical energy, and to meet the electricity needs of different regions by connecting power plants, substations and power users; however, since high-voltage transmission lines are usually distributed in remote areas, insulators, grading rings and high-voltage cables are exposed outdoors and face harsh operating environments, which pose a serious threat to the safety and stability of the power system; therefore, detecting defects in high-voltage transmission lines is one of the key links to ensure safe and reliable power transmission.
[0003] With the remarkable progress of deep learning algorithms in the field of image recognition and detection, the target detection algorithm based on indoor light learning has attracted widespread attention due to its high detection progress and strong robustness. The application of such algorithms in high-voltage transmission line defect detection is also increasing, and it has shown superior performance. For example, Zhao et al. fine-tuned the faster region-based FasterR-CNN model to detect insulators; Zhang et al. improved the feature pyramid network for insulators and insulator defects in YOLOv3; Zhang et al. proposed an attention-guided multi-task CNN to detect power line components; Zheng et al. proposed an improved central network to improve the recognition effect of substation equipment under complex background, but did not take into account the rotation characteristics of objects; Zheng et al. proposed a directional detection model for infrared images of insulators, but the detection speed was slow; Although these methods have become the mainstream solutions in the field of target detection, the complex background and tiny defects in high-voltage transmission line images often lead to defects being missed. Therefore, the task of high-voltage transmission line defect detection still has great challenges. Summary of the invention
[0004] In order to solve the problems existing in the prior art, the present invention provides a high-voltage transmission line defect detection algorithm based on improved YOLOv8. The scheme includes: acquiring multiple high-voltage transmission line images taken to construct a high-voltage transmission line defect detection data set; inputting the high-voltage transmission line defect detection data set into the improved YOLOv8 network model for training; using the trained improved YOLOv8 network model to perform defect detection on the high-voltage transmission line to be detected; the improved YOLOv8 network model includes: the backbone network uses the Mamba-Block module to extract features from the high-voltage transmission line image; the backbone network also uses a dynamic weight selection mechanism to assign weights to the fused feature map; the neck network uses a focused diffusion pyramid network structure to fuse the extracted features; the improved model proposed by the present invention can effectively improve the detection capability of small defects and meet the needs of high-voltage transmission line detection tasks.
[0005] The present invention adopts the following technical solution, a high-voltage transmission line defect detection algorithm based on improved YOLOv8, including:
[0006] Acquire a plurality of photographed high-voltage transmission line images; the high-voltage transmission line images include a plurality of high-voltage transmission lines with defects;
[0007] A high-voltage transmission line defect detection dataset is constructed based on multiple acquired high-voltage transmission line images;
[0008] Inputting the high-voltage transmission line defect detection data set into the improved YOLOv8 network model for training to obtain a trained YOLOv8 network model;
[0009] Obtain an image of a high-voltage transmission line to be inspected, input the image of the high-voltage transmission line to be inspected into a trained YOLOv8 network model, and use the trained improved YOLOv8 network model to perform defect detection on the high-voltage transmission line to be inspected;
[0010] The improved YOLOv8 network model includes: a backbone network, a neck network and a head network; wherein the backbone network uses a Mamba-Block module to extract features from high-voltage transmission line images, and introduces a dynamic weight selection mechanism to weight the output features of the Mamba-Block module; the neck network uses a focused diffusion pyramid network structure to fuse the extracted features.
[0011] Furthermore, the backbone network uses the Mamba-Block module to extract features from the high-voltage transmission line image, including:
[0012] The input high-voltage transmission line image is normalized by layer normalization;
[0013] The normalized high-voltage transmission line image enters two parallel paths, which are a main path and a bypass path.
[0014] The high-voltage transmission line image is subjected to deep separable convolution through the main path to extract spatial features, and then subjected to feature enhancement through the Selective SSM module, and nonlinear mapping is performed using an activation function;
[0015] After the high-voltage transmission line image passes through the bypass path, it undergoes a linear layer to perform a linear combination of features, and then uses an activation function to perform nonlinear mapping;
[0016] The outputs of the main path and the bypass path are fused by element-by-element multiplication to obtain the output features of the Mamba-Block module.
[0017] Furthermore, the neck network adopts a focused diffusion pyramid network structure to fuse the extracted features, specifically:
[0018] After the extracted features are input into the focused diffusion pyramid network structure, they are input into three branches for downsampling processing respectively; the first branch uses the Adown module for downsampling to obtain the first feature map; the second branch uses a 1*1 convolution kernel for channel compression and feature transformation to obtain the second feature map; the third branch uses a 3*3 convolution kernel to extract local spatial features to obtain the third feature map;
[0019] The first feature map, the second feature map and the third feature map are concatenated to obtain a fused feature map;
[0020] Four parallel depth-wise separable convolution operations are performed on the multi-scale feature fusion map, and the outputs of the convolution operations are added and fused element by element to obtain a multi-scale fusion feature map.
[0021] Furthermore, the Adown module includes:
[0022] After performing a two-dimensional average pooling operation on the input features, they are input into two branches respectively;
[0023] The feature input to the first branch undergoes a maximum pooling operation and passes through a convolutional layer for feature transformation and channel compression;
[0024] The second branch of feature input passes through a convolutional layer for feature transformation and channel compression;
[0025] The outputs of the two branches are fused through a feature concatenation operation to obtain the first feature map.
[0026] Furthermore, the backbone network also uses a dynamic weight selection mechanism to assign weights to the output features of the Mamba-Block module, including:
[0027] The output features of the Mamba-Block module are subjected to a convolutional layer for feature extraction and channel compression, and then divided into two branches; the left branch uses variable convolution, and the right branch uses two-dimensional convolution.
[0028] Furthermore, the high-voltage transmission line image includes a variety of high-voltage transmission lines with defects, specifically:
[0029] The various defects in high-voltage transmission lines include: damaged insulators, tilted equalizing rings, detached equalizing rings, broken cable strands, loose cable strands, and foreign objects in cables.
[0030] Furthermore, the method for constructing a high-voltage transmission line defect detection dataset based on multiple high-voltage transmission line images is as follows:
[0031] Taking multiple high-voltage transmission line pictures, manually annotating the multiple high-voltage transmission line pictures, and classifying defects according to the annotated content of each high-voltage transmission line picture;
[0032] A high-voltage transmission line defect detection dataset is constructed based on multiple classified high-voltage transmission line images.
[0033] Furthermore, when the high-voltage transmission line defect detection dataset is input into the improved YOLOv8 network model for training, it also includes:
[0034] Precision, recall, average precision, number of parameters and amount of calculation are used as evaluation indicators of the model.
[0035] The beneficial effects of the present invention are as follows: in the network model constructed by the present invention, the Mamba-Block module is designed to promote the effective coordination of defect recognition and positioning in the high-voltage transmission line image, thereby improving the detection ability of the model under complex backgrounds; secondly, the FDPN network structure is introduced, and the network structure can make the features of each scale have more detailed context information through a customized feature focusing module and feature diffusion mechanism, which is more conducive to the detection and classification of subsequent targets; finally, a DWSM module is proposed, which assigns different weights to different convolution operations, enhances the sensitivity of the model to edge features, thereby improving the model's detection ability for small defects and meeting the needs of high-voltage transmission line defect detection tasks; in addition, the present invention constructs a data set dedicated to high-voltage transmission line defect detection, covering a variety of typical defect categories, including: insulator damage, grading ring tilt, grading ring detachment, cable strand breakage, cable loose strands, and cable foreign matter, etc., providing a solid foundation for subsequent research. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0037] Figure 1 A schematic diagram of a high-voltage transmission line defect detection algorithm based on an improved YOLOv8 according to an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of an improved YOLOv8 network model structure according to an embodiment of the present invention;
[0039] Figure 3 A schematic diagram of a state space model structure of an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of the Mamba-Block module structure according to an embodiment of the present invention;
[0041] Figure 5 A schematic diagram of a focused diffusion pyramid network structure according to an embodiment of the present invention;
[0042] Figure 6 A schematic diagram of a Focusfeature network structure of an embodiment of the present invention;
[0043] Figure 7 A schematic diagram of the structure of an Adown module according to an embodiment of the present invention;
[0044] Figure 8 A schematic diagram of the structure of a dynamic weight selection module according to an embodiment of the present invention;
[0045] Fig. 9 An image of a high-voltage transmission line in a real scenario according to an embodiment of the present invention;
[0046] Fig.10 A schematic diagram of a thermal map comparison according to an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] A schematic diagram of a high-voltage transmission line defect detection algorithm based on an improved YOLOv8 according to an embodiment of the present invention is shown in FIG. Figure 1 As shown, including:
[0049] Acquire a plurality of photographed high-voltage transmission line images; the high-voltage transmission line images include a plurality of high-voltage transmission lines with defects;
[0050] A high-voltage transmission line defect detection dataset is constructed based on multiple acquired high-voltage transmission line images;
[0051] Inputting the high-voltage transmission line defect detection data set into the improved YOLOv8 network model for training to obtain a trained YOLOv8 network model;
[0052] Obtain an image of a high-voltage transmission line to be inspected, input the image of the high-voltage transmission line to be inspected into a trained YOLOv8 network model, and use the trained improved YOLOv8 network model to perform defect detection on the high-voltage transmission line to be inspected;
[0053] The improved YOLOv8 network model includes: a backbone network, a neck network and a head network; wherein the backbone network uses a Mamba-Block module to extract features from high-voltage transmission line images, and introduces a dynamic weight selection mechanism to weight the output features of the Mamba-Block module; the neck network uses a focused diffusion pyramid network structure to fuse the extracted features.
[0054] In another specific embodiment of the present invention:
[0055] The detection and identification of high-voltage transmission line defects has always been an important issue of concern to researchers. Deep learning algorithms have demonstrated their significant superiority in this field, but their effective application depends on sufficient and high-quality data samples. However, the existing insulator datasets have problems such as extremely unbalanced positive and negative samples, fewer data samples, and lack of diversity. At present, the public China Power Line Insulator Dataset (CPLID) was released in 2018, containing 600 normal insulator images and 248 defective insulator images; normal images are real images taken by drones from different angles, while defective images are synthetic images formed by pasting cropped defective insulators onto background images; the existing public high-voltage transmission line defect detection dataset only has the China Transmission Line Insulator Dataset, which has a small number of images and a single defect category, including only one category of insulators, which is difficult to meet the needs of intelligent power inspection; in order to make up for these shortcomings, the present invention constructs a new high-voltage transmission line defect detection dataset, and takes a large number of high-voltage transmission line-related images in real scenes, which include defective insulators, grading rings, high-voltage cables, etc. Specific defects include insulator damage, voltage equalizing ring tilt, voltage equalizing ring fall-off, cable strand breakage, cable loose strands, and cable foreign matter, such as Fig. 9 shown.
[0056] The specific construction process of the dataset is as follows: first, a large number of pictures of high-voltage transmission lines are taken in various real scenes. In a specific embodiment of the present invention, a total of 4,800 pictures are collected. Then, these pictures are annotated in detail to ensure that the defect type and location in each picture are accurate. During the annotation process, they are classified according to different defect types. Finally, a real, reliable and diverse high-voltage transmission line defect detection dataset is obtained. This dataset not only contains multiple defect types, but also has high image quality and rich scene diversity, providing a solid data foundation for subsequent deep learning model training.
[0057] The YOLOv8 algorithm includes five versions of different sizes: YOLOv8n (Nano), YOLOv8s (Small), YOLOv8m (Medium), YOLOv8l (Large) and YOLOv8x (ExtraLarge) to meet the requirements of model complexity and accuracy in different scenarios. The difference between each version is mainly reflected in the two hyperparameters of network depth (Depth multiplier) and width (Width multiplier). The network depth determines the number of sub-module convolutional layers and residual modules, while the network width controls the number of channels in each convolution operation. By adjusting these two parameters, YOLOv8 can flexibly adjust the computational complexity and accuracy of the model, thereby adapting to target detection tasks under different computing resource conditions. The present invention takes YOLOv8n as the basic model, and improves on this basic model to obtain MFD-YOLOv8. The network structure is as follows Figure 2 As shown, the proposed method can meet the needs of high-voltage transmission line defect detection tasks.
[0058] According to control theory, the state space model (SSM) represents a continuous system, which maps the state x(t) to y(t) through the potential state h(t). In order to integrate SSM into the deep model, the present invention adopts four parameters (A, B, C and sampling step Δ) to define the system as follows: Figure 3 As shown, the sequence-to-sequence conversion is defined as:
[0059] h(t)=Ah(t-1)+Bx(t)
[0060] y(t)=Ch(t)+Dx(t)
[0061] Among them, C and D are matrix parameters, and parameters A and B are defined by the zero-order holder discretization rule:
[0062] A∈R N×N =exp(AΔ)
[0063] B∈R N×1 =(AΔ) -1 (exp(AΔ)-I)·ΔB
[0064] Where N represents the matrix dimension.
[0065] In the YOLOv8 algorithm, the convolution module in the backbone network uses a convolution with a kernel size of 3 and a stride of 2. This convolution can be used to downsample the feature map, but the stride of the convolution is 2, which is a strided convolution. The use of this convolution may result in the loss of some fine-grained information. When there are small targets among the targets to be detected or the image resolution is low, the detection accuracy will be affected. Therefore, the present invention designs a Mamba-Block module for application in the backbone network. Mamba-Block can effectively enhance the feature extraction capability, realize the long sequence modeling capability, and help the network better capture complex image features, thereby improving the detection accuracy. Moreover, Mamba-Block adopts a lightweight design, which can reduce the computational complexity while maintaining performance and accelerate the reasoning process. The structure of Mamba-Block is as follows: Figure 4 shown.
[0066] In the improved YOLOv8 algorithm of the embodiment of the present invention, the backbone network adopts the Mamba-Block module. For each Mamba-Block block, the input is first processed by layer normalization (LayerNormalization); the role of layer normalization is to standardize the features of each input so that it has zero mean and unit variance, thereby improving the stability of training; the normalized input is divided into two parallel paths: the main path input first passes through a linear layer for linear transformation to change the dimension or spatial distribution of the feature; in the main path, the output after the linear layer passes through a deep separable convolution layer (DWConv), which effectively extracts spatial features by reducing the number of parameters and the amount of calculation, thereby improving the calculation efficiency; the bypass path input directly passes through a linear layer for linear combination of features; after the respective linear transformations of the main path and the bypass path, the activation function σ is applied for nonlinear mapping; in the main path, the Selective SSM module focuses on the important parts of the input features, enhances the features with strong correlation and suppresses the irrelevant or noise features, aiming to improve the feature selection ability of the model, and in the Selective SSM module, the activation function σ is applied to the main path and the bypass path, and the activation function σ is applied to the bypass path ... After the SSM module, the output of the main path is fused with the output of the bypass path through an element-by-element multiplication operation. This step can be considered as a gating mechanism that controls the weights of different feature channels according to the choice of the attention mechanism. The fused features are further transformed through a linear layer for linear mapping. Finally, the output processed by the linear layer is residually connected with the original input through an addition operation.
[0067] In summary, a standard Mamba-Block output can be summarized as follows:
[0068] z′ l-1 =LN(z l-1 )
[0069] z′ l=σ(DWConv(Linear(z′ l-1 )))
[0070] z′ l =σ(Linear(z′ l-1 ))
[0071] z l =Linear(SSM(z′ l )⊙z″ l )+z l-1
[0072] Among them, z l ∈R represents the output of the lth module, σ represents the SiLU activation function, ⊙ represents element-by-element multiplication, SSM represents the Selective SSM module, and Linear represents the fully connected layer.
[0073] In the improved YOLOv8 algorithm, the neck network of the present invention adopts a focused diffuse pyramid network structure (FDPN), and its structural diagram is shown in FIG. Figure 5 As shown in the figure, through the customized feature focusing module and feature diffusion mechanism, the features of each scale can have detailed contextual information, which is beneficial to the detection and classification of subsequent targets; the focus diffusion pyramid network structure can accept inputs of three scales, and use a set of parallel deep convolutions in the Focusfeature structure to capture rich information across multiple scales, and use the diffusion mechanism to diffuse features with rich contextual information to each detection scale. The schematic diagram of the Focusfeature structure is shown in Figure 6 As shown, the specific ones are:
[0074] The input features are first processed by three different branches: the first branch uses the Adown module for feature downsampling, the second branch uses a 1*1 convolution kernel for channel compression and feature transformation, and the third branch extracts local spatial features through a 3*3 convolution kernel; the feature maps of the three branches are then concatenated in the channel dimension to form a multi-scale feature fusion output, and four parallel depthwise separable convolution (DWConv) operations are applied to the concatenated feature maps. These convolution layers use convolution kernels of different sizes (5*5, 7*7, 9*9, and 11*11, respectively) to further capture multi-scale contextual information; each volume The product output and the Identity operation are added element by element through the first Add operation to achieve comprehensive fusion of multi-scale features; then, the fused feature map is further compressed through a 1*1 convolutional layer, and is added element by element with the features in the trunk path through the second Add operation to form a skip connection (SkipConnection) to enhance information fluidity and gradient propagation capabilities; this module can improve the network's ability to express information at multiple scales through multi-scale feature extraction and fusion, and improve the network's nonlinear expression ability and gradient stability through multiple feature addition operations and the design of skip connections.
[0075] In the focused diffusion pyramid network structure, the Adown module is as follows Figure 7 As shown in the figure, the input features first undergo a two-dimensional average pooling (AvgPool2d) operation to reduce the spatial resolution of the feature map while retaining the global information; then, the pooled feature map is divided into (Split) two different branches. The first branch performs a maximum pooling (MaxPool2d) operation to further extract the local extreme value information of the feature, and then passes through a convolutional layer for feature transformation and channel compression; the second branch directly applies the convolutional layer to further extract feature details and compress the channel. The feature maps output by the two branches are finally fused in the channel dimension through a feature splicing operation to form an output with multiple feature expressions. This design can maintain the computational efficiency and feature richness of the network while fusing global and local features, thereby improving the expressiveness and generalization performance of the model.
[0076] In the improved YOLOv8 algorithm, the backbone network uses a dynamic weight selection mechanism (DWSM) to weight the features output by the Mamba-Block module. The structural diagram of the dynamic weight selection mechanism is shown in FIG. Figure 8 As shown, W1 and W2 dynamically adjust the weights through model training. For the input feature X, the DWFM module calculates the relevance score of each branch, which is represented by matrices W1 and W2. The formula of the DWFM training process is as follows:
[0077] y11 =W1×(Deformconv2d(conv(x)))
[0078] y 22 =W2×(conv2d(conv(x)))
[0079] y1=siLU(BatchNorm2d(y 11 ))
[0080] y2 = siLU(BatchNorm2d(y 22 ))
[0081] y = conv(concat(y1,y2))
[0082] Among them, x represents the feature, y 11 Represents the feature map output after variable convolution processing, y 22 Represents the feature map output after standard convolution processing, Deformconv2d() represents deformable convolution, and y1 represents the feature map y 11 Output after batch normalization operation, y2 represents the feature map y 22 The output after processing by the siLU activation function, BatchNorm2d() represents batch normalization, and conv() represents the convolution operation.
[0083] W1 and W2 represent the learned weight matrices, and W1 and W2 have the following constraints:
[0084] W1+W2=1
[0085] Different weights are given to different branches through training to enhance the adaptability of the model.
[0086] The embodiment of the present invention further adds dynamic variable convolution to DWFM, which has significant advantages and helps to improve the performance and flexibility of the model; although ordinary convolution operations have limitations in processing complex images and local details, variable convolution dynamically adjusts the sampling points of the convolution kernel by introducing a learnable offset. The sampling position of the convolution kernel is no longer fixed in each convolution, but is adaptively adjusted according to the characteristics of the input image; the offset is learned by a separate convolution layer, and the entire process can be trained through back propagation; this adaptability enables the model to more accurately extract effective features when facing complex image deformations, and enhances the robustness of the model to different scales, angles and shapes, specifically:
[0087] The input features first pass through a standard convolution layer for preliminary feature extraction and channel compression, and then are divided into two parallel branches. The left branch uses deformable convolution, which can dynamically adjust the sampling position of the convolution kernel to better capture the geometric deformation characteristics of the target; the right branch uses ordinary two-dimensional convolution for conventional feature extraction. The convolution operations of the two branches are both equipped with a batch normalization layer to stabilize the training, and the SiLU activation function is used to introduce nonlinear features; after the convolution operation, the feature maps output by the two branches are fused according to the weight coefficients W1 and W2. The weight coefficients can be used to adjust the influence of different branch features on the final output and improve the expression ability of the model. The fused feature maps are further merged through the splicing operation on the channel dimension to form a more informative multi-scale feature representation. Then, the spliced feature maps are passed through a standard convolution layer for channel compression and feature integration to improve the expression efficiency of the features and reduce the computational complexity, so as to be transmitted to the neck network for subsequent processing. The design of this module combines the advantages of deformable convolution and standard convolution. It can not only better adapt to target deformation and complex geometric structures, but also improve the model's feature expression ability and computational efficiency through multi-branch structure and weight fusion strategy, thereby achieving better performance when processing complex visual tasks.
[0088] In the embodiment of the present invention, the Ubuntu 20.04 operating system is used to train the model. The specific experimental platform and configuration are shown in Table 1. In the network training stage, the batch size is set to 16, and the SGD optimizer is used to update the network parameters. The initial learning rate is 0.01, the momentum is 0.9, the epoch is set to 300, and the patience is set to 50. Enhancement algorithms such as mosaic, mixup, and image color shift are enabled, and pre-trained weights are not used during training.
[0089] Table 1 Experimental platform and setting diagram
[0090]
[0091] At the same time, during the model training process, the present invention uses precision, recall, average precision, parameter quantity and calculation amount as evaluation indicators of the model, and the specific contents include:
[0092] Precision measures the proportion of correctly predicted positive samples in the detection results to all predicted positive samples. A high precision means that the detector has fewer false positives when predicting targets. The formula is:
[0093]
[0094] Among them, TP is true positive (True Positive) and FP is false positive (False Positive).
[0095] Recall refers to the proportion of all true positive samples that are correctly detected. A high recall rate indicates that the detector has fewer missed detections. The formula is:
[0096]
[0097] Among them, FN stands for false negative.
[0098] The average precision (AP) combines precision and recall, and measures the performance of the model by calculating the area under the precision-recall curve. The formula is:
[0099]
[0100] Among them, AP is the evaluation standard of the detection effect of a single category, and its calculation usually includes the average precision under multiple recall rate thresholds.
[0101] Mean Average Precision (mAP) is the mean of all categories of AP and is used for overall performance evaluation of multi-category target detection tasks. The calculation formula of mAP is:
[0102]
[0103] The above evaluation indicators can be used to fully understand the detection capabilities of the model, and help make more scientific and reasonable decisions during model training and optimization.
[0104] In another experimental embodiment of the present invention:
[0105] In order to study the effectiveness of different feature fusion modules, the embodiment of the present invention selects different pyramid structures FPN, PAN (Path Aggregation Network), BiFPN (Bidirectional Feature Pyramid Network) and FDPN designed by the present invention for ablation experiments, and the results are shown in Table 2:
[0106] Table 2 Schematic diagram of comparison results of different hyperparameters
[0107]
[0108] It can be seen from Table 2 that if FPN is used, the model may not be able to achieve the best fusion effect by simply adding the semantic information in the high-level features and the spatial details in the low-level features due to the insufficient feature fusion, resulting in limited detection capability for small targets; if PAN is used, the bidirectional feature flow of PAN sometimes introduces feature redundancy, that is, repeated fusion of information, which makes it difficult for the model to effectively distinguish high-level semantic features from low-level spatial features, and the accuracy rate does not achieve a good effect; if BiFPN is used, a large number of adjustable weight parameters are introduced in the design of BiFPN, and these parameters have a greater impact on the final performance during the training process. Experimental results show that in the detection of high-voltage transmission line defects, the FDPN pyramid structure designed by the present invention achieves the best results.
[0109] In another experimental embodiment of the present invention:
[0110] In order to intuitively reflect the impact of each module on the performance of the network model proposed by the present invention, that is, to verify the effectiveness of the three modules proposed by the present invention on the algorithm improvement, that is, to replace the C2f module of the backbone network with the Mamba-Block module in the YOLOv8n algorithm; to add DWSM in the backbone; to replace the original FPN network with the FDPN network, the present invention conducted an ablation experiment, and the experimental results are shown in Table 3:
[0111] Table 3 Schematic diagram of ablation test results of MFD-YOLOv8 model
[0112]
[0113] It can be seen that after replacing the Mamba-Block module, although the accuracy of the model has slightly decreased, its parameters and calculation amount have been significantly reduced, achieving the lightweight of the model, which is particularly suitable for the deployment requirements of edge devices; secondly, after replacing the original FPN network with the FDPN network, the accuracy and recall of the model have increased by 0.5% and 1.6% respectively; finally, after introducing the DWSM module, thanks to its dynamic adjustment mechanism, the mAP@0.5~0.95 of the model has increased by 2% without increasing the number of parameters, significantly enhancing the model's ability to obtain global information and defect detection performance. In summary, using the Mamba-Block module, FDPN network and DWSM module at the same time, after 300 rounds of iterative training, the improved YOLOv8 model finally trained has an mAP@0.5~0.95 that is 7.2% higher than the original model while ensuring the lightweight of the model, achieving a balance between lightweight and detection accuracy, and meeting the needs of intelligent power inspection.
[0114] In another experimental embodiment of the present invention:
[0115] In this embodiment, the MFD-YOLOv8 algorithm is experimented on the data set constructed by the present invention and the public Chinese Power Line Insulator Dataset (CPLID). The experimental results on the data set constructed by the present invention are shown in Table 4:
[0116] Table 4 Schematic diagram of performance comparison of different models on the dataset constructed by the present invention
[0117]
[0118] It can be seen that compared with Faster R-CNN and Mask R-CNN in the two-stage algorithm, MFD-YOLOv has improved in both precision and recall indicators; compared with YOLO series algorithms YOLOv5s, YOLOv7 tiny, YOLOv10s and other lightweight networks, the improved YOLOv8n has improved in precision by 3.9%, 8.9%, and 15.3% respectively; in the comparison of SSD, RetinaNet, DETR and other models, the recall rate has increased by 7.4%, 4.8%, and 3.7% respectively.
[0119] At the same time, in order to verify the advantages of the method proposed in the present invention, a heat map visualization comparison experiment was carried out on the improved network model of the present invention and the original network model. The result is shown in the schematic diagram. Fig. 9 As shown in the figure, the areas with high brightness represent the key parts that the network pays attention to. It can be seen that the improved model has increased the attention to the defective parts of the transmission line, reduced the false detection rate and missed detection rate, and improved the model's detection ability for small target defects.
[0120] In order to demonstrate the generalization ability of the MFD-YOLOv8 model, this embodiment further uses the Chinese power line insulator dataset for experiments. The experimental results are shown in Table 5:
[0121] It can be seen from Table 5 that compared with Faster R-CNN and Mask R-CNN, MFD-YOLOv8 has improved mAP@0.5-0.95 by 1.4% and 0.7% respectively; compared with other single-stage detection algorithms, the YOLOv5s model is slightly better than the algorithm proposed in this invention, in which the recall rate and mAP@0.5-0.95 are higher than those of the algorithm proposed in this invention; compared with DETR, the precision rate is improved by 2.8%; overall, compared with other algorithms, MFD-YOLOv8 has achieved quite good results.
[0122] Table 5. Comparison of performance of different models on CPLID dataset
[0123]
[0124] In summary, the improved network model of the present invention has significant advantages in terms of model parameter quantity and calculation amount, and achieves a good accuracy rate. Compared with the YOLO series algorithms and other algorithms, its accuracy rate and recall rate have been significantly improved, which proves the effectiveness of the detection method proposed in the present invention in high-voltage transmission line defect detection.
[0125] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A high-voltage transmission line defect detection algorithm based on improved YOLOv8, characterized in that: include: Acquire multiple photographed images of high-voltage transmission lines; The high-voltage transmission line image includes a plurality of high-voltage transmission lines with defects; A high-voltage transmission line defect detection dataset is constructed based on multiple acquired high-voltage transmission line images; Inputting the high-voltage transmission line defect detection data set into the improved YOLOv8 network model for training to obtain a trained YOLOv8 network model; Obtain an image of a high-voltage transmission line to be inspected, input the image of the high-voltage transmission line to be inspected into a trained YOLOv8 network model, and use the trained improved YOLOv8 network model to perform defect detection on the high-voltage transmission line to be inspected; The improved YOLOv8 network model includes: a backbone network, a neck network and a head network; wherein the backbone network uses a Mamba-Block module to extract features from high-voltage transmission line images, and introduces a dynamic weight selection mechanism to weight the output features of the Mamba-Block module; the neck network uses a focused diffusion pyramid network structure to fuse the extracted features.
2. According to claim 1, a high-voltage transmission line defect detection algorithm based on improved YOLOv8 is characterized in that: The backbone network uses the Mamba-Block module to extract features from high-voltage transmission line images, including: The input high-voltage transmission line image is normalized by layer normalization; The normalized high-voltage transmission line image enters two parallel paths, which are a main path and a bypass path. The high-voltage transmission line image is subjected to deep separable convolution through the main path to extract spatial features, and then subjected to feature enhancement through the Selective SSM module, and nonlinear mapping is performed using an activation function; After the high-voltage transmission line image passes through the bypass path, it undergoes a linear layer to perform a linear combination of features, and then uses an activation function to perform nonlinear mapping; The outputs of the main path and the bypass path are fused by element-by-element multiplication to obtain the output features of the Mamba-Block module.
3. The high-voltage transmission line defect detection algorithm based on improved YOLOv8 according to claim 1 is characterized in that: The neck network adopts a focused diffusion pyramid network structure to fuse the extracted features. Specifically: After the extracted features are input into the focused diffusion pyramid network structure, they are input into three branches for downsampling processing respectively; the first branch uses the Adown module for downsampling to obtain the first feature map; the second branch uses a 1*1 convolution kernel for channel compression and feature transformation to obtain the second feature map; the third branch uses a 3*3 convolution kernel to extract local spatial features to obtain the third feature map; The first feature map, the second feature map and the third feature map are concatenated to obtain a fused feature map; Four parallel depth-wise separable convolution operations are performed on the multi-scale feature fusion map, and the outputs of the convolution operations are added and fused element by element to obtain a multi-scale fusion feature map.
4. The improved YOLOv8 high-voltage transmission line defect detection algorithm according to claim 3 is characterized in that: The Adown module includes: After performing a two-dimensional average pooling operation on the input features, they are input into two branches respectively; The feature input to the first branch undergoes a maximum pooling operation and passes through a convolutional layer for feature transformation and channel compression; The second branch of feature input passes through a convolutional layer for feature transformation and channel compression; The outputs of the two branches are fused through a feature concatenation operation to obtain the first feature map.
5. The high-voltage transmission line defect detection algorithm based on improved YOLOv8 according to claim 1 is characterized in that: The backbone network also uses a dynamic weight selection mechanism to assign weights to the output features of the Mamba-Block module, including: The output features of the Mamba-Block module are extracted and compressed through a convolutional layer, and then divided into two branches. The left branch uses variable convolution, and the right branch uses two-dimensional convolution. The weight coefficient of each branch is calculated according to the dynamic weight selection mechanism, and the feature maps output after the convolution operation of the two branches are fused according to the corresponding weight coefficients to output the detection result.
6. The high voltage transmission line defect detection algorithm based on improved YOLOv8 according to claim 1, characterized in that: The high-voltage transmission line image includes a variety of high-voltage transmission lines with defects, specifically: The various defects in high-voltage transmission lines include: damaged insulators, tilted equalizing rings, detached equalizing rings, broken cable strands, loose cable strands, and foreign objects in cables.
7. The high voltage transmission line defect detection algorithm based on improved YOLOv8 according to claim 1, characterized in that: The method for constructing a high-voltage transmission line defect detection dataset based on multiple high-voltage transmission line images is as follows: Taking multiple high-voltage transmission line pictures, manually annotating the multiple high-voltage transmission line pictures, and classifying defects according to the annotated content of each high-voltage transmission line picture; A high-voltage transmission line defect detection dataset is constructed based on multiple classified high-voltage transmission line images.
8. The high voltage transmission line defect detection algorithm based on improved YOLOv8 according to claim 1, characterized in that: When the high-voltage transmission line defect detection dataset is input into the improved YOLOv8 network model for training, the training further includes: Precision, recall, average precision, number of parameters and amount of calculation are used as evaluation indicators of the model.
Citation Information
Cited By
Rice disease and insect pest target detection algorithm based on Mamba and YOLOv8
CN120472149A
Rice pest and disease target detection algorithm based on Mamba and YOLOv8
CN120472149B
Photovoltaic panel defect detection model training method, device and system and medium
CN121391821A
Photovoltaic panel defect detection model training method, device, system and medium
CN121391821B
Ultrahigh-voltage transmission line defect detection enhancement method based on one-way LSTM online learning
CN122157070A