Lightweight detection method for small target defects of power transmission line

Through the improved YOLOv7 model, combined with the lightweight convolution module and the adaptive feature fusion module, and using the Focal-CIoU loss function, the accuracy problem of defect detection of small target equipment in transmission lines is solved, and the detection accuracy and drone patrol are improved. Check performance.

CN118628465APending Publication Date: 2024-09-10INST OF OCEAN & OFFSHORE ENG NANTONG HEHAI UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410817978.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing technology is difficult to effectively detect small target equipment defects in transmission lines, especially because wire clips, fittings and insulators are small in size and difficult to detect, resulting in false detection and missed detection problems, affecting detection accuracy and drone intelligent inspection. efficiency.

Method used

The improved YOLOv7 model is adopted, the lightweight convolution module GhostConv and the adaptive feature fusion module AScat are introduced, and the Focal-CIoU loss function is used to optimize the feature extraction and fusion process and improve the model's detection ability of small target defects.

Benefits of technology

By reducing redundant information extraction, the model's identification accuracy of small target defects is improved, the detection capability of drone intelligent inspection is enhanced, the problem of positive and negative sample imbalance is improved, and the model convergence speed is accelerated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628465A
    Figure CN118628465A
Patent Text Reader

Abstract

The invention discloses a lightweight detection method for small target defects of a power transmission line. The lightweight detection method comprises the following steps: acquiring a to-be-detected power transmission line image; preprocessing the power transmission line image; inputting the preprocessed power transmission line image into a pre-trained power transmission line small target equipment defect detection model, and outputting a power transmission line image with equipment defects by the power transmission line small target equipment defect detection model; wherein the power transmission line small target equipment defect detection model adopts an improved YOLOv7 model, and the improved YOLOv7 model comprises an input layer, a feature extraction layer, a feature fusion layer and an output layer which are arranged in sequence; wherein the feature extraction layer comprises a lightweight convolution module GhostConv (GhostConv). Defect detection of small target equipment in a power transmission line can be effectively realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of neural network technology, and in particular to a lightweight detection method, device and storage medium for small target defects of power transmission lines. Background Art

[0002] With the continuous development of social economy, the investment and construction speed of power system is also accelerating. As far as the power system is concerned, transmission lines, as the main medium for transmitting electricity, are of great significance to the safe and reliable operation of the power grid.

[0003] In view of the complex background of transmission line targets and the small size and difficult-to-detect characteristics of wire clamps, hardware and insulators at a long distance, in order to more effectively detect key targets and target structures such as insulators in transmission lines, the images in the intelligent inspection of transmission line drones are taken as the research target, and the super-resolution construction method of small target data sets is optimized. The transmission line small target equipment defect detection model based on deep learning is studied, and the transmission line small target equipment defect recognition and classification method is explored to solve the problems of false detection and missed detection of small target detection objects, improve the detection accuracy, and enhance the intelligent inspection and defect recognition capabilities of transmission line drones. Summary of the invention

[0004] The purpose of the present invention is to provide a lightweight detection method for small target defects of transmission lines, which realizes the detection of small target equipment defects of transmission lines by introducing a lightweight convolution module and an adaptive feature fusion module at a specific position of the YOLOv7 network and using the Focal-CIoU loss function. The present invention is implemented by the following technical solutions.

[0005] In a first aspect, the present invention provides a lightweight detection method for small target defects of a transmission line, comprising: Acquire an image of a power transmission line to be inspected; Preprocessing the transmission line image; Inputting the preprocessed transmission line image into a pre-trained transmission line small target equipment defect detection model, and the transmission line small target equipment defect detection model outputs a transmission line image with equipment defects; Among them, the transmission line small target equipment defect detection model adopts an improved YOLOv7 model, and the improved YOLOv7 model includes an input layer, a feature extraction layer, a feature fusion layer and an output layer arranged in sequence; wherein the feature extraction layer includes a lightweight convolution module GhostConv.

[0006] Optionally, the lightweight convolution module GhostConv includes a first branch and a second branch, and the lightweight convolution module GhostConv performs the following specific operations: For the input feature map, In the first branch, the intrinsic feature map is generated by 1×1 convolution. In the second branch, the intrinsic feature map is first generated by 1×1 convolution, and then the generated intrinsic feature map is linearly operated to generate a new feature map. Finally, the feature maps output by these two branches are concatenated together.

