Defect detection method for overhead ground wire based on improved YOLOv5 enhanced fuzzy features

CN118968210BActive Publication Date: 2026-10-27CHINA THREE GORGES UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410872526.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2026-10-27
Estimated Expiration
2044-07-01

AI Technical Summary

Technical Problem

[0008]针对现有技术中的上述不足,本发明提供一种基于改进YOLOv5增强模糊特征的架空地线缺陷检测方法,通过自制架空地线断股和散股缺陷的数据集,并对YOLOv5的神经网络结构进行改进,以训练和验证得到适用于架空地线断股和散股缺陷的识别模型,解决了对于架空地线断股和散股这两种模糊特征检测精度不高和检测速度慢的问题

Benefits of technology

[0053]所述S2.1中将Conv模块和C3模块分别换为更轻量化的GhostConv模块和C3Ghost模块,目的在于减小模型参数,加快模型对缺陷的检测速度,使模型在嵌入平台实际部署更容易,使巡检修补机器人能达到实时巡检的要求;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968210B_ABST
    Figure CN118968210B_ABST
Patent Text Reader

Abstract

The overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy feature includes the following steps: making an overhead ground wire broken strand and scattered strand defect data set, and preprocessing the data set to obtain an overhead ground wire broken strand and scattered strand picture training set and a verification set; improving YOLOv5, first, performing lightweight processing on the model; secondly, replacing the SPPF module with the RFB module; thirdly, embedding a layer of SimAM module after the backbone network RFB module; finally, introducing a three-level fusion in the deep layer network of the neck network, and further strengthening the feature expression fusion with the shallow layer network and the middle layer network through the attention convolution module CS module; selecting appropriate equipment and experimental parameters to train and verify the improved YOLOv5 network model to obtain an overhead ground wire broken strand and scattered strand defect detection network model; and evaluating the improved model of the application. The application solves the problems of low detection precision and slow speed of the target recognition network for the two defects of overhead ground wire broken strand and scattered strand with fuzzy features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of overhead ground wire detection technology, specifically relating to an overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features. Background Technology

[0002] The probability of defects in the grounding wire structure is extremely high, and the axial tension of the overhead grounding wire structure will generate a large stress concentration at the defect location. If the defects are not detected and repaired in time, it will eventually lead to broken strands and loose strands in the overhead grounding wire, causing huge economic losses and serious electrical accidents.

[0003] Currently, the main approach to repairing overhead ground wire faults involves power system high-voltage workers locating the broken strand manually and using specialized auxiliary tools to repair it. The broken strand is typically located in the center of the line at the point of greatest stress, requiring specially trained personnel and specialized mobile equipment to reach it. This process exposes workers to high altitudes and strong electromagnetic fields, posing significant risks, time-consuming procedures, and high labor intensity. Furthermore, the need to wear protective suits during repairs further reduces efficiency and flexibility, significantly increasing the workload and risks.

[0004] With the development of smart grids, the development of power grids has become closely integrated with the progress of social technology. Using inspection and repair robots to replace manual repairs can overcome environmental limitations and avoid a large amount of repetitive labor. The image recognition algorithms on these robots can identify defects in overhead ground wires, but different algorithms yield different results in terms of accuracy and efficiency.

[0005] Before the rise of deep learning, the detection of defects in overhead ground wires mainly relied on traditional image processing methods. Traditional image processing typically involves two steps: identifying the target component and using a mathematical model to detect defects. This method can accurately detect component defects, but it requires building corresponding feature extraction algorithms and defect discrimination models for each type of defect, thus its practicality is limited.

[0006] Since the rise of deep learning, image semantic segmentation technology has been applied to various fields by many scholars. This technology performs pixel-level classification, greatly improving the accuracy of defect detection. Compared with traditional image processing methods and machine learning algorithms, one of the main advantages of deep learning is that it does not require manually designed feature extraction, making it effective for detection tasks with different target features and complex image backgrounds. At the same time, deep learning-based image recognition algorithms have better robustness and stronger model generalization ability.

[0007] The overhead ground wire consists of multiple steel wires connected side-by-side internally, and multiple aluminum wires wound in a spiral externally. In the event of a fault, the outer aluminum wires break or unravel. Therefore, physical damage to the overhead ground wire is categorized into broken strands and unraveled strands. Both types of defects can be repaired urgently by inspection and repair robots. However, because broken strands result in wire breakage while unraveled strands do not, the repair methods differ, requiring the robot to classify and identify these two defects. The characteristics of broken strands and unraveled strands are ambiguous due to differences in the number of broken strands and the degree of wire unraveling. Current deep learning algorithms do not offer high accuracy in detecting defects with such ambiguous characteristics. Furthermore, the inspection and repair robot requires a certain detection speed during real-time inspection, typically around 30 FPS for good real-time performance. Summary of the Invention

[0008] To address the aforementioned shortcomings in existing technologies, this invention provides a method for detecting defects in overhead ground wires based on improved YOLOv5 enhanced fuzzy features. By creating a dataset of broken and scattered strand defects in overhead ground wires and improving the neural network structure of YOLOv5, a recognition model suitable for broken and scattered strand defects in overhead ground wires is trained and validated. This solves the problems of low detection accuracy and slow detection speed for these two fuzzy features of broken and scattered strands in overhead ground wires.

[0009] The technical solution adopted in this invention is as follows:

[0010] The overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features includes the following steps:

[0011] Step 1: Obtain a dataset of overhead ground wire broken strand and loose strand defects from the perspective of the inspection and repair robot, and preprocess the dataset to obtain a training set and a validation set of images of overhead ground wire broken strand and loose strand defects.

