Insulator target detection method and device for unmanned aerial vehicle electric power inspection, and medium

By introducing a double-layer routing attention mechanism and a multi-cascade CFNet stage into the YOLOv7 network, combined with the EIoU loss function, the accuracy and real-time problems of insulator target detection in complex environments are solved, and efficient identification and recognition of small-sized insulators are achieved. Positioning improves the detection accuracy and efficiency of power inspection.

CN118587620APending Publication Date: 2024-09-03STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410764769.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing insulator target detection technology is difficult to accurately identify small-sized and highly overlapping insulator targets in complex transmission line environments, and the processing time is long, making it difficult to meet real-time requirements.

Method used

An improved model based on the YOLOv7 network structure is adopted, a double-layer routing attention mechanism and multiple cascaded CFNet stages are introduced, combined with the EIoU loss function, to dynamically adjust the attention distribution and multi-scale feature fusion to improve detection accuracy and real-time performance.

Benefits of technology

It significantly improves the detection accuracy and real-time performance of small-sized insulator targets, adapts to different power inspection scenarios, and improves the maintenance efficiency and operation safety of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587620A
    Figure CN118587620A
Patent Text Reader

Abstract

The invention relates to an insulator target detection method and device for unmanned aerial vehicle power inspection and a medium, and the method comprises the steps: obtaining an insulator data set for unmanned aerial vehicle power inspection, and inputting the insulator data set into a trained network model for insulator target detection; wherein the network model is an improved model based on a YOLOv7 network structure; a double-layer routing attention mechanism is introduced into a backbone network of the network model and is used for dynamically adjusting an attention distribution structure; and a plurality of cascaded CFNet stages are designed at the head of the network model for multi-scale feature fusion. Compared with the prior art, the method has the advantages of high detection precision of a small-size insulator target, real-time detection and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computer vision and artificial intelligence, and in particular to an insulator target detection method, equipment and medium for unmanned aerial vehicle power inspection. Background Art

[0002] With the rapid development of science and technology, UAV power inspection technology has become an important research direction for modern power system maintenance. One of the core technologies of UAV power inspection is insulator target detection, which is crucial to ensure the safety and efficiency of the power system. In the power inspection scenario, the accuracy of insulator target detection directly affects the quality and efficiency of power inspection.

[0003] However, current insulator target detection technology faces a series of challenges. Especially in complex transmission line environments, insulator targets are often small in size and highly overlapped, which makes them blurry in the image and difficult to accurately identify. In addition, the appearance of insulators will change significantly under different lighting conditions, different angles, and different distances, further increasing the difficulty of detection.

[0004] Traditional two-dimensional target detection methods are usually based on convolutional neural networks (CNNs), which extract image features through layers of convolution, pooling (downsampling), and fully connected layers. Although these methods perform well in some scenarios, they have obvious shortcomings in power inspection scenarios, especially for the detection of small-sized insulator targets. The main problem is that the pooling operation will lead to a decrease in spatial resolution, making it difficult for the network to capture the details of small targets. In addition, these methods often require a long processing time and are difficult to meet real-time requirements.

[0005] After searching, Chinese invention patent publication number CN113297915A discloses an insulator identification target detection method based on drone inspection, including: establishing a network structure, the network structure is a Yolov4 network, CSPdarknet53 is used as the backbone network, the spatial pyramid pooling module and the path aggregation network module are used as the neck, and Yolov3 is used as the head prediction output. This existing patent has the problem of inaccurate target detection.

[0006] How to achieve accurate and real-time detection of insulator targets in drone power inspection scenarios has become a technical problem that needs to be solved. Summary of the invention

[0007] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide an insulator target detection method, equipment and medium for UAV power inspection.

[0008] The purpose of the present invention can be achieved by the following technical solutions:

[0009] According to one aspect of the present invention, a method for detecting insulator targets during UAV power inspection is provided, comprising:

