A power distribution line detection method based on deep learning
By using deep learning-based methods and combining images acquired by drones with data augmentation and synthesis techniques, EfficientDet and Transformer models are constructed, solving the problems of low efficiency and limited accuracy in traditional power distribution line detection, and achieving efficient and accurate real-time fault detection.
Patent Information
- Application Number
- CN202411682873.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2044-11-22
AI Technical Summary
Traditional power distribution line detection methods are inefficient, have limited accuracy, are difficult to monitor in real time, and are sensitive to changes in complex environments.
We employ a deep learning-based approach, utilizing drones to collect images and combining data augmentation and synthesis techniques to expand the dataset. We apply self-supervised learning and EfficientDet and Transformer models to optimize the model structure, perform real-time fault detection, and reduce computational and storage requirements through model pruning and quantization techniques.
It significantly improves the efficiency and accuracy of power distribution line testing, enabling it to cope with diverse environmental changes and achieve efficient deployment and operation in low-resource environments.
Smart Images

Figure CN119625570B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of power distribution line detection, and particularly relates to a power distribution line detection method based on deep learning. BACKGROUND
[0002] In modern power systems, the stable operation of power distribution lines is crucial for maintaining the reliability of power supply. However, due to natural disasters, human damage, and equipment aging, power distribution lines are prone to failure. This not only threatens the continuity of power supply, but also may cause serious economic losses and safety hazards. Therefore, fast and accurate detection of power distribution line faults has become an important challenge faced by the power industry.
[0003] Traditional power distribution line detection methods mainly rely on manual inspection and regular maintenance, which has many shortcomings, such as low detection efficiency, limited accuracy, and difficulty in realizing real-time monitoring. In recent years, with the development of unmanned aerial vehicle technology and image processing technology, image-based power distribution line detection methods have gradually attracted attention. However, traditional image processing methods are sensitive to environmental changes and are difficult to meet the detection needs in complex scenarios. SUMMARY
[0004] To solve the above problems, the purpose of the present application is to provide a power distribution line detection method based on deep learning, which can greatly improve the detection efficiency and accuracy, and can effectively cope with diversified environmental changes and equipment limitations.
[0005] To achieve the above purpose, the present application adopts the following technical solutions:
[0006] A power distribution line detection method based on deep learning, comprising the following steps:
[0007] S1: Collect normal and fault images of power distribution lines, use unmanned aerial vehicle equipment to collect images under different viewing angles and different lighting conditions, and use data augmentation and synthesis technology to expand the data set;
[0008] S2: Apply self-supervised learning method to the expanded data set for preliminary feature learning;
[0009] S3: Construct a power distribution line detection model based on EfficientDet and Transformer, specifically as follows:
[0010] Use EfficientNet as the feature extraction backbone network, use the efficient feature pyramid network BiFPN of EfficientDet to process multi-scale features, and enhance the small target detection capability; BiFPN effectively fuses features of different scales through self-defined weighting and fusion technology, and gives the input feature map {P1, P2,..., P i′ ,...,Pn},BiFPN updated feature map is:
[0011]
[0012] wherein Conv represents a convolution operation; w i′ is the weight corresponding to the i'th input feature map;
[0013] EfficientDet uses three compound coefficients φ to automatically balance the network depth, width and input resolution:
[0014] r=r0·2 φ / 3 ;
[0015] d=d0·2 φ / 3 ;
[0016] e=e0+φ / / 3;
[0017] wherein r is the input resolution of the network, r0 is the input resolution of the base network; d is the width of the network, d0 is the width of the base network; e is the network depth, e0 is the base depth; / / represents integer division;
[0018] By adjusting the compound coefficient in EfficientDet, the balance between accuracy and speed of the model is optimized; and a Transformer module is added after the EfficientDet model to capture complex spatial features and temporal information in the image; the global consistency of detection and classification results is improved using the Transformer;
[0019] S4: Train the power distribution line detection model based on the training data set, adjust the learning rate using One-Cycle Policy to quickly enter the best learning stage and prevent overfitting, and use the Warmup strategy to optimize the learning process in the initial stage;
[0020] S5: Adopt model pruning and quantization technology to reduce model overhead and obtain the final power distribution line detection model;
[0021] S6: Deploy the final power distribution line detection model on the unmanned aerial vehicle device to realize real-time fault detection and feedback on site.
[0022] Further, S1 is specifically:
[0023] Data collection is performed using an unmanned aerial vehicle device. The unmanned aerial vehicle can flexibly change the shooting angle to obtain images from different perspectives, including images of power distribution lines in normal operation state and images containing various fault forms;
[0024] Data augmentation techniques are used to enhance the dataset. At each augmentation, the parameters of geometric transformation (θ, α, tx, ty) and the parameters of color transformation and noise addition are randomly selected;
[0025] The selected parameters are used to perform geometric transformation, color transformation, and noise addition operations on the image;
[0026] The geometric transformation includes:
[0027] Rotation: Randomly select the rotation angle θ, the formula is:
[0028] RotatedImage = [cos(θ) sin(θ) - sin(θ) cos(θ)] x OriginalImage;
[0029] Scaling: Scale the image at different scales α:
[0030] ScaledImage = α x OriginalImage;
[0031] Translation: Randomly translate in the x and y axis directions;
[0032] Color transformation includes brightness adjustment and color jitter, where brightness adjustment is achieved by increasing or decreasing the intensity value of each pixel; color jitter is achieved by randomly changing the hue, saturation, and contrast of the image;
[0033] Noise addition is achieved by adding salt and pepper noise to the image to simulate various interference conditions;
[0034] Based on the data synthesis technique, more simulated samples are generated using existing data to expand the dataset.
[0035] Further, the data synthesis technique generates more simulated samples based on existing data, as follows: WGAN-GP is used to generate new power distribution line scenes:
[0036] WGAN-GP consists of a generator G and a discriminator D, which are trained through an adversarial process;
[0037] Generator G: receives random noise vector z as input, consists of several deconvolution layers, batch normalization layers, and activation functions, and generates power distribution line scenes through learning;
[0038] Discriminator D: distinguishes between generated images and real images; inputs real or generated images, consists of convolution layers, batch normalization, uses activation functions, and outputs a score for the input image.
[0039] Adversarial loss is used to optimize the generator and discriminator:
[0040] Discriminator loss LD :
[0041]
[0042] Generator loss L G :
[0043]
[0044] where x is an image sampled from the real data distribution p data ; z is a random noise vector input to the generator; p z is the distribution of the random noise vector; G(z) is an image generated by the generator based on the input noise vector z; G(x) is an image generated by the generator based on the input x; D(x) and D(G(x)) are scores output by the discriminator based on x and G(x) respectively;
[0045] To improve the training stability of WGAN, a gradient penalty is introduced:
[0046]
[0047] where is a sample obtained from the linear interpolation of real data x and generated data G(z), and λ is the gradient penalty coefficient; L GP is the gradient penalty term; ||·||2 is the L2 norm; ∈ is a random weight for
[0048] For each round of training, a batch of real samples is sampled from the real data distribution, and a batch of fake samples is generated;
[0049] The loss L D of the discriminator is calculated, the gradient penalty L GP is calculated and added to the loss, and the discriminator parameters are updated;
[0050] A new batch of fake samples is generated, the loss L G of the generator is calculated, and the generator parameters are updated;
[0051] The training loop is repeated until the desired optimization effect is achieved.
[0052] Further, the quality of the generated images is checked regularly, and the FID quantitative index is used to evaluate the quality and stability of the generated images, as follows:
[0053] A set of representative images is selected from the real data set, and a set of images is sampled from the generated model;
[0054] The above image is input into a pre-trained Inception v3 model, and the pool layer of the pre-trained Inception v3 model is used to extract features from the real and generated images to obtain a feature vector set {f r} from the real image and {f g} from the generated image; and the feature vector set is used to calculate the feature mean and covariance matrix:
[0055]
[0056] Where μ r is the feature distribution mean of the real image; μ g is the feature distribution mean of the generated image; Σ r is the covariance matrix of the feature distribution of the real image; Σ g is the covariance matrix of the feature distribution of the generated image; N is the number of samples participating in the calculation of the real features; M is the number of samples participating in the calculation of the generated features; f r,i represents the feature vector of the i-th real image after processing in the pool layer of the Inception network; f g,i represents the feature vector of the i-th generated image after processing in the pool layer of the Inception network.
[0057] The FID score is calculated according to the following formula:
[0058] FID(r, g) = || μ r - μ g || 2 + Tr(∑ r + ∑ g -2(∑ r ∑ g ) 1 / 2 );
[0059] Where Tr represents the trace of the matrix, i.e. the sum of the diagonal elements of the matrix.
[0060] The FID is calculated regularly at multiple stages of model training to monitor changes in generated image quality and model convergence.
[0061] Further, the power distribution line detection model combines the comprehensive loss of EfficientDet and the Transformer module, and the goal is to minimize the position regression loss and class classification loss of the detection frame at the same time, as follows:
[0062] The classification loss used in EfficientDet is Focal Loss:
[0063] L cls (p t )=-αt (1-p t ) γ log(p t );
[0064] where p t is the probability of the model predicting the true label at time t; a t is the class balance parameter, and g is the adjustment factor;
[0065] For the regression loss, EfficientDet uses GIoU Loss:
[0066] L GIoU (B p ,B g )=1-GIoU(B p ,B g );
[0067] where B p and B g are the predicted and true boxes, respectively; GIoU measures the overlap and relative position of two boxes;
[0068] When the Transformer module is used for target detection, in order to ensure the accuracy and consistency of the feature mapping, the distribution difference between two feature maps is quantified by KL divergence to enhance the consistency of the Transformer output. The KL divergence loss is:
[0069]
[0070] where p(i″) is the reference distribution of pixel point i″; Q(i″) is the distribution of pixel point i″ after Transformer processing;
[0071] The KL divergence loss is combined with the classification loss and the regression loss to form a comprehensive loss L:
[0072] L=l cls ·L cls +l GIoU ·L GIoU +l KL ·L KL ;
[0073] where l cls , l GIoU and l KL are the weight parameters corresponding to the classification loss, the regression loss and the KL divergence loss, respectively.
[0074] Further, based on the training data set, the power distribution line detection model is trained, the learning rate is adjusted using One-Cycle Policy to quickly enter the best learning stage and prevent overfitting, and the Warmup strategy is used to optimize the learning process in the initial stage, as follows:
[0075] Set the initial learning rate η star , the minimum learning rate η min , the maximum learning rate η max , and the final learning rate η final ; Configure the Warmup step t warmup ; Configure the One-Cycle Policy cycle, including increasing the step t up and decreasing the step t down ;
[0076] When starting training, at time 0≤t≤t warnup , the learning rate is gradually increased using the Warmup strategy:
[0077]
[0078] After that, switch to One-Cycle Policy to dynamically adjust the learning rate, including the rising phase and the falling phase. The rising phase is from the end of the Warmup strategy to the peak:
[0079]
[0080] The falling phase is from the peak to the end of the cycle
[0081]
[0082] Further, model pruning and quantization techniques are used to reduce model overhead to obtain the final power distribution line detection model, as follows:
[0083] Calculate the L1 norm of each layer weight of the power distribution line detection model, sort the weights, and find the weights less than the threshold for pruning;
[0084] After pruning, the model is fine-tuned using a pre-set learning rate to restore the original performance loss. During fine-tuning, the training data set is used and the model performance on the validation set is monitored;
[0085] Extract a pre-set amount of data set from the training data to run the model, obtain the dynamic range of the activation function and weight, collect the maximum and minimum values of the activation value of each layer; for each neural network parameter, calculate the scaling factor and zero point;
[0086] Based on the scaling factor and zero point, the floating point number is converted into an 8-bit integer, and in the inference stage, the integer is restored to a floating point number for calculation; based on the accuracy, recall rate, F1 score of the model, the performance of the quantized model is verified.
[0087] A power distribution line detection system based on deep learning comprises a processor, a memory and a computer program stored on the memory, and when the processor executes the computer program, the steps of the power distribution line detection method based on deep learning are specifically executed.
[0088] The present application has the following beneficial effects:
[0089] 1、The present application can greatly improve the detection efficiency and accuracy of the power distribution line, and can effectively cope with diversified environmental changes and equipment limitations;
[0090] 2、The present application combines EfficientDet and Transformer modules to build a model that uses multi-scale features and complex semantic information to more effectively detect power distribution lines, maintaining a good balance between precision and speed; and the model is pruned and quantized, greatly reducing its calculation and storage requirements, thereby meeting the efficient deployment and operation requirements in low-resource environments
[0091] 3、The present application uses One-Cycle Policy combined with warm start strategy, which can quickly reach the ideal state of effective training, prevent the shock in the early stage of training and the overfitting problem in the later stage, and effectively enhance the performance of the model in the power distribution line detection task. BRIEF DESCRIPTION OF DRAWINGS
[0092] Figure 1 The present application is a method flowchart. DETAILED DESCRIPTION
[0093] The present application will be further described in detail below in combination with the drawings and specific embodiments:
[0094] A power distribution line detection method based on deep learning comprises the following steps:
[0095] S1: Collect normal and fault images of power distribution lines, use unmanned aerial vehicle equipment to collect images under different angles and different lighting conditions, and use data augmentation and synthesis technology to expand the data set;
[0096] S2: Apply a self-supervised learning method to the expanded data set for preliminary feature learning;
[0097] S3: Build a power distribution line detection model based on EfficientDet and Transformer, specifically as follows:
[0098] EfficientNet is used as the feature extraction backbone network, and the efficient feature pyramid network BiFPN of EfficientDet is used to process multi-scale features and enhance the detection ability of small targets. BiFPN effectively fuses features of different scales through self-defined weighting and fusion technology. Given the input feature map {P1, P2,..., P i′ ,...,P n}, the updated feature map of BiFPN is:
[0099]
[0100] where Conv represents the convolution operation; w i′ is the weight corresponding to the i'th input feature map;
[0101] EfficientDet uses three compound coefficients φ to automatically balance the network depth, width and input resolution:
[0102] r=r0·2 φ / 3 ;
[0103] d=d0·2 φ / 3 ;
[0104] e=e0+φ / / 3;
[0105] where r is the input resolution of the network, r0 is the input resolution of the base network; d is the width of the network, d0 is the width of the base network; e is the network depth, e0 is the base depth; / / represents integer division;
[0106] By adjusting the compound coefficient in EfficientDet, the balance between precision and speed of the model is optimized. A Transformer module is added to the EfficientDet model to capture complex spatial features and temporal information in the image. The use of Transformer improves the global consistency of detection and classification results.
[0107] S4: Train the power distribution line detection model based on the training data set. Use One-Cycle Policy to adjust the learning rate, quickly enter the best learning stage and prevent overfitting, and use Warmup strategy to optimize the learning process in the initial stage.
[0108] S5: Use model pruning and quantization technology to reduce model overhead and obtain the final power distribution line detection model.
[0109] S6: Deploy the final power distribution line detection model on the unmanned aerial vehicle device to realize real-time fault detection and feedback on site.
[0110] In this embodiment, S1 is specifically:
[0111] Data collection is performed using unmanned aerial vehicle equipment. The unmanned aerial vehicle can flexibly change the shooting angle to obtain images from different perspectives, including images of power distribution lines in normal operation and images containing various fault forms (such as broken lines, grounding, tower tilting, etc.);
[0112] Data augmentation techniques are used to enhance the data set. At each augmentation, the parameters (θ, α, tx, ty) of geometric transformation and the parameters of color transformation and noise addition are randomly selected;
[0113] The selected parameters are used to perform geometric transformation, color transformation, and noise addition operations on the image;
[0114] Geometric transformation includes:
[0115] Rotation: Randomly select a rotation angle θ, the formula is:
[0116] RotatedImage = [cos(θ) sin(θ) - sin(θ) cos(θ)] x OriginalImage;
[0117] Scaling: Scale the image at different scales α:
[0118] ScaledImage = α x OriginalImage;
[0119] Translation: Randomly translate in the x and y axis directions;
[0120] Color transformation includes brightness adjustment and color jitter, where brightness adjustment is achieved by increasing or decreasing the intensity value of each pixel; color jitter is achieved by randomly changing the hue, saturation, and contrast of the image;
[0121] Noise addition is achieved by adding salt and pepper noise to the image to simulate various interference conditions;
[0122] Based on the data synthesis technique, more simulated samples are generated using existing data to expand the data set.
[0123] In this embodiment, based on the data synthesis technique, more simulated samples are generated using existing data, as follows: WGAN-GP is used to generate new power distribution line scenes:
[0124] WGAN-GP is trained through an adversarial process using a generator G and a discriminator D;
[0125] Generator G: receives a random noise vector z as input, is composed of several deconvolution layers (transpose convolution), batch normalization layers, and activation functions (such as ReLU), and generates realistic power distribution line scenes through learning;
[0126] Discriminator D: distinguish generated images and real images; input real or generated images, do not use convolutional layers, batch normalization, use activation functions, and output the true score of the input image.
[0127] Optimize the generator and discriminator using adversarial loss:
[0128] Discriminator loss L D :
[0129]
[0130] Generator loss L G :
[0131]
[0132] where x is an image sampled from the real data distribution p data ; z is a random noise vector input to the generator; p z is the distribution of the random noise vector; G(z) is the image generated by the generator based on the input noise vector z; G(x) is the image generated by the generator based on the input x; D(x) and D(G(x)) are the scores output by the discriminator based on x and G(x), respectively;
[0133] Improve the training stability of WGAN by introducing gradient penalty:
[0134]
[0135] where is a sample obtained from the linear interpolation of real data x and generated data G(z), λ is the gradient penalty coefficient; L GP is the gradient penalty term; ||·||2 is the L2 norm; ∈ is a random weight for
[0136] For each round of training, sample a batch of real samples from the real data distribution, and generate a batch of pseudo samples;
[0137] Calculate the loss L D of the discriminator; perform gradient penalty, calculate L GP and add it to the loss; update the discriminator parameters;
[0138] Generate a new batch of pseudo samples, calculate the loss L G of the generator, and update the generator parameters;
[0139] Repeat the training loop until the desired optimization effect is achieved.
[0140] In this embodiment, the generated images are periodically quality checked, using a quantitative indicator such as FID (Frechet Inception Distance) to evaluate the quality and stability of the generated images, as follows:
[0141] A set of representative images is selected from the real dataset, and a set of images is sampled from the generative model;
[0142] The above images are input into a pre-trained Inception v3 model, and the pool layer of the pre-trained Inception v3 model is used to extract features from the real and generated images, obtaining a set of feature vectors {f r} from real images and {f g} from generated images; and the feature vector set is used to calculate the feature mean and covariance matrix:
[0143]
[0144] wherein μ r is the feature distribution mean of the real images; μ g is the feature distribution mean of the generated images; Σ r is the covariance matrix of the feature distribution of the real images; Σ g is the covariance matrix of the feature distribution of the generated images; N is the number of samples participating in the calculation of the real features; M is the number of samples participating in the calculation of the generated features; f r,i represents the feature vector of the i-th real image after processing by the pool layer of the Inception network; and f g,i represents the feature vector of the i-th generated image after processing by the pool layer of the Inception network.
[0145] The FID score is calculated according to the following formula:
[0146] FID(r, g) = || μ r - μ g || 2 + Tr(∑ r + ∑ g - 2(∑ r ∑ g ) 1 / 2 );
[0147] wherein Tr represents the trace of the matrix, i.e. the sum of the diagonal elements of the matrix;
[0148] The FID is calculated periodically at multiple stages of model training to monitor changes in the quality of the generated images and the convergence of the model.
[0149] In this embodiment, the power distribution line detection model combines the comprehensive loss of EfficientDet and the Transformer module, and the goal is to minimize the position regression loss and the class classification loss of the detection frame at the same time, as follows:
[0150] The classification loss used in EfficientDet is Focal Loss:
[0151] L cls (p t ) t (1-p t ) γ log(p t );
[0152] where p t is the probability that the model at time t predicts consistent with the true label; α t is the class balance parameter, and γ is the adjustment factor;
[0153] For the regression loss, EfficientDet uses GIoU Loss:
[0154] L GIoU (B p ,B g )=1-GIoU(B p ,B g );
[0155] where B p , B g are the predicted and true boxes, respectively; GIoU measures the overlap and relative position of the two boxes;
[0156] When the Transformer module performs target detection, in order to ensure the accuracy and consistency of feature mapping, the KL divergence is used to quantify the distribution difference between two feature maps to enhance the consistency of the Transformer output, and the KL divergence loss is:
[0157]
[0158] where p(i″) is the reference distribution of pixel point i″; Q(i″) is the distribution of pixel point i″ after Transformer processing;
[0159] The KL divergence loss is combined with the classification loss and the regression loss to form the comprehensive loss L:
[0160] L=λ cls ·L cls +λ GIoU ·L GIoU +λ KL ·LKL ;
[0161] wherein, λ cls , λ GIoU and λ KL are the weight parameters corresponding to the classification loss, the regression loss and the KL divergence loss respectively.
[0162] In the embodiment, the power distribution line detection model is trained based on the training data set, the learning rate is adjusted using One-Cycle Policy to quickly enter the optimal learning stage and prevent overfitting, and the Warmup strategy is used to optimize the learning process in the initial stage, as follows:
[0163] The initial learning rate η star , the minimum learning rate η min , the maximum learning rate η max , and the final learning rate η final are set; the Warmup step t warmup is configured; the One-Cycle Policy cycle is configured, including the increase step t up and the decrease step t down .
[0164] When starting training, at time 0≤t≤t warnup , the learning rate is gradually increased using the Warmup strategy:
[0165]
[0166] Then switch to One-Cycle Policy to dynamically adjust the learning rate, including the rising phase and the falling phase, the rising phase is from the end of the Warmup strategy to the peak:
[0167]
[0168] The falling phase is from the peak to the end of the cycle
[0169]
[0170] In the embodiment, model pruning and quantization techniques are used to reduce model overhead to obtain the final power distribution line detection model, as follows:
[0171] The L1 norm of each layer weight of the power distribution line detection model is calculated, the weights are sorted, and the weights less than the threshold are pruned;
[0172] After pruning, the model is fine-tuned using a preset learning rate to restore the original performance loss. During the fine-tuning process, the training data set is used and the performance of the model on the validation set is monitored;
[0173] The model is run on a preset amount of data set extracted from the training data to obtain the dynamic range of the activation function and the weight, and the maximum and minimum values of the activation value of each layer are collected; for each neural network parameter, the scaling factor and the zero point are calculated;
[0174] Based on the scaling factor and the zero point, the floating point number is converted into an 8-bit integer, and in the inference stage, the integer is restored to a floating point number for calculation; based on the accuracy, recall rate and F1 score of the model, the performance of the quantized model is verified.
[0175] In the embodiment, a power distribution line detection system based on deep learning is also provided, which comprises a processor, a memory and a computer program stored in the memory, and the processor executes the computer program to specifically execute the steps in the deep learning-based power distribution line detection method.
[0176] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0177] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The means for performing the functions specified in one or more flows and / or blocks.
[0178] These computer program instructions can also be stored in a computer-readable storage medium that can guide the computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable storage medium produce a product including instruction means, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The means for performing the functions specified in one or more flows and / or blocks.
[0179] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 one or more flowcharts and / or blocks
[0180] The above descriptions are only the preferred embodiments of the present application, not intended to limit the present application to other forms described. Any person skilled in the art may make changes or modifications to the above-described technical contents as equivalent embodiments without departing from the technical solutions of the present application. However, any simple modification, equivalent change and modification of the above embodiments according to the technical essence of the present application without departing from the technical solutions of the present application still belongs to the protection scope of the technical solutions of the present application.
Claims
1. A deep learning-based method for detecting power distribution lines, characterized in that, Includes the following steps: S1: Collect normal and fault images of power distribution lines, use drone equipment to collect images from different perspectives and under different lighting conditions, and expand the dataset using data augmentation and synthesis techniques; S2: Apply self-supervised learning methods to perform preliminary feature learning on the expanded dataset; S3: A power distribution line detection model is constructed based on EfficientDet and Transformer, as detailed below: EfficientNet is used as the backbone network for feature extraction, and the efficient feature pyramid network BiFPN of EfficientDet is utilized to process multi-scale features, enhancing the small object detection capability. BiFPN effectively fuses features of different scales through custom weighting and fusion techniques, given an input feature map {P1, P2, ..., P...}. i′ ,...,P n The updated feature map after BiFPN is as follows: Where Conv represents the convolution operation; w i′ The weights corresponding to the i′-th input feature map; EfficientDet uses three composite coefficients φ to automatically balance network depth, width, and input resolution: r=r0·2 φ / 3 ; d=d0·2 φ / 3 ; e = e0 + φ / / 3; Where r is the input resolution of the network, r0 is the input resolution of the reference network; d is the width of the network, d0 is the width of the reference network; e is the network depth, e0 is the reference depth; / / indicates integer division; By adjusting the composite coefficients in EfficientDet, the model's balance between accuracy and speed is optimized; and a Transformer module is added after the EfficientDet model to capture complex spatial features and temporal information in the image; the Transformer is used to improve the global consistency of detection and classification results. S4: Train the power distribution line detection model based on the training dataset, use One-Cycle Policy to adjust the learning rate, quickly enter the optimal learning stage and prevent overfitting, and use Warmup strategy to optimize the learning process in the initial stage. S5: Model pruning and quantization techniques are used to reduce model overhead and obtain the final power distribution line detection model; The S6 deploys the final power distribution line detection model on drone equipment to achieve real-time fault detection and feedback on-site.
2. The deep learning-based power distribution line detection method according to claim 1, characterized in that, Specifically, S1 is: By using drones for data collection, drones can flexibly change shooting angles to acquire images from different perspectives, including images of power distribution lines in normal operation, as well as images containing various types of faults. The dataset is augmented using data augmentation techniques. During each augmentation, the parameters of the geometric transformation (θ, α, tx, ty) and the parameters of color transformation and noise addition are randomly selected. Perform geometric transformations, color transformations, and noise additions on the image using the selected parameters; Geometric transformations include: Rotation: Randomly select a rotation angle θ, the formula is: RotatedImage=[cos(θ)sin(θ)-sin(θ)cos(θ)]×OriginalImage; Scaling: Scaling images at different ratios α: ScaledImage=α×OriginalImage; Translation: Perform random translations along the x and y axes; Color transformation includes brightness adjustment and color dithering. Brightness adjustment is achieved by increasing or decreasing the intensity value of each pixel; color dithering is achieved by randomly changing the hue, saturation, and contrast of the image. Noise addition: Salt and pepper noise is added to the image to simulate various interference scenarios; Furthermore, based on data synthesis technology, more simulated samples are generated using existing data to expand the dataset.
3. The deep learning-based power distribution line detection method according to claim 2, characterized in that, The data synthesis technology utilizes existing data to generate more simulation samples, specifically as follows: New power distribution line scenarios are generated using WGAN-GP: WGAN-GP consists of a generator G and a discriminator D, trained through an adversarial process; Generator G: Receives a random noise vector z as input and consists of several deconvolutional layers, batch normalization layers, and activation functions. It learns to generate power distribution line scenarios. Discriminator D: Distinguishes between generated images and real images; The input is a real or generated image, processed by convolutional layers (without batch normalization), using an activation function, and the output is a score indicating whether the input image is real. Use adversarial loss to optimize the generator and discriminator: Discriminator loss L D : Generator loss L G : Where x is from the real data distribution p data The image sampled in the middle; z is the random noise vector input to the generator; p z G(z) is the distribution of the random noise vector; G(z) is the image generated by the generator based on the input noise vector z; G(x) is the image generated by the generator based on the input x; D(x) and D(G(x)) are the scores output by the discriminator based on x and G(x), respectively. Improve the training stability of WGAN by introducing gradient penalty: in, It is a sample obtained from the linear interpolation of real data x and generated data G(z), where λ is the gradient penalty coefficient; L GP This is the gradient penalty term; ||.||2 is the L2 norm; ∈ is the random weight of ; For each round of training, a batch of real samples is sampled from the real data distribution, and a batch of pseudo samples is generated. Calculate the loss L of the discriminator D Apply gradient penalty and compute L GP Add it to the loss; update the discriminator parameters; Generate a new batch of pseudo-samples and calculate the generator's loss L. G Update generator parameters; Repeat the training cycle until the desired optimization effect is achieved.
4. The deep learning-based power distribution line detection method according to claim 3, characterized in that: The generated images are regularly subjected to quality checks, and the quality and stability of the generated images are evaluated using the quantization index FID, as follows: Select a representative set of images from the real dataset, and sample from the generative model to generate a set of images; The above images are input into a pre-trained Inception v3 model. The pooling layer of the pre-trained Inception v3 model is used to extract features from both the real and generated images, resulting in a feature vector set {f}. r From real images and {f g } Generate an image; and use the feature vector set to calculate the feature mean and covariance matrix: Where, μ r It is the mean of the feature distribution of the real image; μ g It is the mean of the feature distribution of the generated image; Σ r It is the covariance matrix of the feature distribution of the real image; Σ g is the covariance matrix of the feature distribution of the generated image; N is the number of samples used to calculate the true features; M is the number of samples used to calculate the generated features; f r,i f represents the feature vector of the i-th real image after processing in the pooling layer of the Inception network; g,i This represents the feature vector of the i-th generated image after processing in the pool layer of the Inception network; The FID score is calculated using the following formula: FID(r,g)=||μ r -m g || 2 +Tr(∑ r +∑ g –2(∑ r ∑ g ) 1 / / 2 ); Where Tr represents the trace of the matrix, which is the sum of the elements on the diagonal of the matrix; FID is calculated periodically at multiple stages of model training to monitor changes in generated image quality and model convergence.
5. The deep learning-based power distribution line detection method according to claim 4, characterized in that: The power distribution line detection model combines the combined loss of the EfficientDet and Transformer modules, aiming to simultaneously minimize the location regression loss and class classification loss of the detection boxes, as detailed below: The classification loss used in EfficientDet is Focal Loss: L cls (p t )=-a t (1-p t ) γ log(p t ); Where, p t α is the probability that the model prediction matches the true label at time t. t It is the class balance parameter, and γ is the adjustment factor; For regression loss, EfficientDet uses GIoU Loss: L GIoU (B p ,B g )=1-GIoU(B p ,B g ); Among them, B p B g These are the predicted and ground truth bounding boxes, respectively; GIoU measures the overlap and relative position of the two boxes. When performing object detection, the Transformer module uses KL divergence to quantify the distribution difference between two feature maps to ensure the accuracy and consistency of feature mapping, thereby enhancing the consistency of the Transformer output. The KL divergence loss is: Where p(i″) is the baseline distribution of pixel i″; Q(i″) is the distribution of pixel i″ after Transformer processing; The KL divergence loss is combined with the classification loss and regression loss to form a comprehensive loss L: L=λ cls ·L cls +λ GIoU ·L GIoU +λ KL ·L KL ; Where, λ cls , λ GIoU and λ KL These are the weight parameters corresponding to classification loss, regression loss, and KL divergence loss, respectively.
6. The deep learning-based power distribution line detection method according to claim 5, characterized in that: The power distribution line detection model is trained based on the training dataset. The learning rate is adjusted using a one-cycle policy to quickly enter the optimal learning stage and prevent overfitting. The Warmup strategy is used to optimize the learning process in the initial stage, as detailed below: Set the initial learning rate η star Minimum learning rate η min Maximum learning rate η max and the final learning rate η final Configure Warmup step count t warmup Configure the One-Cycle Policy, including increasing the number of steps t. up and reduce the number of steps t down ; At the start of training, in time 0≤t≤t warnup The learning rate is gradually increased using a warmup strategy: Then switch to a One-Cycle Policy to dynamically adjust the learning rate, including an ascending phase and a descending phase. The ascending phase is from the end of the Warmup policy to the peak value. The decline phase is from the peak to the end of the cycle.
7. The deep learning-based power distribution line detection method according to claim 1, characterized in that, The model pruning and quantization techniques are used to reduce model overhead, resulting in the final power distribution line detection model, as detailed below: Calculate the L1 norm of the weights in each layer of the power distribution line detection model, sort the weights, and prune the weights that are less than the threshold. After pruning, the model is fine-tuned using a preset learning rate to recover the original performance loss. During the fine-tuning process, the training dataset is used and the model's performance on the validation set is monitored. Run the model by extracting a preset amount of dataset from the training data, obtain the dynamic range of the activation function and weights, and collect the maximum and minimum values of the activation values of each layer; For each neural network parameter, calculate the scaling factor and zeros; Based on the scaling factor and zero point, the floating-point number is converted into an 8-bit integer. During the inference phase, the integer is restored to a floating-point number for computation. The performance of the quantized model is verified based on the model's accuracy, recall, and F1 score.
8. A power distribution line detection system based on deep learning, characterized in that, It includes a processor, a memory, and a computer program stored in the memory. When the processor executes the computer program, it specifically performs the steps in the deep learning-based power distribution line detection method as described in any one of claims 1-7.
Citation Information
Patent Citations
Distribution line nest fault identification method based on RVI-BNN
CN113903032A
Power transmission line intelligent inspection method based on image recognition and deep learning technology
CN118691795A