Wire fault detection method

Through the improved YOLOv8 model, combined with the space depth convolution module and the simplified fast spatial pyramid pooling module, the problem of high miss detection and error detection in automatic wire detection is solved, and higher detection accuracy and speed is achieved, which is suitable for automatic winding machine detection in industrial sites.

CN120085113APending Publication Date: 2025-06-03UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510358974.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

In the prior art, the leakage and error detection rates of automatic wire detection are high, making it difficult to detect and repair wire defects in time during the transformer winding process, resulting in economic losses.

Method used

The improved YOLOv8 model is used for wire fault detection. By introducing the spatial depth convolution module SPD-Conv, replacing the fast space pyramid pooling module as a simplified fast space pyramid pooling module, and improving the use of WIoU for the loss function, the detection accuracy and speed of the model are improved.

Benefits of technology

It improves the accuracy and speed of wire fault detection, reduces the leakage detection rate and error detection rate, and meets the requirements of industrial site automatic winding machines for detection speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120085113A_ABST
    Figure CN120085113A_ABST
Patent Text Reader

Abstract

The invention provides a wire fault detection method, and belongs to the technical field of power fault detection, and the method comprises the steps: collecting wire data in industrial production, and carrying out the preprocessing of the wire data; and according to the preprocessed wire data, performing wire fault detection by using an improved YOLOv8 model. According to the invention, the problems of high omission ratio and false detection rate of automatic detection of the wire are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power fault detection, and particularly relates to a wire fault detection method. Background Art

[0002] As one of the core devices of the power system, transformers are widely used in industry and daily life. It plays a very important role in the stable operation of the power grid. The wire used to wind the transformer coil plays a key role in the quality of the transformer. Traditional wire defect detection mainly relies on manual inspection, which is time-consuming and inefficient. As transformer manufacturers gradually purchase semi-automatic and automatic winding equipment to improve production efficiency, the efficiency of manual inspection can no longer meet the current production efficiency, so it is necessary to introduce automatic detection technology to solve this problem. Currently, deep learning models are widely used to detect defects in various materials, such as steel, aluminum, leather, textiles, etc.

[0003] Due to the partial discharge caused by wire defects, the entire transformer coil will have to be scrapped, resulting in greater economic losses. Therefore, it is necessary to timely find out the wire defects during the winding process in order to repair the defects or take other measures to strengthen the insulation near the wire defects. However, wire defects are diverse in type, complex in background, and different in size, making them difficult to detect. At the same time, when the transformer is produced by an automatic winding machine, the winding speed of the coil is faster, and the real-time detection speed of the model is also higher. Therefore, improving the accuracy and speed of the model in wire defect detection has become the core issue in optimizing the model.

[0004] Currently, deep learning models are widely used to detect defects in various types of materials, such as steel, aluminum, leather, textiles, etc. Some researchers have applied the YOLO model to detect defects such as pores and welding slag generated during the metal welding process. Some researchers, in order to solve the problem of high missed detection rate of the YOLO model when detecting small targets, have introduced various attention mechanisms into the backbone network to enhance the feature extraction ability of the model. Some researchers have optimized the detection ability of the YOLO model in complex environments by improving the convolutional module. Therefore, YOLO, as a benchmark model, has considerable application prospects. Summary of the Invention

[0005] Aiming at the above deficiencies in the prior art, a wire fault detection method provided by the present invention solves the problems of high missed detection rate and false detection rate in wire automatic detection.

[0006] In order to achieve the above purpose, the technical solution adopted by the present invention is a wire fault detection method, including the following steps:

[0007] S1. Collect wire data in industrial production and preprocess it;

[0008] S2. Use the improved YOLOv8 model to detect wire faults based on the preprocessed wire data.