[0012] Step 2: Improve the YOLOv5 network model to enhance its ability to classify and identify defects with fuzzy characteristics, such as broken strands and scattered strands in overhead ground wires, thereby increasing the model's detection speed;

[0013] Step 3: Use the training and validation sets of the obtained images of broken and scattered strands in overhead ground wires to train and validate the improved YOLOv5 network model, and obtain a network model that can identify broken and scattered strands in overhead ground wires.

[0014] Step 4: Model comparison and evaluation, and improvement effect assessment.

[0015] Step 1 includes the following steps:

[0016] S1.1 The overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features of the present invention is used on the inspection and repair robot. Therefore, the present invention builds an experimental platform based on the perspective of the inspection and repair robot to capture images of broken strands and scattered strands of the overhead ground wire.

[0017] S1.2. Take photos of broken strand defects with different degrees of breakage and different numbers of broken strands, and scattered strand defects with different degrees of dispersion and different numbers of scattered strands; in addition, select different backgrounds such as green fields and sandy fields to take photos of broken strand and scattered strand defects of overhead ground wires.

[0018] The beneficial effects of S1.2 above are: in order to simulate the environment of overhead ground wires in reality, to make the dataset cover as many situations as possible of broken strands and loose strands defects of overhead ground wires, to make the defect identification model achieve better learning effect for the two types of defects with ambiguous features of broken strands and loose strands of overhead ground wires, and to enhance the generalization ability of the model.

[0019] S1.3. Randomly select some images from S1.2 above, and add Gaussian blur to the selected images of broken and scattered strands of overhead ground wires to expand the dataset of images of broken and scattered strands of overhead ground wires.

[0020] The beneficial effects of S1.3 above are as follows: Since the overhead ground wire is located on high ground, the inspection and repair robot will sway due to the wind when it travels on the line, and the image captured by the camera on the robot may become blurry. Therefore, the present invention adds Gaussian blur to some images to simulate the swaying of the robot in reality.

[0021] S1.4. Randomly select some images from S1.2 above, and rotate and translate the selected images of broken strands and loose strands in overhead ground wires to expand the dataset of images of broken strands and loose strands in overhead ground wires.

[0022] The beneficial effects of S1.4 above are as follows: Firstly, the defective features of broken and scattered strands of overhead ground wires have certain location information, so the present invention flips and translates the images; Secondly, it can expand the dataset to a certain extent, so that the model trained later has a stronger generalization ability.

[0023] S1.5 The dataset of this invention contains 3036 images. The LabelImg tool is then used to label the images. The labels are: spread for scattered strands and disconnect for broken strands. Finally, the dataset is divided into training set and validation set in a ratio of 8:2.

[0024] The Gaussian blur calculation formula in S1.3 is as follows:

[0025]

[0026] In the formula: μ and ν represent the x and y coordinates of the coordinates with the fuzzy center as the origin; μ 2 +ν 2 =r 2 Let represent the standard deviation, where r represents the fuzzy radius and σ represents the standard deviation of the normal distribution.

[0027] In step S1.4, the image translation calculation expression is as follows:

[0028]

[0029] In the formula: (x,y) represents the pixel coordinates in the source image, (x′,y′) represents the pixel coordinates after rotation, and θ is the rotation angle of the image.

[0030] The expression for calculating image rotation is as follows:

[0031]

[0032] In the formula: (x,y) represents the pixel coordinates in the source image, (x′,y′) represents the pixel coordinates after translation, x0 is the horizontal translation amount of the image, and y0 is the vertical translation amount of the image.

[0033] Step 2, the improvement of the YOLOv5 network model includes the following steps:

[0034] S2.1 Replace all Conv modules except the first Conv module in the original YOLOv5 network model with the lighter GhostConv module, and replace the C3 module in the original YOLOv5 network model with the lighter C3Ghost module.

[0035] S2.2 Replace the SPPF module in the backbone network with the RFB module;

[0036] S2.3. Embed a SimAM attention module after the above RFB module;

[0037] S2.4. The information in the backbone network is further extracted using the attention convolution module CS, and the middle layer of the neck network is further extracted using the attention convolution module CS. The two feature maps and the feature map at the downsampling point of the deep layer of the neck network are simultaneously integrated into the splicing layer of the deep layer of the neck network to form a three-level fusion structure.

[0038] In step 2, the Conv module in the backbone network of the improved YOLOv5 network model is used to extract features and downsample to reduce the dimension of the input feature map.

[0039] The GhostConv module in the improved YOLOv5 network model serves to extract features and downsample to reduce the dimensionality of the input feature map;

[0040] The computational complexity formulas for the Conv and GhostConv modules are as follows:

[0041] GFLOP (Conv) =nhwCk 2

[0042]

[0043] Where: GFLOP (Conv) Indicates the computational cost of the Conv convolution module; GFLOP (GhostConv) This indicates the computational complexity of the GhostConv convolutional module; n represents the number of feature maps, h represents the feature map height, w represents the feature map width, C represents the number of channels, and k represents the number of channels. 2 and d 2 This indicates a linear operation, and s can be seen as the compression ratio of the two operations, with a value greater than 1; it can be seen that the operation of GhostConv is less than that of the Conv module.