[0007] Optionally, the ratio of the parameters of the ordinary convolution module Conv to the lightweight convolution module GhostConv is r c The calculation formula is as follows:

[0008] in c is the number of channels of the input feature map, n is the number of channels of the output feature map, k is the size of the ordinary convolution kernel, d is the size of the linear transformation convolution kernel, s is the number of linear transformations, and .

[0009] Optionally, the feature fusion layer includes a CBS module and a UPSample module arranged in parallel, and an adaptive feature fusion module AScat and an ELAN-H module arranged in sequence; The CBS module compresses the input feature map to obtain information in the horizontal direction of the feature map; The UPSample module upsamples the input feature map using nearest neighbor interpolation, thereby enlarging a smaller feature map to a larger size and obtaining information in the vertical direction of the feature map; The input of the adaptive feature fusion module AScat is connected to the outputs of the UPSample module and the CBS module, and the output is connected to the input of the ELAN-H module. The feature information in the horizontal direction of the feature map obtained from the CBS module and the feature information in the vertical direction of the feature map received from the UPSample module are automatically calculated for the adaptive weights in their respective directions, and the feature information transmitted in the horizontal and vertical directions is multiplied by the corresponding weights for feature fusion. The channel dimension of the fused features is attention-weighted by the ELAN-H module to enhance important feature information.

[0010] Optionally, the fusion formula of the adaptive feature fusion module AScat is as follows:

[0011] Among them, i represents the vertical coordinate position in the input feature map, and j represents the horizontal coordinate position in the input feature map; is the weighted fused feature vector at the feature map (i, j), They represent the feature vectors at (i, j) after the feature map is enlarged after being transmitted vertically and from left to right before feature fusion. is the coefficient, It is a parameter automatically generated by backpropagating from the input feature map using 1×1 convolution to control the coefficients .

[0012] Optionally, the improved YOLOv7 model adopts a Focal-CIoU loss function, and the calculation formula of the Focal-CIoU loss function is: in, Represents the intersection-over-union ratio of the predicted box and the true box, is a parameter that controls the degree of outlier suppression; its core idea is to use The CIoU loss is re-weighted by the value, thus obtaining the Focal-CIoU loss; The CIoU loss function calculation formula is: in, represents the Euclidean distance between two center points, Represent the center points of the predicted box and the real box respectively. represents a weight parameter, v represents the consistency of the metric aspect ratio, and c represents the diagonal length of the minimum enclosing rectangle that can contain both the predicted box and the true box. represents the width and height of the real box, w,h represents the width and height of the predicted box. The improved YOLOv7 model adopts the Focal-CIoU loss function to improve the performance of the CIoU loss function.

[0013] Optionally, the training method for lightweight detection of small target defects in power transmission lines includes: Obtain image samples and annotation information from different power transmission line environments; Divide the image samples into training set samples and test set samples; Preprocess the image samples to determine the transmission line image annotation information; Input the preprocessed training set samples and sample annotation information into the pre-built YOLOv7 network to train the YOLOv7 network; The classification accuracy of the trained YOLOv7 network is tested through the test set samples. If the classification accuracy reaches the preset accuracy requirement, the training is stopped. Otherwise, the YOLOv7 network training is continued through the training set samples.

[0014] In a second aspect, the present invention provides a lightweight detection device for small target defects of a transmission line, comprising: An image processing module is configured to obtain an image of a power transmission line to be inspected; A preprocessing module, configured to preprocess the transmission line image; An image detection output module is configured to input the preprocessed transmission line image into a pre-trained transmission line small target equipment defect detection model, and the transmission line small target equipment defect detection model outputs a transmission line image with equipment defects; Among them, the transmission line small target equipment defect detection model adopts an improved YOLOv7 model, and the improved YOLOv7 model includes an input layer, a feature extraction layer, a feature fusion layer and an output layer arranged in sequence; wherein the feature extraction layer includes a lightweight convolution module GhostConv.

[0015] In a third aspect, the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon, characterized in that when the computer program / instruction is executed by a processor, the steps of the lightweight detection method for small target defects of transmission lines described in the first aspect are implemented. Beneficial Effects