[0009] The beneficial effects of the present invention are as follows: The present invention introduces the Spatial Depth Convolution Module SPD-Conv, enabling the model to better adapt to features of different sizes, better recover the features of small targets, and improve the detection accuracy. Replace the Fast Spatial Pyramid Pooling Module SPPF (Spatial Pyramid Pooling-Fast) with the Spatial Depth Convolution Module SPD-Conv, reducing the computational complexity of the YOLOv8 model and improving the detection speed. Use the WIoU improved loss function to enhance the localization ability of the YOLOv8 model, optimize the anchor box quality, and improve the detection performance. The improved YOLOv8 has a higher average accuracy for grease and dirt, external insulation defects, and internal insulation defects of wires, and faster detection speed. The improved YOLOv8 model can simultaneously meet the requirements of high detection speed and accuracy, meeting the requirements of industrial on-site automatic wire winding machines for detecting wire defects.

[0010] Furthermore, the improvement of the YOLOv8 model is as follows:

[0011] In the backbone network, use the Spatial Depth Convolution Module SPD-Conv to replace the Convolution Module Conv, use the Simplified Fast Spatial Pyramid Pooling SimSPPF to replace the Fast Spatial Pyramid Pooling Module SPPF in the pyramid pooling layer, and use the C2f convolution structure;

[0012] Add a bottom-up path aggregation information in the neck and use the C2f convolution structure;

[0013] Replace the head with the decoupled head structure Decoupled-Hea, separating the regression part from the prediction part.

[0014] The beneficial effects of the above further solutions are as follows: The present invention is to better extract data features, reduce the computational complexity of the YOLOv8 model, and improve the detection speed. First, introduce the Spatial Depth Convolution Module SPD-Conv in the backbone network to replace the product module Conv, so as to better adapt to the sizes of different features, better retain the characteristics of small targets, and improve the detection accuracy. Secondly, replace SPPF with SimSPPF to reduce the computational complexity of the YOLOv8 model and improve the detection speed, and replace the head with the decoupled head structure Decoupled-Hea to change from the anchor box-based method to the anchor-free method.

[0015] Still further, the improved YOLOv8 model includes:

[0016] An input module for receiving the preprocessed wire data;

[0017] The backbone network is used to extract features from the received wire data by using the Spatial Depth Convolution Module (SPD-Conv), obtaining multiple groups of sub-shaped wire images, and fixing the size of the sub-shaped wire images and enhancing the receptive field in the Spatial Pyramid Pooling layer by using the Simplified Fast Spatial Pyramid Pooling (SimSPPF) module. Among them, the C2f convolution structure in the backbone network is used to accelerate the speed while extracting multi-dimensional wire images;

[0018] The neck network is used to aggregate multiple groups of sub-shaped wire images by using a bottom-up path. Among them, the C2f convolution structure in the neck network is used to accelerate the fusion of sub-shaped wire images;

[0019] The head network is used to perform separation processing on the feature map fused by the neck network by using the Decoupled-Head structure to obtain the detection result of wire faults;

[0020] The output layer is used to output the detection result of wire faults.

[0021] The beneficial effects of the above further scheme are as follows: In the backbone network, the Spatial Depth Convolution Module (SPD-Conv) is used to replace the Conv module. The advantage of SPD-Conv is that it is a technology that converts image spatial information into depth information, so that the Convolutional Neural Network (CNN) can learn image features more effectively. This method optimizes the model's processing ability for small objects and low-resolution images by reducing information loss and improving the accuracy of feature extraction. In the pyramid pooling layer, SimSPPF (Simplified Spatial Pyramid Pooling - Fast) is used to replace SPPF (Spatial Pyramid Pooling - Fast). Its advantage is that through multiple max-pooling operations and concatenation operations, the fusion of features at different scales is realized, and finally the fused feature map is converted into the specified number of output channels, which can effectively extract multi-scale features and fuse these features to enhance the model's recognition ability for objects of different sizes. At the same time, the simplified design makes the calculation efficiency higher and improves the real-time performance of model use. The advantage of using the C2f convolution structure is that it extracts and transforms the features of the input data through operations such as feature transformation, branch processing, and feature fusion, generating a more representative output.

[0022] Furthermore, the Spatial Depth Conversion Convolution Module (SPD-Conv) includes a Spatial to Depth layer (SPD) and a non-strided convolution layer;

[0023] The Spatial to Depth layer (SPD) is used to convert the spatial dimension of the input wire data into the depth dimension;