[0044] In step 2, the C3Ghost module in the improved YOLOv5 network model is used to extract features, increase the receptive field, and increase the network depth. Compared with the original C3 module, it has fewer parameters. The bottleneck module in the C3 module is the Bottleneck module, while the bottleneck module in the C3Ghost module is the lighter Ghostbottleneck module. The convolution module in the Bottleneck module is the Conv module, and the convolution module in the Ghostbottleneck module is the GhostConv module. It can be seen that the computational cost of C3Ghost is less than that of the C3 module.

[0045] In step 2, the RFB module in the improved YOLOv5 network model effectively integrates feature information at different scales and increases the receptive field.

[0046] In step 2, the SimAM module in the improved YOLOv5 network model is used to evaluate feature weights, enhance the characteristics of broken and scattered strands in overhead ground wires, and reduce interfering features. This module measures the linear separability between the target neuron and its neighboring neurons by defining an energy function, which can highlight important information. The energy function used to evaluate the importance of different neurons is as follows:

[0047]

[0048] In the formula: t represents the target neuron. μ, Let e ​​be the mean and variance of all neurons except t, and λ be a hyperparameter. The lower the energy value of e, the greater the difference between neuron t and other neurons, and the higher its importance.

[0049] In step 2, the Upsample module in the improved YOLOv5 network model is an upsampling module, which is used to expand the dimensions of the image. The feature map after the Upsample module is expanded to twice its original height and width.

[0050] The Cancat module in the improved YOLOv5 network model is a two-level fusion module with two input channels, one from the backbone network and the other from the upsampling layer above it.

[0051] The TriFusion module in the improved YOLOv5 network model is a three-level fusion module with three inputs. The first input comes from the backbone network (shallow network) and is fed into the three-level fusion module through two CS modules. The second input comes from the middle layer of the neck network and is fed into the three-level fusion module through one CS module. The third input comes from the downsampling convolutional layer above. The CS module in the improved YOLOv5 network model is a convolutional module that integrates the SimAM attention module. This module not only has the functions of extracting features and downsampling to reduce the dimension of the input feature map, but also has the ability to reduce interference signals.

[0052] The beneficial effects of improving the YOLOv5 network model are as follows:

[0053] In S2.1, the Conv module and C3 module are replaced with the lighter GhostConv module and C3Ghost module, respectively. The purpose is to reduce the model parameters, speed up the model's defect detection speed, make the model easier to deploy on the embedded platform, and enable the inspection and repair robot to meet the requirements of real-time inspection.

[0054] Compared to the SPPF module, the RFB module in S2.2 uses convolution operations with multiple branches and convolution kernels of various sizes to extract feature information of defective targets at different scales, and uses dilated convolution to expand the network's receptive field; through the feature map of the RFB module, more detailed feature information can be preserved.

[0055] In S2.3, adding the SimAM attention module after the RFB module can effectively filter out interference information and enhance the feature expression ability of the network entering the neck.

[0056] The two improvement schemes S2.2 and S2.3 can effectively improve the model's learning effect on the two defects of broken and scattered strands of overhead ground wires, which have fuzzy characteristics.

[0057] The improved method in S2.4 considers that the backbone network (shallow network) contains richer location information of the target, while the neck network contains richer semantic information of the target. In this improved method, the first step is to downsample the information in the backbone network through the attention convolution module (CS module) to make the feature map meet the fusion size and enhance the target features. Then, the output feature map is further enhanced by the attention convolution module (CS module) and finally fused into the deep network of the neck network. The second step is to further enhance the feature expression of the information in the middle network of the neck network through the attention convolution module (CS module) and fuse it into the deep network of the neck network. The third step is to integrate the feature map at the downsampled part of the deep network of the neck network into the deep network splicing layer. This method of fusing feature information from the shallow, middle and deep layers can effectively enhance the features and further improve the model's learning effect on the two defects of broken and scattered overhead ground wires with ambiguous features, effectively improving the final detection accuracy.

[0058] Step 3 includes the following steps:

[0059] S3.1 Select appropriate equipment for model training and choose appropriate experimental parameters before training; the model training equipment selected in this invention is as follows: hardware environment uses Windows 11 64-bit, CPU is AMD Ryzen 7 7745HX, RAM is 16G, GPU is NVIDIA GeForce RTX 4060 8G; software environment uses Python programming language, deep learning framework is PyTorch, and training platform is PyCharm;

[0060] Experimental parameters: batch size of 8, initial learning rate of 0.01, momentum of 0.937, optimizer of SGD, and training epochs of 200.

[0061] S3.2 Model training: As the number of training rounds increases, the total loss gradually decreases. When the total loss reaches 200 rounds, the fluctuation of the total loss is stable, indicating that the model has reached its best detection effect on the defects of broken and scattered strands in overhead ground wires.

[0062] S3.3 Evaluation Indicators:

[0063] The evaluation metrics selected in this invention are precision (P), recall (R), mean average precision across all classes (mAP0.5), number of parameters (Params), computational cost (GFLOPs), and frames per second (FPS). Precision, recall, and mean average precision across all classes evaluate the model's detection performance; the number of parameters and computational cost evaluate the model's size; and FPS measures the algorithm's detection speed. A higher FPS value indicates faster detection speed and better real-time performance. Their formulas are as follows:

[0064]

[0065] Params = IK 2 C+C;

[0066]

[0067] In the formula: T P For defect samples that can be correctly detected; F P For defect samples that were incorrectly detected; F N For undetected defect samples; AP is the integral of the PR curve for a certain type of defect; mAP is the average AP of all defects; I is the input size; K is the kernel size; C is the output size; t represents the average time taken by the algorithm to detect one frame of image.

[0068] Step 4 includes the following steps:

[0069] S4.1 Comparison of the improved YOLOv5 network model and the original YOLOv5 model;

[0070] S4.2, Comparison of ablation experiments;

[0071] The specific analysis results for S4.1 and S4.2 are given in subsequent embodiments.

[0072] This invention presents an overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features. It reduces the number of model parameters, accelerates the defect detection speed of the model, improves the inspection speed of the inspection and repair robot, and strengthens feature extraction and feature fusion. It effectively improves the learning effect of the target recognition network on two types of defects with fuzzy features: broken strands and scattered strands in overhead ground wires, and effectively improves the final detection accuracy. Attached Figure Description

[0073] Figure 1 This is a flowchart illustrating the steps of an overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features in an embodiment of the present invention.

[0074] Figure 2 This is a schematic diagram of the original YOLOv5 network structure in an embodiment of the present invention.

[0075] Figure 3 This is a schematic diagram of the structure of the improved YOLOv5 network model in an embodiment of the present invention.

[0076] Figure 4 This is a schematic diagram of the Conv module structure in an embodiment of the present invention.

[0077] Figure 5 This is a schematic diagram of the GhostConv module structure in an embodiment of the present invention.

[0078] Figure 6(a) is a schematic diagram of the C3Ghost module structure in an embodiment of the present invention;

[0079] Figure 6(b) is a schematic diagram of the C3 module structure in an embodiment of the present invention.

[0080] Figure 7 This is a schematic diagram of the Ghostbottleneck module and the Bottleneck module structure in an embodiment of the present invention.

[0081] Figure 8 A schematic diagram of the RFB structure in an embodiment of the present invention.

[0082] Figure 9 This is a schematic diagram of the TriFusion structure in an embodiment of the present invention.

[0083] Figure 10 This is a schematic diagram of the CS module structure in an embodiment of the present invention.

[0084] Figure 11 This represents the training results of the original model in this embodiment of the invention.

[0085] Figure 12 The training results of the improved model in this embodiment of the invention are shown. Detailed Implementation

[0086] Example:

[0087] like Figure 1 The diagram shows the flowchart of an overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features provided by the present invention, which includes the following steps:

[0088] S1. Obtain a dataset of overhead ground wire broken strand and loose strand defects that meet the perspective of the inspection and repair robot, and preprocess the dataset to obtain a training set and a validation set of images of overhead ground wire broken strand and loose strand defects.

[0089] S2. Improve the YOLOv5 network to enhance its ability to classify and identify defects with fuzzy characteristics, such as broken strands and scattered strands in overhead ground wires, thereby improving the model's detection speed.

[0090] S3. The improved YOLOv5 network model is trained and validated using the training and validation sets of the obtained images of broken and scattered strands in the overhead ground wire, resulting in a network model capable of recognizing broken and scattered strands in the overhead ground wire.

[0091] S4. Model comparison and evaluation, and evaluation of improvement effects.

[0092] Step S1 includes the following steps:

[0093] S11. The overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features of the present invention is used on the inspection and repair robot. Therefore, the present invention builds an experimental platform based on the perspective of the inspection and repair robot to capture images of broken strands and scattered strands of the overhead ground wire.

[0094] S12. Take photos of broken strand defects with different degrees of breakage and different numbers of broken strands, as well as scattered strand defects with different degrees of dispersion and different numbers of scattered strands; in addition, select different backgrounds such as green fields and sandy fields to take photos of broken strand and scattered strand defects of overhead ground wires.

[0095] The beneficial effects of S12 above are: in order to simulate the environment of overhead ground wires in reality, to make the dataset cover as many situations as possible of broken strands and loose strands defects of overhead ground wires, to make the defect identification model achieve better learning effect for the two types of defects with ambiguous features of broken strands and loose strands of overhead ground wires, and to enhance the generalization ability of the model.

[0096] S13. Randomly select some images from S12 above, and add Gaussian blur to the selected images of broken and scattered strands of overhead ground wires to expand the dataset of images of broken and scattered strands of overhead ground wires.

[0097] The beneficial effect of S13 above is that, since the overhead ground wire is located on high ground, the inspection and repair robot will sway due to the wind when it travels on the line, and the image captured by the camera on the robot may become blurry. Therefore, the present invention adds Gaussian blur to some images to simulate the swaying of the robot in reality.

[0098] S14. Randomly select some images from S12 above, and rotate and translate the selected images of broken and scattered strands of overhead ground wires to expand the dataset of images of broken and scattered strands of overhead ground wires.

[0099] The beneficial effects of S14 above are as follows: Firstly, the defective features of broken and scattered strands of overhead ground wires have certain location information, so the present invention flips and translates the images; Secondly, it can expand the dataset to a certain extent, so that the model trained later has a stronger generalization ability.

[0100] Furthermore, the calculation expression for Gaussian blur in S13 is as follows:

[0101]

[0102] In the formula, μ and ν represent the x and y coordinates of the coordinates with the fuzzy center as the origin, respectively. 2 +ν 2 =r 2 Let represent the standard deviation, where r represents the fuzzy radius and σ represents the standard deviation of the normal distribution;

[0103] Furthermore, the image rotation calculation expression in S14 is as follows:

[0104]

[0105] In the formula, (x,y) represents the pixel coordinates in the source image, (x′,y′) represents the pixel coordinates after rotation, and θ is the rotation angle of the image;

[0106] Furthermore, the image rotation calculation expression in S14 is as follows:

[0107]

[0108] In the formula, (x,y) represents the pixel coordinates in the source image, (x′,y′) represents the pixel coordinates after translation, x0 is the horizontal translation amount of the image, and y0 is the vertical translation amount of the image.

