Unmanned aerial vehicle insulator defect identification method based on improved yolov8n
By improving the feature extraction and loss function of the YOLOv8n model and combining with model pruning technology, the limitations of drone insulator defect detection in real-time and accuracy are solved, and a more efficient and accurate defect detection effect is achieved.
Patent Information
- Application Number
- CN202411625575.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-14
AI Technical Summary
The existing drone insulator defect detection methods have limitations in real-time and accuracy, especially when detecting small-size defects, it is difficult to achieve satisfactory accuracy.
By improving the YOLOv8n model, including designing the C2f-PKI module to replace the original C2f module, integrating the Adown downsampling module of YOLOv9, using Focaler-SIoU loss function, and using the LAMP algorithm for model pruning to improve the model's feature extraction ability and detection accuracy .
The accuracy of insulator defect detection is improved, the complexity and calculation amount of the model are reduced, making the model more suitable for real-time detection on the drone platform, and solving the problems of inefficiency and poor real-time performance.
Smart Images

Figure CN119445085A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power operation and maintenance, and in particular to a method for identifying defects of unmanned aerial vehicle insulators based on improved yolov8n. Background Art
[0002] In the power system, insulators are important components used to support and fix conductors while maintaining insulation between the conductors and the ground or other conductors. Due to long-term exposure to the outdoor environment, insulators are susceptible to pollution, wear or physical damage, resulting in defects, which may cause serious power system failures. Therefore, regular defect detection of insulators is essential to ensure the safe operation of the power grid.
[0003] Traditional insulator defect detection methods mainly rely on manual inspections, which are inefficient and pose safety risks in complex or dangerous environments. With the development of drone technology, the use of drones for insulator defect detection has become an emerging and effective solution. Drones can quickly cover large areas, reduce labor costs, and improve detection efficiency.
[0004] However, existing drone insulator defect detection methods mostly rely on complex image processing algorithms and expensive hardware equipment, which have certain limitations in real-time and accuracy. Especially for the detection of small-size defects, existing algorithms often find it difficult to achieve satisfactory accuracy.
[0005] In recent years, deep learning-based target detection algorithms, especially the YOLO (You Only Look Once) series of algorithms, have been widely used in the field of real-time target detection due to their fast speed and high accuracy. As a version of the YOLO series, YOLOv8n has a faster detection speed and a smaller model size, making it suitable for deployment on embedded devices such as drones. However, YOLOv8n still has problems with insufficient feature extraction and high model complexity when dealing with small target detection.
[0006] To solve these problems, the present invention proposes a UAV insulator defect identification method based on improved yolov8n, aiming to improve the accuracy of insulator defect detection while reducing the complexity and computational complexity of the model to meet the real-time detection needs of the UAV platform.
[0007] The above information is presented as background information only to assist with understanding the present disclosure and no determination or admission is made as to whether any of the above may be used as prior art with respect to the present disclosure. Summary of the invention
[0008] The present invention provides a UAV insulator defect identification method based on improved yolov8n, which can improve the accuracy of insulator defect detection and reduce the complexity and calculation amount of the model to meet the real-time detection needs of the UAV platform.
[0009] To achieve the above objectives, in a first aspect, the present invention provides a method for identifying defects of unmanned aerial vehicle insulators based on improved yolov8n, comprising:
[0010] Step S10: Basic model selection: select YOLOv8n as the basic model;
[0011] Step S20: C2f module improvement: design and implement the C2f-PKI module to replace the C2f module in the original YOLOv8n model to enhance feature extraction capabilities;
[0012] Step S30: Downsampling module replacement: Integrate the Adown downsampling module of YOLOv9 into the improved model to replace the downsampling module of YOLOv8n to capture richer feature information;
[0013] Step S40: Loss function optimization: The Focaler-SIoU loss function is used to replace the traditional CIoU loss function to improve the accuracy and robustness of target detection;
[0014] Step S50: Model pruning: Apply the LAMP algorithm to prune the improved model to remove redundant network connections and weights to reduce the model size and computational complexity;
[0015] Step S60: Model training: using the training data set to train the pruned model and adjust the model parameters to improve performance;
[0016] Step S70: Model verification and evaluation: Evaluate the performance of the model on an independent verification data set, including detection accuracy and model efficiency;
[0017] Step S80: Result analysis and optimization: Analyze the evaluation results, compare the performance of the model before and after improvement, identify the deficiencies, and further optimize the model as needed.
[0018] Optionally, YOLOv8n mainly consists of three parts: backbone, neck and head, among which the backbone network consists of three modules: CBS, C2f and SPPF.
[0019] Optionally, the S20 includes:
[0020] Improved design of C2f module: Improve the C2f module in the original YOLOv8n model, design and implement the C2f-PKI module to enhance feature extraction capabilities;
[0021] Integration of PKI modules: Integrate at least one PKI module in the C2f-PKI module to improve the model's ability to identify insulator defect features;
[0022] Integration of CAA modules: Integrate at least one CAA module in the C2f-PKI module to further optimize the feature extraction process.
[0023] Optionally, the S20 further includes:
[0024] Feature fusion strategy: Implement feature fusion strategy in the C2f-PKI module to ensure that feature information from different layers can be effectively integrated to improve the accuracy of defect detection;
[0025] Parameter optimization: The network parameters in the C2f-PKI module are optimized to meet the task requirements of insulator defect identification.
[0026] Optionally, the S30 includes:
[0027] Replace the downsampling module of YOLOv8n with the Adown downsampling module of YOLOv9;
[0028] The input feature map is first subjected to an average pooling operation;
[0029] Split the feature map into two sub-feature maps along the channel dimension;
[0030] A 3×3 CBS operation is performed on one sub-feature map, and a 1×1 CBS operation is performed on another sub-feature map after a maximum pooling operation;
[0031] The two processed sub-feature maps are concatenated to generate the output feature map of the Adown module;
[0032] The Adown module is used to extract richer feature information, realize the fusion of features of different scales, and generate more representative feature maps.
[0033] Optionally, the S40 includes:
[0034] Introduce Focaler-SIoU loss function;
[0035] The Focaler-SIoU loss function is used to replace the traditional CIoU loss function to optimize the performance of object detection.
[0036] Optional,
[0037] The construction of the Focaler-SIoU loss function includes two parts: Focaler-IoU and SIoU; SIoU is an angle loss added on the basis of CIoU, which considers the minimum angle between the center point of the anchor box and the real box, so as to calculate the loss more accurately; Focaler-IoU is an improvement on the IoU loss, which redefines the IoU loss through linear interval mapping technology, so that the model can pay more attention to difficult-to-classify samples; Focaler-IoU is applied to the SIoU loss function to form the Focaler-SIoU loss function, which not only considers the position information of the bounding box, but also enhances the model's ability to handle difficult samples.
[0038] Optionally, the S50 includes:
[0039] The LAMP algorithm is used to lightweight the YOLOv8n model.
[0040] Optionally, the S80 includes:
[0041] Calculate and obtain evaluation indicators of different models, wherein the evaluation indicators include accuracy and recall rate;
[0042] Evaluate the average precision of different models on the insulator defect identification task;
[0043] Analyze the performance of different models on different types of defects and identify possible biases or misclassifications.
[0044] Optionally, the S80 further includes:
[0045] The evaluation indicators are presented in a chart.
[0046] Compared with the prior art, the present invention has the following beneficial effects: a method for identifying insulator defects on drones based on improved yolov8n is provided. First, the downsampling module and feature map processing are improved, the model's ability to extract insulator defect features is enhanced, and the detection accuracy is improved. Secondly, the Focaler-SIoU loss function is introduced to optimize the performance of target positioning, especially when processing difficult-to-classify samples, the robustness of the model is improved. In addition, the model is lightweighted by the LAMP algorithm, which reduces the parameters and calculation amount of the model, making the model more suitable for running on mobile devices such as drones. Finally, after sufficient training and verification, it is ensured that the model has good generalization ability and is successfully deployed in the drone detection system, realizing real-time and efficient defect recognition, thereby solving the problems of low efficiency and poor real-time performance in the background technology.
[0047] Therefore, the UAV insulator defect identification method based on improved yolov8n provided by the present invention can improve the accuracy of insulator defect detection, while reducing the complexity and calculation amount of the model to meet the real-time detection needs of the UAV platform.
[0048] The present invention has other features and advantages, which will be apparent from or will be described in detail in the accompanying drawings and the following detailed description incorporated herein, which together serve to explain the specific principles of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] 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 work.
[0050] Figure 1 It is a YOLOv8 network architecture diagram provided by an embodiment of the present invention;
[0051] Figure 2 It is a PAL-YOLOv8 network architecture diagram provided by an embodiment of the present invention;
[0052] Figure 3 is a structural diagram of a PKI module provided by an embodiment of the present invention;
[0053] Figure 4 is a structural diagram of a C2f-PKI module provided in an embodiment of the present invention;
[0054] Figure 5 is a structural diagram of the Adown downsampling module provided in an embodiment of the present invention;
[0055] Figure 6 is a unified pruning flow chart provided by an embodiment of the present invention;
[0056] Figure 7 It is the YOLOv8n precision-recall curve provided by an embodiment of the present invention;
[0057] Figure 8 It is the YOLOv9t precision-recall curve provided by the embodiment of the present invention;
[0058] Fig. 9 It is the YOLOv10n precision-recall curve provided by an embodiment of the present invention;
[0059] Fig.10is the PAL-YOLOv8 precision-recall curve provided by an embodiment of the present invention;
[0060] Fig.11 is the confusion matrix of YOLOv8n provided in an embodiment of the present invention;
[0061] Fig.12 is the confusion matrix of YOLOv9t provided in an embodiment of the present invention;
[0062] Fig.13 is the confusion matrix of YOLOv10n provided in an embodiment of the present invention;
[0063] Fig.14 is the confusion matrix of PAL-YOLOv8 provided in an embodiment of the present invention;
[0064] Fig.15 Schematic diagram of the comparison of the detection results of small insulator defects; (a) is the detection result of YOLOv8n, (b) is the detection result of YOLOv9t, (c) is the detection result of YOLOv10n, and (d) is the detection result of PAL-YOLOv8;
[0065] Fig.16 Comparison of the detection results of dense small insulator defects: (a) is the detection result of YOLOv8n, (b) is the detection result of YOLOv9t, (c) is the detection result of YOLOv10n, and (d) is the detection result of PAL-YOLOv8;
[0066] Fig.17 Comparison of defect detection results of special material insulators: (a) is the detection result of YOLOv8n, (b) is the detection result of YOLOv9t, (c) is the detection result of YOLOv10n, and (d) is the detection result of PAL-YOLOv8;
[0067] Fig.18 A flow chart of a method for identifying defects in UAV insulators based on improved yolov8n is provided in an embodiment. DETAILED DESCRIPTION
[0068] In order to explain in detail the possible application scenarios, technical principles, specific schemes that can be implemented, and the purposes and effects that can be achieved, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0069] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the various technical features mentioned in the embodiments can be combined in any way to form a corresponding implementable technical solution.
[0070] Unless otherwise defined, the technical terms used in this document have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms in this document is only for describing specific embodiments and is not intended to limit this application.
[0071] In the description of this application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" logical relationship.
[0072] In the present application, terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.
[0073] Without further limitations, in this application, the words "include", "comprises", "has" or other similar expressions used in the sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.
[0074] Similar to the understanding in the Examination Guidelines, in this application, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.
[0075] In the description of the embodiments of the present application, space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the referred device or component must have a specific position, a specific orientation, or be constructed or operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.
[0076] Unless otherwise expressly specified or limited, in the description of the embodiments of the present application, the terms such as "install", "connect", "connect", "fix", "set", etc. used should be understood in a broad sense. For example, the "connection" can be a fixed connection, a detachable connection, or an integrated setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. For technicians in the technical field to which the present application belongs, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0077] Example 1
[0078] Please refer to the attached Fig.18 , is a flow chart of a method for identifying insulator defects of drones based on improved yolov8n provided by an embodiment of the present invention. The method is applicable to the scene of visual detection of insulator defects. The method is executed by a detection system, and the detection system can be implemented by software and / or hardware. The method specifically includes the following steps:
[0079] Step S10: Basic model selection: select YOLOv8n as the basic model;
[0080] The YOLOv8n model has advantages in speed and number of parameters and is suitable for real-time drone detection applications.
[0081] YOLOv8 is developed based on YOLOv5 and integrates different network depths and widths. It has five versions. Among them, YOLOv8n has the least amount of computation and number of parameters, and is easier to deploy on embedded devices. Therefore, this study chooses YOLOv8n as the baseline model for algorithm improvement. YOLOv8n mainly consists of three parts: backbone, neck and head, such as Figure 1 shown.
[0082] The backbone network consists of three modules: CBS, C2f and SPPF. The CBS and C2f modules are mainly used for feature extraction, capturing object shape, texture and depth semantic information. The SPPF module enhances the feature map representation by merging features of different scales. The neck section adopts the PAN-FPN structure to achieve bidirectional fusion of low-level and high-level features, thereby improving the detection capability of targets of various scales. The head segment adopts an anchor-free decoupling head to separate the regression and classification branches, reduce task interference, and improve detection efficiency.
[0083] Steps S20-S50 are all intended to improve and optimize YOLOv8n in different aspects. For the sake of distinction, the final improved and optimized model is called PAL-YOLOv8.
[0084] The PAL-YOLOv8 algorithm has made improvements in four aspects (S20-S50) based on the YOLOv8n algorithm, successfully reducing the model complexity and improving the detection accuracy. The network structure of PAL-YOLOv8 is as follows: Figure 2 shown.
[0085] First, the C2f-PKI module is constructed using the PKI block in PKINet, replacing part of the original C2f module. This enhances the feature extraction capability while reducing the model complexity. Secondly, the Adown downsampling module replaces the CBS downsampling module to improve the detection performance of the model. In addition, Focaler-SIoU is used as a bounding box regression loss function to focus on different regression samples to enhance the performance of the detector in different detection tasks. Finally, the LAMP algorithm is used to reduce the model complexity and further improve the detection accuracy.
[0086] The following is a detailed description of each optimization step.
[0087] Step S20: C2f module improvement: design and implement the C2f-PKI module to replace the C2f module in the original YOLOv8n model to enhance feature extraction capabilities;
[0088] In YOLOv8n, the C2f module enhances the target detection performance by integrating feature information from different channels. However, it performs poorly when processing small insulator defects in aerial images. In addition, the C2f module consists of standard convolution and n bottleneck modules, which increases the number of parameters and computational complexity of the model. The Polycore Inception Network (PKINet) is a novel neural network architecture proposed at CVPR2024. Its core concept is to capture multi-scale object features using parallel deep convolutions. In addition, the architecture integrates a contextual anchor attention (CAA) module to capture the features of slender objects and reduce the number of parameters of the network. This study improved the C2f module by introducing the PKI Block of PKINet. The structure of the PKI block is as follows Figure 3 shown.
[0089] The PKI module includes the PKI module and the CAA module. The PKI module uses 3×3 deep convolution to extract local information and uses parallel deep convolution kernels of different sizes to extract multi-scale target features. The expression of the PKI module is as follows:
[0090] (1)
[0091] (2)
[0092]
[0093] represents the extracted local features, represents the extracted multi-scale features, represents the output feature. In the C2f-PKI module, , .
[0094] In the CAA module, two depth-wise strip convolutions are introduced to better capture the features of slender objects while reducing the number of parameters. The expression of the CAA module is as follows:
[0095]
[0096]
[0097] (6)
[0098]
[0099] represents the average pooling operation, represents the pooling feature, and Represents the strip convolution features in two depth directions. Compared with the 2D depth convolution, using two 1D depth convolutions not only achieves the same effect, but also reduces According to the experimental results in Section 4.3, we can conclude that Produces higher detection accuracy in C2f-PKI module. A represents the output features.
[0100] After obtaining the output characteristics of the CAA and PKI modules, the output characteristics of the PKI block can be derived.
[0101]
[0102]
[0103] represents the enhanced features obtained by element-wise multiplication and summation, while Represents the output features.
[0104] In order to improve the detection accuracy of the model and reduce the number of its parameters, this embodiment replaces the bottleneck module in C2f with PKI Blocks. The improved C2f-PKI module is as follows: Figure 4 shown.
[0105] Step S30: Downsampling module replacement: Integrate the Adown downsampling module of YOLOv9 into the improved model to replace the downsampling module of YOLOv8n to capture richer feature information;
[0106] The downsampling module in YOLOv8n will cause some detail information to be lost when reducing the size of the feature map, which will especially affect the detection performance of small defects in insulators. The newly introduced Adown module in YOLOv9 can retain more feature information while reducing the size of the feature map. Therefore, this embodiment uses the Adown module to optimize YOLOv8n.
[0107] like Figure 5 As shown, in the Adown downsampling module, the input feature map First, an average pooling operation is performed. Then the feature map is split into two sub-feature maps along the channel dimension: and . Perform 3×3 CBS operation, and Perform the maximum pooling operation, and then perform a 1×1 CBS operation. Finally, concatenate the two sub-feature maps to generate the output feature map of the Adown module. The Adown module extracts rich feature information, fuses features of different scales, and generates more representative feature maps.
[0108] Step S40: Loss function optimization: The Focaler-SIoU loss function is used to replace the traditional CIoU loss function to improve the accuracy and robustness of target detection;
[0109] In the insulator defect detection task, samples can be divided into difficult samples and easy samples according to the detection complexity, and small defect samples are considered difficult samples. The CIoU loss function in YOLOv8n improves the regression performance through the geometric relationship between bounding boxes, but ignores the impact of sample difficulty on bounding box regression. In order to improve the detection performance of the model, the Focaler-SIoU loss function is introduced in PAL-YOLOv8. By using Focaler-IoU, the model's attention to different regression samples is enhanced. Based on CIoU, SioU adds the angle loss between the anchor box and the true box to the bounding box regression loss function. The definition of SIoU is as follows:
[0110]
[0111] in, represents the distance loss, Ω represents the shape loss, and the distance loss Loss through angle Calculation. Angle loss The definition is as follows:
[0112]
[0113] Angle loss Indicates the minimum angle between the center point of the ground truth box and the center point of the anchor box. When the angle is 45°, = 1. After considering the angle cost, the distance loss is redefined as follows:
[0114]
[0115]
[0116] The shape loss Ω mainly describes the shape difference between the ground-truth box and the anchor box. The parameter θ is set to 4. and They represent the relative difference in width and height between the predicted box and the true box, respectively.
[0117]
[0118]
[0119] Focaler-IoU uses linear interval mapping technology to redefine IoU loss. It is defined as follows:
[0120]
[0121]
[0122] and The value of determines Focus on different regression samples, where .
[0123] Focaler-IoU loss is applied to the SIoU bounding box regression loss function. It is defined as follows:
[0124] (18)
[0125] Step S50: Model pruning: Apply the LAMP algorithm to prune the improved model to remove redundant network connections and weights to reduce the model size and computational complexity;
[0126] In order to give full play to the advantages of large models under limited hardware resources, the application of pruning algorithms has received increasing attention. Pruning reduces the number of parameters and the amount of computation by eliminating unimportant weights in the model, thereby improving the ease of model deployment. In order to further reduce the model size and simplify the pruning process, this study uses the layer adaptive amplitude pruning (LAMP) algorithm to prune the improved model and then fine-tune it to restore its performance. The LAMP algorithm does not require the adjustment of hyperparameters and only relies on the LAMP score to complete the pruning task. Assume that each weight tensor is flattened into a one-dimensional vector, let and represents the weight index, Represents an index The corresponding weight item. hour, . Weight Tensor of The LAMP score of an index is defined as follows:
[0127]
[0128] The LAMP uniform pruning process is as follows Figure 6 As shown in the figure. First, the improved model and pruning rate are input. Then, the weights of each layer are flattened and their corresponding LAMP scores are calculated. Then, the weights with higher LAMP scores are retained according to the pruning rate. Finally, the model is updated with the pruned weights.
[0129] After pruning, the model becomes more streamlined, but its accuracy drops significantly. Therefore, fine-tuning is needed to restore its accuracy. By selecting an appropriate pruning rate, pruning effectively removes redundant parameters while retaining key features, resulting in a fine-tuned model that surpasses the pre-pruned model in accuracy.
[0130] Step S60: Model training: using the training data set to train the pruned model and adjust the model parameters to improve performance;
[0131] Step S70: Model verification and evaluation: Evaluate the performance of the model on an independent verification dataset, including detection accuracy and model efficiency.
[0132] Step S80: Result analysis and optimization: Analyze the evaluation results, compare the performance of the model before and after improvement, identify the deficiencies, and further optimize the model as needed.
[0133] In order to verify the superiority of the proposed algorithm, this embodiment conducts a comparative experiment on PAL-YOLOv8 and other algorithms in the YOLO series, as shown in Table 1:
[0134] Table 1 Model comparison experimental results
[0135]
[0136] The English terms in the table above are commonly used to evaluate and compare the performance of object detection models in computer vision tasks. Here is what each term means:
[0137] mAP50 / %:
[0138] mAP is the abbreviation of mean Average Precision.
[0139] 50 means the IoU threshold (Intersection over Union) is 0.5.
[0140] mAP50 represents the average precision of the model across all categories when the IoU threshold is 0.5. Usually, this indicator is used to measure the performance of the model in the object detection task. The higher the value, the better the model performance.
[0141] mAP50-95 / %:
[0142] Similar to mAP50, but here it calculates the mean average precision for IoU thresholds ranging from 0.5 to 0.95 (usually in steps of 0.05).
[0143] This metric provides a more comprehensive performance evaluation as it takes into account different IoU thresholds, allowing for a better understanding of how the model performs under different accuracy requirements.
[0144] Parameters / 106:
[0145] Parameters refers to the number of learnable parameters in the model.
[0146] 10 6 Indicates the number of parameters in millions (10^6). For example, if the value is 10, it means the model has 100 million (10x10^6) learnable parameters.
[0147] The number of parameters can be used to measure the complexity of the model. Generally, the more parameters there are, the more complex the model is and the more computing resources are required.
[0148] Model Size / MB:
[0149] Model Size refers to the size of the model, usually measured in megabytes (MB).
[0150] Model size is related to the storage and transmission requirements of the model, and smaller models are easier to deploy in resource-constrained environments.
[0151] GFLOPs:
[0152] GFLOPs is the abbreviation of Giga-FLOPS, which means one billion floating-point operations per second.
[0153] This metric is used to measure the computational complexity or amount of computation of the model, and can reflect the speed requirement of the model when performing reasoning.
[0154] FLOPS (floating point operations) is a metric of computer performance that measures the ability of hardware or software to perform floating-point operations.
[0155] In summary, these terms are important metrics used to describe and compare the performance of object detection models, including their accuracy, complexity, size, and computational efficiency.
[0156] Compared to YOLOv5s, PAL-YOLOv8 has 82.3% fewer parameters, 80.4% fewer model size, and 75.3% fewer computations, while improving mAP50 by 3.4% and mAP50–95 by 5.6%. Compared to YOLOv7-tiny, PAL-YOLOv8 has 79.4% fewer parameters, 76.9% smaller model size, and 70.0% fewer computations, while improving mAP50 by 3.1% and mAP50–95 by 6.4%. Compared to YOLOv8s, PAL-YOLOv8 has 88.9% fewer parameters, 87.4% fewer model size, and 86.3% fewer computations, while improving mAP50 by 4.3% and mAP50–95 by 2.7%. Compared with YOLOv9s, PAL-YOLOv8 has 82.5% fewer parameters, 81.1% fewer model size, and 85.1% less computation, while improving mAP50 by 1.7% and mAP50–95 by 0.4%. YOLOv8n, YOLOv9t, YOLOv10n, and PAL-YOLOv8 all have the advantages of fewer parameters and lower computational rate. However, compared with YOLOv8n, YOLOv9t, and YOLOv10n, PAL-YOLOv8 shows higher detection accuracy and lower model complexity. Overall, PAL-YOLOv8 improves detection accuracy while maintaining a lightweight model.
[0157] The comparison of the precision curves of the evaluation results of YOLOv8n, YOLOv9t, YOLOv10n and PAL-YOLOv8 is shown below. Figure 7-10 As shown. Compared with YOLOv8n, YOLOv9t and YOLOv10n, PAL-YOLOv8 significantly improves the AP value of contamination flash and brothers.
[0158] Figure 11-14 The confusion matrices for YOLOv8n, YOLOv9t, YOLOv10n, and PAL-YOLOv8 are shown respectively. In these figures, the elements along the diagonal represent the percentage of correctly predicted sample counts, while the elements in the lower triangular area represent the percentage of missed sample counts. Compared with other models, PAL-YOLOv8 achieves the highest correct detection rate and the lowest missed detection rate.
[0159] In order to intuitively demonstrate the effectiveness of PAL-YOLOv8 in detecting insulator defects and its application value in power infrastructure maintenance, this example selects three images containing small insulator defects from the test set for detection and visualization. These results are compared with the results of YOLOv8n, YOLOv9t, and YOLOv10n, as shown in Figure 2. Figure 15-17 shown.
[0160] Fig.15 The detection results of small damage defects by different models are shown. It can be observed that except YOLOv8n, all models correctly detect the damage defects in the image. Fig.16 The detection results of different models for dense, small, and contaminated flashover defects are shown. Among all the models, only YOLOv9t shows 1 missed detection, while YOLOv8n, YOLOv10, and PAL-YOLOv8 show better performance than YOLOv9t in detecting dense and small objects. Fig.17 Insulators in the power grid exhibit reflectivity due to their material properties, causing YOLOv8n, YOLOv9t, and YOLOv10n to perform poorly in detecting defects on such insulators. YOLOv8n shows 1 missed detection and multiple false positives, YOLOv9t shows 2 missed detections and multiple false positives, and YOLOv10n performs the worst with 3 missed detections and multiple false positives. In contrast, PAL-YOLOv8 can accurately detect all breakage defects without any false positives. These results show that PAL-YOLOv8 has higher accuracy in detecting small insulator defects and can effectively contribute to the maintenance of power infrastructure.
[0161] Step S90: Final model deployment: Deploy the verified and optimized model to the UAV platform to perform the actual insulator defect detection task.
[0162] This embodiment proposes a PAL-YOLOv8 algorithm based on the YOLOv8n algorithm, thereby improving the accuracy of detecting small insulator defects while reducing the amount of calculation and the number of parameters. First, the C2f module is improved using the PKI module of PKINet, thereby reducing the model complexity and enhancing the feature extraction capability. Secondly, the Adown downsampling module of YOLOv9 is used to replace the downsampling module in YOLOv8n, so that richer feature information can be captured. In addition, the Focaler-SIoU loss function is introduced to improve the detection performance. Finally, the LAMP algorithm is used to remove redundant network connections and weights. Experimental results show that the PAL-YOLOv8 algorithm achieves 95.0% and 64.5% mAP50 and mAP50-95 values on the insulator defect detection dataset, and the parameters are reduced to 1.24×10 6 , the model size is reduced to 2.7MB and GFLOPs is reduced to 3.9.
[0163] The present invention has the following beneficial effects: a method for identifying insulator defects of unmanned aerial vehicles based on improved yolov8n is provided. First, the downsampling module and feature map processing are improved, the model's ability to extract insulator defect features is enhanced, and the detection accuracy is improved. Secondly, the Focaler-SIoU loss function is introduced to optimize the performance of target positioning, especially when processing difficult-to-classify samples, the robustness of the model is improved. In addition, the model is lightweighted by the LAMP algorithm, the parameters and calculation amount of the model are reduced, making the model more suitable for running on mobile devices such as unmanned aerial vehicles. Finally, after sufficient training and verification, it is ensured that the model has good generalization ability and is successfully deployed in the unmanned aerial vehicle detection system, realizing real-time and efficient defect recognition, thereby solving the problems of low efficiency and poor real-time performance in the background technology.
[0164] Therefore, the unmanned aerial vehicle insulator defect identification method based on the improved yolov8n provided by the present invention can improve the accuracy of insulator defect detection, while reducing the complexity and calculation amount of the model to meet the real-time detection needs of the unmanned aerial vehicle platform.
[0165] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of this application, this does not limit the scope of patent protection of this application. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concept of this application using the contents recorded in the specification and drawings of this application, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of patent protection of this application.
Claims
1. A method for identifying defects in insulators using drones based on improved yolov8n, characterized in that: include: Step S10: Basic model selection: select YOLOv8n as the basic model; Step S20: C2f module improvement: design and implement the C2f-PKI module to replace the C2f module in the original YOLOv8n model to enhance feature extraction capabilities; Step S30: Downsampling module replacement: Integrate the Adown downsampling module of YOLOv9 into the improved model to replace the downsampling module of YOLOv8n to capture richer feature information; Step S40: Loss function optimization: The Focaler-SIoU loss function is used to replace the traditional CIoU loss function to improve the accuracy and robustness of target detection; Step S50: Model pruning: Apply the LAMP algorithm to prune the improved model to remove redundant network connections and weights to reduce the model size and computational complexity; Step S60: Model training: using the training data set to train the pruned model and adjust the model parameters to improve performance; Step S70: Model verification and evaluation: Evaluate the performance of the model on an independent verification data set, including detection accuracy and model efficiency; Step S80: Result analysis and optimization: Analyze the evaluation results, compare the performance of the model before and after improvement, identify the existing deficiencies, and further optimize the model as needed; Step S90: Final model deployment: Deploy the verified and optimized model to the UAV platform to perform the actual insulator defect detection task.
2. The method for identifying insulator defects of unmanned aerial vehicles based on improved yolov8n according to claim 1 is characterized in that: YOLOv8n mainly consists of three parts: backbone, neck and head. The backbone network consists of three modules: CBS, C2f and SPPF.
3. The method for identifying defects of unmanned aerial vehicle insulators based on improved yolov8n according to claim 2 is characterized in that: The S20 includes: Improved design of C2f module: Improve the C2f module in the original YOLOv8n model, design and implement the C2f-PKI module to enhance feature extraction capabilities; Integration of PKI modules: Integrate at least one PKI module in the C2f-PKI module to improve the model's ability to identify insulator defect features; Integration of CAA modules: Integrate at least one CAA module in the C2f-PKI module to further optimize the feature extraction process.
4. The method for identifying defects of unmanned aerial vehicle insulators based on improved yolov8n according to claim 3 is characterized in that: The S20 further includes: Feature fusion strategy: Implement feature fusion strategy in the C2f-PKI module to ensure that feature information from different layers can be effectively integrated to improve the accuracy of defect detection; Parameter optimization: The network parameters in the C2f-PKI module are optimized to meet the task requirements of insulator defect identification.
5. The method for identifying defects of unmanned aerial vehicle insulators based on improved yolov8n according to claim 4 is characterized in that: The S30 includes: Replace the downsampling module of YOLOv8n with the Adown downsampling module of YOLOv9; The input feature map is first subjected to an average pooling operation; Split the feature map into two sub-feature maps along the channel dimension; A 3×3 CBS operation is performed on one sub-feature map, and a 1×1 CBS operation is performed on another sub-feature map after a maximum pooling operation; The two processed sub-feature maps are concatenated to generate the output feature map of the Adown module; The Adown module is used to extract richer feature information, realize the fusion of features of different scales, and generate more representative feature maps.
6. The method for identifying insulator defects of unmanned aerial vehicles based on improved yolov8n according to claim 5 is characterized in that: The S40 includes: Introduce Focaler-SIoU loss function; The Focaler-SIoU loss function is used to replace the traditional CIoU loss function to optimize the performance of object detection.
7. The method for identifying defects of unmanned aerial vehicle insulators based on improved yolov8n according to claim 6 is characterized in that: Among them, the construction of the Focaler-SIoU loss function includes two parts: Focaler-IoU and SIoU; SIoU is an angle loss added on the basis of CIoU, which considers the minimum angle between the center point of the anchor box and the real box, so as to calculate the loss more accurately; Focaler-IoU is an improvement on the IoU loss. It redefines the IoU loss through linear interval mapping technology, so that the model can pay more attention to difficult-to-classify samples; Focaler-IoU is applied to the SIoU loss function to form the Focaler-SIoU loss function. The Focaler-SIoU loss function not only considers the position information of the bounding box, but also enhances the model's ability to handle difficult samples.
8. The method for identifying defects of unmanned aerial vehicle insulators based on improved yolov8n according to claim 7 is characterized in that: The S50 includes: The LAMP algorithm is used to lightweight the YOLOv8n model; The LAMP algorithm identifies and removes redundant network connections and weights by analyzing the model’s attention graph; While maintaining model performance, reduce the number of model parameters and computational complexity; Through the application of LAMP algorithm, model compression and acceleration are achieved.
9. The method for identifying insulator defects of unmanned aerial vehicles based on improved yolov8n according to claim 1 is characterized in that: The S80 includes: Calculate and obtain evaluation indicators of different models, wherein the evaluation indicators include accuracy and recall rate; Evaluate the average precision of different models on the insulator defect identification task; Analyze the performance of different models on different types of defects and identify possible biases or misclassifications.
10. The method for identifying defects of unmanned aerial vehicle insulators based on improved yolov8n according to claim 9 is characterized in that: The S80 further includes: The evaluation indicators are presented in a chart.
Citation Information
Cited By
Unmanned aerial vehicle small target detection method and device based on IASL-YOLO
CN119919837A
Unmanned aerial vehicle small target detection method and device based on iasl-yolo
CN119919837B
Lightweight power transmission line insulator defect detection method and system
CN122223596A