[0024] The non-step convolution layer is used to perform feature extraction based on the transformed depth dimension without reducing the size of the wire feature map, obtaining multiple groups of sub-shaped wire images. During the extraction process, the fine-grained information of the wire feature image is retained.

[0025] The beneficial effect of the above further solution is that in the present invention, the spatial depth convolution module SPD-Conv consists of an SPD layer and a convolution layer. The present invention introduces it into the feature extraction stage to replace the Conv module, thereby improving the wire defect detection ability without adding too much redundancy.

[0026] Furthermore, the expression of the activation function of the simplified fast spatial pyramid pooling module SimSPPF is as follows:

[0027] f(x) = max(0, x)

[0028] where f(x) represents the activation function of the fast spatial pyramid pooling module SimSPPF, and x represents multiple groups of sub-shaped wire images input to the fast spatial pyramid pooling module SimSPPF.

[0029] The beneficial effect of the above further solution is that by using the above activation function in the present invention, the problem of computational complexity caused by exponential calculation can be effectively reduced.

[0030] Furthermore, the expression of the loss function of the improved YOLOv8 model is as follows:

[0031] L = R WIoU ×L IoU

[0032]

[0033] L IoU = 1 - IoU

[0034] where L represents the unweighted loss value of the YOLOv8 model, R WIoU represents the weight coefficient related to the repetition degree of the true value and the predicted value, L IoU represents the error of the predicted value, IoU represents the evaluation index in the field of object detection, measuring the coincidence degree of the predicted value and the true value, c h and c w respectively represent the maximum width difference and the maximum height difference between the predicted bounding box and the true bounding box, and respectively represent the abscissa and ordinate of the center point of the true bounding box, and respectively represent the abscissa and ordinate of the center point of the predicted bounding box.

[0035] The beneficial effects of the above further solution are as follows: The present invention utilizes an improved WIoU loss function and uses a reasonable gradient gain allocation strategy to dynamically optimize the weights of high-quality and low-quality anchor boxes in the loss, which enables the YOLOv8 model to focus on samples of average quality and improves the overall performance of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a structural diagram of the YOLOv8 model.

[0037] Figure 2 It is a structural diagram of the improved YOLOv8 model adopted by the present invention.

[0038] Figure 3 It is a structural diagram of the spatial depth convolution module SPD-Conv.

[0039] Figure 4 It is a flowchart of the method of the present invention.

[0040] Figure 5 It is a schematic diagram of the ground truth box and the predicted box. DETAILED DESCRIPTION OF THE INVENTION

[0041] The following describes the specific embodiments of the present invention to facilitate those skilled in the art of the present technology to understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art of the present technology, as long as various changes are within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions made using the inventive concept of the present invention are within the scope of protection.

[0042] Embodiment

[0043] Due to partial discharge caused by wire defects, the entire transformer coil will have to be scrapped, resulting in greater economic losses. Therefore, it is necessary to promptly find wire defects during the winding process to repair the defects or take other measures to strengthen the insulation near the wire defects. However, wire defects are diverse in type, complex in background, and vary in size, making them difficult to detect. At the same time, when the transformer is produced by an automatic winding machine, the winding speed of the coil is faster, and the real-time detection speed of the model is also higher. Therefore, improving the accuracy and speed of the model in wire defect detection has become the core issue in optimizing the model.

[0044] The YOLO series of models is a single-stage model. The YOLO series of models divides the input image into multiple small regions through a grid. If the center point of the detected object falls into a certain grid, that grid is responsible for predicting the bounding box and confidence of the object, and then screening is completed through non-maximum suppression. As the latest model in the series, the YOLOv8 model is widely used in various scenarios. The YOLOv8 model can be divided into five modes: n, s, m, l, and x according to the width and depth of the network. The size of the network gradually increases, and at the same time, the detection accuracy also gradually improves. YOLOv8s is highly lightweight and has a fast detection speed, making it suitable for detecting wire defects in automatic winding machines. The network structure of the YOLOv8 model is as Figure 1 shown, including four parts: the input part, the backbone network part (Backbone), the neck part (neck), and the head part (head). The YOLOv8 model performs relatively poorly in terms of accuracy, but has a great advantage in detection speed. Its accuracy and speed can generally meet the requirements of wire defect detection. However, for scenarios with complex image backgrounds and dense and overlapping wire arrangements, the recognition ability of the YOLOv8 model still has a large room for improvement.