[0109] S15. The dataset of this invention contains 3036 images. The LabelImg tool is then used to label the images. The labels are: spread for scattered strands and disconnect for broken strands. Finally, the dataset is divided into training set and validation set in a ratio of 8:2.

[0110] Furthermore, S2 improves the YOLOv5 network, enhancing the model's ability to identify two defects with fuzzy characteristics: broken strands and scattered strands in overhead ground wires.

[0111] contrast Figure 2 The original model in the middle, Figure 3 The improvements to the YOLOv5 model are as follows:

[0112] S21. Replace all Conv modules except the first Conv module in the original model with the lighter GhostConv module, and replace the C3 module in the original model with the lighter C3Ghost module.

[0113] S22. Replace the SPPF module in the backbone network with the RFB module;

[0114] S23. Embed a SimAM attention module after the above RFB module;

[0115] S24. The information in the backbone network is further extracted using the attention convolution module CS, and the middle layer of the neck network is further extracted using the attention convolution module CS. The two feature maps and the feature map at the downsampling point of the deep layer of the neck network are simultaneously integrated into the splicing layer of the deep layer of the neck network to form a three-level fusion structure.

[0116] Furthermore, such as Figure 4As shown, the Conv module in the improved YOLOv5 network model in S2 is an example. In this module, the input feature map first undergoes a convolution operation, then a Batch Normalization (BN) neural network, and finally a SiLU activation module. The Conv module's function is to extract features and downsample to reduce the dimensionality of the input feature map.

[0117] Furthermore, the formula for the SiLU activation function is as follows:

[0118]

[0119] Furthermore, Figure 3 In the example, Conv(6,2) represents a Conv convolutional module with a kernel size of 6 and a stride of 2. Its main purpose is to extract features while reducing the dimension of the input feature map, with both the height and width of the feature map being halved.

[0120] Furthermore, such as Figure 5 As shown, the GhostConv module in the improved YOLOv5 network model in S2 is used for feature extraction and downsampling to reduce the dimensionality of the input feature map. This module first uses a small number of convolutional kernels to extract features from the input feature map, then further performs cheaper linear transformation operations on this part of the feature map, and finally generates the final feature map by concatenating them using Cancat. This method reduces the learning cost of non-critical features: that is, by combining a small number of convolutional kernels with cheaper linear transformation operations to replace the conventional convolution method, the computational resource requirements are effectively reduced without affecting the performance of the model.

[0121] Furthermore, Figure 3 GhostConv(3,2) represents a GhostConv convolutional module with a kernel size of 3 and a stride of 2. Its main purpose is to extract features while downsampling the image to reduce the dimension of the feature map, halving both the height and width of the feature map. Figure 3 In the code, GhostConv(1,1) represents a GhostConv convolutional module with a kernel size of 1 and a stride of 1. Its main purpose is to extract features without altering the input feature map.

[0122] Furthermore, the computational complexity formulas for the Conv and GhostConv modules are as follows:

[0123] GFLOP (Conv) =nhwCk 2

[0124]

[0125] In the formula: n represents the number of feature maps, h represents the feature map height, w represents the feature map width, C represents the number of channels, and k 2 and d2 This indicates a linear operation, and s can be seen as the compression ratio of the two operations, with a value greater than 1; it can be seen that the operation of GhostConv is less than that of the Conv module.

[0126] Furthermore, as shown in Figure 6(a), the C3Ghost module in the improved YOLOv5 network model in S2 is used to extract features, increase the receptive field, and increase the network depth. Compared to the original C3 module, it has fewer parameters. The structural diagram of the C3 module is shown in Figure 6(b). The bottleneck module in the C3 module is the Bottleneck module, while the bottleneck module in the C3Ghost module is the lighter Ghostbottleneck module. Figure 7 It can be seen that the convolution module in the Bottleneck module is the Conv module, and the convolution module in the Ghostbottleneck module is the GhostConv module. It can be seen that the computational cost of C3Ghost is less than that of the C3 module.

[0127] Furthermore, such as Figure 8 As shown, the RFB module in the improved YOLOv5 network model in S2 uses convolution operations with multiple branches and convolution kernels of various sizes to extract feature information of defect targets at different scales, effectively fusing feature information of different scales and increasing the receptive field.

[0128] Furthermore, the SimAM module in the improved YOLOv5 network model in S2 is used to evaluate feature weights, enhance the characteristics of broken and scattered strands in overhead ground wires, and reduce interfering features. This module measures the linear separability between the target neuron and its neighboring neurons by defining an energy function, which can highlight important information. The energy function used to evaluate the importance of different neurons is defined as follows:

[0129]

[0130] In the formula: t represents the target neuron. μ, Let be the mean and variance of all neurons except t. λ is a hyperparameter. The lower the energy value of e, the greater the difference between neuron t and other neurons, and the higher its importance.

[0131] Furthermore, in the improved YOLOv5 network model in S2, the Upsample module is an upsampling module, which is used to expand the dimension of the image. The feature map after passing through the Upsample module has its height and width expanded to twice the original size.

[0132] Furthermore, in the improved YOLOv5 network model in S2, the Cancat module is a two-level fusion module with two input channels, one from the backbone network and the other from the upsampling layer above it.

[0133] Furthermore, such as Figure 9 As shown, the TriFusion module in the improved YOLOv5 network model in S2 is a three-level fusion module with three inputs. The first input comes from the backbone network (shallow network) and is input to the three-level fusion module through two CS modules; the second input comes from the middle layer of the neck network and is input to the three-level fusion module through one CS module; and the third input comes from the downsampling convolutional layer above.

