A YOLO-based method for identifying fault types in 10kV distribution network lines

By improving the YOLOv8 model, the problems of insufficient small target detection, poor multi-scale adaptability, and complex background interference in 10kV distribution network line fault identification were solved, achieving high-precision and real-time fault identification and classification, and improving the efficiency of distribution network operation and maintenance and the timeliness of fault early warning.

CN122090158APending Publication Date: 2026-05-26SHANGHAI GUOQUAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI GUOQUAN TECH CO LTD
Filing Date
2026-02-27
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing 10kV distribution network line fault identification technologies suffer from problems such as poor detection performance for small target faults, insufficient adaptability to multiple scales, weak anti-interference capability in complex backgrounds, difficulty in balancing accuracy and real-time performance, and low distinguishability between similar fault types.

Method used

An improved YOLOv8 model is adopted, which uses a multi-scale attention fusion module, an improved feature pyramid network and a small target detection enhancement head, combined with a multi-task loss function and a three-stage training strategy to perform data augmentation and post-processing optimization, so as to achieve high-precision, high-robustness and real-time fault identification.

Benefits of technology

It significantly improves the performance of small target fault detection, enhances the model's adaptability to multi-scale faults, improves anti-interference ability and recognition accuracy, meets the real-time requirements of online monitoring of distribution networks, and reduces false detection rate and false negative rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122090158A_ABST
    Figure CN122090158A_ABST
Patent Text Reader

Abstract

This invention provides a YOLO-based method for identifying fault types in 10kV distribution network lines, comprising: constructing a fault image dataset and data augmentation; constructing an improved YOLOv8 fault identification model architecture; constructing a multi-task loss function for fault identification; training the line fault identification model; inference detection based on line inspection images; post-processing optimization of fault detection results; and outputting identification results. This invention achieves high-precision, robust, and real-time intelligent identification and classification of various types of line faults in 10kV distribution networks, effectively improving the efficiency of intelligent inspections and the timeliness of fault early warnings, and ensuring the safe and stable operation of the distribution network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of power system distribution network operation and maintenance technology and computer vision deep learning technology, and in particular to a method for identifying fault types of 10kV distribution network lines based on YOLO. Background Technology

[0002] The 10kV distribution network is a core link in the power system that directly connects the transmission network and end users. The safety and stability of its lines directly determine the reliability of regional power supply. With the continuous expansion of the distribution network, overhead lines are widely distributed and traverse complex terrains. Traditional manual inspection methods suffer from low efficiency, high cost, numerous blind spots, and delayed fault detection. Intelligent inspection based on image recognition has become the mainstream development direction for fault detection in distribution network lines.

[0003] Currently, technical solutions for fault image recognition in 10kV distribution network lines can be mainly divided into four categories: First, traditional image processing methods, which extract features from line fault images based on threshold segmentation, edge detection, and other algorithms. These methods are greatly affected by outdoor environmental factors such as lighting and weather, and the models have poor generalization ability. Second, classic machine learning methods, which use classifiers such as SVM and random forests, combined with manually designed texture, color, and shape features to achieve fault recognition. However, due to the upper limit of the expression of manually designed features, the recognition accuracy is difficult to meet engineering requirements. Third, standard deep learning models, which use general object detection models such as CNN and Faster R-CNN for fault detection. These models have significant shortcomings in small object fault detection and multi-scale feature fusion. Fourth, detection solutions based on the YOLO series. Existing versions such as YOLOv5 and YOLOv7 have been tried to be applied to power equipment detection, but their adaptability to specific fault types in 10kV distribution networks is insufficient, and there is still considerable room for improvement in balancing recognition accuracy and real-time performance.

[0004] In summary, existing 10kV distribution network line fault identification technologies still suffer from the following core shortcomings in practical engineering applications: First, they are ineffective at detecting small-target faults, with existing models exhibiting a high false negative rate for small-sized fault targets such as insulator breakage and connector detachment. Second, they lack multi-scale adaptability, as fault targets vary greatly in scale under different shooting distances and angles, and the existing feature pyramid structure has low cross-scale information transmission efficiency, failing to meet the needs of fault detection across large scales. Third, they have weak ability to suppress interference from complex backgrounds, as background elements such as tree branches and buildings in the field environment can easily lead to a large number of false detections. Fourth, it is difficult to balance recognition accuracy and real-time performance, as online monitoring of distribution networks has high requirements for real-time fault early warning, while existing high-precision models generally suffer from high computational load and slow inference speed, failing to meet the needs of edge deployment. Fifth, they have low differentiation between similar fault types, and existing models struggle to accurately classify fault types with similar characteristics such as corona discharge and arc discharge. Summary of the Invention

[0005] This invention provides a YOLO-based method for identifying fault types in 10kV distribution network lines. Addressing the aforementioned shortcomings of existing 10kV distribution network line fault identification technologies, this invention aims to overcome industry pain points such as weak small-target fault detection capability, insufficient adaptability to multi-scale faults, poor anti-interference capability in complex backgrounds, difficulty in balancing accuracy and real-time performance, and low differentiation of similar faults. It achieves high-precision, robust, and real-time intelligent identification and classification of various types of line faults in 10kV distribution networks, effectively improving the efficiency of intelligent inspection and the timeliness of fault early warning in distribution networks, and ensuring the safe and stable operation of the distribution network.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: A YOLO-based method for identifying fault types in 10kV distribution network lines includes: Inspection images of 10kV distribution network lines were collected to construct a 10kV distribution network line fault image dataset. The fault image dataset contains inspection images labeled with fault types, including insulator breakage, insulator flashover, conductor strand breakage, conductor foreign object suspension, loose connectors, connector detachment, corona discharge, arc discharge, tree contact with line, and bird nest construction. Data augmentation processing was performed on the inspection images in the fault image dataset to obtain an augmented training dataset. An improved YOLOv8 model is constructed, comprising a backbone network, a neck network, and a detection head connected in sequence; a multi-scale attention fusion module is embedded in the backbone network, an improved feature pyramid network is set in the neck network, and a small target detection enhancement head is added to the detection head; A multi-task loss function adapted to 10kV distribution network line fault identification is constructed. The multi-task loss function includes classification loss, location loss, target confidence loss and improved focus loss. Using the enhanced training dataset, the improved YOLOv8 model is trained based on the multi-task loss function to obtain a trained 10kV distribution network line fault identification model. Acquire the inspection image of the 10kV distribution network line to be detected, input the inspection image to be detected into the trained 10kV distribution network line fault identification model for inference, and obtain the initial fault detection result. The initial fault detection results are post-processed and optimized to obtain the final 10kV distribution network line fault type and location identification results.

[0007] In this specification, the data augmentation processing of the inspection images in the fault image dataset specifically includes: performing at least one of four types of processing on the inspection images in sequence: geometric transformation, photometric transformation, weather simulation, and noise injection. Each of the four types of processing is triggered randomly with a preset probability. Among them, the geometric transformation includes random rotation and random perspective transformation, the photometric transformation includes brightness adjustment and color jitter, the weather simulation includes rain and fog weather generation, and the noise injection includes Gaussian noise addition and salt-and-pepper noise addition.

[0008] In this specification, the processing flow of the multi-scale attention fusion module is as follows: receiving the feature map input from the backbone network, processing the feature map in parallel through multiple convolutional branches with different dilation rates to obtain multiple sets of branch feature maps with different receptive fields; fusing the multiple sets of branch feature maps to obtain a fused feature map; sequentially performing channel attention weighting and spatial attention weighting on the fused feature map to obtain an enhanced feature map, and inputting the enhanced feature map into the improved feature pyramid network.

[0009] In this specification, the processing flow of the improved feature pyramid network is as follows: receiving the enhanced feature map output by the multi-scale attention fusion module, and passing the semantic information of the high-level feature map to the shallow feature map through a bottom-up enhancement path; performing weighted bidirectional cross-scale fusion processing on the feature maps of different levels to obtain a cross-scale fusion feature map; performing pixel-level alignment and semantic recalibration processing on the cross-scale fusion feature map to obtain the final multi-scale fusion feature map, and inputting the multi-scale fusion feature map into the detection head.