[0016] The lightweight detection method for small target defects of transmission lines proposed in the present invention uses a lightweight convolution module GhostConv to replace the ordinary convolution module Conv of part of the feature extraction network, thereby reducing the extraction of redundant information and reducing the burden of model calculation; an adaptive feature fusion module AScat is introduced, and the splicing module Concat in the head network is replaced by the AScat module, and the spatial attention mechanism is used to generate weights, so that the model can more accurately detect and identify small target defects; the Focal-CIoU loss function is used to improve the contribution of high-quality anchors of the model, improve the problem of severe imbalance between positive and negative samples, and accelerate the convergence speed of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flowchart for inventing a lightweight detection method for small target defects in power transmission lines; Figure 2 This is the overall structure diagram of the improved YOLOv7 network model of the present invention; Figure 3 This is the network structure diagram of the lightweight convolution module GhostConv; Figure 4 This is a diagram of the feature fusion network structure of YOLOv7 improved without using the AScat module in the present invention; Figure 5 The present invention uses the AScat module to improve the YOLOv7 feature fusion network structure diagram; Figure 6Schematic diagram of a tool for labeling datasets (labelImg) in the present invention; Figure 7 This is the improved YOLOv7 defect detection effect diagram of the present invention. DETAILED DESCRIPTION

[0018] The following is a further description in conjunction with the accompanying drawings and specific embodiments. In the description of the present invention, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. Example

[0019] This embodiment introduces a lightweight detection method for small target defects of a transmission line, including: Acquire an image of a power transmission line to be inspected; Preprocessing the transmission line image; Inputting the preprocessed transmission line image into a pre-trained transmission line small target equipment defect detection model, and the transmission line small target equipment defect detection model outputs a transmission line image with equipment defects; Among them, the transmission line small target equipment defect detection model adopts an improved YOLOv7 model, and the improved YOLOv7 model includes an input layer, a feature extraction layer, a feature fusion layer and an output layer arranged in sequence; wherein the feature extraction layer includes a lightweight convolution module GhostConv.

[0020] In practical application, the original data set is subjected to image preprocessing to obtain the data set required for the experiment and further divided into training set, test set and image to be identified. The divided data set is input into the improved YOLOv7 model for training, thereby obtaining a trained transmission line small target equipment defect recognition model; finally, the image to be identified is put into the model, the transmission line small target equipment defects in the image are identified, and the transmission line image with the defective part marked is output.

[0021] The method of this embodiment mainly involves the following contents.

[0022] 1. Dataset Acquisition and Processing The original high-voltage transmission line image dataset obtained by the present invention comes from the Chinese Power Transmission Line Insulator Dataset (CPLID) on GitHub. The dataset contains 600 images of insulators in normal operation and 248 images of insulators with self-explosion defects. Since the optimal size of the detected image in the YOLOv7 model is 640×640, the Lambimg tool is used to annotate the transmission line images in the training set with anchor frames, such as Figure 6 As shown in the figure, the insulotor tag indicates that it contains a self-explosion defect. After all images are labeled, the generated XML format defect information is converted into a txt format. Finally, the training set and the test set are randomly allocated in a ratio of 7:3 to ensure the randomness of the defect data.

[0023] 2. Model Construction and Training 2.1 Model Construction In practical applications, due to the small size of the insulator, YOLOv7 will extract a lot of redundant information, thereby increasing the amount of calculation. In order to reduce model parameters and the amount of calculation, the present invention adopts a lightweight convolution module GhostConv to replace part of the ordinary convolution module Conv. The network structure diagram of the lightweight convolution module GhostConv is shown in Figure 3 As shown in the figure. The lightweight convolution module GhostConv contains two branches. For the input feature map, in the first branch, the intrinsic feature map is generated by 1×1 convolution. In the second branch, the intrinsic feature map is first generated by 1×1 convolution, and then the generated intrinsic feature map is linearly operated to generate a new feature map. Finally, the feature maps output by these two branches are spliced ​​together. The core idea is to obtain the same feature map as all ordinary convolutions without affecting the ability of the neural network to extract features.

[0024] Ordinary convolution uses a convolution kernel to slide on the feature map with a specific step size, and obtains feature information through stacked convolution. In this process, a lot of redundant information is also extracted. In addition, the normalization layer of ordinary convolutional neural networks is easily affected by the training batch, resulting in the current batch samples not fully reflecting the overall distribution of the data, resulting in a high error rate. The GhostConv module expands the expression of feature maps, enabling it to better capture the various dimensions and contextual information of the input features.