[0134] Furthermore, such as Figure 10 As shown, the CS module in the improved YOLOv5 network model in S2 is a convolutional module that integrates the SimAM attention module. The input feature map first undergoes a convolution operation, then passes through the SimAM module, then through a BN neural network, and finally through a SiLU activation module. This module not only has the ability to extract features and downsample to reduce the dimensionality of the input feature map, but also has the ability to reduce interference signals.

[0135] Furthermore, Figure 3 In the middle, CS(3,2) represents a CS attention convolution module with a kernel of 3 and a stride of 2. Its main purpose is to extract features, filter out interference signals, and downsample the image at the same time, thereby reducing the dimension of the feature map. The height and width of the feature map are halved. Figure 3 In this context, CS(1,1) represents a CS attention convolution module with a kernel size of 1 and a stride of 1. Its main purpose is to extract features and filter out interference signals without altering the input feature map.

[0136] The beneficial effects of the improved method in S2 are as follows:

[0137] In S21, the Conv module and C3 module are replaced with the lighter GhostConv module and C3Ghost module, respectively. The purpose is to reduce the model parameters, speed up the model's defect detection speed, make the model easier to deploy on the embedded platform, and enable the inspection and repair robot to meet the requirements of real-time inspection.

[0138] Compared to the SPPF module, the RFB module in S22 uses convolution operations with multiple branches and convolution kernels of various sizes to extract feature information of defective targets at different scales, and uses dilated convolution to expand the network's receptive field; through the feature map of the RFB module, more detailed feature information can be preserved.

[0139] In step S23, adding the SimAM attention module after the RFB module can effectively filter out interference information and enhance the feature expression ability of the neck network.

[0140] The two improvement schemes S22 and S23 can effectively improve the model's learning effect on the two defects with fuzzy features: broken strands and scattered strands in overhead ground wires.

[0141] The improved method in S24 considers that the backbone network (shallow network) contains richer location information of the target, while the neck network contains richer semantic information of the target. In this improved method, the first step is to downsample the information in the backbone network through the attention convolution module (CS module) to make the feature map meet the fusion size and enhance the target features. Then, the output feature map is further enhanced by the attention convolution module (CS module) and finally fused into the deep network of the neck network. The second step is to further enhance the feature expression of the information in the middle network of the neck network through the attention convolution module (CS module) and fuse it into the deep network of the neck network. The third step is to integrate the feature map at the downsampled part of the deep network of the neck network into the deep network splicing layer. This method of fusing feature information from the shallow, middle and deep layers can effectively enhance the features and further improve the model's learning effect on the two defects of broken and scattered strands of overhead ground wires, which have ambiguous features, and effectively improve the final detection accuracy.

[0142] Furthermore, step S3 is as follows:

[0143] S31. Select appropriate equipment for model training, and select appropriate experimental parameters before training; the model training equipment selected in this invention is as follows: hardware environment uses Windows 11 64-bit, CPU is AMD Ryzen 7 7745HX, RAM is 16G, GPU is NVIDIA GeForce RTX 4060 8G; software environment uses Python programming language, deep learning framework is PyTorch, and training platform is PyCharm;

[0144] Experimental parameters: batch size of 8, initial learning rate of 0.01, momentum of 0.937, optimizer of SGD, and training epochs of 200.

[0145] S32. Model training: As the number of training rounds increases, the total loss gradually decreases. When the total loss reaches 200 rounds, the fluctuation of the total loss is stable, indicating that the model has reached its best detection effect on the defects of broken and scattered strands in overhead ground wires.

[0146] S33. Evaluation Indicators:

[0147] The evaluation metrics selected in this invention are precision (P), recall (R), mean average precision across all classes (mAP0.5), number of parameters (Params), computational cost (GFLOPs), and frames per second (FPS). Precision, recall, and mean average precision across all classes evaluate the model's detection performance; the number of parameters and computational cost evaluate the model's size; and FPS measures the algorithm's detection speed. A higher FPS value indicates faster detection speed and better real-time performance. Their formulas are as follows:

[0148]

[0149] Params = IK 2 C+C

[0150]

[0151] In the formula T P For defect samples that can be correctly detected, F P For defect samples that were incorrectly detected, F N For undetected defect samples, AP is the integral of the PR curve for a certain type of defect, and mAP is the average AP for all types of defects; I is the input size, K is the kernel size, and C is the output size; t represents the average time taken by the algorithm to detect one frame of image.

[0152] Furthermore, after completing steps S1-S3, step S4 evaluates the model, with the following specific steps:

[0153] S41. Comparison of the improved YOLOv5 model with the original YOLOv5 model;

[0154] As shown in Table 1 below, by comparing the original YOLOv5 model and the improved model in this embodiment, it can be seen that the improved model is significantly better than the original model. For the accuracy of detecting broken and loose strands in overhead ground wires, the improved model is 4.9% better than the original model; for the recall rate of detecting broken and loose strands in overhead ground wires, the improved model is 3.6% better than the original model; for the average precision across all classes of detecting broken and loose strands in overhead ground wires, the improved model is 4.6% better than the original model. The improved model significantly improves the performance of detecting broken and loose strands in overhead ground wires compared to the original model.