[0010] In this specification, the small target detection enhancement head is a high-resolution detection layer with a resolution of 160×160 pixels. The processing flow of the small target detection enhancement head is as follows: receiving the shallow high-resolution feature map output by the improved feature pyramid network, performing pixel-by-pixel recalibration and noise suppression processing on the shallow high-resolution feature map through a feature refinement network to obtain a refined small target feature map; expanding the receptive field of the corresponding neighborhood of the small target feature map through dilated convolution, fusing the contextual feature information around the target to obtain the final small target detection feature, and outputting the initial detection result of the small target fault based on the small target detection feature.

[0011] In this specification, the multi-task loss function further includes shape consistency constraint loss and feature similarity regularization term; the improved focus loss is used to reduce the weight of easily classified negative samples, so that the model training focuses on difficult-to-classify positive fault samples; the shape consistency constraint loss is used to apply regularization constraint to the aspect ratio of the predicted bounding box and the ground truth labeled box; the feature similarity regularization term is used to constrain the intra-class distance of samples of the same fault type in the feature space.

[0012] In this specification, the training of the improved YOLOv8 model specifically employs a three-stage progressive training strategy, including: First, freezing all parameters of the backbone network of the improved YOLOv8 model and training only the parameters of the detection head; Second, unfreezing the deep parameters of the backbone network and jointly fine-tuning the unfrozen backbone network parameters and detection head parameters; Third, unfreezing all network parameters of the improved YOLOv8 model and using a cosine annealing learning rate scheduling strategy to globally fine-tune all network parameters until the model converges.

[0013] In this specification, the three-stage progressive training strategy involves loading pre-trained weights before model training. These pre-trained weights are obtained as follows: the YOLOv8 base model is first pre-trained on a general vision dataset, and then the pre-trained model is performed on a public power equipment dataset for domain-adaptive pre-training to obtain the power equipment pre-trained weights. During training, an online hard sample mining mechanism is introduced. In each training iteration, the loss value of all anchor boxes is calculated, and a preset proportion of anchor boxes with the highest loss values ​​are selected as hard samples. The network parameters are updated through backpropagation only using the loss of hard samples.

[0014] In this specification, the post-processing optimization of the initial fault detection results specifically includes: performing non-maximum suppression improvement processing on the initial fault detection results based on prior knowledge of 10kV distribution network line faults, and dynamically adjusting the cross-parallel ratio threshold for different fault types; for the inspection images to be detected in the form of video sequences, performing spatiotemporal continuity constraint processing on the initial fault detection results of adjacent frames to eliminate false alarm results of isolated frames; and adaptively adjusting the confidence threshold of fault detection according to the environmental characteristics of the inspection images to be detected, thereby obtaining the final fault type and location identification results.

[0015] In this specification, the trained 10kV distribution network line fault identification model is quantized and compressed, and then deployed in an edge computing unit. The edge computing unit accesses the real-time video stream of the 10kV distribution network line inspection by a fixed camera or drone via the RTSP protocol, decodes the inspection image to be detected, performs fault identification processing frame by frame, and outputs an alarm result containing fault location, fault type, and confidence information when a fault is identified.

[0016] In summary, the present invention has at least the following beneficial effects: It significantly improves the detection performance of small target faults. Through high-resolution detection layer, multi-scale feature fusion and context enhancement design, it effectively makes up for the problem of loss of details of small target faults in traditional models, and greatly reduces the missed detection rate of small faults such as micro-cracks in insulators and early strand breakage of conductors.

[0017] The model's adaptability to multi-scale faults has been enhanced. Through the improved feature pyramid network and multi-scale attention fusion module, efficient extraction and bidirectional fusion of fault features of different scales and forms have been achieved, which can effectively adapt to the fault detection needs under different shooting distances and angles in power distribution network inspection.

[0018] It significantly improves the model's anti-interference ability and generalization performance. Through full-scene data augmentation strategy, attention mechanism and hard sample mining design, it effectively suppresses the interference caused by factors such as complex background, bad weather and light changes in the field, and significantly reduces the model's false detection rate. It can be adapted to application scenarios with different terrains and different inspection equipment.

[0019] It achieves an efficient balance between recognition accuracy and real-time performance. The core improved modules all adopt a lightweight design, which significantly improves fault recognition accuracy while maintaining a fast inference speed. It can be adapted to the deployment of edge computing devices and meets the engineering requirements of online real-time inspection and fault early warning of power distribution networks.

[0020] It improves the distinguishability of similar fault types. Through optimized loss function and feature discrimination constraint, the model learns more distinguishable feature embeddings for various faults, effectively solving the problem of difficult accurate classification of similar faults such as corona discharge and arc discharge, and realizing accurate identification and classification of all types of line faults in 10kV distribution network.

[0021] The model lowers the engineering implementation threshold. Through transfer learning and multi-stage training strategies, it significantly reduces the model's dependence on massive labeled fault samples, adapting to the industry's current situation where power distribution network fault samples are scarce. At the same time, it can be directly connected to existing drone inspection and fixed-point video monitoring systems, demonstrating excellent engineering practicality. It can effectively improve the operation and maintenance efficiency of power distribution networks, provide early warning of potential line faults, reduce power outages, and ensure the reliability of power supply in power distribution networks. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of the YOLO-based 10kV distribution network line fault type identification method involved in this invention.

[0024] Figure 2 This is a flowchart illustrating the YOLO-based 10kV distribution network line fault type identification method involved in this invention.

[0025] Figure 3 This is a schematic diagram of the overall architecture of the YOLO-based 10kV distribution network line fault type identification method involved in this invention.

[0026] Figure 4 This is a schematic diagram of the improved YOLOv8 model structure involved in this invention. Detailed Implementation

[0027] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the embodiments of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0028] The following disclosure provides many different implementations or examples for carrying out different structures of the embodiments of the present invention. To simplify the disclosure of the embodiments of the present invention, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the embodiments of the present invention. Furthermore, reference numerals and / or reference letters may be repeated in different examples of the embodiments of the present invention; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various implementations and / or arrangements discussed.

[0029] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0030] refer to Figure 1 , Figure 2 and Figure 3 This embodiment provides a method for identifying fault types in 10kV distribution network lines based on YOLO, including: Inspection images of 10kV distribution network lines were collected to construct a 10kV distribution network line fault image dataset. The fault image dataset contains inspection images labeled with fault types, including insulator breakage, insulator flashover, conductor strand breakage, conductor foreign object suspension, loose connectors, connector detachment, corona discharge, arc discharge, tree contact with line, and bird nest construction. Data augmentation processing was performed on the inspection images in the fault image dataset to obtain an augmented training dataset. An improved YOLOv8 model is constructed, comprising a backbone network, a neck network, and a detection head connected in sequence; a multi-scale attention fusion module is embedded in the backbone network, an improved feature pyramid network is set in the neck network, and a small target detection enhancement head is added to the detection head; A multi-task loss function adapted to 10kV distribution network line fault identification is constructed. The multi-task loss function includes classification loss, location loss, target confidence loss and improved focus loss. Using the enhanced training dataset, the improved YOLOv8 model is trained based on the multi-task loss function to obtain a trained 10kV distribution network line fault identification model. Acquire the inspection image of the 10kV distribution network line to be detected, input the inspection image to be detected into the trained 10kV distribution network line fault identification model for inference, and obtain the initial fault detection result. The initial fault detection results are post-processed and optimized to obtain the final 10kV distribution network line fault type and location identification results.

[0031] In some embodiments, the data augmentation processing of the inspection images in the fault image dataset specifically includes: performing at least one of four types of processing on the inspection images in sequence: geometric transformation, photometric transformation, weather simulation, and noise injection. The four types of processing are all randomly triggered with a preset probability. The geometric transformation includes random rotation and random perspective transformation; the photometric transformation includes brightness adjustment and color jitter; the weather simulation includes rain and fog weather generation; and the noise injection includes Gaussian noise addition and salt-and-pepper noise addition.

[0032] In some embodiments, the processing flow of the multi-scale attention fusion module is as follows: receiving the feature map input from the backbone network, processing the feature map in parallel through multiple convolutional branches with different dilation rates to obtain multiple sets of branch feature maps with different receptive fields; fusing the multiple sets of branch feature maps to obtain a fused feature map; sequentially performing channel attention weighting and spatial attention weighting on the fused feature map to obtain an enhanced feature map, and inputting the enhanced feature map into the improved feature pyramid network.