[0045] To solve the above problems in wire defect detection, the present invention proposes an algorithm based on the improved YOLOv8 to better extract data features, reduce the computational complexity of the YOLOv8 model, and improve the detection speed. First, a spatial depth convolution module SPD-Conv is introduced into the backbone network to replace the convolution module Conv, so as to better adapt to the sizes of different features, better retain the characteristics of small targets, and improve the detection accuracy. Secondly, SimSPPF (Simplified Spatial Pyramid Pooling-Fast) is used to replace SPPF (Spatial Pyramid Pooling-Fast) to reduce the computational complexity of the model and improve the detection speed. Finally, WIoU (Wise IoU, where IoU is the intersection over union) is used to improve the loss function, improve the localization ability of the YOLOv8 model, optimize the quality of the anchor points, and improve the detection ability. The structure of the improved YOLOv8 model is as Figure 2 shown.

[0046] As Figure 4 shown, the present invention provides a wire fault detection method, and its implementation method is as follows:

[0047] S1, Collect wire data in industrial production and preprocess it;

[0048] In this embodiment, collecting wire data in industrial production prepares for the subsequent detection of faults by the model.

[0049] In the present invention, a large number of wire images need to be collected for the data set, including oil stains, external insulation (insulation defect 1), and internal insulation (insulation defect 2). These three defects correspond to the following characteristics: (1) The shape of the oil stain is mostly sheet-like and has various colors. Usually, the place with more oil stains has a darker color, clear contours, while the color of other parts gradually fades from dark to light; (2) The external insulation is made of light-colored glass fiber, and most of the damage is caused by collision or friction. The edge of the damage is rough and irregular, often exposing the transparent internal insulation and internal metal wires; (3) The internal insulation is made of semi-transparent polytetrafluoroethylene. The wire defect caused by the damage of the internal insulation will directly expose the metal wire.

[0050] S2. According to the preprocessed wire data, use the improved YOLOv8 model to detect wire faults.

[0051] In this embodiment, the improvement of the YOLOv8 model is as follows:

[0052] In the backbone network, use the Spatial Depthwise Convolution Module SPD-Conv to replace the convolution module Conv, use the Simplified Fast Spatial Pyramid Pooling SimSPPF to replace the Fast Spatial Pyramid Pooling Module SPPF in the Pyramid Pooling layer, and use the C2f convolution structure;

[0053] Add a bottom-up path in the neck to aggregate information, and use the C2f convolution structure;

[0054] Replace the head with the Decoupled-Hea structure to separate the regression part from the prediction part.

[0055] In this embodiment, the improved YOLOv8 model includes:

[0056] An input module for receiving the preprocessed wire data;

[0057] A backbone network for using the Spatial Depthwise Convolution Module SPD-Conv to extract features from the received wire data, obtaining multiple groups of sub-shaped wire images, and using the Simplified Fast Spatial Pyramid Pooling SimSPPF module in the Pyramid Pooling layer to fix the size of the sub-shaped wire images and enhance the receptive field. Among them, use the C2f convolution structure in the backbone network to speed up while extracting multi-dimensional wire images;

[0058] A neck network for aggregating multiple groups of sub-shaped wire images using a bottom-up path. Among them, use the C2f convolution structure in the neck network to accelerate the fusion of sub-shaped wire images;

[0059] A head network for using the Decoupled-Hea structure to separate the feature map fused by the neck network to obtain the detection result of wire faults;

[0060] An output layer for outputting the detection result of the wire fault.

[0061] In this embodiment, the spatial depth convolution module SPD-Conv includes a spatial-to-depth layer SPD and a non-strided convolution layer; the spatial-to-depth layer SPD is used to convert the spatial dimension of the input wire data into the depth dimension; the non-strided convolution layer is used to perform feature extraction based on the converted depth dimension without reducing the size of the wire feature map, obtaining multiple groups of sub-shaped wire images, where the fine-grained information of the wire feature image is retained during the extraction process.