[0155] Regarding model parameters, the improved model reduces them by 1.86 × 10 compared to the original model. 6 The improved model reduces the number of parameters by 26.5%; in terms of computation, it reduces the computation by 6.2% compared to the original model, a reduction of 39.2%, and the detection speed increases by 13.4% year-on-year; the improved model significantly improves the speed of detecting broken strands and loose strands in overhead ground wires compared to the original model.

[0156] Table 1. Parameter Comparison of the Original YOLOv5 Model and the Improved YOLOv5 Network Model

[0157]

[0158] Furthermore, such as Figure 11 The PR curve obtained from training the original model, such as Figure 12 To improve the PR curve obtained from model training, a comparison of the two curves shows that the improved model has improved accuracy in detecting broken strands and loose strands in overhead ground wires compared to the original model. The accuracy in detecting loose strands increased from 84.4% to 90.5%, an improvement of 6.1%, and the accuracy in detecting broken strands increased from 85.7% to 88.7%, an improvement of 3%. The average accuracy across all classes increased from 85% to 89.6%, an improvement of 4.6%. The improved model has significantly improved the detection performance of defects with fuzzy features in broken strands and loose strands in overhead ground wires, and has the effect of clarifying fuzzy features.

[0159] S42. Comparison of ablation experiments;

[0160] As shown in Table 2 below, to verify the improvement effect of the YOLOv5 algorithm in this paper, this embodiment uses ablation experiments to verify each improvement aspect. First, the first group is the original YOLOv5 model without improvement; the second group is the original model that is lightweighted, replacing all Conv modules except the first Conv module with the lighter GhostConv module, and replacing the C3 module in the original model with the lighter C3Ghost module; the third group is based on the second group, replacing the SPPF module with the RFB module; the fourth group is based on the third group, embedding a SimAM module after the RFB module; the fifth group is based on the fourth group, adding a three-level fusion structure introduced by the CS module; the experimental data are shown in Table 2 below.

[0161] Table 2 Experimental Data

[0162]

[0163] As shown in Table 2 above, after model lightweighting, the number of model parameters decreased from 7.02 × 10⁻⁶. 6 It decreased to 3.68 × 10 6 The detection speed decreased by 47.6%, while the detection rate increased by 19.9% ​​year-on-year, achieving a lightweight effect, but the detection accuracy decreased by 1.4%. Replacing the SPPF module with the RFB module improved the detection accuracy by 1.5%. Embedding the SimAM module further improved the detection accuracy by 1.4%. After adding the three-level fusion structure introduced by the CS module, although the number of parameters increased by 8.2 × 10 5However, the detection accuracy was improved by 3.1%, which is a significant improvement. At the same time, the detection speed was improved by 13.4% compared with the original model, reaching 30 FPS. From the above experimental results, it can be seen that each improvement has achieved the expected effect. The final improved model also achieved a simultaneous improvement in detection accuracy and detection speed, and the improvement is significant.

[0164] The principle of the overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features provided by this invention is as follows: Improvements are made to the basic framework of YOLOv5, mainly including: 1. Lightweighting the model; 2. Replacing the SPPF module with the RFB module; 3. Embedding a SimAM module after the RFB module in the backbone network; 4. Introducing a three-level fusion in the deep network of the neck network, which is further enhanced by the attention convolution module CS module in the shallow and middle networks to fuse with the features.

[0165] The improved method provided by this invention reduces the number of model parameters, accelerates the defect detection speed of the model, improves the inspection speed of the inspection and repair robot, strengthens feature extraction and feature fusion, effectively improves the learning effect of the target recognition network on the two defects with fuzzy features, namely broken strands and scattered strands of overhead ground wires, and effectively improves the final detection accuracy.

Claims

1. A method for detecting defects in overhead ground wires based on improved YOLOv5 enhanced fuzzy features, characterized in that... Includes the following steps: Step 1: Obtain a dataset of overhead ground wire broken strand and loose strand defects from the perspective of the inspection and repair robot, and preprocess the dataset to obtain a training set and a validation set of images of overhead ground wire broken strand and loose strand defects. Step 2: Improve the YOLOv5 network model to enhance its ability to classify and identify two types of defects with fuzzy characteristics: broken strands and scattered strands in overhead ground wires. Step 3: Use the training and validation sets of the obtained images of broken and scattered strands in overhead ground wires to train and validate the improved YOLOv5 network model, and obtain a network model that can identify broken and scattered strands in overhead ground wires. Step 2, the improvement of the YOLOv5 network model includes the following steps: S2.1 Replace all Conv modules except the first Conv module in the original YOLOv5 network model with the lighter GhostConv module, and replace the C3 module in the original YOLOv5 network model with the lighter C3Ghost module. S2.2 Replace the SPPF module in the backbone network with the RFB module; S2.

3. Embed a SimAM attention module after the above RFB module; S2.