[0033] In some embodiments, the processing flow of the improved feature pyramid network is as follows: receiving the enhanced feature map output by the multi-scale attention fusion module, and passing the semantic information of the high-level feature map to the shallow feature map through a bottom-up enhancement path; performing weighted bidirectional cross-scale fusion processing on the feature maps of different levels to obtain a cross-scale fusion feature map; performing pixel-level alignment and semantic recalibration processing on the cross-scale fusion feature map to obtain the final multi-scale fusion feature map, and inputting the multi-scale fusion feature map into the detection head.

[0034] In some embodiments, the small target detection enhancement head is a high-resolution detection layer with a resolution of 160×160 pixels. The processing flow of the small target detection enhancement head is as follows: receiving the shallow high-resolution feature map output by the improved feature pyramid network, performing pixel-by-pixel recalibration and noise suppression processing on the shallow high-resolution feature map through a feature refinement network to obtain a refined small target feature map; expanding the receptive field of the corresponding neighborhood of the small target feature map through dilated convolution, fusing the contextual feature information around the target to obtain the final small target detection feature, and outputting the initial detection result of the small target fault based on the small target detection feature.

[0035] In some embodiments, the multi-task loss function further includes a shape consistency constraint loss and a feature similarity regularization term; the improved focus loss is used to reduce the weight of easily classified negative samples, so that model training focuses on difficult-to-classify positive fault samples; the shape consistency constraint loss is used to apply a regularization constraint to the aspect ratio of the predicted bounding box and the ground truth labeled box; the feature similarity regularization term is used to constrain the intra-class distance of samples of the same fault type in the feature space.

[0036] In some embodiments, the training of the improved YOLOv8 model specifically employs a three-stage progressive training strategy, including: a first stage, freezing all parameters of the backbone network of the improved YOLOv8 model and training only the parameters of the detection head; a second stage, unfreezing the deep parameters of the backbone network and jointly fine-tuning the unfrozen backbone network parameters and detection head parameters; and a third stage, unfreezing all network parameters of the improved YOLOv8 model and using a cosine annealing learning rate scheduling strategy to globally fine-tune all network parameters until the model converges.

[0037] In some embodiments, in the three-stage progressive training strategy, pre-trained weights are loaded before model training. The pre-trained weights are obtained by: first, pre-training the YOLOv8 base model on a general vision dataset, and then performing domain-adaptive pre-training on a public power equipment dataset to obtain power equipment pre-trained weights; during the training process, an online hard sample mining mechanism is introduced. In each training iteration, the loss value of all anchor boxes is calculated, and a preset proportion of anchor boxes with the highest loss values ​​are selected as hard samples. The network parameters are updated by backpropagation only through the loss of hard samples.

[0038] In some embodiments, the post-processing optimization of the initial fault detection results specifically includes: performing non-maximum suppression improvement processing on the initial fault detection results based on prior knowledge of 10kV distribution network line faults, and dynamically adjusting the cross-parallel ratio threshold for different fault types; for the inspection images to be detected in the form of video sequences, performing spatiotemporal continuity constraint processing on the initial fault detection results of adjacent frames to eliminate false alarm results of isolated frames; and adaptively adjusting the confidence threshold of fault detection according to the environmental characteristics of the inspection images to be detected, to obtain the final fault type and location identification results.

[0039] In some embodiments, the trained 10kV distribution network line fault identification model is quantized and compressed, and then deployed in an edge computing unit. The edge computing unit accesses the real-time video stream of the 10kV distribution network line inspection by a fixed camera or drone via the RTSP protocol, decodes the inspection image to be detected, performs fault identification processing frame by frame, and outputs an alarm result containing fault location, fault type, and confidence information when a fault is identified.

[0040] This invention is based on the YOLOv8 target detection model and features end-to-end customized improvements tailored to the specific characteristics of 10kV distribution network line fault scenarios. The core technical solution mainly comprises five key components: Data Acquisition and Preprocessing: Construct an image dataset covering all types of 10kV distribution network line faults, including insulator breakage / flashover, conductor strand breakage / foreign object suspension, loose / detached connectors, corona / arc discharge, and tree contact with lines / bird nest construction; Design a multi-dimensional and hierarchical data augmentation strategy, using multi-stage random overlay of four major categories of augmentation techniques: geometric transformation, photometric transformation, rain and fog weather simulation, and sensor noise simulation, to expand the scene coverage of the training samples and solve the problem of insufficient sample diversity in power inspection scenarios.

[0041] Customized improvements to the YOLOv8 model architecture: Addressing the core pain points of distribution network fault detection, three core improvement modules are designed: First, the Multi-Scale Attention Fusion (MSAF) module expands the receptive field through parallel convolutional branches with different dilation rates, combining channel attention and spatial attention to enhance and accurately locate multi-scale fault features; second, the improved Feature Pyramid Network (FPN+) improves the fusion efficiency of multi-scale fault features and compensates for the loss of details in small targets by adding bottom-up enhancement paths, weighted bidirectional cross-scale fusion, and a lightweight feature calibration module; third, a new small target detection enhancement head significantly improves the detection recall rate of tiny fault targets by adding a high-resolution detection layer, a feature refinement network, and a contextual information enhancement mechanism.

[0042] Loss function optimization: A multi-task weighted loss function adapted to the characteristics of power grid fault samples is designed. Based on classification loss, location loss, and target confidence loss, an improved focus loss is introduced to solve the problem of extreme imbalance between positive and negative samples. At the same time, shape consistency constraint loss and feature similarity regularization term are added to simultaneously optimize the fault classification accuracy, bounding box location stability, and feature discriminative power of the model.

[0043] Training strategy optimization: The power field transfer learning strategy is adopted to reduce the model's dependence on labeled samples. A three-stage progressive training paradigm is designed to avoid catastrophic forgetting of pre-trained features. At the same time, the online hard sample mining (OHEM) mechanism is introduced to enable the model training to focus on difficult-to-classify fault samples and improve the model's ability to identify rare and minor faults.

[0044] Post-processing optimization: A triple customized post-processing strategy is designed for distribution network inspection scenarios, including non-maximum suppression (NMS) improvement based on fault prior knowledge, spatiotemporal continuity constraints for video sequences, and confidence adaptive threshold adjustment. Without changing the model weights, the false detection rate of the model is further reduced, and the engineering practicality of the detection results is improved.

[0045] Specifically as follows: Step 1: Data Acquisition and Preprocessing A fault image dataset for 10kV distribution network lines was established, including the following fault types: insulator breakage and flashover; conductor strand breakage and foreign object hanging; loose or detached connectors; corona discharge and arc discharge; tree contact with line and bird nest building.

[0046] Data augmentation techniques, including random rotation, brightness adjustment, simulated rain and fog, and noise addition, are employed to transform the original inspection images in various ways to simulate the visual diversity caused by environmental changes, equipment differences, and shooting conditions in real power inspection scenarios: Geometric Transformation Class - Random Rotation: In implementation, a rotation angle θ∈[-30°,+30°] is first sampled from a uniform distribution, and an affine transformation matrix is ​​constructed with the image center as the origin. For each pixel (x,y) in the image, its corresponding coordinates (x',y') in the original image are calculated using the transformation matrix, and the pixel value at that position is determined using bilinear interpolation, thus avoiding the jagged effect caused by integer coordinate offset. The rotation operation simulates the changes in the UAV's heading angle, the gimbal's pitch adjustment, and the differences in the camera's installation angle on the tower, ensuring that the model is invariant to the morphological changes of faulty targets (such as insulator strings or broken conductors) under different orientations.

[0047] Photometric transformation category – Brightness adjustment and color dithering: Brightness adjustment is performed in the HSV color space: After converting the RGB image to HSV space, a brightness scaling factor γ is randomly sampled from the interval [0.6, 1.4], pixel-level multiplication is performed on the brightness channel V, and then the image is converted back to RGB space. This process simulates scenarios such as differences in light intensity between morning and evening, instantaneous darkening caused by cloud cover, and backlighting. To further enhance robustness, it can be extended to color dithering: independent Gaussian perturbations ΔR, ΔG, ΔB~N(0, σ) are added to each of the three channels in the RGB space. 2 This simulates color shifts caused by different camera models, white balance deviations, and aging lenses.

[0048] Weather simulation – Rain and fog weather generation: The fog simulation uses an atmospheric scattering model: ; Where I(x) is the synthesized fog image, J(x) is the clear original image, β is the attenuation coefficient (controlling fog concentration, usually taken as 0.5~1.2), d(x) is the scene depth map (for inspection images, it can be simplified to the assumption that it increases linearly with the ordinate), and A is the atmospheric light value (set as a light gray [220,240,240]). Rain simulation is achieved by adding a line mask with random directions: a binary mask of the same size as the image is generated, short lines with slight angular deflection are drawn at random intervals, and a motion blur kernel is applied to the mask area. After superposition, the local contrast is reduced to simulate the stripe occlusion effect formed by rain on the lens or protective glass.