[0025] The operations used by the lightweight module can share weights, thereby reducing the number of parameters to be learned. The ratio of the number of parameters of the ordinary convolution module Conv to the lightweight convolution module GhostConv is r c The calculation formula is as follows:

[0026] in cis the number of channels of the input feature map, n is the number of channels of the output feature map, k is the size of the ordinary convolution kernel, d is the size of the linear transformation convolution kernel, s is the number of linear transformations, and In this embodiment, the values ​​of d and k are 3.

[0027] The specific steps of adding are as follows: In the feature extraction network of YOLOv7, the CBS module is composed of a normal convolution layer Conv, an activation function SiLU and a normalization layer. The normal convolution layer is replaced with a lightweight convolution GhostConv layer, and the rest remains unchanged.

[0028] In the feature fusion network of YOLOv7, a design method of adaptive feature fusion module AScat is proposed by combining the spatial adaptive attention mechanism, and the concatenation module Concat in the original feature extraction network is replaced by the AScat module. The AScat module can be regarded as an attention mechanism module for the scale and semantic level of the image target. This method improves the performance of the feature fusion network and makes the defect features of small targets in the image more prominent. The improved YOLOv7 feature fusion network without the AScat module is shown in the figure below. Figure 4 shown.

[0029] The core idea is to use the spatial attention mechanism to automatically generate weights for feature fusion based on the input feature map.

[0030] The feature fusion layer includes a CBS module and a UPSample module arranged in parallel, and an adaptive feature fusion module AScat and an ELAN-H module arranged in sequence; The CBS module compresses the input feature map to obtain information in the horizontal direction of the feature map; The UPSample module upsamples the input feature map using nearest neighbor interpolation, thereby enlarging a smaller feature map to a larger size and obtaining information in the vertical direction of the feature map; The input of the adaptive feature fusion module AScat is connected to the outputs of the UPSample module and the CBS module, and the output is connected to the input of the ELAN-H module. The feature information in the horizontal direction of the feature map obtained from the CBS module and the feature information in the vertical direction of the feature map received from the UPSample module are automatically calculated for the adaptive weights in their respective directions, and the feature information transmitted in the horizontal and vertical directions is multiplied by the corresponding weights for feature fusion. The channel dimension of the fused features is attention-weighted by the ELAN-H module to enhance important feature information.

[0031] The working principle of the AScat module spatial attention mechanism is as follows: In YOLOv7, the FAFPN network structure with clustered features is used. In this network structure, a fixed-weight feature fusion method is used, which performs a weighted average of the bottom-up and top-down features, so that the defect characteristics of small targets are ignored during feature fusion. The adaptive feature fusion module AScat learns a spatial adaptive weight on the input by fusing the input horizontal feature information with the vertical feature information, and then performs adaptive feature fusion based on this weight.

[0032] Since the trained scale attention module adaptively weights the feature maps according to the object scale contained in the input image, it emphasizes higher resolution feature maps when performing feature fusion, so as to achieve the purpose of paying more attention to the features of small target defects in the input.

[0033] According to the input feature map, the spatial attention mechanism is used to automatically generate weights for fusion. i , j ) is a weighted fusion of vectors at , whose coefficients are adaptively learned by the network and shared among all channels. The fusion formula of ASCAT is as follows:

[0034] Among them, i represents the vertical coordinate position in the input feature map, and j represents the horizontal coordinate position in the input feature map; is the weighted fused feature vector at the feature map (i, j), They represent the feature vectors at (i, j) after the feature map is enlarged after being transmitted vertically and from left to right before feature fusion. is the coefficient, It is a parameter automatically generated by backpropagating from the input feature map using 1×1 convolution to control the coefficients The AScat module is used to improve the YOLOv7 feature fusion network diagram as shown below. Figure 5 shown.

[0035] The regression loss in the original YOLOv7 model loss function is redesigned and the Focal-CIoU loss function is used.

[0036] The YOLOv7 network model loss function mainly consists of three parts: confidence loss, classification loss and coordinate regression loss. The loss function is:

