Power transmission line small target equipment small sample defect detection method and device and storage medium
By introducing attention mechanism modules and deep convolution generation adversarial networks into the YOLOv7 network, the detection problems in the detection of small target equipment in transmission lines are solved, the detection accuracy and generalization capabilities are improved, and more accurate small target equipment defect detection.
Patent Information
- Application Number
- CN202411163156.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-10
AI Technical Summary
There is a shortage of samples and small targets in the defect detection of small target equipment on transmission lines, resulting in low model detection accuracy and requires the extraction ability of extremely large aspect ratio target features and the target detection ability in multi-scale and complex contexts.
The attention mechanism module CBAM is introduced in the YOLOv7 network model, combining deep convolution generation adversarial network DCGAN to generate data with high similarity, enriching the data set, and improving detection accuracy and generalization capabilities through image preprocessing and data enhancement methods.
It improves the accuracy of the model's object detection in multi-scale and complex contexts, enhances feature extraction capabilities, avoids network overfitting, and improves the accuracy and generalization capabilities of defect detection of small-target equipment.
Smart Images

Figure CN119107496A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image detection technology, and in particular to a method, device and storage medium for detecting small sample defects of small target equipment in a power transmission line. Background Art
[0002] Transmission line small target equipment plays an important role in the power system. Since transmission lines are exposed to the atmosphere all year round and are damaged by rain, snow, hail, sunlight, insolation, and chemicals in the atmosphere, they are prone to corrosion and damage, which poses a huge hidden danger to the safe and reliable operation of the power system. Traditional fault detection methods rely on manpower to troubleshoot transmission line faults, but manual troubleshooting is time-consuming and labor-intensive, and some transmission lines are built on rugged mountains, making detection very difficult.
[0003] As the coverage of transmission lines gradually expands, the traditional manual inspection method can no longer meet the needs of rapid inspection of power systems. In recent years, the target detection algorithm based on deep learning has attracted widespread attention due to its strong learning ability and good detection effect. Applying the target detection technology based on deep learning to the defect detection of transmission lines can greatly improve the defect detection speed and detection accuracy, and provide practical technical support for accurate and rapid search of defect areas. Among them, the most representative target detector based on deep learning is the YOLO series detector, such as YOLOv5, YOLOv7, etc., which has been widely used as a mainstream method in various surface defect detection fields, including small target equipment defect detection of transmission lines. However, the lack of defect samples of small target equipment in transmission lines and the small size of targets will lead to problems such as low model detection accuracy. These problems require not only the designed detector to have the ability to extract target features with a large aspect ratio, but also to have good generalization ability for target detection with multi-scale and complex background states. Summary of the invention
[0004] The purpose of the present invention is to provide a method, device and storage medium for small sample defect detection of small target equipment in power transmission lines, which solves the problem of target defect detection under multi-scale and complex background conditions by introducing an attention mechanism module at a specific position of the YOLOv7 network model. The present invention is implemented by the following technical solutions.
[0005] In a first aspect, the present invention provides a small sample defect detection method for small target equipment of a power 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 small sample defect detection model, and the transmission line small target equipment small sample defect detection model outputs a classification result; Mark the detected target defects according to the classification results of the small sample defect detection model for small target equipment in the transmission line, and output the image of the transmission line with equipment defects; Among them, the small sample defect detection model for small target equipment in transmission lines adopts an improved YOLOv7 network model, and the improved YOLOv7 network model includes an input layer, a feature extraction layer, a feature fusion layer and an output layer arranged in sequence; wherein the feature fusion layer includes an attention mechanism module CBAM.
[0006] Optionally, the attention mechanism module CBAM includes a channel attention module CAM and a spatial attention module SAM connected in series; Optionally, the channel attention module CAM performs the following operations: for an input feature map F with a height, width and number of channels H, W and C respectively, two one-dimensional vectors of H×W×1 are obtained by global maximum pooling and global average pooling, and then the two one-dimensional vectors are respectively sent to a multi-layer perceptron neural network MLP, and the channel attention map output by the multi-layer perceptron neural network MLP is merged by element-by-element summation operation, and then activated by a Sigmoid activation function to obtain the final channel attention feature map M c (F), channel attention feature map M c (F) is calculated by the following formula: , Where F is the input feature map of the channel attention module CAM, M c (F) is the channel attention feature map, is the Sigmoid activation function, MLP is a multi-layer perceptron, AyqPool is an average pooling operation, which means extracting the average value on the channel, and MaxPool is a maximum pooling operation, which means extracting the maximum value on the channel.
[0007] Optionally, the spatial attention module SAM performs the following operations: transforming the channel attention feature map M obtained by the channel attention module CAM into c (F) is element-wise multiplied with the input initial feature map F to obtain the input initial feature map of the spatial attention module SAM, denoted as F', and the input feature map is subjected to channel-based global average pooling and global maximum pooling to obtain two feature maps, and then the two feature maps are concatenated based on the channel, followed by a 7×7 convolution operation to reduce the dimension to 1 channel, i.e., H×W×1, and then the spatial attention feature map M is generated after Sigmoid activation.s (F'), and finally the feature M s (F') is multiplied by the input feature map F' of the module to obtain the final generated feature, the spatial attention feature map M s (F') is calculated by the following formula: , Where F' is the input feature map of the spatial attention module SAM, M s (F') is the spatial attention feature map, is the Sigmoid activation function, f represents the convolution operation, 7×7 represents the size of the convolution kernel, AyqPool is the average pooling operation, which means extracting the average value on the channel, and MaxPool is the maximum pooling operation, which means extracting the maximum value on the channel.
[0008] Optionally, the acquiring of the transmission line image to be detected includes the following three parallel processing methods: Using data enhancement methods, the brightness of the acquired transmission line images is processed, noise is added to the images, and the acquired image samples are expanded by image rotation. Using the PS defect method of complex background images, power transmission line defects are artificially added in the complex outdoor environment background, thereby expanding the acquired image samples; The deep convolutional generative adversarial network DCGAN is used to purposefully generate image data with the highest similarity to the original image data, so as to further expand the acquired image samples and obtain expanded image samples.
[0009] Optionally, the method of using a deep convolutional generative adversarial network (DCGAN) to purposefully generate image data having a high degree of similarity to the original image data includes: The deep convolutional generative adversarial network DCGAN is a generative model proposed by utilizing the feature extraction capability of convolutional neural networks, which includes a generator G and a discriminator D; The random noise Z that conforms to the probability distribution is input into the generator G of the deep convolutional generative adversarial network DCGAN, which generates false samples G(Z) that conform to the training data through the deconvolution structure. The discriminator D continuously distinguishes whether the generated data is a real sample X in the training data set or a false sample G(Z), so as to output the probability y that the data is the real data real and the data fake generated by the generator. The output result y of the discriminator is finally fed back to the generator G and the discriminator D. After receiving this information, the generator G updates its parameters to generate more realistic samples. After receiving this information, the discriminator D also updates its parameters.
[0010] In practical applications, this process will be repeated until the samples generated by the generator G are real enough that the discriminator D has difficulty distinguishing between real and fake samples, or the preset number of training iterations is reached. Under the constraints of the discriminator D, the generator G can learn the essential characteristics of real data without a lot of prior knowledge and prior distribution, thereby generating data that is very similar to the original data. At the same time, the generator D will also continuously adjust its parameters to improve the accuracy of judging real samples and generating fake samples.
[0011] Optionally, the preprocessing of the power transmission line image includes improving the image quality of the power transmission line image by image filtering and image enhancement.
[0012] Optionally, the training method for small sample defect detection of small target equipment in a power transmission line includes: 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.
[0013] In practical application, the original data set needs to be preprocessed and the defective parts of the transmission line in the image need to be marked to obtain the data set required for the experiment and further divide it in proportion to obtain the training set, test set and image to be identified. Then the divided data set is input into the improved YOLOv7 model for training to obtain a trained transmission line small target equipment defect recognition model; finally, the image to be identified is put into the model to identify the small target equipment defects of the transmission line in the image and output the transmission line image with the defective part marked.
[0014] In a second aspect, the present invention provides a small sample defect detection device for small target equipment of a power transmission line, comprising: An image acquisition module is configured to acquire an image of a power transmission line to be inspected; A preprocessing module, configured to preprocess the transmission line image; An image detection module is configured to input the preprocessed transmission line image into a pre-trained transmission line small target device small sample defect detection model, and the transmission line small target device small sample defect detection model outputs a classification result; and, a detection output module configured to mark the detected target defects according to the classification results of the small sample defect detection model for small target equipment of the power transmission line, and output an image of the power transmission line with equipment defects; Among them, the small sample defect detection model for small target equipment in transmission lines adopts an improved YOLOv7 network model, and the improved YOLOv7 network model includes an input layer, a feature extraction layer, a feature fusion layer and an output layer arranged in sequence; wherein the feature fusion layer includes an attention mechanism module CBAM.
[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 small sample defect detection method for small target equipment in a transmission line described in the first aspect are implemented. Beneficial Effects
[0016] The small sample defect detection method for small target equipment in power transmission lines proposed in the present invention is based on the YOLOv7 network model that supports multi-scale detection. The attention mechanism module CBAM is introduced at a specific position to suppress minor channel feature information and enhance useful attention information in the feature map, so that the network can automatically learn important features in the input data, thereby improving the accuracy of the model for the target to be detected in the detection scenario where the target features and background features in the image are similar. The deep convolutional generative adversarial network DCGAN is also used to purposefully generate data that is highly similar to the original data, thereby enriching the data set, optimizing the detection model's detection effect on small target device defects, improving detection accuracy and network generalization capabilities, and avoiding network overfitting. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 The figure is a flow chart of a small sample defect detection method for small target equipment of a power transmission line according to the present invention; Figure 2 Shown is a schematic diagram of the deep convolutional generative adversarial network DCGAN of the present invention; Figure 3 Shown is a network structure diagram of the attention mechanism CBAM of the present invention; Figure 4 Shown is the improved YOLOv7 network model structure diagram of the present invention; Figure 5 The figure shows the effect of the improved YOLOv7 network model of the present invention on the small sample defect recognition of small target equipment in the power transmission line collected by the drone. 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 small sample defect detection method for small target equipment in a power transmission line. Figure 1 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 small sample defect detection model, and the transmission line small target equipment small sample defect detection model outputs a classification result; Mark the detected target defects according to the classification results of the small sample defect detection model for small target equipment in the transmission line, and output the image of the transmission line with equipment defects; Among them, the small sample defect detection model for small target equipment in transmission lines adopts an improved YOLOv7 network model, and the improved YOLOv7 network model includes an input layer, a feature extraction layer, a feature fusion layer and an output layer arranged in sequence; wherein the feature fusion layer includes an attention mechanism module CBAM.
[0020] In practical application, the original data set needs to be preprocessed and the defective parts of the transmission line in the image need to be marked to obtain the data set required for the experiment and further divide it in proportion to obtain the training set, test set and image to be identified. Then the divided data set is input into the improved YOLOv7 model for training to obtain a trained transmission line small target equipment defect recognition model; finally, the image to be identified is put into the model to identify the small target equipment defects of the transmission line in the image and output the transmission line image with the defective part marked.
[0021] The method of this embodiment mainly involves the following contents.
[0022] Dataset acquisition and processing The present invention obtains a transmission line image dataset in two ways. The first way is to obtain some transmission line images through the Chinese Transmission Line Insulator Dataset CPLID, which is an open source image dataset designed for power line insulator defect detection. The dataset consists of normal insulator images captured by drones and synthesized defective insulator images. By using deep learning technology, it aims to promote the application of power facility maintenance. The CPLID dataset uses innovative data enhancement methods, such as TVSeg algorithm to segment defective parts, affine transformation to expand images and masks, and training U-Net convolutional neural network to improve the generalization ability of the model.
[0023] The second method is to collect part of the data set through drones, and expand it based on the acquired data set using the following methods: using the data enhancement method, the acquired data set is expanded by performing brightness processing, adding noise to the image, and rotating the image; using the complex background image PS defect method, power transmission line defects are artificially added in the complex outdoor environment background to expand the original data set; using the deep convolutional generative adversarial network DCGAN to purposefully generate data that is highly similar to the original data, thereby further expanding the data set and obtaining the expanded data set.
[0024] The deep convolutional generative adversarial network DCGAN is a generative model proposed by using the feature extraction capability of convolutional neural networks. Figure 2 As shown in the figure, the deep convolutional generative adversarial network DCGAN is a generative model proposed by utilizing the feature extraction capability of convolutional neural networks, which includes a generator G and a discriminator D.
[0025] The random noise Z that conforms to the probability distribution is input into the generator G of the deep convolutional generative adversarial network DCGAN, which generates false samples G(Z) that conform to the training data through the deconvolution structure. The discriminator D continuously distinguishes whether the generated data is the real sample X in the training data set or the false sample G(Z), so as to output the probability y that the data is the real data real and the data generated by the generator fake. The output result y of the discriminator is finally fed back to the generator G and the discriminator D. After receiving this information, the generator G updates its parameters and generates more realistic samples. After receiving this information, the discriminator D will also update its parameters and continuously improve its recognition ability.
[0026] In practical applications, this process will be repeated until the samples generated by the generator G are real enough that the discriminator D has difficulty distinguishing between real and fake samples, or the preset number of training iterations is reached. Under the constraints of the discriminator D, the generator G can learn the essential characteristics of real data without a lot of prior knowledge and prior distribution, thereby generating data that is very similar to the original data. At the same time, the generator D will also continuously adjust its parameters to improve the accuracy of judging real samples and generating fake samples.
[0027] Based on the expanded data set, the image quality of the data set is improved by image filtering and image enhancement. The labelimg image annotation tool installed in Anaconda is used to annotate the horizontal and vertical coordinates of the center of the bounding box of the expanded image, as well as the width and height, to obtain the annotated data set. Based on the annotated data set, the training set and the test set are randomly allocated in a ratio of 7:2, and the remaining data set is used as the image to be identified to ensure the randomness of the defect data.
[0028] Model construction and training 2.1 Model Construction The present invention adds an attention mechanism module CBAM at the end of the feature fusion layer. CBAM is an efficient and lightweight attention mechanism that can suppress minor channel feature information, enhance useful attention information in the feature map, and improve the accuracy of the model for the target to be detected in the detection scenario where the target features and background features in the image are similar. It can better detect multi-scale small targets in the transmission line image and improve the feature expression ability and detection accuracy of the key feature channel. Figure 3 As shown in Figure 1, the attention mechanism consists of two serially connected submodules, channel attention CAM and spatial attention SAM, and can perform attention operations in both spatial and channel dimensions. The advantage of this attention operation method is that it can save parameters and make the module more flexible.
[0029] The channel attention module CAM performs the following operations: for the input feature map F with a height, width and number of channels H, W and C respectively, two one-dimensional vectors of H×W×1 are obtained by global maximum pooling and global average pooling respectively, and then these two one-dimensional vectors are respectively sent to a multi-layer perceptron neural network MLP, and the channel attention map output by the multi-layer perceptron neural network MLP is merged by element-by-element summation operation, and then activated by the Sigmoid activation function to obtain the final channel attention feature map M c (F), channel attention feature map M c (F) is calculated by the following formula: , Where F is the input feature map of the channel attention module CAM, M c (F) is the channel attention feature map, is the Sigmoid activation function, MLP is a multi-layer perceptron, AyqPool is an average pooling operation, which means extracting the average value on the channel, and MaxPool is a maximum pooling operation, which means extracting the maximum value on the channel.
[0030] The spatial attention module SAM performs the following operations: transforming the channel attention feature map M obtained by the channel attention module CAM into c (F) is element-wise multiplied with the input initial feature map F to obtain the input initial feature map of the spatial attention module SAM, denoted as F', and the input feature map is subjected to channel-based global average pooling and global maximum pooling to obtain two feature maps, and then the two feature maps are concatenated based on the channel, followed by a 7×7 convolution operation to reduce the dimension to 1 channel, i.e., H×W×1, and then the spatial attention feature map M is generated after Sigmoid activation. s (F'), and finally the feature M s (F') is multiplied by the input feature map F' of the module to obtain the final generated feature, the spatial attention feature map M s (F') is calculated by the following formula: , Where F' is the input feature map of the spatial attention module SAM, M s (F') is the spatial attention feature map, is the Sigmoid activation function, f represents the convolution operation, 7×7 represents the size of the convolution kernel, AyqPool is the average pooling operation, which means extracting the average value on the channel, and MaxPool is the maximum pooling operation, which means extracting the maximum value on the channel.
[0031] like Figure 4 As shown in the figure, it is the structure diagram of the improved YOLOv7 overall network model.
[0032] 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.
[0033] The image to be identified is input into the trained model to identify the small sample defects of small target equipment in the transmission line in the image, and to verify the effectiveness of the small sample defect detection model for small target equipment in the transmission line. Figure 5As shown in the figure, the improved model identifies small sample defects in the transmission line small target equipment image collected by the drone. If the model detects a defect on the transmission line, the defect is marked with a rectangular frame and the output image is saved. Example
[0034] Based on the same inventive concept as that of Example 1, this embodiment introduces a small sample defect detection device for small target equipment of a power transmission line, comprising: An image acquisition module is configured to acquire an image of a power transmission line to be inspected; A preprocessing module, configured to preprocess the transmission line image; An image detection module is configured to input the preprocessed transmission line image into a pre-trained transmission line small target device small sample defect detection model, and the transmission line small target device small sample defect detection model outputs a classification result; and, a detection output module configured to mark the detected target defects according to the classification results of the small sample defect detection model for small target equipment of the power transmission line, and output an image of the power transmission line with equipment defects; Among them, the small sample defect detection model for small target equipment in transmission lines adopts an improved YOLOv7 network model, and the improved YOLOv7 network model includes an input layer, a feature extraction layer, a feature fusion layer and an output layer arranged in sequence; wherein the feature fusion layer includes an attention mechanism module CBAM. Example
[0035] 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 a method for small sample defect detection of small target equipment in a transmission line are implemented as introduced in Example 1.
[0036] 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.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] 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 small sample defect detection method for small target equipment in a power transmission line, 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 small sample defect detection model, and the transmission line small target equipment small sample defect detection model outputs a classification result; Mark the detected target defects according to the classification results of the small sample defect detection model for small target equipment in the transmission line, and output the image of the transmission line with equipment defects; Among them, the small sample defect detection model for small target equipment in transmission lines adopts an improved YOLOv7 network model, and the improved YOLOv7 network model includes an input layer, a feature extraction layer, a feature fusion layer and an output layer arranged in sequence; wherein the feature fusion layer includes an attention mechanism module CBAM.
2. The method according to claim 1, characterized in that: The attention mechanism module CBAM includes a channel attention module CAM and a spatial attention module SAM.
3. The method according to claim 2, characterized in that: The channel attention module CAM performs the following operations: for the input feature map F with a height, width and number of channels H, W and C respectively, two one-dimensional vectors of H×W×1 are obtained by global maximum pooling and global average pooling respectively, and then these two one-dimensional vectors are respectively sent to a multi-layer perceptron neural network MLP, and the channel attention map output by the multi-layer perceptron neural network MLP is merged by element-by-element summation operation, and then activated by the Sigmoid activation function to obtain the final channel attention feature map M c (F), channel attention feature map M c (F) is calculated by the following formula: , Where F is the input feature map of the channel attention module CAM, M c (F) is the channel attention feature map, is the Sigmoid activation function, MLP is a multi-layer perceptron, AyqPool is an average pooling operation, which means extracting the average value on the channel, and MaxPool is a maximum pooling operation, which means extracting the maximum value on the channel.
4. The method according to claim 3, characterized in that: The spatial attention module SAM performs the following operations: transforming the channel attention feature map M obtained by the channel attention module CAM into c (F) is element-wise multiplied with the input initial feature map F to obtain the input initial feature map of the spatial attention module SAM, denoted as F', and the input feature map is subjected to channel-based global average pooling and global maximum pooling to obtain two feature maps, and then the two feature maps are concatenated based on the channel, followed by a 7×7 convolution operation to reduce the dimension to 1 channel, i.e., H×W×1, and then the spatial attention feature map M is generated after Sigmoid activation. s (F'), and finally the feature M s (F') is multiplied by the input feature map F' of the module to obtain the final generated feature, the spatial attention feature map M s (F') is calculated by the following formula: , Where F' is the input feature map of the spatial attention module SAM, M s (F') is the spatial attention feature map, is the Sigmoid activation function, f represents the convolution operation, 7×7 represents the size of the convolution kernel, AyqPool is the average pooling operation, which means extracting the average value on the channel, and MaxPool is the maximum pooling operation, which means extracting the maximum value on the channel.
5. The method according to claim 1, characterized in that: The acquisition of the transmission line image to be detected includes the following three parallel processing methods: Using data enhancement methods, the brightness of the acquired transmission line images is processed, noise is added to the images, and the acquired image samples are expanded by image rotation. Using the PS defect method of complex background images, power transmission line defects are artificially added in the complex outdoor environment background, thereby expanding the acquired image samples; The deep convolutional generative adversarial network DCGAN is used to purposefully generate image data with the highest similarity to the original image data, so as to further expand the acquired image samples and obtain expanded image samples.
6. The method according to claim 5, characterized in that: The method of using a deep convolutional generative adversarial network (DCGAN) to purposefully generate image data that is highly similar to the original image data includes: The deep convolutional generative adversarial network DCGAN is a generative model proposed by utilizing the feature extraction capability of convolutional neural networks, which includes a generator G and a discriminator D; The random noise Z that conforms to the probability distribution is input into the generator G of the deep convolutional generative adversarial network DCGAN, which generates false samples G(Z) that conform to the training data through the deconvolution structure. The discriminator D continuously distinguishes whether the generated data is a real sample X in the training data set or a false sample G(Z), so as to output the probability y that the data is the real data real and the data fake generated by the generator. The output result y of the discriminator is finally fed back to the generator G and the discriminator D. After receiving this information, the generator G updates its parameters to generate more realistic samples. After receiving this information, the discriminator D also updates its parameters.
7. The method according to claim 6, characterized in that: The preprocessing of the power transmission line image includes improving the image quality of the power transmission line image by image filtering and image enhancement.
8. The method according to claim 1, characterized in that: The training method for small sample defect detection of small target equipment in a power transmission line 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.
9. A small sample defect detection device for small target equipment in a power transmission line, characterized in that: include: An image acquisition module is configured to acquire an image of a power transmission line to be inspected; A preprocessing module, configured to preprocess the transmission line image; An image detection module is configured to input the preprocessed transmission line image into a pre-trained transmission line small target device small sample defect detection model, and the transmission line small target device small sample defect detection model outputs a classification result; and, a detection output module configured to mark the detected target defects according to the classification results of the small sample defect detection model for small target equipment of the power transmission line, and output an image of the power transmission line with equipment defects; Among them, the small sample defect detection model for small target equipment in transmission lines adopts an improved YOLOv7 network model, and the improved YOLOv7 network model includes an input layer, a feature extraction layer, a feature fusion layer and an output layer arranged in sequence; wherein the feature fusion layer includes an attention mechanism module CBAM.
10. 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 method for detecting small sample defects of small target equipment in a power transmission line as described in any one of claims 1-8 are implemented.
Citation Information
Patent Citations
Power equipment small target defect identification method and system based on mobilenet
CN115100546A
Power transmission line intelligent defect detection method based on improved YOLOv5 network
CN116843649A
Cited By
Lightweight detection method for small target defects of power transmission line
CN118628465A
Pavement defect detection method, device and equipment and storage medium
CN120163760A