[0049] Noise injection type - Sensor noise simulation: Gaussian noise is realized from a normal distribution N(0,σ) 2 Independent random values ​​are sampled and superimposed onto each pixel channel, with σ ranging from [5, 25] (for pixels ranging from 0 to 255). This noise simulates the thermal noise of a CMOS sensor in low-light environments and random interference in communication transmission. Salt-and-pepper noise sets random pixels to their maximum value (255, white) or minimum value (0, black) with a probability p (typically p = 0.01~0.05), simulating bit errors in image transmission, bad pixels in the storage medium, or pixel failure in old CCD panels.

[0050] Multi-stage overlay: This method does not rely on a single, independent enhancement; instead, it employs a randomized combination strategy: each training image undergoes a randomized process of "geometric transformation → photometric transformation → weather simulation → noise injection," with each step triggered with a probability of 50%–80%. Furthermore, to address the unique aerial perspective diversity of the 10kV distribution network, a randomized perspective transformation is introduced: the coordinates of the four corner points of the image are randomly perturbed, generating irregular quadrilaterals that are then mapped back to rectangles, simulating the perspective distortion of targets such as insulator strings and clamps when photographed by a drone from different heights and tilt angles. Simultaneously, multi-scale random cropping is used: sub-images occupying 30%–70% of the original image area are randomly cropped and scaled to the network input size, forcing the model to learn the scale-invariant features of fault targets.

[0051] Through the above-mentioned multi-dimensional and hierarchical data augmentation scheme, this invention expands the limited original inspection image library into a rich training set covering all real working condition variations such as illumination, weather, angle, noise, and scale. This fundamentally solves the problem of insufficient sample diversity in power inspection scenarios and lays a data foundation for the high-precision and high-robustness detection of subsequent YOLOv8 improved models.

[0052] Step 2: Model Architecture Improvement Improved YOLOv8 model structure reference Figure 4 The following key improvements were made based on YOLOv8: Multi-scale attention fusion module (MSAF): Input feature map → multi-branch convolution (different dilation rates) → feature fusion → channel attention (SE module) → spatial attention → output enhanced features; This multi-scale attention fusion module achieves multi-dimensional enhancement of fault features through a parallel architecture: First, it uses convolutional branches with different porosity (e.g., porosity = 1, 2, 3) to process the input feature map in parallel, expanding the receptive field without increasing the number of parameters, and extracting semantic features of multi-scale fault targets such as micro-cracks in insulators, broken strands in conductors, and large-area flashover. Then, feature fusion concatenates and compresses the feature maps of each branch along the channel dimension, achieving preliminary integration of cross-scale information. Next, the channel attention module (SE) compresses the spatial dimension through global average pooling and learns the channel weights through a fully connected layer, globally activating feature channels containing typical discharge characteristics or temperature rise patterns. Finally, the spatial attention module takes the maximum and average values ​​along the channel axis and concatenates them, generating a spatial weight map through convolution, accurately locating the pixel-level position of the fault in the image. Through this three-stage enhancement of "multi-scale perception - channel filtering - spatial focusing," the output feature map significantly strengthens the key discriminative information regarding the blurred edges, varying scales, and susceptibility to background interference of distribution network fault targets.

[0053] Improved Feature Pyramid Network (FPN+): In the improved Feature Pyramid Network (FPN+), firstly, by adding a bottom-up enhancement path, strong semantic information from high-level feature maps is propagated back to shallower layers, compensating for the loss of spatial details of small targets caused by continuous downsampling. This significantly improves the localization accuracy of minute fault features such as insulator microcracks and conductor strand breaks. Simultaneously, a cross-scale feature fusion mechanism is introduced, borrowing the idea of ​​BiFPN to perform weighted bidirectional fusion of feature maps from different levels. This allows the model to adaptively integrate high-level semantic and low-level texture information according to the target scale, effectively handling fault targets with extremely large scale spans, such as tree obstacles, bird nests, and partial discharges. Furthermore, a lightweight feature calibration module is added, using deformable convolution or lightweight attention to perform pixel-level alignment and semantic recalibration of the fused features, eliminating spatial misalignment and semantic gaps between different levels of the feature pyramid. These three improvements work synergistically, enabling FPN+ to significantly enhance the extraction accuracy and fusion efficiency of multi-scale, multi-morphological fault features in 10kV distribution network inspection images for YOLOv8 with almost no increase in computational burden.

[0054] Small target detection enhancement head: In the improved small target detection enhancement head of YOLOv8, a high-resolution detection layer of 160×160 pixels is added. This layer has the highest resolution and the smallest downsampling factor at the top of the feature pyramid, which can completely preserve the original edge texture and spatial location information of small-sized fault targets such as micro-cracks in insulators, broken strands of conductors, and detached connecting pins. This fundamentally solves the contradiction that deep feature maps are rich in semantic information but severely lose details of small targets. At the same time, a Feature Refinement Network (FRN) is adopted. By stacking lightweight residual convolution modules, the high-resolution feature map is recalibrated pixel by pixel and noise is suppressed to improve the feature quality of small targets. This allows weak fault signals such as partial discharge traces and early burn points, which are originally blurred and easily confused with the background, to obtain stronger response intensity in the feature space. In addition, a context information enhancement mechanism is introduced. Dilated convolution or adaptive pooling is used to expand the receptive field of the neighborhood of small targets and encode the environmental background features such as the outline of surrounding towers and the direction of lines into auxiliary semantic information. This helps the model accurately distinguish real insulator damage from light and shadow interference and rain stains in complex forest and building backgrounds. This enhanced head, through a triple design of "high-resolution detail preservation, feature refinement and semantic purification, and context-assisted discrimination," improves the recall rate of YOLOv8 for early micro-fault targets with a pixel ratio of less than 0.1% in 10kV distribution network inspection images by more than 30%.

[0055] Step 3: Loss Function Optimization Design a multi-task loss function: ; Improved focus loss, targeting imbalance between easy and difficult samples; For classifying losses, To locate the loss, The target confidence loss is used to optimize fault category discrimination, bounding box regression accuracy, and target presence probability, respectively. To address the extreme class imbalance problem in distribution network inspection images where normal samples far outnumber fault samples, an improved focus loss is introduced. Through modulation factor By reducing the weight of a large number of easily classified negative samples (such as normal insulators and background areas), the model focuses on rare, hard-to-classify positive sample fault targets (such as partial discharge and early strand breakage) during training, significantly improving the recall performance of small sample fault categories with high false negative rates. Simultaneously, a shape consistency constraint loss is introduced. By applying L2 regularization to the aspect ratio of the predicted bounding box and the actual target box, the model is forced to maintain geometric consistency when locating fault targets with significant aspect ratios and fixed poses, such as insulator strings and clamps, effectively suppressing positioning jitter caused by changes in shooting angle. Furthermore, a feature similarity regularization term is added. By calculating the intra-class distance of the same fault category in the feature space, the dispersion of feature representations of different samples of the same category (such as "insulator breakage") is penalized, guiding the model to learn more compact and discriminative fault feature embeddings, enabling the same type of faults under different shapes and lighting conditions to form tight clusters in the feature space. These four losses are in the hyperparameters... – The collaborative optimization under dynamic balance enables the improved YOLOv8 model to achieve a triple performance improvement in accurate classification, robust localization, and high-confidence output for fault targets with varying scales, scarce samples, and complex backgrounds in 10kV distribution network inspection images, while maintaining real-time detection speed.

[0056] Step 4: Optimize Training Strategy Transfer learning is employed, using pre-trained weights from power equipment: The model is first pre-trained on a large-scale general visual dataset (such as ImageNet) to learn rich low-level general features (edges, textures, shapes). Then, it undergoes domain-adaptive pre-training using a publicly available dataset of power equipment containing a large number of normal and typical faults (such as insulators, clamps, and conductors). This allows the model's backbone network to pre-master the feature representations of common visual structures such as towers, fittings, and lines in power inspection scenarios. Based on this, the model can be fine-tuned using only a small amount of 10kV distribution network-specific fault annotation data, quickly converging to the optimal state. This significantly reduces the dependence on massive amounts of labeled samples and greatly improves the detection accuracy and generalization ability for rare fault categories such as partial discharge traces, early strand breakage, and micro-cracks.