[0037] in, represents the confidence loss; represents the classification loss; represents the positioning loss; is the balance coefficient. Both the confidence loss and classification loss are calculated using the binary cross entropy loss function; the confidence loss is calculated for all samples, the classification loss is only calculated for positive samples, and the regression loss is calculated using the CIoU loss, the calculation formula is: in, represents the Euclidean distance between two center points, Represent the center points of the predicted box and the real box respectively. represents a weight parameter, v represents the consistency of the metric aspect ratio, and c represents the diagonal length of the minimum enclosing rectangle that can contain both the predicted box and the true box. represents the width and height of the real box, and w,h represents the width and height of the predicted box.

[0038] Since bounding box regression is a key step in determining target localization performance, the original YOLOv7 network does not give enough consideration to the imbalance of training samples in CIoU loss. A high-quality anchor has a large IoU with the true box, which means it matches the actual target well. On the contrary, a low-quality anchor has a small IoU with the true box, which means it matches the target poorly.

[0039] Due to the limitations of anchor-base, among the large number of generated anchors, high-quality anchors that can match the target object are scarce, which leads to a serious imbalance between positive and negative samples, thus affecting the model training process. On this basis, a Focal-CIoU loss based on CIoU loss is proposed to improve the performance degradation caused by CIoU loss during network training. The calculation formula is:

[0040] in Represents the intersection-over-union ratio of the predicted box and the true box, It is a parameter that controls the degree of outlier suppression and is determined to be 0.5 through experiments.

[0041] The CIoU loss is re-weighted by the IoU value, and the Focal-CIoU loss is obtained to improve the contribution of the loss of samples with good regression quality and small loss, which helps to improve the contribution of high-quality anchors in the training data and the regression accuracy. The overall architecture of the improved YOLOv7 model is as follows: Figure 2 shown.

[0042] 2.2 Model Training The divided training set is input into the improved YOLOv7 network for training. After each round of training, the test set is input into the model for evaluation. The above process is repeated to continuously optimize the parameters of the improved YOLOv7 network model, and finally a trained model is obtained.

[0043] The image to be identified is input into the trained model to identify the defects of small target equipment in the transmission line in the image, and to verify the effectiveness of the small target equipment defect detection model for transmission line. Figure 7 As shown in the figure, the defect marking effect of the improved model on the image of small target equipment of the power transmission line collected by the drone is identified. If the model detects a defect on the transmission line, the defect is marked with a rectangular frame and the output image is saved.

[0044] Example 2 Based on the same inventive concept as Example 1, this embodiment introduces a lightweight detection device for small target defects of a transmission line, comprising: An image processing module is configured to obtain an image of a power transmission line to be inspected; A preprocessing module, configured to preprocess the transmission line image; An image detection output module is configured to input the preprocessed transmission line image into a pre-trained transmission line small target equipment defect detection model, and the transmission line small target equipment defect detection model outputs a transmission line image with equipment defects; Among them, the transmission line small target equipment defect detection model adopts an improved YOLOv7 model, and the improved YOLOv7 model includes an input layer, a feature extraction layer, a feature fusion layer and an output layer arranged in sequence; wherein the feature extraction layer includes a lightweight convolution module GhostConv.

[0045] Example 3 Based on the same inventive concept as Example 1 and Example 2, this embodiment introduces a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the lightweight inspection method for small target defects in transmission lines as introduced in Example 1 are implemented.

[0046] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may 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.

[0047] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a 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 generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0048] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0049] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0050] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.

Claims

1. A lightweight detection method for small target defects in power transmission lines, characterized in that: include: Acquire an image of a power transmission line to be inspected; Preprocessing the transmission line image; Inputting the preprocessed transmission line image into a pre-trained transmission line small target equipment defect detection model, and the transmission line small target equipment defect detection model outputs a transmission line image with equipment defects; Among them, the transmission line small target equipment defect detection model adopts an improved YOLOv7 model, and the improved YOLOv7 model includes an input layer, a feature extraction layer, a feature fusion layer and an output layer arranged in sequence; wherein the feature extraction layer includes a lightweight convolution module GhostConv.

2. The method according to claim 1, characterized in that: The lightweight convolution module GhostConv includes a first branch and a second branch, and the lightweight convolution module GhostConv performs the following specific operations: For the input feature map, In the first branch, the intrinsic feature map is generated by 1×1 convolution. In the second branch, the intrinsic feature map is first generated by 1×1 convolution, and then the generated intrinsic feature map is linearly operated to generate a new feature map. Finally, the feature maps output by these two branches are concatenated together.

