A shock absorber defect detection method, device and computer readable storage medium
By combining the YOLOv9 target detection model with an autoencoder, the problem of accurate detection of location, range and severity of defects in vibration damper is solved, achieving high-precision defect detection and quantitative characterization, and overcoming the difficulties of feature extraction and sample scarcity in complex backgrounds caused by single models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID JIANGSU ELECTRIC POWER CO ZHENJIANG POWER SUPPLY CO
- Filing Date
- 2026-01-15
- Publication Date
- 2026-05-29
AI Technical Summary
Existing methods for detecting vibration damper defects cannot accurately detect the location, extent, and severity of defects. Furthermore, a single model is prone to missing or false detections when extracting feature information of the low-proportion vibration damper area from power line images.
The YOLOv9 target detection model is used to extract images of the vibration damper area, and the predicted target boxes are cropped by expanding them. The encoder and decoder are used for depth feature extraction and image reconstruction. The reconstruction error is calculated to determine the defects and generate a heat map of the defect area.
It achieves high-precision vibration damper defect detection, accurately locates defect areas and quantifies defect severity, solves the problem of scarce defect samples, and avoids dependence on a large number of labeled samples.
Smart Images

Figure CN122115329A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power equipment testing technology, and in particular to a method, device, and computer-readable storage medium for detecting defects in vibration dampers. Background Technology
[0002] Power lines are a core component of the power grid system, and their operational status directly affects the safety and stability of power transmission. Therefore, researching efficient power line equipment inspection technologies to achieve accurate and rapid identification of equipment faults is crucial for ensuring the safe and stable operation of the power grid. In power lines, vibration dampers are key equipment for ensuring the stable operation of high-voltage power lines. They utilize the principle of inertia to generate a counterforce when conductors vibrate, effectively reducing wind-induced vibrations in power lines, protecting the power lines and tower structures, and extending their service life. Therefore, defect detection using vibration dampers is an indispensable and important part of power line inspection.
[0003] Traditional power line equipment inspection relies primarily on manual patrols. However, with the development of the drone industry, drone technology has become the mainstream inspection method for power lines in recent years. Compared to manual inspection, drone inspection effectively overcomes problems such as heavy workload, low efficiency, and high operational risks, reducing inspection costs while improving efficiency and safety. However, drone inspections generate a large amount of power line image data, requiring manual analysis and processing. To overcome the problems of missed and false detections in manual analysis, deep learning object detection algorithms based on convolutional neural networks have been introduced into the field of vibration damper defect detection.
[0004] Due to the low proportion of target pixels (vibration hammer region) and significant interference from complex backgrounds in power line images acquired by drones, existing technologies have proposed combining similarity attention modules with Res2Net network structures. By dynamically focusing on small target regions, the feature extraction capability of the vibration hammer region is significantly improved without increasing computational load. In addition, researchers have designed spatial pyramid kernel attention modules, which, with the help of multi-scale feature fusion and pyramid convolution kernels, accurately capture subtle features of the vibration hammer region while suppressing interference from complex backgrounds. Furthermore, some methods improve the detection accuracy of small targets through multi-scale feature fusion and improved upsampling operators, while introducing efficient feature extraction modules. In summary, these methods that optimize the model structure all aim to improve the feature extraction performance of the model, extracting more and more effective feature information of the vibration hammer region from power line images, and then classifying and identifying the feature information to detect whether there are defects in the vibration hammer region. Besides optimizing the model structure, existing technologies address the problem of scarce vibration damper defect samples, which prevents the model from fully learning defect sample feature information during training. These technologies improve the model's detection and recognition accuracy from the perspective of data generation and augmentation. For example, 3D modeling technology is used to generate artificial samples to alleviate the data scarcity problem, or an ensemble feature learning module is introduced to enhance the model's ability to learn defect features. Alternatively, traditional data augmentation methods such as translation and flipping are used to expand the training samples to simulate the problem of insufficient defect datasets. However, neither of these methods can provide information such as defect location, extent, and severity. Furthermore, using a single model to extract features and detect defects in the vibration damper region of power line images is limited by the proportion of the vibration damper region, making it difficult to extract vibration damper feature information. When the vibration damper in the image is blurred or extremely small, false negatives or missed detections are likely to occur.
[0005] In summary, existing methods for detecting defects in vibration dampers cannot accurately detect the location, extent, and severity of defects. Furthermore, the use of a single model to directly extract feature information from the low-percentage vibration damper area in power line images can easily lead to missed or false detections. Summary of the Invention
[0006] Therefore, the technical problem to be solved by the present invention is to overcome the shortcomings of existing anti-vibration hammer defect detection methods, such as the inability to accurately detect the location, range and severity of defects. At the same time, the single model directly extracts feature information of the low proportion of anti-vibration hammer area from the power line image, which is prone to missed detection or false detection.
[0007] To solve the above-mentioned technical problems, the present invention provides a method for detecting defects in a vibration damper, comprising: The power line image is input into the YOLOv9 target detection model, which outputs the predicted target box of the vibration damper and expands the predicted target box; the power line image is then cropped based on the expanded predicted target box to obtain the vibration damper region image. The image of the vibration damper region is input into the encoder for deep feature extraction, and a low-dimensional feature map is output. The low-dimensional feature map is input into the decoder for image reconstruction, and the reconstructed image of the vibration damper region is output. Based on the reconstruction error of each pixel in the image of the vibration damper region and the reconstructed image of the vibration damper region, the reconstruction error of the image of the vibration damper region is calculated, and the magnitude of the reconstruction error of the image of the vibration damper region is determined to be the same as the preset error threshold. If the reconstruction error of the vibration damper area image is greater than the preset error threshold, it is determined that the vibration damper is abnormal, and a global error distribution map is constructed based on the reconstruction error of each pixel point between the vibration damper area image and the reconstructed vibration damper area image. Threshold segmentation technology is used to filter the global error distribution map to obtain pixel regions where the reconstruction error of each pixel is greater than the preset error threshold. Based on the reconstruction error of each pixel in the pixel region, the pixel region is converted into a defect region heat map. The defect region heat map is then superimposed on the power line image using a semi-transparent overlay method.
[0008] Preferably, the power line image is input into the YOLOv9 target detection model, which outputs the predicted target box of the vibration damper and expands the predicted target box, including: The power line image is input into the backbone network of the YOLOv9 target detection model, and the output is a multi-scale feature map of the power line. The multi-scale feature map of the power line is input into the feature pyramid module of the YOLOv9 target detection model for multi-scale feature fusion, and multiple fused feature maps are output. Multiple fused feature maps are input into multiple prediction heads of the head network of the YOLOv9 object detection model, and multiple prediction boxes including the shock absorber, the coordinates of each prediction box and the confidence score are output. Remove prediction boxes with confidence levels below a preset confidence threshold. Based on the coordinates of the remaining prediction boxes, calculate the overlap between the remaining prediction boxes and the prediction box with the highest confidence level, and remove prediction boxes with overlap levels greater than a preset overlap threshold to obtain the prediction target boxes of the vibration damper. The width and height of the predicted target box of the vibration damper are both expanded by a preset ratio to obtain the expanded predicted target box.
[0009] Preferably, the power line image is input into the backbone network of the YOLOv9 target detection model, and the output power line multi-scale feature map includes: The power line image is input into the convolutional layer, and the initial feature map of the power line is output; the initial feature map of the power line is input into the ELAN1 feature block, and the depth feature map of the power line is output. The power line depth feature map is input into the feature enhancement module, and then downsampled by three downsampling sub-modules connected in series along the forward propagation direction. Based on the output of the three downsampling sub-modules, three downsampled feature maps are obtained. Input the downsampled feature map output from the last downsampled submodule into the SPPELAN feature block, and output a multi-scale fused feature map; Based on three downsampled feature maps and a multi-scale fused feature map, a multi-scale feature map of the power line is obtained.
[0010] Preferably, the multi-scale feature map of the power line is input into the feature pyramid module of the YOLOv9 target detection model for multi-scale feature fusion, outputting multiple fused feature maps, including: The multi-scale fusion feature map is fused with the downsampled feature map output by the third downsampling submodule to obtain the first feature map; the first feature map is input into the first upsampling module in the upsampling path, and the output of the first upsampling module is fused with the downsampled feature map output by the second downsampling submodule to obtain the second feature map; the second feature map is input into the second upsampling module in the upsampling path, and the output of the second upsampling module is fused with the downsampled feature map output by the first downsampling submodule to obtain the third feature map; The downsampled feature map output by the first downsampling submodule is input into the first downsampling module in the downsampling path. The output of the first downsampling module is fused with the downsampled feature map output by the second downsampling submodule to obtain the fourth feature map. The fourth feature map is input into the second downsampling module in the downsampling path. The output of the second downsampling module is fused with the downsampled feature map output by the third downsampling submodule to obtain the fifth feature map. The fifth feature map is input into the third downsampling module in the downsampling path. The output of the third downsampling module is fused with the multi-scale fusion feature map to obtain the sixth feature map. The first feature map is fused with the sixth feature map to obtain the first fused feature map; the second feature map is fused with the fifth feature map to obtain the second fused feature map; and the third feature map is fused with the fourth feature map to obtain the third fused feature map.
[0011] Preferably, the image of the vibration damper region is input into an encoder for depth feature extraction, and a low-dimensional feature map is output; the low-dimensional feature map is input into a decoder for image reconstruction, and a reconstructed image of the vibration damper region is output, including: The image of the vibration damper region is input into four cascaded convolutional layers in the encoder for layer-by-layer feature encoding. The spatial size is obtained based on the output of the last convolutional layer. A low-dimensional feature map with 256 channels; The second feature map is input into four cascaded deconvolutional layers in the decoder for layer-by-layer size recovery. The spatial size is obtained based on the output of the last deconvolutional layer. A high-dimensional feature map with 3 channels; The high-dimensional feature map is adaptively weighted using the Sigmoid activation function to obtain the reconstructed image of the vibration damper region.
[0012] Preferably, the formula for calculating the reconstruction error of the vibration damper area image is: , in, Image showing the vibration damper area Reconstruction error; Image showing the vibration damper area The number of pixels; Image showing the vibration damper area The pixel value of the i-th pixel; This represents a reconstructed image of the earthquake-resistant area. This represents the pixel value of the i-th pixel in the reconstructed earthquake-resistant area image.
[0013] Preferably, the process of obtaining the preset error threshold includes: Obtain a dataset containing multiple defect-free vibration damper area image samples; The image samples of the vibration damper area are input into the encoder for deep feature extraction, and the low-dimensional feature map of the sample is output. The low-dimensional feature map of the sample is input into the decoder for image reconstruction, and the reconstructed image samples of the vibration damper area are output. Based on the reconstruction error of each pixel in the image sample of the vibration damper region and the reconstructed image sample of the vibration damper region, the reconstruction error of the image sample of the vibration damper region is calculated. The reconstruction errors of all image samples of the vibration damper area are arranged from smallest to largest, and the aT-th reconstruction error is used as the preset error threshold; where a represents the preset ratio. T represents the number of image samples of the vibration damper area in the dataset.
[0014] Preferably, the color depth of each pixel in the heat map of the defect area is positively correlated with the reconstruction error of that pixel.
[0015] The present invention also provides a vibration damper defect detection device, comprising: The vibration damper region acquisition module is used to input power line images into the YOLOv9 target detection model, output the predicted target boxes of the vibration damper, and expand the predicted target boxes; based on the expanded predicted target boxes, the power line images are cropped to obtain the vibration damper region images; The vibration damper region reconstruction module is used to input the vibration damper region image into the encoder for depth feature extraction and output a low-dimensional feature map; the low-dimensional feature map is then input into the decoder for image reconstruction and outputs the reconstructed vibration damper region image. The reconstruction error acquisition module is used to calculate the reconstruction error of the vibration damper region image based on the reconstruction error of each pixel point of the vibration damper region image and the reconstructed vibration damper region image, and to determine the magnitude of the reconstruction error of the vibration damper region image compared with the preset error threshold. The global error distribution acquisition module is used to determine that there is an anomaly in the vibration damper if the reconstruction error of the vibration damper area image is greater than a preset error threshold, and to construct a global error distribution map based on the reconstruction error of each pixel of the vibration damper area image and the reconstructed vibration damper area image. The defect region acquisition module is used to filter the global error distribution map using threshold segmentation technology to obtain pixel regions where the reconstruction error of each pixel is greater than a preset error threshold. Based on the reconstruction error of each pixel in the pixel region, the pixel region is converted into a defect region heat map. The defect region heat map is then superimposed on the power line image using a semi-transparent overlay method.
[0016] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for detecting defects in a vibration damper.
[0017] The method for detecting defects in vibration dampers provided in this application has the following beneficial effects: This application utilizes the YOLOv9 target detection model to extract the vibration damper region image from power line images, targeting the vibration damper. By cropping the power line image based on the detection results, it addresses the issues of low vibration damper region coverage and complex background interference to some extent. Furthermore, this application abandons the defect detection method of feature extraction followed by identification and classification. Instead, it reconstructs the vibration damper region image. The reconstruction error is small in normal areas but large in defective areas. The reconstruction error is used to determine whether the vibration damper has defects, as well as the location and severity of the defects. Simultaneously, a defect heatmap is generated based on pixel-level reconstruction errors, achieving quantitative characterization of vibration damper defects. In addition, the image reconstruction detection method no longer relies on a large number of labeled defect samples. It can be trained directly using normal vibration damper image samples, solving the problem of scarce defect samples and eliminating the need for manually generated defect samples. Unlike existing technologies that use a single model to directly extract features and identify defects from power line images, the three-stage scheme designed in this application (target and background separation, target region reconstruction for defect detection, and quantitative characterization of defects based on reconstruction results) simultaneously solves the problems of low proportion of vibration dampers in power line images, difficulty in feature extraction, and scarcity of defect samples that prevent the model from accurately learning defect features, thus achieving high-precision vibration damper defect detection. Attached Figure Description
[0018] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein... Figure 1 The flowchart of the vibration damper defect detection method provided in this application is as follows; Figure 2 This application provides schematic diagrams of vibration dampers with different defect types in complex backgrounds. Detailed Implementation
[0019] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0020] Please see Figure 1 , Figure 1 The diagram shown is a flowchart of the vibration damper defect detection method provided in this application. The method specifically includes steps S10 to S50: S10: Input the power line image into the YOLOv9 target detection model, output the predicted target box of the vibration damper, and expand the predicted target box; based on the expanded predicted target box, crop the power line image to obtain the vibration damper region image.
[0021] S20: Input the image of the vibration damper area into the encoder for deep feature extraction and output a low-dimensional feature map; input the low-dimensional feature map into the decoder for image reconstruction and output the reconstructed image of the vibration damper area.
[0022] S30: Based on the reconstruction error of each pixel in the image of the vibration damper region and the reconstructed image of the vibration damper region, calculate the reconstruction error of the image of the vibration damper region and determine the magnitude of the reconstruction error of the image of the vibration damper region compared with the preset error threshold.
[0023] S40: If the reconstruction error of the vibration damper area image is greater than the preset error threshold, it is determined that the vibration damper is abnormal, and a global error distribution map is constructed based on the reconstruction error of each pixel point between the vibration damper area image and the reconstructed vibration damper area image.
[0024] S50: The threshold segmentation technique is used to filter the global error distribution map to obtain the pixel region where the reconstruction error of the pixel point is greater than the preset error threshold. Based on the reconstruction error of each pixel point in the pixel region, the pixel region is converted into a defect region heat map. The defect region heat map is superimposed on the power line image using a semi-transparent overlay method.
[0025] Specifically, the power line image is input into the YOLOv9 target detection model, which outputs the predicted target bounding box of the vibration damper. The predicted target bounding box is then expanded, including steps 1-1 to 1:5. Step 1-1: Input the power line image into the backbone network of the YOLOv9 target detection model and output the multi-scale feature map of the power line.
[0026] Steps 1-2: Input the multi-scale feature map of the power line into the feature pyramid module of the YOLOv9 target detection model to perform multi-scale feature fusion and output multiple fused feature maps.
[0027] Steps 1-3: Input multiple fused feature maps into multiple prediction heads of the head network of the YOLOv9 object detection model, and output multiple prediction boxes including the shock absorber, the coordinates of each prediction box, and the confidence score.
[0028] Steps 1-4: Remove prediction boxes with confidence levels below a preset confidence threshold. Based on the coordinates of the remaining prediction boxes, calculate the overlap between the remaining prediction boxes and the prediction box with the highest confidence level, and remove prediction boxes with overlap levels greater than a preset overlap threshold to obtain the prediction target boxes of the vibration damper.
[0029] Steps 1-5: Expand the width and height of the predicted target box of the vibration damper by a preset ratio to obtain the expanded predicted target box.
[0030] Specifically, the expanded formula for predicting the target bounding box is: , , in, , These represent the width and height of the predicted bounding box before expansion, respectively. , These represent the width and height of the expanded predicted bounding box, respectively.
[0031] The expanded predicted bounding box can cover a more complete vibration damper area, avoiding the omission of key features due to the inaccurate boundaries of the directly generated predicted bounding box. By cropping the expanded predicted bounding box area from the power line image, a complete vibration damper area image can be obtained.
[0032] Furthermore, the power line image is input into the backbone network of the YOLOv9 target detection model, and the multi-scale feature map of the power line is output, including steps 1-1-1 to 1-1-4: Step 1-1-1: Input the power line image into the convolutional layer and output the initial feature map of the power line; input the initial feature map of the power line into the ELAN1 feature block and output the depth feature map of the power line.
[0033] For example, a convolutional layer consists of two concatenated convolutional blocks.
[0034] Step 1-1-2: Input the power line depth feature map into the feature enhancement module, and perform downsampling through three downsampling sub-modules connected in series along the forward propagation direction. Based on the output of the three downsampling sub-modules, three downsampled feature maps are obtained.
[0035] Specifically, all three downsampling submodules utilize RepNCSPELAN4 blocks for feature processing. Each time a feature map passes through a downsampling submodule, its size is halved and its number of channels is doubled.
[0036] Step 1-1-3: Input the downsampled feature map output by the last downsampled submodule into the SPPELAN feature block, and output a multi-scale fused feature map.
[0037] Specifically, SPPELAN feature blocks utilize spatial pyramid pooling to aggregate multi-scale contextual information, ultimately achieving the transformation from the original image to high-level speech features.
[0038] Step 1-1-4: Based on the three downsampled feature maps and the multi-scale fused feature map, obtain the multi-scale feature map of the power line.
[0039] Furthermore, the multi-scale feature map of the power line is input into the feature pyramid module of the YOLOv9 target detection model for multi-scale feature fusion, outputting multiple fused feature maps, including steps 1-2-1 to 1-2-3: Step 1-2-1: Fuse the multi-scale fusion feature map with the downsampled feature map output by the third downsampling submodule to obtain the first feature map; input the first feature map into the first upsampling module in the upsampling path, and fuse the output of the first upsampling module with the downsampled feature map output by the second downsampling submodule to obtain the second feature map; input the second feature map into the second upsampling module in the upsampling path, and fuse the output of the second upsampling module with the downsampled feature map output by the first downsampling submodule to obtain the third feature map.
[0040] Step 1-2-2: Input the downsampled feature map output by the first downsampled submodule into the first downsampled module in the downsampled path, and fuse the output of the first downsampled module with the downsampled feature map output by the second downsampled submodule to obtain the fourth feature map; input the fourth feature map into the second downsampled module in the downsampled path, and fuse the output of the second downsampled module with the downsampled feature map output by the third downsampled submodule to obtain the fifth feature map; input the fifth feature map into the third downsampled module in the downsampled path, and fuse the output of the third downsampled module with the multi-scale fusion feature map to obtain the sixth feature map.
[0041] Steps 1-2-3: Fuse the first feature map with the sixth feature map to obtain the first fused feature map; fuse the second feature map with the fifth feature map to obtain the second fused feature map; fuse the third feature map with the fourth feature map to obtain the third fused feature map.
[0042] Specifically, the feature pyramid module in this application adopts a bidirectional feature pyramid structure, which uses three upsampling and three downsampling to form a complete bidirectional feature propagation path. In the upsampling path, the deep feature map is upsampled through nearest neighbor interpolation and spliced and fused with the shallow features of the corresponding scale. In the downsampling path, the shallow features are downsampled through convolution operation and interact with the deep features. This bidirectional fusion mechanism ensures that the features at each scale can contain rich semantic information and accurate location information.
[0043] Specifically, the image of the vibration damper region is input into the encoder for depth feature extraction, and a low-dimensional feature map is output; the low-dimensional feature map is input into the decoder for image reconstruction, and a reconstructed image of the vibration damper region is output, including steps 2-1 to 2-3: Step 2-1: Input the image of the vibration damper region into four cascaded convolutional layers in the encoder for layer-by-layer feature encoding. Based on the output of the last convolutional layer, obtain the spatial size. A low-dimensional feature map with 256 channels.
[0044] Specifically, all four convolutional layers use 3*3 convolutional kernels with a stride of 2, and incorporate a nonlinear transformation using the ReLU activation function. The progressive feature compression mechanism formed by the cascaded convolutional layers can effectively capture the essential features of the shock absorber and filter out irrelevant background interference information.
[0045] Step 2-2: Input the second feature map into the four cascaded deconvolution layers in the decoder for layer-by-layer size recovery. Based on the output of the last deconvolution layer, the spatial size is obtained as follows: A high-dimensional feature map with 3 channels.
[0046] Steps 2-3: Adaptively weight the feature weights of the high-dimensional feature map using the Sigmoid activation function to obtain the reconstructed vibration damper region image.
[0047] Specifically, the formula for calculating the reconstruction error of the vibration damper area image is as follows: , in, Image showing the vibration damper area Reconstruction error; Image showing the vibration damper area The number of pixels; Image showing the vibration damper area The pixel value of the i-th pixel; This represents a reconstructed image of the earthquake-resistant area. This represents the pixel value of the i-th pixel in the reconstructed earthquake-resistant area image.
[0048] This application selects mean squared error as the core evaluation index to measure the difference between the original image and the reconstructed image, so as to quantify the degree of difference between the original image and the reconstructed image. It can effectively reflect the overall difference of the image at the pixel level. Its value directly reflects the similarity between the reconstructed image and the original image. The smaller the error value, the closer the reconstructed image is to the original image, and vice versa, it indicates that there is a significant difference.
[0049] Furthermore, the process of obtaining the preset error threshold includes steps 3-1 to 3-4: Step 3-1: Obtain a dataset containing multiple defect-free vibration damper area image samples.
[0050] Step 3-2: Input the image sample of the vibration damper area into the encoder for deep feature extraction, and output the low-dimensional feature map of the sample; input the low-dimensional feature map of the sample into the decoder for image reconstruction, and output the reconstructed image sample of the vibration damper area.
[0051] Step 3-3: Based on the reconstruction error of each pixel in the image sample of the vibration damper region and the reconstructed image sample of the vibration damper region, calculate the reconstruction error of the image sample of the vibration damper region.
[0052] Steps 3-4: Sort the reconstruction errors of all image samples of the vibration damper area from smallest to largest, and use the aT-th reconstruction error as the preset error threshold; where a represents the preset ratio. T represents the number of image samples of the vibration damper area in the dataset.
[0053] In one specific embodiment of this application, 'a' is set to 95%, which is a preset error threshold. Represented as: , in, The function representing the 95th percentile of the dataset, with a preset error threshold, ensures that 95% of the reconstruction errors in normal vibration damper area image samples are below a certain threshold. This keeps the false alarm rate at 5%.
[0054] Furthermore, based on the preset error threshold in the above example, the formula for determining whether the vibration damper has defects is expressed as: , Specifically, when the reconstruction error is less than or equal to a preset error threshold, the vibration damper is determined to be in normal condition. Conversely, if the vibration damper does not meet the requirements, it is determined that the vibration damper is defective. .
[0055] Since the preset error threshold is determined based on the reconstruction error of a large number of normal vibration damper image samples, when the reconstruction error of the vibration damper region image to be detected exceeds the preset error threshold, it indicates that the reconstruction error of the current vibration damper region image exceeds the reconstruction error of a large number of normal vibration damper image samples. Therefore, it is determined that the vibration damper is different from the normal vibration damper and has defects.
[0056] Specifically, the color depth of each pixel in the heatmap of the defect area is positively correlated with the reconstruction error of that pixel. The defect area is determined by the reconstruction error of each pixel and the magnitude of the preset error threshold. The degree of defect is then quantified by the reconstruction error of each pixel in the defect area. Thus, the distribution of reconstruction error of each pixel can be judged based on the color depth of each pixel in the heatmap, and the severity of the defect can be quantified more intuitively.
[0057] To verify the effectiveness of the vibration damper defect detection method provided in the above embodiments, this application embodiment also performed the verification on a dataset.
[0058] The dataset used in this embodiment originates from actual power line environments and covers image samples of vibration dampers of various materials and sizes under different backgrounds, such as... Figure 2As shown, the hardware was labeled using the labelimg tool and used for training and testing. The dataset contains 425 images, representing two abnormal states of power line vibration dampers: tilting and falling. It includes 197 images of dampers in the fallen state and 228 images of dampers in the tilted state. To ensure the effectiveness of model training and validation, the training and validation sets were randomly split in a 7:3 ratio, with 294 images in the training set and 131 images in the validation set.
[0059] The vibration damper defect detection model was trained using images from the training set, and then validated on the validation set. Analysis of the validation results showed that the vibration damper defect detection model based on YOLOv9 target detection model and autoencoder provided in this application can accurately identify whether there are defects in the vibration dampers in power lines. At the same time, the heat map mechanism can realize the precise location of defects and reflect the severity of defects, providing effective technical support for vibration damper condition assessment.
[0060] It should be noted that in this embodiment, a stochastic gradient descent optimizer is used for model training, with a momentum of 0.937, a weight decay coefficient of 0.0005, and a cosine annealing strategy for learning rate scheduling. The initial learning rate is set to 0.01, and the final learning rate decreases to 0.001. The batch size is set to 16 based on GPU memory, and gradient accumulation is used to simulate the training effect of larger batches. The training period is 300 epochs, with warm-up training in the first 3 epochs, where the learning rate linearly increases from 0.0 to 0.01. Simultaneously, an exponential moving average technique is used to smooth parameter updates.
[0061] Based on the vibration damper defect detection method provided in the above embodiments, this application also provides a vibration damper defect detection device, which specifically includes: The vibration damper region acquisition module is used to input power line images into the YOLOv9 target detection model, output the predicted target boxes of the vibration damper, and expand the predicted target boxes; based on the expanded predicted target boxes, the power line images are cropped to obtain the vibration damper region images; The vibration damper region reconstruction module is used to input the vibration damper region image into the encoder for depth feature extraction and output a low-dimensional feature map; the low-dimensional feature map is then input into the decoder for image reconstruction and outputs the reconstructed vibration damper region image. The reconstruction error acquisition module is used to calculate the reconstruction error of the vibration damper region image based on the reconstruction error of each pixel point of the vibration damper region image and the reconstructed vibration damper region image, and to determine the magnitude of the reconstruction error of the vibration damper region image compared with the preset error threshold. The global error distribution acquisition module is used to determine that there is an anomaly in the vibration damper if the reconstruction error of the vibration damper area image is greater than a preset error threshold, and to construct a global error distribution map based on the reconstruction error of each pixel of the vibration damper area image and the reconstructed vibration damper area image. The defect region acquisition module is used to filter the global error distribution map using threshold segmentation technology to obtain pixel regions where the reconstruction error of each pixel is greater than a preset error threshold. Based on the reconstruction error of each pixel in the pixel region, the pixel region is converted into a defect region heat map. The defect region heat map is then superimposed on the power line image using a semi-transparent overlay method.
[0062] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method for detecting defects in a vibration damper.
[0063] This application selects YOLOv9 as the basic detection framework for the identification and localization of vibration dampers in power line images. Through its internal feature extraction network and detection head, the power line image is analyzed to quickly locate the vibration damper target and output the bounding box coordinates. Based on this, the original image is cropped according to the output coordinates to extract the image region containing only the vibration damper. To improve the integrity of the cropped region and the reliability of detection, the bounding box coordinates are appropriately expanded, thus providing high-quality, high-precision target image input for subsequent anomaly detection modules.
[0064] Furthermore, an anomaly detection algorithm based on an autoencoder is employed. This structure consists of an encoder and a decoder. The encoder extracts deep features from the image and performs dimensionality reduction through a multi-layer convolutional neural network, while the decoder reconstructs the image from the compressed low-dimensional features. During the training phase, only a large number of normal vibration damper samples are used to minimize the reconstruction error, allowing the autoencoder to learn the feature distribution pattern under normal conditions. In the detection phase, the image to be tested is input into the trained autoencoder, and its reconstruction result is obtained. By calculating the error between the original image and the reconstructed image, anomalies are determined: if the error exceeds a set threshold, it is judged as a defect; otherwise, it is considered normal. This method eliminates the dependence on defective samples and achieves reliable detection in imbalanced scenarios.
[0065] In addition, to intuitively present the distribution characteristics and severity of vibration damper defects, a standardized anomaly heatmap generation mechanism was constructed. By extracting areas where the reconstruction error exceeds a set threshold, the error distribution is visualized: First, based on a pixel-level comparison algorithm, the pixel difference between the original image of the vibration damper under test and the reconstructed image output by the autoencoder is calculated to construct a global error distribution map, providing data support for anomaly area identification; Threshold segmentation technology is introduced to process the error distribution map, accurately filtering out anomaly areas where the reconstruction error exceeds the standard, converting the error distribution data into a heatmap format, and integrating it into the original image using a semi-transparent overlay method. Simultaneously, the core defect area is marked with a rectangular bounding box, and the depth of the heatmap color is positively correlated with the reconstruction error value, which can intuitively quantify the severity of the defect.
[0066] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied 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.
[0067] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0068] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0069] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0070] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A method for detecting defects in a vibration damper, characterized in that, include: Input the power line image into the YOLOv9 target detection model, output the predicted target box of the vibration damper, and expand the predicted target box; The power line image is cropped based on the expanded predicted target box to obtain the vibration damper area image; The image of the vibration damper area is input into the encoder for deep feature extraction, and a low-dimensional feature map is output. The low-dimensional feature map is input into the decoder for image reconstruction, and the reconstructed image of the vibration damper area is output. Based on the reconstruction error of each pixel in the image of the vibration damper region and the reconstructed image of the vibration damper region, the reconstruction error of the image of the vibration damper region is calculated, and the magnitude of the reconstruction error of the image of the vibration damper region is determined to be the same as the preset error threshold. If the reconstruction error of the vibration damper area image is greater than the preset error threshold, it is determined that the vibration damper is abnormal, and a global error distribution map is constructed based on the reconstruction error of each pixel point between the vibration damper area image and the reconstructed vibration damper area image. Threshold segmentation technology is used to filter the global error distribution map to obtain pixel regions where the reconstruction error of each pixel is greater than the preset error threshold. Based on the reconstruction error of each pixel in the pixel region, the pixel region is converted into a defect region heat map. The defect region heat map is then superimposed on the power line image using a semi-transparent overlay method.
2. The method for detecting defects in a vibration damper according to claim 1, characterized in that, The power line image is input into the YOLOv9 target detection model, which outputs the predicted target bounding box of the vibration damper. The predicted target bounding box is then expanded to include: The power line image is input into the backbone network of the YOLOv9 target detection model, and the output is a multi-scale feature map of the power line. The multi-scale feature map of the power line is input into the feature pyramid module of the YOLOv9 target detection model for multi-scale feature fusion, and multiple fused feature maps are output. Multiple fused feature maps are input into multiple prediction heads of the head network of the YOLOv9 object detection model, and multiple prediction boxes including the shock absorber, the coordinates of each prediction box and the confidence score are output. Remove prediction boxes with confidence levels below a preset confidence threshold. Based on the coordinates of the remaining prediction boxes, calculate the overlap between the remaining prediction boxes and the prediction box with the highest confidence level, and remove prediction boxes with overlap levels greater than a preset overlap threshold to obtain the prediction target boxes of the vibration damper. The width and height of the predicted target box of the vibration damper are both expanded by a preset ratio to obtain the expanded predicted target box.
3. The method for detecting defects in a vibration damper according to claim 2, characterized in that, The power line image is input into the backbone network of the YOLOv9 object detection model, which outputs a multi-scale feature map of the power line, including: The power line image is input into the convolutional layer, and the initial feature map of the power line is output; the initial feature map of the power line is input into the ELAN1 feature block, and the depth feature map of the power line is output. The power line depth feature map is input into the feature enhancement module, and then downsampled by three downsampling sub-modules connected in series along the forward propagation direction. Based on the output of the three downsampling sub-modules, three downsampled feature maps are obtained. Input the downsampled feature map output from the last downsampled submodule into the SPPELAN feature block, and output a multi-scale fused feature map; Based on three downsampled feature maps and a multi-scale fused feature map, a multi-scale feature map of the power line is obtained.
4. The method for detecting defects in a vibration damper according to claim 3, characterized in that, The multi-scale feature maps of power lines are input into the feature pyramid module of the YOLOv9 target detection model for multi-scale feature fusion, outputting multiple fused feature maps, including: The multi-scale fusion feature map is fused with the downsampled feature map output by the third downsampling submodule to obtain the first feature map; the first feature map is input into the first upsampling module in the upsampling path, and the output of the first upsampling module is fused with the downsampled feature map output by the second downsampling submodule to obtain the second feature map; the second feature map is input into the second upsampling module in the upsampling path, and the output of the second upsampling module is fused with the downsampled feature map output by the first downsampling submodule to obtain the third feature map; The downsampled feature map output by the first downsampling submodule is input into the first downsampling module in the downsampling path. The output of the first downsampling module is fused with the downsampled feature map output by the second downsampling submodule to obtain the fourth feature map. The fourth feature map is input into the second downsampling module in the downsampling path. The output of the second downsampling module is fused with the downsampled feature map output by the third downsampling submodule to obtain the fifth feature map. The fifth feature map is input into the third downsampling module in the downsampling path. The output of the third downsampling module is fused with the multi-scale fusion feature map to obtain the sixth feature map. The first feature map is fused with the sixth feature map to obtain the first fused feature map; the second feature map is fused with the fifth feature map to obtain the second fused feature map; and the third feature map is fused with the fourth feature map to obtain the third fused feature map.
5. The method for detecting defects in a vibration damper according to claim 1, characterized in that, The image of the vibration damper area is input into the encoder for deep feature extraction, and a low-dimensional feature map is output. The low-dimensional feature map is input into the decoder for image reconstruction, and the output is a reconstructed image of the vibration damper region, including: The image of the vibration damper region is input into four cascaded convolutional layers in the encoder for layer-by-layer feature encoding. The spatial size is obtained based on the output of the last convolutional layer. A low-dimensional feature map with 256 channels; The second feature map is input into four cascaded deconvolutional layers in the decoder for layer-by-layer size recovery. The spatial size is obtained based on the output of the last deconvolutional layer. A high-dimensional feature map with 3 channels; The high-dimensional feature map is adaptively weighted using the Sigmoid activation function to obtain the reconstructed image of the vibration damper region.
6. The method for detecting defects in a vibration damper according to claim 1, characterized in that, The formula for calculating the reconstruction error of the vibration damper area image is as follows: , in, Image showing the vibration damper area Reconstruction error; Image showing the vibration damper area The number of pixels; Image showing the vibration damper area The pixel value of the i-th pixel; This represents a reconstructed image of the earthquake-resistant area. This represents the pixel value of the i-th pixel in the reconstructed earthquake-resistant area image.
7. The method for detecting defects in a vibration damper according to claim 1, characterized in that, The process of obtaining the preset error threshold includes: Obtain a dataset containing multiple defect-free vibration damper area image samples; The image samples of the vibration damper area are input into the encoder for deep feature extraction, and the low-dimensional feature map of the sample is output. The low-dimensional feature map of the sample is input into the decoder for image reconstruction, and the reconstructed image samples of the vibration damper area are output. Based on the reconstruction error of each pixel in the image sample of the vibration damper region and the reconstructed image sample of the vibration damper region, the reconstruction error of the image sample of the vibration damper region is calculated. The reconstruction errors of all image samples of the vibration damper area are arranged from smallest to largest, and the aT-th reconstruction error is used as the preset error threshold; where a represents the preset ratio. T represents the number of image samples of the vibration damper area in the dataset.
8. The method for detecting defects in a vibration damper according to claim 1, characterized in that, The color depth of each pixel in the heatmap of the defect area is positively correlated with the reconstruction error of that pixel.
9. A defect detection device for a vibration damper, characterized in that, include: The vibration damper region acquisition module is used to input power line images into the YOLOv9 target detection model, output the predicted target box of the vibration damper, and expand the predicted target box; The power line image is cropped based on the expanded predicted target box to obtain the vibration damper area image; The vibration damper region reconstruction module is used to input the vibration damper region image into the encoder for deep feature extraction and output a low-dimensional feature map. The low-dimensional feature map is input into the decoder for image reconstruction, and the reconstructed image of the vibration damper area is output. The reconstruction error acquisition module is used to calculate the reconstruction error of the vibration damper region image based on the reconstruction error of each pixel point of the vibration damper region image and the reconstructed vibration damper region image, and to determine the magnitude of the reconstruction error of the vibration damper region image compared with the preset error threshold. The global error distribution acquisition module is used to determine that there is an anomaly in the vibration damper if the reconstruction error of the vibration damper area image is greater than a preset error threshold, and to construct a global error distribution map based on the reconstruction error of each pixel of the vibration damper area image and the reconstructed vibration damper area image. The defect region acquisition module is used to filter the global error distribution map using threshold segmentation technology to obtain pixel regions where the reconstruction error of each pixel is greater than a preset error threshold. Based on the reconstruction error of each pixel in the pixel region, the pixel region is converted into a defect region heat map. The defect region heat map is then superimposed on the power line image using a semi-transparent overlay method.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the anti-vibration hammer defect detection method according to any one of claims 1 to 8.