4. The information in the backbone network is further extracted through the attention convolution module CS, and the middle layer of the neck network is further extracted through the attention convolution module CS. The two feature maps and the feature map at the downsampling point of the deep network of the neck network are simultaneously integrated into the splicing layer of the deep network of the neck network to form a three-level fusion structure. In step 2, the Conv module in the backbone network of the improved YOLOv5 network model is used to extract features and downsample to reduce the dimension of the input feature map. The GhostConv module in the improved YOLOv5 network model serves to extract features and downsample to reduce the dimensionality of the input feature map; The computational complexity formulas for the Conv and GhostConv modules are as follows: ; ; ; In the formula: This indicates the computational cost of the Conv convolution module; This indicates the computational cost of the GhostConv convolutional module; Indicates the number of feature maps. Indicates the feature map height. Indicates the width of the feature map. Indicates the number of channels. and Represents linear operations. This can be seen as the compression ratio of the computational load between the two, and its value is greater than 1; The improved C3Ghost module in the YOLOv5 network model is used to extract features, increase the receptive field, and increase the network depth. The bottleneck module in the C3 module is the Bottleneck module, and the bottleneck module in the C3Ghost module is the lighter Ghostbottleneck module. The convolutional module in the Bottleneck module is the Conv module, and the convolutional module in the Ghostbottleneck module is the GhostConv module. The improved RFB module in the YOLOv5 network model effectively integrates feature information at different scales and increases the receptive field. The SimAM module in the improved YOLOv5 network model is used to evaluate feature weights, enhance the characteristics of broken and scattered strands in overhead ground wires, and reduce interference features. This module measures the linear separability between the target neuron and its neighboring neurons by defining an energy function, which highlights important information. The energy function used to evaluate the importance of different neurons is as follows: ; In the formula: For the target neuron; , To remove The mean and variance of all neurons except those in the group. For hyperparameters, The lower the energy value, the more it indicates The greater the difference between a neuron and other neurons, the higher its importance.

2. The overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features according to claim 1, characterized in that: It also includes step 4: model comparison and evaluation, and improvement effect evaluation.

3. The overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features according to claim 1, characterized in that: Step 1 includes the following steps: S1.

1. An experimental platform was built based on the perspective of the inspection and repair robot to capture images of broken and scattered strands in overhead ground wires. S1.

2. Take photos of broken strand defects with different degrees of breakage and different numbers of broken strands, and scattered strand defects with different degrees of spread and different numbers of scattered strands; in addition, take photos of broken strand and scattered strand defects of overhead ground wires with different backgrounds. S1.

3. Randomly select some images from S1.2 above, and add Gaussian blur to the selected images of broken and scattered strands of overhead ground wires to expand the dataset of images of broken and scattered strands of overhead ground wires. S1.

4. Randomly select some images from S1.2 above, and rotate and translate the selected images of broken strands and loose strands of overhead ground wires to expand the dataset of images of broken strands and loose strands of overhead ground wires. S1.

5. Use the LabelImg tool to label the images. Label the scattered strands as "spread" and the broken strands as "disconnect". Finally, divide the dataset into training and validation sets in an 8:2 ratio.

4. The overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features according to claim 3, characterized in that: The Gaussian blur calculation formula in S1.3 is as follows: ; In the formula: , Represents the x and y coordinates of the coordinates with the fuzzy center as the origin; This represents the standard deviation, where, Indicates the fuzzy radius. It represents the standard deviation of a normal distribution.

5. The overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features according to claim 3, characterized in that: In step S1.4, the image translation calculation expression is as follows: ; In the formula: This represents the pixel coordinates in the source image. This represents the coordinates of the rotated pixel. The rotation angle of the image; The expression for calculating image rotation is as follows: ; In the formula: This represents the pixel coordinates in the source image. This represents the coordinates of the translated pixel. This represents the horizontal translation of the image. This represents the vertical coordinate shift of the image.

6. The overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features according to claim 1, characterized in that: In step 2, the Upsample module in the improved YOLOv5 network model is an upsampling module, which is used to expand the dimension of the image. The feature map after the Upsample module is expanded to twice its original height and width. The Cancat module in the improved YOLOv5 network model is a two-level fusion module with two input channels, one from the backbone network and the other from the upsampling layer above it. The TriFusion module in the improved YOLOv5 network model is a three-level fusion module with three inputs. The first input comes from the backbone network and is fed into the three-level fusion module through two CS modules. The second source is from the middle layer of the neck network, which is input to the three-level fusion module through a CS module; the third source is from the previous downsampling convolutional layer. The CS module in the improved YOLOv5 network model is a convolutional module that integrates the SimAM attention module. This module not only has the functions of extracting features and downsampling to reduce the dimension of the input feature map, but also has the ability to reduce interference signals.

7. The overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features according to claim 1, characterized in that: Step 3 includes the following steps: S3.1 Select equipment for model training and select experimental parameters before training; S3.2 Model training: As the number of training rounds increases, the total loss gradually decreases. When the total loss reaches 200 rounds, the fluctuation of the total loss is stable, indicating that the model has reached its best detection effect on the defects of broken and scattered strands in overhead ground wires. S3.3 Evaluation Indicators: Choose precision (P), recall (R), average precision (mAP) of all classes (0.5), number of parameters (Params), computational cost (GFLOPs), and frame rate per second. Precision, recall, and average precision across all classes evaluate the model's detection performance, while the number of parameters and computational cost evaluate the model's size. Used to measure the detection speed of the algorithm The larger the value, the faster the detection speed and the better the real-time performance. Their formulas are as follows: ; ; ; ; ; In the formula: For defect samples that can be correctly detected; These are defect samples that were incorrectly detected. These are defective samples that were not detected. To integrate the PR curve for a certain type of defect; This is for all types of defects. Take the average value; Input dimensions; The kernel size; Output dimensions; This represents the average time taken by the algorithm to detect one frame of an image.

8. The overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features according to claim 2, characterized in that: Step 4 includes the following steps: S4.1 Comparison of the improved YOLOv5 network model and the original YOLOv5 model; S4.2, Comparison of ablation experiments.

Citation Information

Patent Citations

  • MULTI-TASK PANOPTIC DRIVING PERCEPTION METHOD AND SYSTEM BASED ON IMPROVED YOU ONLY LOOK ONCE VERSION 5 (YOLOv5)

    US20250005914A1