[0062] In this embodiment, the backbone network of the YOLOv8 model receives the input data after processing such as Mosaic data augmentation and adaptive anchor box calculation. These data are extracted through convolution operations and then use the SPPF module for fast pyramid pooling to complete the feature extraction of the backbone network part. The backbone network replaces the C3 structure in YOLOv5 with a simpler and richer gradient flow C2f structure, which reduces one convolution process, thus accelerating the network speed while ensuring the ability to extract multi-dimensional information. The Neck contains the classic PAFPN architecture, but adds a bottom-up path to aggregate information, realizing the fusion of up and down information flows and improving the multi-scale feature extraction ability. In addition, in the Neck of the YOLOv8 model, the C3 module is also replaced by the C2f module to accelerate feature fusion. The Head is replaced by the mainstream decoupled head structure Decoupled-Head, separating the regression part from the prediction part, and also changing from an anchor box-based method to an anchor-free method. Sort according to the score weighted values of classification and regression of the YOLOv8 model, and select the top K highest positive samples. The formula for calculating the weighted alignment metric align metric is as follows:

[0063] align metric = s α *u β

[0064] where s represents the classification score for all pixels, u represents the intersection over union (IOU) of the predicted box and the ground truth box, and both α and β represent hyperparameters used to control the weights.

[0065] When the image resolution is high and the size of the detection object is moderate, the wire image contains sufficient redundant pixel information. Even if these redundant pixel information are skipped during the convolution process, the model can still effectively learn features. However, in more complex tasks, such as cases involving blurred images and small objects, the features obtained are no longer redundant but some details are lost, which seriously damages its ability to learn features. Small objects are difficult to be detected due to low resolution and limited available information.

[0066] In the YOLOv8 model, when the image resolution in the task is low or the detection object is small, the detection performance of the Conv (convolution layer) will drop rapidly. The present invention introduces the spatial-to-depth convolution SPD-Conv into the backbone network and the neck, which can significantly improve the performance of the YOLOv8 model in dealing with complex tasks of low-resolution images and small objects. The spatial-depth convolution module SPD-Conv consists of a spatial-to-depth layer SPD and a convolution layer. The present invention introduces it into the feature extraction stage to replace the Conv module, thereby improving the wire defect detection ability without adding too much redundancy. Figure 3 The structure of the spatial-depth convolution module SPD-Conv is shown.

[0067] In this embodiment, the spatial-depth convolution module SPD-Conv is composed of a spatial-to-depth layer SPD and a non-strided convolution layer. The spatial-to-depth layer SPD is a conversion layer that converts the spatial dimension of the input wire image into the depth dimension, thereby increasing the depth of the feature map without losing information. By using the spatial-to-depth layer SPD, as much spatial information as possible can be retained when processing low-resolution images and small objects. This layer avoids information loss in traditional strided convolution and pooling operations by converting the information in the spatial dimension into the depth dimension. The non-strided convolution layer is a convolution layer applied after the conversion of the spatial-to-depth layer SPD, without using a stride, to retain fine-grained information. Non-strided convolution can perform feature extraction without reducing the size of the wire feature map, further maintaining the fine-grained information of the wire image, which is crucial for improving the recognition performance of low-resolution images and small objects.

[0068] Figure 3 The feature map of the spatial-depth convolution module SPD-Conv is shown, demonstrating the slicing process of the input wire feature map. After pruning, four groups of sub-shaped images are obtained, and the number of channels of each sub-shaped image is the same as that of the input wire feature map. In this way, all the sub-feature information is retained.

[0069] In this embodiment, to ensure the real-time performance of wire defect detection, a SimSPPF module (Simplified Spatial Pyramid Pooling - Fast) is introduced. This SimSPPF module effectively reduces the computational complexity and processing time. It connects three 5x5 max-pooling layers to process the input data to achieve a fixed-size wire feature map and enhances the receptive field of the model. In this part, the SiLU activation function in the SPPF module (Spatial Pyramid Pooling - Fast) is replaced by the ReLU activation function in the SimSPPF module. These activation functions are represented by the following equations:

[0070] ReLU function: f(x) = max(0, x)

[0071] SiLU function:

[0072] Among them, f(x) represents the activation function of the SimSPPF module, and x represents multiple groups of sub-shaped wire images input to the SimSPPF module of the fast spatial pyramid pooling.

[0073] If the SiLU function is used, the computational complexity will increase due to exponential calculations. Therefore, the ReLU function is applied to accelerate convergence.

[0074] In this embodiment, the YOLOv8 model uses the computer intersection over union (CIoU) to calculate the regression loss of the bounding box. However, the CIoU has the following disadvantages: First, when the dataset contains a large number of low-quality samples, the performance of the CIoU is poor. Second, the aspect ratio used by the CIoU cannot reflect the true difference between the two boxes when the ground truth box and the predicted box overlap. Third, the calculation of the CIoU involves many parameters, such as inverse trigonometric functions and various calculation steps, which require a large amount of calculations. The calculation formula of the CIoU is shown in the following equation:

[0075]

[0076] In the above equation, IoU represents the intersection over union of the predicted box and the ground truth box, ρ(b, b gt ) represents the Euclidean distance between the centers of the ground truth box and the predicted box, h and w respectively represent the height and width of the predicted box, h gt and w gt respectively represent the height and width of the ground truth box, c h and c wrespectively represent the maximum width difference and maximum height difference between the predicted box and the ground truth box.

[0077] EIoU (Efficient-IoU, efficient intersection over union, IoU is intersection over union) is an improvement based on the computer intersection over union CIoU, which reflects the differences in width and height between the ground truth box and the predicted box, and is more reasonable than the computer intersection over union CIoU. EIoU is shown in the following equation:

[0078]

[0079] In the above equation, ρ(h, h gt ) and ρ(w, w gt ) respectively represent the minimum width difference and minimum height difference between the predicted box and the ground truth box, and respectively represent the coordinates of the center points of the ground truth box and the predicted box.

[0080] In this embodiment, different from the above several mainstream loss functions using static focusing mechanisms, the improved WIoU method uses a dynamic non-monotonic focusing mechanism to evaluate the quality of anchor boxes and adopts a more reasonable gradient gain allocation strategy. L applies an attention-based predicted box loss, which introduces a distance-based attention mechanism. When the target box overlaps with the predicted box within a certain range, the model can obtain better generalization ability. The formula for calculating L is shown in the following equation:

[0081] L = R WIoU × L IoU

[0082]

[0083] L IoU = 1 - IoU

[0084] Among them, L represents the unweighted loss value of the YOLOv8 model, R WIoU represents the weight coefficient related to the repetition degree of the ground truth value and the predicted value, L IoU represents the error of the predicted value, c h and c w respectively represent the maximum width difference and maximum height difference between the predicted box and the ground truth box, and respectively represent the abscissa and ordinate of the center point of the ground truth box, and respectively represent the abscissa and ordinate of the center point of the predicted box, as Figure 5 shown in the figure, where w and h respectively represent the width and height of the predicted box, w gt and h gt respectively represent the width and height of the ground truth box, ρ(h, hgt ) and ρ(w, w gt ) represent the minimum width difference and the minimum height difference between the predicted bounding box and the ground truth bounding box, respectively.

[0085] In this embodiment, an outlier β is introduced into the improved WIoU loss function to measure the quality of the anchor box. Based on β, a non-monotonic focusing factor r is constructed to improve L. The magnitude of the outlier is positively correlated with the quality of the anchor box. Therefore, for an anchor box with a smaller degree of outlier, a smaller gradient gain is assigned, while for an anchor box with a larger degree of outlier, a larger gradient gain is assigned. The improved WIoU loss function uses a reasonable gradient gain allocation strategy to dynamically optimize the weights of high-quality and low-quality anchor boxes in the loss, which enables the model to focus on samples of average quality and improves the overall performance of the YOLOv8 model. The formula for the improved WIoU is shown in the following equation. Both α and δ represent hyperparameters and can be adjusted according to different YOLOv8 models.