3. The method according to claim 2, characterized in that: The ratio r of the parameters of the convolution module Conv and the lightweight convolution module GhostConv c The calculation formula is as follows: in c is the number of channels of the input feature map, n is the number of channels of the output feature map, k is the size of the ordinary convolution kernel, d is the size of the linear transformation convolution kernel, s is the number of linear transformations, and .

4. The method according to claim 3, characterized in that: The feature fusion layer includes a CBS module and a UPSample module arranged in parallel, and an adaptive feature fusion module AScat and an ELAN-H module arranged in sequence; The CBS module compresses the input feature map to obtain information in the horizontal direction of the feature map; The UPSample module upsamples the input feature map using nearest neighbor interpolation, thereby enlarging a smaller feature map to a larger size and obtaining information in the vertical direction of the feature map; The input of the adaptive feature fusion module AScat is connected to the outputs of the UPSample module and the CBS module, and the output is connected to the input of the ELAN-H module. The feature information in the horizontal direction of the feature map obtained from the CBS module and the feature information in the vertical direction of the feature map received from the UPSample module are automatically calculated for the adaptive weights in their respective directions, and the feature information transmitted in the horizontal and vertical directions is multiplied by the corresponding weights for feature fusion. The channel dimension of the fused features is attention-weighted by the ELAN-H module to enhance important feature information.

5. The method according to claim 4, characterized in that: The fusion formula of the adaptive feature fusion module AScat is as follows: Among them, i represents the vertical coordinate position in the input feature map, and j represents the horizontal coordinate position in the input feature map; is the weighted fused feature vector at the feature map (i, j), They represent the feature vectors at (i, j) after the feature map is enlarged after being transmitted vertically and from left to right before feature fusion. is the coefficient, It is a parameter automatically generated by backpropagating from the input feature map using 1×1 convolution to control the coefficients .

6. The method according to claim 5, characterized in that: The improved YOLOv7 model adopts the Focal-CIoU loss function, and the calculation formula of the Focal-CIoU loss function is: in, Represents the intersection-over-union ratio of the predicted box and the true box, is a parameter that controls the degree of outlier suppression; its core idea is to use The CIoU loss is re-weighted by the value, thus obtaining the Focal-CIoU loss; The CIoU loss function calculation formula is: in, represents the Euclidean distance between two center points, Represent the center points of the predicted box and the real box respectively. represents a weight parameter, v represents the consistency of the metric aspect ratio, and c represents the diagonal length of the minimum enclosing rectangle that can contain both the predicted box and the true box. represents the width and height of the real box, and w,h represents the width and height of the predicted box.

7. The method according to claim 6, characterized in that: The training method for lightweight detection of small target defects in power transmission lines comprises: Obtain image samples and annotation information from different transmission line environments; Divide the image samples into training set samples and test set samples; Preprocess the image samples to determine the transmission line image annotation information; Input the preprocessed training set samples and sample annotation information into the pre-built YOLOv7 network to train the YOLOv7 network; The classification accuracy of the trained YOLOv7 network is tested through the test set samples. If the classification accuracy reaches the preset accuracy requirement, the training is stopped. Otherwise, the YOLOv7 network training is continued through the training set samples.

8. A lightweight detection device for small target defects in power transmission lines, characterized in that: include, An image processing module is configured to obtain an image of a power transmission line to be inspected; A preprocessing module, configured to preprocess the transmission line image; An image detection output module is configured to input the preprocessed transmission line image into a pre-trained transmission line small target equipment defect detection model, and the transmission line small target equipment defect detection model outputs a transmission line image with equipment defects; Among them, the transmission line small target equipment defect detection model adopts an improved YOLOv7 model, and the improved YOLOv7 model includes an input layer, a feature extraction layer, a feature fusion layer and an output layer arranged in sequence; wherein the feature extraction layer includes a lightweight convolution module GhostConv.

9. A computer-readable storage medium having a computer program / instruction stored thereon, which stores computer-executable instructions, which, when executed by a processor, implement the steps of the lightweight detection method for small target defects of transmission lines as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Power transmission line fault detection method and system based on lightweight target detection model

    CN116206222A

  • Power transmission line small target equipment small sample defect detection method and device and storage medium

    CN119107496A