[0057] 2. Multi-stage training strategy: Phase 1: Freeze the backbone network and train the detection head; Phase Two: Unfreezing part of the backbone network and making minor adjustments; Phase 3: Fine-tuning of the entire network, using cosine annealing learning rate; In the multi-stage training strategy, this invention adopts a three-stage progressive fine-tuning to achieve efficient model optimization. The first stage freezes the pre-trained weights of the backbone network, training only the detection head. This preserves the general visual features (such as edges, textures, and shapes) already learned by the pre-trained power equipment model, while enabling the randomly initialized detection head to quickly converge to a dedicated feature space adapted to the distribution network fault targets (insulator breakage, conductor strand breakage), avoiding catastrophic forgetting of features due to drastic adjustments to the backbone network parameters. The second stage unfreezes some deep backbone network layers for fine-tuning, allowing high-level semantic features (such as fault location semantics and fitting categories) to adaptively adjust according to the domain distribution of 10kV distribution network inspection images, while shallow convolutional layers remain frozen to retain stable basic texture features, achieving the best balance between domain adaptation and preservation of general features. The third stage jointly fine-tunes all parameters of the entire network and adopts a cosine annealing learning rate scheduling strategy, causing the learning rate to periodically decay from the initial value to near zero in the form of a cosine function. In the later stages of training, parameters are finely optimized with extremely small steps, helping the model escape local optima and smoothly converge to a flat extremum region with stronger generalization ability. This hierarchical training paradigm of "starting from the beginning and working backwards, progressing from shallow to deep, and refining the overall picture" can significantly reduce the risk of overfitting in small-sample scenarios of distribution network faults, enabling the improved YOLOv8 model to still achieve high-precision and high-robust fault detection performance with limited labeled data.

[0058] 2. Introduce Online Hard Sample Mining (OHEM) In optimizing the training strategy, this invention introduces Online Hard Example Mining (OHEM) to further enhance the ability of the improved YOLOv8 model to identify difficult-to-distinguish fault samples in power distribution network inspection images. During each iteration of training, this mechanism first performs a complete forward propagation on the input image, calculating the classification loss and localization loss of all preset anchor frames, and sorting the anchor frames according to their loss values ​​from highest to lowest. Subsequently, only the anchor frames with the highest loss ranking (top K%) are selected as difficult samples (such as micro-cracks in insulators, early strand breaks in conductors, weak spots of partial discharge, and other easily missed targets), and their backpropagation updates the model parameters. Meanwhile, a large number of easily classified background areas with low loss (normal insulators, towers, sky, vegetation) are not included in the gradient calculation. This "high-loss-first learning" strategy enables the model to focus its limited computational resources and parameter update capabilities on fault targets that are misclassified, have large location biases, or lack confidence during training. This effectively solves the problem of model training being "submerged" in easily classified negative samples due to the extreme imbalance between normal and fault samples in distribution network fault datasets and the small scale and weak features of fault targets. Compared with traditional random downsampling or fixed hard example selection, OHEM achieves dynamic adaptation of the hard example distribution: as model performance improves, targets initially considered difficult gradually become simpler. OHEM automatically selects new fault modes that are truly difficult to distinguish in the current training stage, allowing the model to continuously challenge its own capability boundaries during iteration. Ultimately, this significantly improves the recall rate of missed faults under conditions of few fault types, rare fault morphologies, and complex background interference, while effectively suppressing false alarms caused by background misjudgment.

[0059] Step 5: Post-processing optimization 1. Improvements to NMS based on prior fault knowledge; 2. Spatiotemporal continuity constraints (for video sequences); 3. Confidence level adaptive threshold adjustment; In the post-processing optimization stage, this invention implements three improvements tailored to the characteristics of power distribution network inspection scenarios to enhance the practicality and reliability of the detection output. First, the NMS is improved based on prior fault knowledge: by statistically analyzing the typical dimensions, aspect ratios, and distribution positions of targets such as insulators, clamps, and broken conductor strands in historical fault data, a prior parameter library specific to each fault category is constructed. During non-maximum suppression, the IoU threshold is dynamically adjusted for different fault types—for example, a higher threshold is used for densely arranged insulator strings to retain adjacent fault frames, and a lower threshold is used for isolated bird nests to suppress redundant frames, thereby effectively reducing missed detections and duplicate alarms for similar targets. Secondly, a spatiotemporal continuity constraint is introduced for the video sequence: using continuous frame images captured by drone inspections or fixed cameras, cross-frame matching of detection boxes in adjacent frames is performed through Kalman filtering or cross-union ratio temporal correlation. If a target has a low confidence in the current frame but is consistently detected in the preceding and following frames, it is retained; conversely, if an isolated frame shows an isolated high-confidence detection without any correlation in the neighborhood, it is judged as a false alarm and suppressed, significantly eliminating false detections caused by sudden changes in illumination, instantaneous reflections, or sensor noise. Finally, an adaptive confidence threshold adjustment is implemented: based on the precision-recall curves of various faults on the validation set, a baseline confidence threshold is independently set for each fault category, and dynamic offset correction is performed during the inference stage based on the global contrast of the input image, the target scale distribution, or the model prediction entropy—for example, automatically lowering the threshold in low light or rainy / foggy weather to improve sensitivity to weak fault features, and raising the threshold in clear, high-visibility conditions to suppress background false alarms. These three post-processing optimizations work synergistically to reduce the false alarm rate of the YOLOv8 improved method by more than 40% in actual deployment without retraining the model, while ensuring reliable detection of early minor faults.

[0060] Example 1: Detection of Insulator Rupture Faults in 10kV Distribution Networks 1. Dataset Construction and Labeling This embodiment focuses on detecting insulator breakage faults in 10kV overhead distribution lines. First, a dedicated image dataset was established. Using a drone equipped with a 30x optical zoom visible light camera, inspections were conducted on distribution lines in three different terrain areas (mountainous, farmland, and suburban areas), collecting a total of 8,200 raw images showing various states, including normal insulators, insulator cracks, broken insulator skirts, and insulator string drops. After data cleaning, 5,000 clear images containing insulator breakage faults were selected, including 3,200 images of single-string insulators and 1,800 images of multiple strings in the same frame. Manual annotation was performed using the LabelImg tool, with the annotation type uniformly set to "insulator_crack". Bounding boxes were tightly fitted to the breakage area. After annotation, the images were stored in VOC format and randomly divided into a training set (4,000 images), a validation set (500 images), and a test set (500 images).

[0061] 2. Image Preprocessing and Data Augmentation: To meet the input requirements of the YOLOv8 network, all images were normalized to 640×640 pixels by proportional scaling and edge padding, while preserving the original aspect ratio. Considering the characteristics of small insulator size, complex backgrounds, and variable lighting in power distribution network inspections, a Mosaic multi-image stitching augmentation strategy was adopted: four training images were randomly selected in each batch, and then randomly scaled, cropped, and arranged to stitch together a new image, significantly improving the model's ability to perceive small targets such as insulators and targets of different scales. Furthermore, a combination of augmentations, including random rotation (-30° to +30°), brightness adjustment (0.6 to 1.4 times the original image), Gaussian noise (σ=5 to 15), and simulated rain and fog weather (atmospheric scattering model, β=0.8), was applied to effectively expand the training set to 32,000 images, effectively suppressing overfitting.

[0062] 3. Model training and parameter configuration utilize a modified YOLOv8n framework. The backbone network embeds the MSAF module, the neck network is replaced with an FPN+ structure, and a 160×160 small target detection head and an FRN refinement network are activated. The training process consists of three stages: Phase 1: Load ImageNet pre-trained weights, freeze all parameters of the backbone network, train only to detect head and neck, initial learning rate 0.01, momentum 0.937, weight decay 0.0005, batch size 16, 50 iterations; Phase 2: After unfreezing the backbone network for 3 stages, fine-tuning is performed with an initial learning rate of 0.001 for 100 iterations. Online hard sample mining (OHEM) is introduced, and only the top 30% of anchor boxes with the loss values ​​are selected for gradient backpropagation. Phase 3: Full network unfreezing, using cosine annealing learning rate scheduling (initially 0.0005, eventually decaying to 1e-5), iterating for 150 rounds. The loss function uses a multi-task weighted combination, where the classification loss... Weight 1.0, localization loss Weight 1.5, confidence loss Weight 1.0, focus loss Weight 2.0, with an additional shape consistency constraint.