[0010] Obtain the insulator dataset of UAV power inspection and input the insulator dataset into the trained network model for insulator target detection;

[0011] The network model is an improved model based on the YOLOv7 network structure; the backbone network of the network model introduces a double-layer routing attention mechanism to dynamically adjust the attention distribution structure; the head of the network model designs multiple cascaded CFNet stages for multi-scale feature fusion.

[0012] Preferably, the insulator dataset includes insulator images in various transmission line environments.

[0013] Preferably, the dual-layer routing attention mechanism is located in the ELAN-Bi module of the backbone network for extracting insulator features; the input of the ELAN-Bi module is the output of multiple consecutive CBS modules in the backbone network.

[0014] More preferably, the input of the ELAN-Bi module passes through four CBS units after passing through a double-layer routing attention mechanism unit, and the features of the two branches are superimposed together to obtain the final result; the double-layer routing attention mechanism replaces the first convolution unit in the traditional ELAN module.

[0015] Preferably, each of the CFNet stages comprises a cascade of sub-trunks for extracting multi-scale features of insulators and a transition block structure for fusing features, which is used to fuse the extracted multi-scale features of insulators.

[0016] More preferably, the transition block is a Transition Block unit located in the head, and the Transition Block unit convolves the inputs of the two branches respectively and then connects and outputs them.

[0017] More preferably, the sub-trunk structure is a Focal Block module based on a ConvNeXt block.

[0018] Preferably, the network model is trained using an EIoU loss function.

[0019] According to another aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the method described above is implemented when the processor executes the program.

[0020] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the program implements the method described above when executed by a processor.

[0021] Compared with the prior art, the present invention has the following beneficial effects:

[0022] 1) The present invention introduces a double-layer routing attention mechanism. The ability of dynamically adjusting the attention distribution enables the model to more accurately identify and locate targets in complex scenes, and can effectively improve the detection accuracy of small-sized insulators and high-overlap insulator targets; the application of multiple cascaded CFNet stages can more effectively process features of different scales through the integration of Focal Block modules and Transition Block transition block structures, which has significant advantages in multi-scale feature fusion and improves the accuracy and real-time performance of small-sized insulator targets.

[0023] 2) The present invention adopts the EIoU loss function when training the model, which can improve the model training efficiency and regression accuracy. Compared with the traditional CIoU loss function, EIoU improves the calculation method of the aspect ratio loss term, and the model can achieve higher detection accuracy faster during the training process.

[0024] 3) The method of the present invention is not only innovative in theory, but also highly practical in actual application. It can adapt to different UAV power inspection scenarios, provide more accurate and reliable insulator target detection results for power inspection, and help improve the maintenance efficiency and operation safety of the power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic diagram of the process of the detection method of the present invention;

[0026] Figure 2 It is a structural schematic diagram of the network model in the present invention;

[0027] Figure 3 It is a schematic diagram of the structure of the ELAN-Bi module in the present invention;

[0028] Figure 4 It is a structural schematic diagram of the Focal Block module in the present invention;

[0029] Figure 5 It is a structural schematic diagram of the Transition Block unit in the present invention;

[0030] Figure 6 It is a schematic diagram of the structure of REP in the present invention;

[0031] Figure 7It is a structural schematic diagram of the ELAN module in the present invention;

[0032] Figure 8 It is a schematic diagram of the structure of SPPCSPC in the present invention;

[0033] Fig. 9 It is a schematic diagram of the structure of MP-1 in the present invention;

[0034] Fig.10 It is a schematic diagram of the structure of MP-2 in the present invention;

[0035] Fig.11 It is a schematic diagram of the structure of CBM in the present invention;

[0036] Fig.12 It is a schematic diagram of the structure of convolution in the present invention;

