A wolf pack algorithm-optimized method for power distribution network equipment identification in YOLOv8
By introducing the wolf pack algorithm to optimize YOLOv8, parameters are optimized based on the characteristics of distribution network equipment, which solves the problems of insufficient parameter adaptation and limited optimization strategies of YOLOv8 in the identification of distribution network equipment, and improves the identification accuracy and stability.
Patent Information
- Application Number
- CN202511667109.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2045-11-14
AI Technical Summary
YOLOv8 suffers from insufficient parameter adaptation and limited optimization strategies in the identification of distribution network equipment, resulting in insufficient ability of the model to capture equipment features and easy misjudgment or omission of distribution network equipment with inconspicuous features.
The wolf pack algorithm is introduced to optimize YOLOv8. After preprocessing by selecting and labeling image samples, the wolf pack algorithm is used to search for the optimal parameter combination of the YOLOv8 model in the solution space. Combined with the direction selection and elite-oriented hunting strategy, the learning rate, momentum, regularization and warm-up parameters are optimized to construct a multi-dimensional parameter optimization system.
It improves the accuracy and stability of power distribution network equipment identification, solves the problems of feature overlap, missed detection of small targets and insufficient environmental adaptability, and enhances the model's identification performance for power distribution network equipment.
Smart Images

Figure CN121147799B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power distribution network equipment identification technology, specifically a power distribution network equipment identification method based on the wolf pack algorithm optimized by YOLOv8. Background Technology
[0002] Power grid drone inspection, as a core technology for smart grid operation and maintenance, utilizes high-resolution imaging equipment to collect standardized images of distribution network equipment. Combined with computer vision algorithms, it enables automated identification of core equipment such as insulators, surge arresters, and transformers, making it a key means to improve inspection efficiency and reduce labor costs. With the development of deep learning technology, single-stage target detection algorithms, represented by YOLOv8, have become the mainstream technology choice for distribution network equipment identification due to their advantages such as strong real-time performance and convenient deployment. Their performance directly affects the level of intelligence in power grid operation and maintenance.
[0003] In power line inspection scenarios, YOLOv8 has been applied to equipment detection in transmission lines, substations, and other locations. It has initially achieved stable identification of large target equipment by relying on high-quality pre-processed images. However, YOLOv8 still has some shortcomings in the identification of distribution network equipment: First, parameter adaptation is insufficient. YOLOv8's default parameters are designed based on general scenarios and are not optimized for the characteristics and identification requirements of distribution network equipment. Key features of distribution network equipment (such as insulators and surge arresters) (such as awning structures and cylindrical shapes) overlap with the background features. However, the default feature fusion weights and loss function weights of the YOLOv8 model do not strengthen the focus on the key features of distribution network equipment, resulting in insufficient ability of the YOLOv8 model to capture equipment features. This makes it easy to misclassify similar backgrounds as distribution network equipment or miss distribution network equipment with inconspicuous features. Second, the optimization strategy is limited. Traditional optimization algorithms have limited search capabilities in the solution space and are prone to getting trapped in local optima. It is difficult to find a globally optimal parameter combination that suits the distribution network equipment detection scenario, resulting in the model's performance not being fully realized.
[0004] Based on this, we now provide a method for identifying distribution network equipment using the wolf pack algorithm optimized by YOLOv8, which can eliminate the drawbacks of existing technical solutions. Summary of the Invention
[0005] The purpose of this invention is to provide a method for identifying distribution network equipment using the wolf pack algorithm to optimize YOLOv8, so as to solve the problems of insufficient parameter adaptation and limited optimization strategies of YOLOv8 in the identification of distribution network equipment in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A wolf pack algorithm-optimized method for identifying distribution network equipment in YOLOv8, specifically including the following steps:
[0008] Step S1: Collect image samples of power distribution network equipment captured during the power distribution network inspection process from the power distribution network drone inspection platform;
[0009] Step S2: Screen and label the image samples of power distribution network equipment, select images that are normally captured and have clear image quality, and label the power distribution network equipment in the images. The power distribution network equipment includes insulators, surge arresters, cable terminals and transformers.
[0010] Step S3: Preprocess the labeled power distribution network equipment image samples. The preprocessing includes uniform resolution adjustment, enhancing the contrast between the power distribution network equipment and the background, and reducing image noise interference.
[0011] Step S4: Divide the preprocessed labeled images into training set and test set according to a preset ratio, and ensure that the distribution of power distribution equipment categories in the two datasets is consistent.
[0012] Step S5: Introduce the wolf pack algorithm and initialize the wolf pack algorithm parameters, which include the population size, maximum number of evaluations, maximum number of walks, attack determination distance, walking direction, and step size factor.
[0013] Step S6: Construct the fitness function and use the wolf pack algorithm to search for the optimal parameter combination of the YOLOv8 model in the solution space;
[0014] Step S7: Train the YOLOv8 model using the optimal parameter combination, apply the trained YOLOv8 model to the image samples in the test set for performance verification, and calculate the recall, precision, mean precision and mean mean precision to evaluate the recognition performance of the YOLOv8 model.
[0015] Preferably, in step S5, the wolf pack algorithm includes a directional selection walking strategy. This walking strategy dynamically adjusts the walking behavior of the artificial wolves in various dimensions by introducing random numbers and a multi-directional selection mechanism. The walking formula is: ,in, For the first During iteration Only artificial wolves in the first Position in dimensional space, Corresponding to the YOLOv8 parameter dimensions to be optimized, For the first During iteration Only artificial wolves are the first Position in dimensional space, for Random numbers between To select the probability, a value of 0.5 is chosen. For the direction of travel, for random integers between [a certain range] For the first Wei's walking stride length, when At that time, the artificial wolf was in the The position of the dimension remains unchanged when At that time, the artificial wolf was in the Horizontal travel The value determines the artificial wolf in the first The direction of travel upstream in the dimension.
[0016] Preferably, in step S5, the wolf pack algorithm includes an elite-oriented hunting strategy, which distinguishes between real-time elite wolves and historical elite wolves and adjusts summoning and besieging behaviors accordingly. The real-time elite wolf is the current elite wolf. The artificial wolf with the best fitness in the next iteration population is the alpha wolf. The historical elite wolf is the individual with the highest cumulative fitness during the iteration process. The formulas for the summoning and attack behaviors are as follows:
[0017] ;
[0018] in, For real-time elite wolves, For the historical elite wolves, The distance between the artificial wolf and the alpha wolf. To determine the distance for an attack, For the first During iteration Only the location of the artificial wolf, For the first During iteration The location of the artificial wolf, when When the summoning action is executed, the artificial wolf is guided by both the real-time elite wolf and the historical elite wolf. , and , , for Random numbers that are uniformly distributed between , when When executing a siege attack, the artificial wolf is only guided by the real-time elite wolf. for Random numbers that are uniformly distributed between them. for A random number between [a certain number of points].
[0019] Preferably, in step S6, the specific process of searching for the optimal parameter combination of the YOLOv8 model in the solution space using the wolf pack algorithm includes:
[0020] Step 1: Initialize the wolf pack algorithm parameters and set the population size to [value missing]. The maximum number of evaluations is The maximum number of moves is The siege judgment distance is The direction of travel is The step size factor is Calculate the fitness value of the artificial wolf. ;
[0021] Step 2: Based on fitness value Select the real-time elite wolves and the historical elite wolves;
[0022] Step 3: The artificial wolf performs a wandering behavior until the artificial wolf... fitness value greater than the alpha wolf's fitness value Or reach the maximum number of visits Stop wandering behavior;
[0023] Step 4: The artificial wolf executes the summoning and attacking behaviors according to the expression formula of the summoning and attacking behaviors;
[0024] Step 5: Update the positions of elite wolves, and update the wolf pack as a whole according to the survival-of-the-fittest wolf pack update mechanism;
[0025] Step 6: Determine if the maximum number of evaluations has been reached. If the target is reached, output the real-time location of the elite wolf; otherwise, continue to step 3.
[0026] Preferably, the fitness function in step S6 is formulated as follows:
[0027] ;
[0028] in, For the fitness function, This represents the average precision.
[0029] Preferably, the formula for calculating the average precision includes:
[0030] ;
[0031] ;
[0032] ;
[0033] ;
[0034] in, Recall rate measures the model's ability to detect real-world devices. To ensure the correct number of detected device targets, This represents the actual number of undetected devices. For accuracy, the proportion of actual equipment in the test results is assessed. To avoid misclassification as background or other categories of equipment, To achieve average accuracy, reflecting the overall performance of a single type of equipment in testing, This represents the number of categories.
[0035] Preferably, when the intersection-union ratio (IU / U) threshold of the YOLOv8 model is adjusted to 0.5, the average precision is denoted as... When the intersection-union ratio (IUU) threshold of the YOLOv8 model is adjusted to 0.5–0.95, the average precision is denoted as... .
[0036] Preferably, in step S6, the YOLOv8 parameters to be searched include learning rate parameters, momentum parameters, regularization parameters, warm-up parameters, loss function weights, and image enhancement parameters. The learning rate parameter is used to reasonably decay the learning pace to match the complex features of the distribution network equipment. The momentum and regularization parameters are used to suppress overfitting due to background interference. The warm-up parameters are used to stabilize the initial training process of the YOLOv8 model to help capture the features of small target equipment. The loss function weights are used to directionally improve the YOLOv8 model's localization accuracy, class discrimination ability, and fine-grained feature recognition sensitivity of the distribution network equipment bounding boxes. The image enhancement parameters are used to increase the adaptability to different scenarios.
[0037] Preferably, in the process of optimizing YOLOv8 parameters using the wolf pack algorithm, the parameters in different ranges are first normalized, and then the normalized parameters are input into the YOLOv8 model. The normalized parameters are then mapped back to their original values according to the parameter range.
[0038] Preferably, the image enhancement parameters include Mosaic, mixup, copy_paste, and erasing. Mosaic is used to simulate complex scene combinations by synthesizing multiple images, thereby enhancing the YOLOv8 model's understanding of the interaction between power distribution network equipment and the background. Mixup is used to enhance the generalization ability of the YOLOv8 model by mixing images and labels to cope with inspection environments with varying lighting conditions. Copy_paste is used to increase object instances and occlusion samples to solve the problem of identifying power distribution network equipment obscured by vegetation. Erasing is used to randomly erase image areas to encourage the YOLOv8 model to pay attention to the subtle features of power distribution network equipment.
[0039] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0040] 1. This invention introduces a wolf pack algorithm with direction selection and elite guidance to adjust the wandering behavior of artificial wolves in various dimensions, enhance the flexibility of search direction to improve global exploration capabilities, and improve summoning and besieging behaviors. This allows the artificial wolves to be guided by two elite wolves in the summoning phase to balance real-time optimal and historical high-quality information, and to focus on fine search around the real-time elite wolves in the besieging phase. This effectively strengthens the synergistic ability of global optimization and local development, and solves the problem of global optimal search for complex parameter combinations in the identification of power distribution network equipment.
[0041] 2. This invention optimizes the core parameters of YOLOv8 for various scenarios. Addressing the characteristics of UAV inspections of power distribution networks, such as overlapping equipment features with the background, a high proportion of small targets, and variable lighting and weather conditions, a multi-dimensional parameter optimization system is constructed. By optimizing parameters such as learning rate, momentum, regularization, and preheating parameters, background overfitting is suppressed, and early feature capture of small targets is ensured. This improves positioning accuracy, category differentiation ability, and fine-grained feature sensitivity. Furthermore, this invention can simulate real inspection environments, solving problems such as feature overlap, missed detection of small targets, and insufficient environmental adaptability, thereby improving the accuracy and stability of power distribution network equipment identification and making it more suitable for images of power distribution network equipment. Attached Figure Description
[0042] Figure 1 This is a schematic diagram illustrating the steps of the power distribution network equipment identification method of the present invention.
[0043] Figure 2 This is a schematic diagram illustrating the steps of the wolf pack algorithm of the present invention in searching for the optimal parameter combination.
[0044] Figure 3 This is a schematic diagram of the overall process of the present invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0046] In this embodiment, as Figures 1-3 As shown, a wolf pack algorithm-optimized method for identifying distribution network equipment using YOLOv8, taking the inspection of a 10kV distribution line as an example, specifically includes the following steps:
[0047] Step S1: Collect image samples of power distribution network equipment captured during the power distribution network inspection process from the power distribution network drone inspection platform;
[0048] Step S2: Screen and label the image samples of power distribution network equipment, select images that are normally captured and have clear image quality, and label the power distribution network equipment in the images. Power distribution network equipment includes insulators, surge arresters, cable terminals and transformers.
[0049] Step S3: Preprocess the labeled distribution network equipment image samples. The preprocessing includes uniform resolution adjustment, enhancing the contrast between distribution network equipment and background, and reducing image noise interference.
[0050] Step S4: Divide the preprocessed labeled images into training set and test set according to a preset ratio, and ensure that the distribution of power grid equipment categories in the two datasets is consistent. In this embodiment, the training set and test set are divided according to a preset ratio of 7:3.
[0051] Step S5: Introduce the wolf pack algorithm and initialize its parameters. These parameters include population size, maximum number of evaluations, maximum number of moves, attack / surround decision distance, movement direction, and step size factor. The population size is... The maximum number of evaluations is The maximum number of moves is The siege judgment distance is The direction of travel is , Population renewal ratio factor The initial position of the artificial wolf corresponds to a random value of the YOLOv8 parameter;
[0052] Step S6: Construct the fitness function and combine it with the wolf pack algorithm to search for the optimal parameter combination of the YOLOv8 model in the solution space. During the YOLOv8 parameter optimization process, the artificial wolves search for the optimal solution in the solution space. Map the positions of the artificial wolves back to the parameter combinations according to the YOLOv8 parameter range, and input the mapped parameter combinations into YOLOv8 to calculate... The algorithm iterates through the maximum number of evaluations, eliminating low-fitness artificial wolves and replacing them with new ones, then outputs the optimal parameter combination. Figure 2 As shown;
[0053] Step S7: Train the YOLOv8 model using the optimal parameter combination, apply the trained YOLOv8 model to the image samples in the test set for performance verification, and calculate the recall, precision, mean precision and mean mean precision to evaluate the recognition performance of the YOLOv8 model.
[0054] In this embodiment, the Wolf Pack Algorithm (WPA) is a swarm intelligence optimization algorithm inspired by the hunting behavior of wolf packs in nature. It achieves optimized search by simulating the wolf pack's hunting strategy. The algorithm abstracts the wolf pack hunting process into three core behaviors: roaming behavior, summoning behavior, and encirclement behavior. The wolf pack is divided into artificial wolves and alpha wolves. The artificial wolves are responsible for roaming and scouting prey during the roaming phase, and are responsible for encircling and hunting prey during the summoning and encirclement phases. The alpha wolf leads the decision-making and command. The algorithm follows the evolutionary mechanism of survival of the fittest, thereby ensuring the continuous evolution and adaptability of the population.
[0055] In this embodiment, YOLOv8 is a detection algorithm in the YOLO series. Its advantage lies in balancing real-time performance and detection accuracy. It has a mature structural design and efficient detection performance, and is widely used in scenarios such as power distribution network equipment identification. It can automatically detect equipment such as insulators, surge arresters, and cable terminals. Its default parameters need to be optimized in combination with scenario characteristics to further improve recognition accuracy and robustness. The YOLOv8 network structure mainly consists of three parts: the backbone network adopts C2f modules, which integrate multi-scale bottleneck layer features to enhance feature expression capabilities; the neck uses an FPN-PAN structure to achieve cross-scale feature fusion, improving adaptability to targets of different sizes; and the detection head adopts a decoupled structure to separate classification and regression tasks, which is a standard structure.
[0056] Among them, such as Figure 3 As shown, in step S5, the wolf pack algorithm includes a directional selection walking strategy. This strategy dynamically adjusts the roaming behavior of the artificial wolves in various dimensions by introducing random numbers and a multi-directional selection mechanism. The walking formula is: ,in, For the first During iteration Only artificial wolves in the first Position in dimensional space, Corresponding to the YOLOv8 parameter dimensions to be optimized, For the first During iteration Only artificial wolves are the first Position in dimensional space, for Random numbers between To select the probability, a value of 0.5 is chosen. For the direction of travel, for random integers between [a certain range] For the first Wei's walking stride length, when At that time, the artificial wolf was in the The position of the dimension remains unchanged when At that time, the artificial wolf was in the Horizontal travel The value determines the artificial wolf in the first The direction of travel upstream in the dimension;
[0057] In this embodiment, the traditional wolf pack algorithm has a single-direction problem in its walking strategy, where the artificial wolves only search along the direction of the alpha wolf. This makes it easy to get trapped in local optima in multi-parameter optimization scenarios for power distribution network equipment identification. Therefore, this invention proposes a wolf pack algorithm with direction selection. The walking strategy introduces random numbers and a multi-direction selection mechanism to dynamically adjust the walking behavior of the artificial wolves in various dimensions, thereby increasing directional flexibility. Through the above operations, the wolf pack can flexibly walk in different dimensions, thereby improving the global search capability of the algorithm and avoiding getting trapped in local optima.
[0058] Among them, such as Figure 3 As shown, in step S5, the wolf pack algorithm includes an elite-oriented hunting strategy. This strategy distinguishes between real-time elite wolves and historical elite wolves, adjusting their summoning and attack behaviors. The real-time elite wolf is the current elite wolf. The artificial wolf with the best fitness in the next iteration is the alpha wolf. The alpha wolf is the artificial wolf with the best fitness in the current iteration. The historical elite wolf is the individual with the highest cumulative fitness during the iteration process. The formulas for summoning and attacking behaviors are:
[0059] ;
[0060] in, For real-time elite wolves, For the historical elite wolves, The distance between the artificial wolf and the alpha wolf. To determine the distance for an attack, For the first During iteration Only the location of the artificial wolf, For the first During iteration The location of the artificial wolf, when When the summoning action is executed, the artificial wolf is guided by both the real-time elite wolf and the historical elite wolf. , and , , for Random numbers that are uniformly distributed between , when When executing a siege attack, the artificial wolf is only guided by the real-time elite wolf. for Random numbers that are uniformly distributed between them. for Random numbers between;
[0061] In this embodiment, since traditional wolf pack algorithms are prone to clustering due to the single wolf being agglomeration during the optimization process, this invention proposes an elite-oriented wolf pack algorithm. The elite-oriented hunting strategy combines information from elite individuals in the population to guide hunting behavior and adjust summoning and besieging behaviors. It divides real-time elite wolves into historical elite wolves. During the summoning phase, the artificial wolf is guided by two elite wolves to balance real-time optimal and historical high-quality information. During the besieging phase, it focuses on a fine search around the real-time elite wolf, effectively improving the algorithm's global optimization ability.
[0062] Among them, such as Figure 2 and Figure 3 As shown, in step S6, the specific process of searching for the optimal parameter combination of the YOLOv8 model in the solution space using the wolf pack algorithm includes:
[0063] Step 1: Initialize the wolf pack algorithm parameters and set the population size to [value missing]. The maximum number of evaluations is The maximum number of moves is The siege judgment distance is The direction of travel is The step size factor is Calculate the fitness value of the artificial wolf. ;
[0064] Step 2: Based on fitness value Select the real-time elite wolves and the historical elite wolves;
[0065] Step 3: The artificial wolf performs a wandering behavior until the artificial wolf... fitness value greater than the alpha wolf's fitness value Or reach the maximum number of visits Stop wandering behavior;
[0066] Step 4: The artificial wolf executes the summoning and attacking behaviors according to the expression formula of the summoning and attacking behaviors;
[0067] Step 5: Update the positions of elite wolves, and update the wolf pack as a whole according to the survival-of-the-fittest wolf pack update mechanism;
[0068] Step 6: Determine if the maximum number of evaluations has been reached. If the target is reached, output the real-time location of the elite wolf; otherwise, continue to step 3.
[0069] Among them, such as Figure 1 As shown, the formula for the fitness function in step S6 is:
[0070] ;
[0071] in, For the fitness function, To achieve the average accuracy, this operation quantifies the model's detection performance by integrating core evaluation metrics, in order to maximize... To optimize the target and achieve targeted improvements in the accuracy and robustness of device recognition;
[0072] Specifically, the formula for calculating the mean of precision includes:
[0073] ;
[0074] ;
[0075] ;
[0076] ;
[0077] in, Recall rate measures the model's ability to detect real-world devices. To ensure the correct number of detected device targets, This represents the actual number of undetected devices. For accuracy, the proportion of actual equipment in the test results is assessed. To avoid misclassification as background or other categories of equipment, To achieve average accuracy, reflecting the overall performance of a single type of equipment in testing, Number of categories;
[0078] Specifically, when the Intersection over Union (IoU) threshold of the YOLOv8 model is adjusted to 0.5, the average precision is denoted as... When the intersection-over-union (IoU) threshold of the YOLOv8 model is adjusted to 0.5–0.95, the average precision is denoted as follows: ;
[0079] In this embodiment, to quantify the optimization effect of YOLOv8 parameter combinations on the recognition performance in the power distribution network UAV inspection scenario, the present invention defines the following core evaluation indicators: (True Positive) represents the number of correctly detected device targets. (False Negatives) represents the number of real devices that were not detected. (False Positives) represents the number of background or other categories that were mistakenly identified as devices. Based on this, the recall rate is used to... ) measures the model's ability to detect real devices, accuracy ( The proportion of real equipment in the evaluation and testing results, and the average accuracy ( ) reflects the comprehensive performance of a single type of equipment in testing, with an average accuracy ( This measures the overall effectiveness of testing using multiple types of equipment.
[0080] Among them, such as Figure 1 As shown, in step S6, the YOLOv8 parameters to be searched include learning rate parameters, momentum parameters, regularization parameters, warm-up parameters, loss function weights, and image enhancement parameters. The learning rate parameters (Lr0, Lrf) are used to reasonably decay the learning rhythm of the complex features of the distribution network equipment. The momentum parameters (Momentum) and regularization parameters (Weight_Decay) are used to suppress background interference and overfitting. The warm-up parameters (Warmup_Momentum, Warmup_Bias_Lr) are used to stabilize the initial training process of the YOLOv8 model. Their target is the initial training of the YOLOv8 model to help capture the features of small target equipment. The loss function weights (Cls, Dfl) are used to improve the positioning accuracy, class discrimination ability, and fine-grained feature recognition sensitivity of the YOLOv8 model for the bounding boxes of distribution network equipment. The loss function weights include classification loss weights (Cls) and distribution focus loss weights (Dfl). The image enhancement parameters are used to increase the adaptability to scene characteristics.
[0081] In this embodiment, considering that in the scenario of UAV inspection of power distribution networks, core parameters such as learning rate, momentum, regularization and preheating parameters can balance the learning rhythm of complex features of equipment, suppress background overfitting, and ensure early learning of small targets, parameter co-optimization can solve the problems of feature overlap, missed detection of small targets and environmental adaptability. Therefore, it is necessary to adapt to the image recognition operation in the scenario of UAV inspection of power distribution networks, and to optimize the YOLOv8 parameters in a targeted manner, and to construct a multi-dimensional parameter optimization system, as shown in Table 1 below, which describes the parameters to be optimized.
[0082] Table 1 - Schematic Table of Parameters to be Optimized
[0083]
[0084] As shown in Table 1 above, this invention systematically optimizes the learning strategy (Lr0, Lrf, Momentum), regularization mechanism (Weight_Decay), training stability (Warmup_Momentum, Warmup_Bias_Lr), loss function weights (Cls, Dfl), and image enhancement strategy (Mosaic, etc.) of YOLOv8 for the power distribution network equipment identification scenario, and constructs a complete parameter optimization system with strong scenario adaptability;
[0085] The values of the above parameters are determined based on algorithm principles, historical data, and parameter sensitivity analysis experiments to ensure that the wolf pack algorithm searches within the effective solution space, while also guaranteeing the training stability and performance of the YOLOv8 model. A learning rate that is too low can lead to slow training or even convergence to a local optimum, while a rate that is too high may cause training oscillations or even divergence. 0.001 to 0.1 is a commonly validated effective range for deep learning models. The wolf pack algorithm performs a fine-grained search within this range, adapting to the complex learning rhythm of power distribution network equipment characteristics. A momentum parameter value of 0.5 to 1.0 helps the model cope with complex background disturbances. Stable learning, regularization values of 0.00025~0.001 can effectively penalize excessive weights, avoid the model's over-reliance on a few background features, and improve generalization ability. The warm-up parameter setting range allows the model to gradually transition from a small momentum / learning rate to the main training phase, avoiding gradient explosion. The loss function weight value range can cover various strategies from localization-oriented to classification-oriented. The image enhancement parameter value range of 0~1 allows the algorithm to autonomously decide whether to enable a certain enhancement. By optimizing the above parameters, this invention can configure data enhancement combinations that are suitable for the current power distribution network scenario, thereby improving the accuracy and stability of power distribution network equipment identification.
[0086] Specifically, in the process of optimizing YOLOv8 parameters using the wolf pack algorithm, the parameters in different ranges are first normalized to the [0,1] interval using a linear mapping formula: Then, the normalized parameters are input into the YOLOv8 model, and the normalized parameters are mapped back to their original values according to the parameter range for model training.
[0087] Specifically, image enhancement parameters include, but are not limited to, Mosaic, mixup, copy_paste, and erasing. Mosaic is used to simulate complex scene combinations by synthesizing multiple images, thereby enhancing the YOLOv8 model's understanding of the interaction between power distribution network equipment and the background. Mixup is used to enhance the generalization ability of the YOLOv8 model by mixing images and labels to cope with inspection environments with varying lighting conditions. Copy_paste is used to increase object instances and occlusion samples to solve the problem of identifying power distribution network equipment obscured by vegetation. Erasing is used to randomly erase image regions to encourage the YOLOv8 model to pay attention to the subtle features of power distribution network equipment.
[0088] In this embodiment, the present invention employs a power distribution network equipment identification system, which includes a power distribution network drone inspection platform and a back-end terminal device. The power distribution network drone inspection platform is a comprehensive system integrating drone control, task planning, data communication, and image uploading functions. It can be used to schedule drone inspection equipment to autonomously inspect power distribution lines according to a predetermined route, and upload power distribution network images collected by high-definition industrial cameras and environmental data collected by sensors in real time during flight to the power distribution network drone inspection platform. The back-end terminal device is equipped with a YOLOv8 model and algorithm module. After receiving the images transmitted by the power distribution network drone inspection platform, it optimizes the YOLOv8 model parameters through the wolf pack algorithm. The trained YOLOv8 model identifies power distribution network equipment image samples, improving detection accuracy and robustness.
[0089] In summary, this invention optimizes the walking behavior by introducing random numbers and a multi-directional selection mechanism. It designs a dynamically adjusted update formula for the artificial wolf's walking in various dimensions to enhance search flexibility. An elite-oriented hunting strategy adjusts the summoning and attacking behaviors. During the summoning phase, the artificial wolf is guided by two elite wolves, while during the attacking phase, it focuses on a detailed search around the real-time elite wolf, thereby improving global optimization capabilities and avoiding local optima. This invention also features a YOLOv8 multi-parameter optimization system adapted to power distribution network scenarios. This system can address issues such as overlapping equipment features, missed detection of small targets, and variable lighting by optimizing the learning rate, momentum, regularization, loss function weights, and image enhancement parameters. This allows it to focus on core features and environmental adaptability, improving the recognition performance of power distribution network equipment.
[0090] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for identifying power distribution network equipment by optimizing YOLOv8 using a wolf pack algorithm, characterized by, Specifically comprising the following steps: Step S1, collecting power distribution network equipment image samples taken during power distribution network inspection from a power distribution network unmanned aerial vehicle inspection platform; Step S2, screening and labeling the power distribution network equipment image samples, screening out images with a resolution greater than 1080p, a single interference object occlusion target area pixel ratio of less than or equal to 10%, and a UAV shooting angle of 30° to 70° with respect to the horizontal direction of the power distribution network equipment, and labeling the power distribution network equipment in the images, the power distribution network equipment including insulators, lightning arresters, cable terminals, and transformers; Step S3, preprocessing the labeled power distribution network equipment image samples, the preprocessing including uniform resolution adjustment, enhancing the contrast between the power distribution network equipment and the background, and reducing image noise interference; Step S4, dividing the preprocessed labeled images into a training set and a test set according to a predetermined ratio, and ensuring consistent power distribution network equipment category distribution in the two data sets; Step S5, introducing a wolf pack algorithm and initializing wolf pack algorithm parameters, the wolf pack algorithm parameters including population size, maximum evaluation times, maximum wandering times, attack determination distance, wandering direction, and step factor; Step S6, constructing a fitness function and searching for the optimal parameter combination of the YOLOv8 model in the solution space using the wolf pack algorithm; Step S7, training the YOLOv8 model using the optimal parameter combination, applying the trained YOLOv8 model to the image samples in the test set for performance verification, calculating the recall rate, precision, average precision, and average precision mean to evaluate the recognition performance of the YOLOv8 model; In the step S6, the specific process of searching for the optimal parameter combination of the YOLOv8 model in the solution space using the wolf pack algorithm includes: Step 1, initialize the wolf swarm algorithm parameters, set the population size to , the maximum evaluation number to , the maximum wandering number to , the siege determination distance to , the wandering direction to , the step factor to , and calculate the fitness value of the artificial wolf ; Step 2, selecting real-time elite wolves and historical elite wolves selecting real-time elite wolves and historical elite wolves Step 3, the artificial wolf performs a wandering behavior until the artificial wolf the fitness value of the head wolf is greater than the fitness value of the head wolf or the maximum number of wandering times is reached the wandering behavior is stopped; Step 4, the artificial wolf performs the calling and attacking behaviors according to the expression formula of the calling and attacking behaviors; Step 5, updating the position of the elite wolf and updating the wolf pack according to the wolf pack update mechanism of survival of the fittest; Step 6, determine if the maximum number of evaluations is reached If yes, output the real-time elite wolf position, if no, go to step 3.
2. The method of claim 1, wherein the method is a power grid device identification method of wolf swarm algorithm optimized YOLOv8. In step S5, the wolf pack algorithm includes a directional selection walking strategy. This walking strategy dynamically adjusts the walking behavior of the artificial wolves in various dimensions by introducing random numbers and a multi-directional selection mechanism. The walking formula is as follows: ,in, For the first During iteration Only artificial wolves in the first Position in dimensional space, Corresponding to the YOLOv8 parameter dimensions to be optimized, For the first During iteration Only artificial wolves are the first Position in dimensional space, for Random numbers between To select the probability, a value of 0.5 is chosen. For the direction of travel, for random integers between [a certain range] For the first Wei's walking stride length, when At that time, the artificial wolf was in the The position of the dimension remains unchanged when At that time, the artificial wolf was in the Horizontal travel The value determines the artificial wolf in the first The direction of travel upstream in the dimension.
3. The method of claim 1, wherein the method is a method of optimizing a power grid device identification of YOLOv8 using a wolf pack algorithm. In the step S5, the wolf swarm algorithm includes an elite-oriented hunting strategy, which divides real-time elite wolves and historical elite wolves to adjust calling and siege behaviors. The real-time elite wolves are artificial wolves with the best fitness in the current population of the nth iteration, i.e., the head wolves, and the historical elite wolves are individuals with the highest cumulative fitness in the iteration process. The expression formula of the calling and siege behaviors is: ; wherein, is a real-time elite wolf, is a historical elite wolf, is a distance between an artificial wolf and a head wolf, is a siege determination distance, is a first is a first is a position of only an artificial wolf, is a first is a position of only an artificial wolf at a first iteration, when a call behavior is performed, at which time the artificial wolf is guided by both the real-time elite wolf and the historical elite wolf, , , , is a random number uniformly distributed between , when a siege behavior is performed, at which time the artificial wolf is guided by only the real-time elite wolf, is a random number uniformly distributed between , is a random number between .
4. The power grid device identification method of optimizing YOLOv8 by wolf pack algorithm according to claim 1, characterized in that, The formula of the fitness function in the step S6 is: ; wherein, is the fitness function, is the average precision mean.
5. The method of claim 4, wherein the method is a power grid device identification method of wolf swarm algorithm optimized YOLOv8. The formula for calculating the average precision mean includes: ; ; ; ; wherein, is a recall rate to measure the detection capability of the model for real devices, is a number of correctly detected device targets, is a number of undetected real devices, is a precision rate to evaluate the proportion of real devices in the detection results, is a number of backgrounds or other categories misjudged as devices, is an average precision to reflect the comprehensive performance of single-class device detection, is a number of classes.
6. The method of claim 4, wherein the wolf swarm algorithm optimizes the YOLOv8 for power grid device identification. When the intersection over union threshold of the YOLOv8 model is adjusted to 0.5, the average precision mean is recorded as When the intersection over union threshold of the YOLOv8 model is adjusted to 0.5-0.95, the average precision mean is recorded as .
7. The method of claim 1, wherein the method is a power grid device identification method of wolf swarm algorithm optimized YOLOv8. In the step S6, the YOLOv8 parameters to be searched include the learning rate parameter, the momentum parameter, the regularization parameter, the warm-up parameter, the loss function weight, and the image enhancement parameter. The learning rate parameter is used to reasonably adjust the learning pace to adapt to the complex features of the power distribution network equipment. The momentum parameter and the regularization parameter are used to suppress background interference overfitting. The warm-up parameter is used to stabilize the initial training process of the YOLOv8 model to help capture small target equipment features. The loss function weight is used to improve the positioning accuracy, class distinction ability, and fine-grained feature recognition sensitivity of the YOLOv8 model for the power distribution network equipment bounding box. The image enhancement parameter is used to increase the adaptation to scene characteristics.
8. The method of claim 1, wherein the method is a power grid device identification method of wolf swarm algorithm optimized YOLOv8. In the process of optimizing the YOLOv8 parameters using the wolf pack algorithm, the parameters in different ranges are first normalized, and then the normalized parameters are input into the YOLOv8 model. The normalized parameters are mapped back to the original values according to the parameter range.
9. The method of claim 7, wherein the method is a power grid device identification method of wolf swarm algorithm optimized YOLOv8. The image enhancement parameters include Mosaic, mixup, copy_paste and erasing, wherein Mosaic is used to simulate complex scene combination by synthesizing multiple images, to strengthen the understanding of the interaction between power distribution network equipment and background by the YOLOv8 model, mixup is used to enhance the generalization ability of the YOLOv8 model by mixing images and labels, to cope with the variable light inspection environment, copy_paste is used to increase object instances and occlusion samples, to solve the problem of identifying power distribution network equipment hidden by vegetation, and erasing is used to encourage the YOLOv8 model to focus on the subtle features of the power distribution network equipment by randomly erasing image regions.
Citation Information
Patent Citations
GIS internal intermittent discharge mode recognition system and method based on SSA and RF, electronic equipment and medium
CN115828984A
Grey wolf algorithm hybrid optimization method based on reverse learning strategy
CN116341605A