[0086] By comparing the loss functions of the above different versions, the optimized loss function is introduced into the improved WIoU as the loss function. The improved WIoU loss function not only takes into account some advantages of EIoU and SIoU, but also uses a dynamic non-monotonic mechanism to evaluate the quality of the anchor box, which improves the object localization ability of the YOLOv8 model. For wire defect detection, the high proportion of small objects increases the difficulty of detection. The improved WIoU loss function can dynamically optimize the loss weights of small objects, thereby improving the wire fault detection performance of the YOLOv8 model.

[0087] In summary, the improved YOLOv8 model can simultaneously meet the requirements of high detection speed and accuracy, and meet the requirements of the industrial on-site automatic wire winding machine for detecting wire defects.

Claims

1. A wire fault detection method, characterized in that: The following steps are involved: S1. Collect wire data in industrial production and pre-process it; S2. Based on the preprocessed wire data, the improved YOLOv8 model is used to detect wire faults.

2. The wire fault detection method according to claim 1, characterized in that: The improvements of the YOLOv8 model are as follows: In the backbone network, the spatial depth convolution module SPD-Conv is used to replace the convolution module Conv, and in the pyramid pooling layer, the simplified fast spatial pyramid pooling SimSPPF is used to replace the fast spatial pyramid pooling module SPPF, and the C2f convolution structure is used; Add a bottom-up path to aggregate information at the neck and use the C2f convolution structure; The head is replaced with the decoupled-Hea structure to separate the regression part from the prediction part.

3. The wire fault detection method according to claim 2, characterized in that: The improved YOLOv8 model includes: An input module, used for receiving pre-processed conductor data; The backbone network is used to extract features from the received wire data using the spatial deep convolution module SPD-Conv to obtain multiple groups of sub-shaped wire images, and to fix the size of the sub-shaped wire images and enhance the receptive field using the simplified fast spatial pyramid pooling SimSPPF module in the spatial pyramid pooling layer, wherein the C2f convolution structure in the backbone network is used to accelerate the speed while extracting multi-dimensional wire images; A neck network is used to aggregate multiple groups of sub-shape wire images using a bottom-up path, wherein a C2f convolution structure in the neck network is used to accelerate the fusion of the sub-shape wire images; The head network is used to separate and process the feature map fused by the neck network using the decoupled-Hea structure to obtain the detection result of the wire fault; The output layer is used to output the detection results of wire faults.

4. The wire fault detection method according to claim 3, characterized in that: The spatial depth conversion convolution module SPD-Conv includes a spatial to depth layer SPD and a non-step convolution layer; The space-to-depth layer SPD is used to convert the spatial dimension of the input wire data into a depth dimension; The non-strided convolution layer is used to perform feature extraction based on the converted depth dimension without reducing the size of the wire feature map to obtain multiple groups of sub-shape wire images, wherein the fine-grained information of the wire feature image is retained during the extraction process.

5. The wire fault detection method according to claim 2, characterized in that: The expression of the activation function of the simplified fast spatial pyramid pooling module SimSPPF is as follows: f(x)=max(0,x) Wherein, f(x) represents the activation function of the fast spatial pyramid pooling module SimSPPF, and x represents multiple groups of sub-shape wire images input to the fast spatial pyramid pooling module SimSPPF.

6. The wire fault detection method according to claim 2, characterized in that: The expression of the loss function of the improved YOLOv8 model is as follows: L=R WIoU ×L IoU L IoU =1-IoU Among them, L represents the unweighted loss value of the YOLOv8 model, R WIoU Represents the weight coefficient related to the repeatability of the true value and the predicted value, L IoU represents the error of the predicted value, IoU represents the evaluation index in the field of target detection, which measures the overlap between the predicted value and the true value, c h and c w Represent the maximum width difference and maximum height difference between the predicted box and the real box, respectively. and Respectively represent the horizontal and vertical coordinates of the center point of the real frame, and Represent the horizontal and vertical coordinates of the center point of the prediction box respectively.