[0037] In the figure, CBS is convolution, batch normalization and activation function; ELAN is efficient layer aggregation network; MP is maximum pooling module; SPPSCPC is spatial pyramid pooling and cross-stage partial connection module; UPSample is upsampling module; Focal Block is focusing module; REP is reparameterization module; CBM is convolution-batch normalization-activation module; Transition Block is transition block; Conv is convolution module; LN is layer normalization module; GELU is Gaussian error linear unit module; BiFormer Block is double-layer routing attention module; BN is batch normalization module; silu is Sigmoid linear unit module; Sigmoid is Sigmoid activation function module. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0039] Example 1

[0040] This embodiment relates to an insulator target detection method for UAV power inspection, and its process is as follows: Figure 1 As shown, including:

[0041] First, obtain an insulator dataset. You can use an open dataset on the Internet or integrate pictures and videos taken by drone power inspections into a dataset and define the algorithm objectives. The image dataset of power inspections is a specialized dataset containing a variety of transmission line environments and insulator images for model training and performance evaluation. The diversity of this dataset ensures that the model can learn a wealth of insulator features and adaptability under different conditions.

[0042] Then, for the insulator detection method, an improved network structure based on YOLOv7 is constructed. By optimizing the backbone network (BackBone) and head (Head) of YOLOv7, part of the downsampling process is replaced with the BiFormer structure, the PAFPN structure in the Head is modified to the CFNet structure, and the original CIoU loss function is optimized to EIoU to speed up the convergence speed and improve the regression accuracy. The overall network structure is as follows Figure 2 shown.

[0043] Next, use the insulator dataset and set an appropriate training strategy for training.

[0044] Finally, the trained model is embedded in the insulator target detection system for application.

[0045] The models in this approach include:

[0046] 1) The backbone network of the model introduces a two-layer routing attention mechanism ( Figure 2 The BiFormerBlock unit in the ELAN-Bi module, such as Figure 3 ): This mechanism dynamically adjusts the attention distribution structure and improves the receptive field selection ability for small-sized insulator targets to improve the detection ability of small-sized insulator targets. This mechanism enables the model to focus more accurately on key information, thereby improving the accuracy of detection. This mechanism enables the model to focus more on key information, thereby achieving more accurate target positioning and recognition in complex scenes.

[0047] 2) The head of the model extracts multi-scale features by designing multiple cascaded CFNet stages, each of which includes a sub-trunk for extracting multi-scale features of insulators ( Figure 2 The Focal Block module in the head serves as a sub-trunk) and a transition block structure for integrating these features ( Figure 2The Transition Block module in the head module) and effectively fuses the multi-scale features of insulators by cascading the sub-trunk and transition block structures. This structure not only improves the model's detection ability for small-sized insulator targets, but also enhances the model's comprehensive detection performance for small targets through multi-scale feature fusion. Compared with the traditional network structure, the sub-trunk structure is based on the ConvNeXt block, which achieves a good balance between speed (FLOPs) and accuracy to optimize the efficiency and accuracy of feature extraction.

[0048] The structure of the Focal Block module is as follows Figure 4 , the structure of the Transition Block unit is as follows Figure 5 .

[0049] 3) Adoption of EIoU loss function: In order to improve the efficiency of model training and the regression accuracy of detection, the present invention adopts the EIoU (Efficient Intersection over Union) loss function, as shown in formula (1). The EIoU loss function replaces the traditional CIoU loss function method in the original model, optimizes the calculation method of the model loss function, accelerates the convergence speed of the model, and improves the regression accuracy.

[0050]

[0051] Among them, L IoU represents the overlap loss, L dis represents the center distance loss, L asp represents the width and height loss. IoU is the intersection over union ratio of the predicted box and the true box, ρ is the Euclidean distance between the two points, b and b gt Represents the center point coordinates of the predicted box and the real box, c w and c h Respectively represent the width and height of the minimum bounding box covering the predicted box and the real box, w and w gt , h and h gt Represent the width and height of the predicted box and the true box respectively.