[0063] 4. System Deployment and Online Detection Process: The trained model is quantized and compressed using TensorRT INT8 and deployed on the front-end edge computing unit (NVIDIA Jetson Xavier NX). In practical applications, the real-time video stream transmitted from a fixed camera on a pole or from a drone is accessed via the RTSP protocol, and image frames are extracted frame by frame after decoding. Each image frame is first preprocessed (scaled to 640×640), input into the improved YOLOv8 model for inference, and outputs the bounding box coordinates, class confidence, and classification probability of the insulator rupture target. The post-processing stage adopts NMS optimization based on fault prior knowledge: an IoU threshold of 0.5 is set for the insulator target, and the predicted box is geometrically filtered according to the typical aspect ratio of the insulator string (2.5:1 to 4:1); at the same time, spatiotemporal continuity constraints are enabled, assigning higher confidence to detection boxes that appear stably in 5 consecutive frames, and suppressing sudden false detections in isolated frames. Finally, when the target confidence level is greater than 0.7, the system automatically captures the fault image and pushes it to the operation and maintenance center, along with the tower's GPS coordinates, timestamp, and confidence level information.

[0064] 5. Test Results and Performance Analysis On 500 independent test images, the method of this invention achieved a detection accuracy of 96.3% and a recall of 94.7%, with mAP@0.5 reaching 95.8%, representing improvements of 12.4, 15.2, and 14.6 percentage points respectively compared to the original YOLOv8n. Particularly for microcracks with a pixel area smaller than 32×32, the recall rate increased from 58.3% in the original model to 86.2%. The average inference time per frame was 22ms (including pre- and post-processing), equivalent to 45 FPS, fully meeting the requirements for real-time inspection. In the field pilot, after 30 days of continuous operation, 127 potential insulator cracks were detected, 116 of which were confirmed manually, with 11 false alarms (mainly due to confusion between surface contamination and early crack characteristics). The alarm accuracy rate was 91.3%, and the average warning time was 9.7 days earlier than manual inspection.

[0065] In some embodiments, the specific expression for the improved focus loss is: ; in, This represents the model's predicted classification probability for the target sample, when the sample is a faulty positive sample. Take the positive class probability predicted by the model when the sample is a negative background sample. Take 1 and subtract the positive class probability predicted by the model; As a category-balanced weighting factor, for scenarios where fault samples are scarce in 10kV distribution networks, positive samples... The value range is 0.75~0.9, negative samples The value range is 0.1 to 0.25; This is the focusing parameter, with a value ranging from 2 to 4, used to modulate the loss weights for easily classified samples. Follow The weight decreases as the weight increases, thus suppressing the weight of easily classified negative samples.

[0066] In some embodiments, the classification loss A labeled, smoothed binary cross-entropy loss method is adopted to adapt to the classification requirements of multiple fault types in 10kV distribution networks. The specific expression is as follows: ; in, This represents the number of sample anchor frames within the batch. This represents the total number of fault categories on 10kV distribution network lines. For the first The anchor frame corresponds to the first The true label of the fault type (1 for positive samples and 0 for negative samples). For the model to predict the first The anchor frame belongs to the first The probability of a type of failure. The label smoothing coefficient, with a value of 0.1, is used to alleviate model overfitting and improve the robustness of classification for similar fault types.

[0067] In some embodiments, the positioning loss CIoU loss is adopted to address the issue that conventional IoU loss cannot reflect the degree of overlap and positional relationship of bounding boxes, thus adapting to the precise location requirements of fault targets in distribution networks. The specific expression is as follows: ;in, To predict bounding boxes With the true bounding box The intersection and union ratio; The squared Euclidean distance between the center coordinates of the predicted bounding box and the ground truth bounding box; It is the diagonal length of the smallest bounding rectangle that simultaneously contains both the predicted bounding box and the ground truth bounding box; These are the weighting coefficients. ; A parameter used to measure the consistency of the aspect ratio between the predicted bounding box and the ground truth bounding box. , To predict the width and height of the bounding box, The width and height of the actual bounding box.

[0068] In some embodiments, the target confidence loss A binary cross-entropy loss is used to optimize the model's confidence prediction of the presence or absence of a faulty target. The specific expression is as follows: ; in, The total number of preset anchor frames in the image. For the first The true confidence label for each anchor box (1 for faulty targets, 0 otherwise). For the model to predict the first Each anchor box contains the confidence value of the faulty target.

[0069] In some embodiments, the specific expression for the shape consistency constraint loss is: ; in, The number of positive sample anchor frames used in the calculation. , The first The width and height of the predicted bounding box, , The first The width and height of the true bounding box are used to determine the consistency of the aspect ratio between the predicted box and the true box through L2 regularization. For fault targets with fixed aspect ratios, such as insulator strings and clamps, additional aspect ratio weight coefficients specific to the category can be set. The weight coefficient for insulator string targets is 1.2 to 1.5, and the weight coefficient for other targets is 1.0.

[0070] In some embodiments, the specific expression of the feature similarity regularization term is: ; in, This represents the total number of fault types. The total number of positive samples in the batch. For the first The number of samples of this type of fault within the batch. , The first In the first type of fault , The one-dimensional feature vector obtained by global average pooling of the multi-scale fused feature map output by the neck network of the model for each sample. The L2 norm is used for regularization, which guides the model to learn compact class feature embeddings by constraining the intra-class feature distance of samples of the same fault category.

[0071] In some embodiments, the complete expression of the multi-task loss function is: ; in, , , , , , These are the weighting coefficients, and their value ranges are as follows: , , , , , .

[0072] In some embodiments, the fixed adaptation value of the weight coefficients of the multi-task loss function (optimized for 10kV distribution network line fault detection scenarios) is: (Classification loss) (Location loss) (Target confidence loss) (Improving focus loss) (Shape consistency constraint loss) (Feature similarity regularization term), this value has been verified by multiple sets of experiments, and it is suitable for the core pain points of imbalanced fault samples, difficulty in locating small targets, and low distinguishability of similar faults in the distribution network.

[0073] In some embodiments, the specific calculation method for channel attention weighting processing in the multi-scale attention fusion module is as follows: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] Perform global average pooling to obtain dimension . The channel feature vectors are processed through two consecutive fully connected layers and a sigmoid activation function to obtain the weight coefficients for each channel. ,pass The corresponding channels of the fused feature map are weighted to obtain the channel attention-enhanced feature map. The specific calculation method for the spatial attention weighting processing is as follows: For the channel attention enhancement feature map... The maximum and average feature maps are calculated along the channel dimension, respectively. The two feature maps are then concatenated along the channel dimension and passed through a 7×7 convolutional layer and a sigmoid activation function to obtain the spatial weight map. ,pass right Pixel-by-pixel weighting is performed to obtain the final enhanced feature map.

[0074] In some embodiments, the weighted bidirectional cross-scale fusion processing in the improved feature pyramid network is specifically calculated as follows: learnable weight coefficients are set for top-down and bottom-up features at the same level. and The fusion formula is ,in The feature map is a top-down propagation. This is a feature map that is propagated from bottom to top. To prevent the minimum value where the denominator is 0, the value is taken as 0. , and The model is adaptively learned and updated during training.

[0075] In some embodiments, the Feature Refinement Network (FRN) consists of three consecutive stacked residual convolutional modules. Each residual convolutional module contains two 3×3 convolutional layers, a batch normalization layer, and a SiLU activation function. The input and output of the residual branches are added through skip connections. A channel attention layer is set at the output of the module to perform channel weighting and labeling on the feature map. The input of the Feature Refinement Network is a shallow high-resolution feature map of 160×160 pixels, and the output is a refined small target feature map of the same size.

[0076] In some embodiments, the specific implementation of the spatiotemporal continuity constraint processing is as follows: for the video sequence... Frame detection results are used to predict the first frame using Kalman filtering. All detected targets in the frame are in the first The predicted position of the frame is calculated, and the predicted position is compared with the first frame. The Intersection over Union (IoU) of the frame detection boxes completes the matching and association of targets detected in adjacent frames; if a detection box is in the first frame... If the confidence level of a frame is below the baseline threshold, but a matching association is completed in 3 or more consecutive frames, its confidence level is raised above the baseline threshold and it is retained; if a detection box only appears in the first frame... If a frame appears and there are no matching associated targets in the two consecutive frames before and after it, it is judged as a false alarm and is removed.