[0052] The EIoU loss function enables this method to achieve higher detection accuracy and faster detection speed when dealing with small-sized insulator targets in power inspection scenarios, meeting the strict requirements of drone power inspection for target detection technology.

[0053] The structures of REP, ELAN, SPPCSPC, MP-1, MP-2, CBM and CBS in the network model are as follows: Figure 6 to Figure 12 .

[0054] During the training process, the present invention adopts a transfer learning strategy, using the weights pre-trained on the COCO dataset as the initial weights, and then fine-tuning them on the power inspection dedicated dataset. This strategy helps to accelerate the convergence of the model and improve the generalization ability of the final model. We use the SGD optimizer and combine it with the cosine annealing strategy to dynamically adjust the learning rate, which helps to balance exploration and exploitation during training, thereby finding a better parameter setting.

[0055] In order to evaluate the performance of the model, we used the average accuracy (mAP) of all classes as the main evaluation indicator, and calculated the mAP values ​​within the IoU threshold range of 0.5 and 0.5:0.95 respectively. These indicators can fully reflect the performance of the model under different overlap thresholds. At the same time, we also recorded the FLOPs of the model to evaluate the computational efficiency of the model. The experimental results show that our improved method has a significant percentage improvement over the original YOLOv7 model in mAP[0.5:0.95], and also achieved an improvement in mAP[0.5], while maintaining efficient performance in computational load, which proves that our method can maintain efficient computational performance while improving detection accuracy. Through these experiments, we verified the effectiveness of the method of the present invention and demonstrated its application potential in the field of UAV power inspection.

[0056] Example 2

[0057] The electronic device of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0058] Multiple components in the device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunication networks.

[0059] The processing unit performs the various methods and processes described above. For example, in some embodiments, the method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed on the device via a ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of the method described above can be performed. Alternatively, in other embodiments, the CPU can be configured to perform the method in any other appropriate manner (e.g., by means of firmware).

[0060] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0061] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0062] Example 3

[0063] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0064] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for detecting insulator targets during UAV power inspection, characterized in that: The method includes: Obtain the insulator dataset of UAV power inspection and input the insulator dataset into the trained network model for insulator target detection; The network model is an improved model based on the YOLOv7 network structure; the backbone network of the network model introduces a double-layer routing attention mechanism to dynamically adjust the attention distribution structure; the head of the network model designs multiple cascaded CFNet stages for multi-scale feature fusion.

2. The insulator target detection method for UAV power inspection according to claim 1 is characterized in that: The insulator dataset includes insulator images in various transmission line environments.

3. The insulator target detection method for UAV power inspection according to claim 1 is characterized in that: The dual-layer routing attention mechanism is located in the ELAN-Bi module of the backbone network and is used for insulator feature extraction; the input of the ELAN-Bi module is the output of multiple consecutive CBS modules in the backbone network.

4. The insulator target detection method for UAV power inspection according to claim 3 is characterized in that: The input of the ELAN-Bi module passes through four CBS units after the double-layer routing attention mechanism unit, and the features of the two branches are superimposed together to obtain the final result; the double-layer routing attention mechanism replaces the first convolution unit in the traditional ELAN module.

5. The insulator target detection method for UAV power inspection according to claim 1 is characterized in that: Each of the CFNet stages includes a cascade of sub-trunks for extracting multi-scale features of insulators and a transition block structure for fusing features, which is used to fuse the extracted multi-scale features of insulators.

6. The insulator target detection method for UAV power inspection according to claim 5 is characterized in that: The transition block is a Transition Block unit located in the head, and the Transition Block unit convolves the inputs of the two branches respectively and then connects and outputs them.

7. The insulator target detection method for UAV power inspection according to claim 5 is characterized in that: The sub-trunk structure is a Focal Block module based on the ConvNeXt block.

8. The insulator target detection method for UAV power inspection according to claim 1 is characterized in that: The network model is trained using the EIoU loss function.

9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.