[0077] In some embodiments, the confidence adaptive threshold adjustment is specifically implemented by: pre-setting a baseline confidence threshold for each type of fault. The value ranges from 0.5 to 0.7; the global contrast of the image to be inspected is calculated during the inference stage. The calculation formula is: ,in The maximum value of the image's grayscale value. The minimum value of the image grayscale; when When the scene is identified as a low-light / low-contrast scene, the confidence threshold is adjusted to... ;when When the scene is identified as a high-contrast, sunny scene, the confidence threshold is adjusted to... For other scenarios, maintain the baseline threshold. constant.

[0078] In some embodiments, in the Online Hard Sample Mining (OHEM), the selection ratio K of hard samples is 20% to 30%. In each training iteration, only the anchor boxes with the top K% of loss values ​​are selected as hard samples to participate in backpropagation, and the loss weight of the remaining anchor boxes is reset to 0 and they do not participate in parameter updates.

[0079] In some embodiments, in the data augmentation process, the preset trigger probabilities of the four types of processing—geometric transformation, photometric transformation, weather simulation, and noise injection—are 70%, 80%, 60%, and 60%, respectively. Each training image undergoes the four types of processing sequentially, and each type of processing is randomly triggered according to its corresponding preset probability.

[0080] In some embodiments, the core parameter of the cosine annealing learning rate scheduling strategy is the initial learning rate. Final learning rate The annealing cycle consists of 50 iterations. During the cycle, the learning rate decays according to the cosine function. After each cycle, the learning rate is reset to its initial value.

[0081] In some embodiments, dynamic serpentine convolution is introduced to replace conventional dilated convolution in the multi-branch convolution of the Multi-Scale Attention Fusion Module (MSAF). The dynamic serpentine convolution adaptively adjusts the sampling point position of the convolution kernel for the slender topology of distribution network lines and insulator strings, and extracts features along the contour and direction of the target. The convolution kernel size of each dynamic serpentine convolution branch is 7×7, corresponding to a hole ratio of 1, 2, and 3, respectively. After feature fusion, the feature maps output by the parallel branches are replaced by a coordinated attention module to replace the conventional SE channel attention and spatial attention. The coordinated attention module simultaneously encodes the dependencies between channels and the position coordinate information of the target, embedding the position features in the horizontal and vertical directions into the channel attention, and accurately locating the spatial position of broken strands of slender conductors and cracks along the insulator string. This design is specific to the slender and small-scale features of distribution network fault targets, which is different from the simple transfer of the general attention module in conventional YOLO improvements. This embodiment applies the deep fusion of dynamic serpentine convolution and coordinated attention to 10kV distribution network fault detection.

[0082] In some embodiments, the improved Feature Pyramid Network (FPN+) introduces discrete wavelet transform and deep fusion of the feature pyramid, replacing the conventional convolutional downsampling operation. Specifically, for each layer of feature map output from the backbone network, a two-dimensional discrete wavelet transform is performed, decomposing it into a low-frequency approximate subband and three high-frequency detail subbands in horizontal, vertical, and diagonal directions. The low-frequency subband is used to convey high-level semantic information, while the high-frequency subband is used to preserve the edge and texture details of small target faults. In the bottom-up enhancement path, the low-frequency subband of high-level features and the high-frequency subband of shallow features are fused across scales. The fused feature map is then reconstructed using inverse wavelet transform to obtain a multi-scale fused feature map. This design, through the multi-resolution analysis characteristics of wavelet transform, fundamentally solves the problem of small target detail loss caused by conventional convolutional downsampling, differing from the simple weighted fusion of conventional BiFPN.

[0083] In some embodiments, the small target detection enhancement head incorporates a lightweight, efficient subpixel convolutional super-resolution reconstruction module (ESPCN) and a feature refinement network (FRN) that are deeply integrated. Specifically, the shallow feature map output from the improved feature pyramid network is input into the ESPCN module. Subpixel convolution is used to achieve a 4x upsampling of the feature map, reconstructing a super-resolution feature map that fully preserves pixel-level details of minute faults. The super-resolution feature map is then input into the feature refinement network for recalibration and noise suppression. The ESPCN module contains only three 3×3 convolutional layers and one subpixel convolutional layer, with fewer than 500,000 parameters, thus not significantly increasing the model's computational load. This design targets ultra-minor faults with a pixel percentage of less than 0.1%, fundamentally improving the recognizability of small target features through super-resolution reconstruction, unlike conventional designs that simply add a high-resolution detection layer.

[0084] In some embodiments, the multi-task loss function is further fused with gradient equalization mechanism loss (GHM loss) and improved focus loss. The specific expression for the GHM loss is as follows: ;in, , For the first The gradient magnitude of each sample, For the gradient magnitude to fall within Number of samples in the neighborhood The total number of samples is denoted as GHM loss. GHM loss weights the loss of each sample by gradient density, automatically suppressing the gradient contribution of a large number of easily classified negative samples, while mitigating the interference of outlier and difficult samples on model training. It works synergistically with improved focus loss to perfectly adapt to the scenario of extremely imbalanced fault samples and mixed difficult and outlier samples in power distribution networks.

[0085] In some embodiments, the model training step introduces a self-supervised pre-training paradigm of Momentum Contrastive Learning (MoCo) during the transfer learning stage. Specifically, this involves: collecting unlabeled inspection images of 10kV distribution network lines, constructing an unlabeled sample library, and using the MoCo self-supervised learning framework to pre-train the YOLOv8 backbone network. Through comparative learning of positive and negative samples, the model learns the common visual features of distribution network lines, towers, and power equipment, obtaining self-supervised pre-training weights. These weights are then adaptively fine-tuned on a public power equipment dataset to obtain the final power equipment pre-training weights, which are used for subsequent three-stage progressive training. This design addresses the industry pain point of scarce labeled fault samples in distribution networks. Unlike conventional solutions that only use ImageNet for pre-training, this embodiment deeply integrates self-supervised contrastive learning with the pre-training of the distribution network fault detection model.

[0086] In some embodiments, the post-processing optimization step introduces evidence-based deep learning to calibrate the confidence level and assess the uncertainty of the fault detection results. Specifically, an evidence layer is added to the output of the detection head of the improved YOLOv8 model. This layer converts the model's category prediction output into evidence parameters distributed by a Dirichlet distribution. The uncertainty score of the prediction result is calculated using these evidence parameters. When the confidence level of the fault detection result is near a baseline threshold and the uncertainty score is below 0.2, it is considered a reliable detection result and retained. When the uncertainty score is above 0.5, regardless of the confidence level, it is considered an unreliable result and discarded. This design quantifies the uncertainty of the model's predictions through evidence theory, statistically reducing the false detection rate in complex contexts, unlike conventional schemes that only adjust the confidence threshold.

[0087] In some embodiments, the data augmentation process additionally introduces a synthesis augmentation strategy specific to distribution network faults. Specifically, based on prior knowledge of distribution network line faults, a fault target mask library is constructed, containing binary masks and corresponding texture features of various fault targets. For normal 10kV distribution network inspection images, the fault target masks and textures are synthesized to the corresponding positions of normal lines and insulators using a Poisson fusion algorithm to generate synthesized fault samples. During the synthesis process, the brightness, contrast, and shadow of the fault target are adaptively adjusted according to the lighting and background environment of the target location to ensure the authenticity of the synthesized samples. This strategy can expand the number of positive fault samples by more than two times, solving the problem of scarce positive fault samples in the distribution network from the root of the data. Unlike conventional general data augmentation schemes, this approach is specifically designed for distribution network scenarios.

[0088] In some embodiments, in the improved feature pyramid network, the two-dimensional discrete wavelet transform uses the db4 wavelet basis as the wavelet mother function, and the number of decomposition layers is set to 1. The db4 wavelet basis has compact support and orthogonality, which can accurately capture the edge abrupt change features of fault targets such as insulator cracks and conductor strand breaks. The 1-layer decomposition can complete the high and low frequency sub-band decomposition of the feature map without losing the fault spatial location information, avoiding the loss of small target feature details caused by multi-layer decomposition.

[0089] In some embodiments, in the multi-scale attention fusion module, each 7×7 convolution kernel of the dynamic serpentine convolution corresponds to 9 adaptively adjustable sampling points. The offset of the sampling points is generated by a lightweight offset prediction convolutional layer. The kernel size of the offset prediction convolutional layer is 3×3, and the number of output channels is 18, which correspond to the x-axis and y-axis offset coordinates of the 9 sampling points, respectively. During training, the sampling point offset is synchronously learned and updated with the network parameters, so that the sampling points of the convolution kernel can be adaptively distributed along the slender contour of the conductor and insulator string, thereby enhancing the ability to extract fault features distributed along the line direction.

[0090] In some embodiments, during the transfer learning phase of model training, in the self-supervised pre-training process of Momentum Contrastive Learning (MoCo), the queue length is set to 65536, the momentum coefficient is 0.999, the batch size is 32, and the pre-training iteration rounds are 200. The queue length is adapted to the sample size of unlabeled inspection images of 10kV distribution network, which can store enough negative samples to ensure the feature discrimination of contrastive learning. The momentum coefficient can ensure the smoothness of feature queue updates and avoid the decline in pre-training effect caused by drastic fluctuations in feature distribution.

[0091] In some embodiments, the specific calculation method for the Dirichlet distribution evidence parameters and uncertainty scores in the evidence deep learning stage of the post-processing optimization phase is as follows: First, for the multi-classification scenario of 10 types of 10kV distribution network line faults, the category prediction logic value output by the model detection head is... The ReLU activation function is used to convert the logistic values ​​into nonnegative evidence. , where i=1,2,...,10 corresponds to 10 types of faults; Secondly, the concentration parameters of the Dirichlet distribution are calculated based on evidence. Total concentration parameter ; Finally, the uncertainty score of the prediction results is calculated. The uncertainty score U ranges from (0,1). A higher value indicates that the model is more uncertain about the prediction result, while a lower value indicates that the prediction result is more reliable.

Claims

1. A YOLO-based 10kV distribution network line fault type identification method, characterized in that, The application relates to a 10kV power distribution network line fault recognition method. The application comprises the following steps: Collecting 10kV power distribution network line inspection images, constructing a 10kV power distribution network line fault image dataset, the fault image dataset containing inspection images labeled with fault types, performing data enhancement processing on the inspection images in the fault image dataset to obtain an enhanced training dataset; Constructing an improved YOLOv8 model, the improved YOLOv8 model comprising a backbone network, a neck network and a detection head connected in sequence; embedding a multi-scale attention fusion module in the backbone network, setting an improved feature pyramid network in the neck network and additionally arranging a small target detection enhancement head in the detection head; Constructing a multi-task loss function suitable for 10kV power distribution network line fault recognition, the multi-task loss function containing a classification loss, a positioning loss, a target confidence loss and an improved focal loss; Training the improved YOLOv8 model based on the multi-task loss function by using the enhanced training dataset to obtain a trained 10kV power distribution network line fault recognition model; Obtaining 10kV power distribution network line inspection images to be detected, inputting the inspection images to be detected into the trained 10kV power distribution network line fault recognition model for inference to obtain initial fault detection results; 2. The YOLO-based 10kV distribution network line fault type identification method according to claim 1, characterized in that, Performing post-processing optimization on the initial fault detection results to obtain final 10kV power distribution network line fault type and position recognition results.

3. The YOLO-based 10kV distribution network line fault type identification method according to claim 1, characterized in that, The data enhancement processing on the inspection images in the fault image dataset specifically comprises: sequentially performing at least one of four types of processing, i.e. geometric transformation, photometric transformation, weather simulation and noise injection, on the inspection images, and the four types of processing are randomly triggered with a preset probability; wherein the geometric transformation comprises random rotation and random perspective transformation, the photometric transformation comprises brightness adjustment and color dithering, the weather simulation comprises rain and fog weather generation, and the noise injection comprises Gaussian noise addition and salt and pepper noise addition. The processing flow of the multi-scale attention fusion module is that: receiving feature maps input by the backbone network, processing the feature maps in parallel through a plurality of convolution branches with different hole rates to obtain a plurality of branch feature maps with different receptive fields; 4. The YOLO-based 10kV distribution network line fault type identification method according to claim 1 or 3, characterized in that, Fusion processing is performed on the plurality of branch feature maps to obtain a fusion feature map; the fusion feature map is sequentially subjected to channel attention weighting processing and spatial attention weighting processing to obtain an enhanced feature map, and the enhanced feature map is input into the improved feature pyramid network. The processing flow of the improved feature pyramid network is that: receiving the enhanced feature map output by the multi-scale attention fusion module, transmitting semantic information of high-level feature maps to shallow feature maps through a bottom-up enhancement path; performing weighted bidirectional cross-scale fusion processing on feature maps at different levels to obtain cross-scale fusion feature maps; performing pixel-level alignment and semantic re-labeling processing on the cross-scale fusion feature maps to obtain final multi-scale fusion feature maps, and inputting the multi-scale fusion feature maps into the detection head.

5. The YOLO-based 10kV distribution network line fault type identification method according to claim 1, characterized in that, The small target detection enhancement head is a high-resolution detection layer with a resolution of 160x160 pixels, and the processing flow of the small target detection enhancement head is: receiving a shallow high-resolution feature map output by the improved feature pyramid network, performing pixel-by-pixel re-calibration and noise suppression processing on the shallow high-resolution feature map through a feature refinement network to obtain a small target feature map after refinement; an expanded convolution is used to expand the receptive field of the small target feature map, and context feature information around the target is fused to obtain a final small target detection feature, and an initial detection result of a small target fault is output based on the small target detection feature.

6. The YOLO-based 10kV distribution network line fault type identification method according to claim 1, characterized in that, The multi-task loss function further includes a shape consistency constraint loss and a feature similarity regularization term; the improved focal loss is used to reduce the weight of easily classified negative samples, so that the model training focuses on difficult-to-classify fault positive samples; the shape consistency constraint loss is used to apply regularization constraints on the width-height ratio of the predicted bounding box and the real labeled box; and the feature similarity regularization term is used to constrain the intra-class distance of samples of the same fault type in the feature space.

7. The YOLO-based 10kV distribution network line fault type identification method according to claim 1, characterized in that, The improved YOLOv8 model is trained by adopting a three-stage progressive training strategy, including: in the first stage, all parameters of the backbone network of the improved YOLOv8 model are frozen, and only the parameters of the detection head are trained; in the second stage, the deep parameters of the backbone network are unfrozen, and the unfrozen backbone network parameters and the detection head parameters are jointly fine-tuned; and in the third stage, all network parameters of the improved YOLOv8 model are unfrozen, and the cosine annealing learning rate scheduling strategy is adopted to globally fine-tune all network parameters until the model converges.

8. The YOLO-based 10kV distribution network line fault type identification method according to claim 7, characterized in that, In the three-stage progressive training strategy, the pre-training weight is loaded before model training, and the pre-training weight is obtained by: first, pre-training the YOLOv8 base model on a general vision dataset, and then performing domain adaptation pre-training on the pre-trained model on a power equipment public dataset to obtain power equipment pre-training weights. During the training process, an online difficult sample mining mechanism is introduced, and in each training iteration, the loss values of all anchor boxes are calculated, a preset proportion of anchor boxes with high loss values are selected as difficult samples, and the network parameters are updated through the loss of the difficult samples.

9. The YOLO-based 10kV distribution network line fault type identification method according to claim 1, characterized in that, The initial fault detection result is post-processed and optimized, specifically including: performing non-maximum suppression improvement processing on the initial fault detection result based on the prior knowledge of the 10kV distribution network line fault, and dynamically adjusting the intersection-over-union threshold for different fault types; for a video sequence form of the to-be-detected inspection image, performing spatio-temporal continuity constraint processing on the initial fault detection results of adjacent frames to eliminate false alarm results of isolated frames; and according to the environmental characteristics of the to-be-detected inspection image, adaptively adjusting the confidence threshold of fault detection to obtain the final fault type and position recognition result.

10. The YOLO-based 10kV distribution network line fault type identification method according to claim 1, characterized in that, The trained 10kV distribution network line fault recognition model is quantized and compressed and deployed in an edge computing unit. The edge computing unit accesses the real-time video stream of the 10kV distribution network line inspection by a fixed camera or drone via the RTSP protocol, decodes the inspection image to be detected, performs fault identification processing frame by frame, and outputs an alarm result containing fault location, fault type, and confidence information when a fault is detected.