Defect Detection Method for Traction Steel Wire Ropes Based on Improved YOLOv5 Network

Through the improved network traction wire rope defect detection method based on YOLOv5, the existing detection methods are solved by environmental interference and insufficient robustness, achieving higher detection accuracy and frame rate, which is suitable for real-time detection.

CN116740013BActive Publication Date: 2025-06-24HARBIN ENG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310689503.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-12
Publication Date
2025-06-24
Estimated Expiration
2043-06-12

AI Technical Summary

Technical Problem

In the existing wire rope defect detection scheme, the physical sensor-based method is affected by environmental interference, and the machine vision-based method cannot be robust to all defects.

Method used

The traction wire rope defect detection method based on YOLOv5 improved network is adopted, and the image information of the measured wire rope is input to the trained YOLOv5 improved network. Through the backbone network and Neck network structure, combined with the LW-C3 module, the main branch gradient module and the cross-level weighted feature pyramid network, the β_CIoU loss function is used for detection.

Benefits of technology

Compared with traditional machine vision detection methods, it is not limited by manual design filters and can detect and identify more defect features, which are more robust, have higher detection accuracy and higher frame rate, and are suitable for real-time detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116740013B_ABST
    Figure CN116740013B_ABST
Patent Text Reader

Abstract

A method for detecting defects in traction steel ropes based on an improved YOLOv5 network relates to the technical field of industrial defect detection. The present invention is to solve the problems in the existing steel rope defect detection solutions that the method based on physical sensors is subject to environmental interference and has large errors, while the method based on machine vision is not robust to all defects. In the method for detecting defects in traction steel ropes based on the improved YOLOv5 network described in the present invention, the image information of the measured traction steel rope is input into the trained improved YOLOv5 network to obtain the detection result. The improved YOLOv5 network designs a lightweight C3 module in the backbone network to replace the C3 module in the original YOLOv5 backbone network. The Neck network structure is a cross-level weighted feature pyramid network; the loss function of the improved YOLOv5 network is the β_CIoU loss function. The present invention is applicable to the scenario of detecting defects in traction steel ropes and realizes faster and more accurate detection of defects in traction steel ropes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of industrial defect detection, and particularly relates to the detection of traction steel ropes. Background Art

[0002] As a load-bearing member, the traction steel rope plays an increasingly important role in large industrial lifting equipment. While extending the service life of the steel rope, it is also necessary to be able to detect the potential safety hazards of the steel rope in a timely manner to ensure that the steel rope can be detected before it breaks, so as to be repaired and replaced in a timely manner.

[0003] The existing steel rope defect detection schemes include two schemes based on physical sensors and based on machine vision.

[0004] The patent document with the publication number CN 110568059 B and the name of a non-destructive testing method for traction steel ropes discloses that: first, the magnetic flux signal and the magnetic flux leakage signal of the steel rope are collected, and then preprocessed to obtain the characteristic values of both. According to the characteristic values, the width of the steel rope defect is obtained and compared with a preset width threshold to determine whether there is a defect. This technical solution is realized based on the physical sensor method, and the detection process is easily interfered by the physical environment. Therefore, the detection accuracy depends on the size of the physical sensor signal error, and it cannot accurately classify various types of defects.

[0005] The patent document with the publication number CN 114216912 B and the name of a defect detection method for traction steel ropes based on machine vision discloses that: the collected steel rope image is filtered and adaptively binarized to obtain the effective region ROI, and then the features of the ROI region are extracted to obtain the lay length of the steel rope, the position of the defect on the steel rope, and the diameter of the steel rope to achieve comprehensive detection. This technical solution is realized based on the machine vision method. Although it is not interfered by the physical environment, it requires manual intervention for preprocessing, and the filter used for extracting the features is manually set, and it cannot guarantee robustness to all defects. Summary of the Invention

[0006] The present invention aims to solve the problems in the existing steel rope defect detection schemes that the method based on physical sensors is affected by environmental interference and has large errors, while the method based on machine vision does not have robustness to all defects. Now, a defect detection method for traction steel ropes based on an improved YOLOv5 network is provided.

[0007] For the defect detection method of the traction steel rope based on the improved YOLOv5 network, the image information of the measured traction steel rope is input into the trained improved YOLOv5 network to obtain the detection result.

[0008] The improved YOLOv5 network includes a backbone network and a Neck network structure.

[0009] The C3 module in the backbone network is an LW-C3 module. The LW-C3 module includes two DSC-BS modules, a main branch gradient module, a Concat module, and a CBS module. The input ends of the two DSC-BS modules are used as the input ends of the LW-C3 module. The output end of one DSC-BS module is connected to one input end of the Concat module, the output end of the other DSC-BS module is connected to the input end of the main branch gradient module, the output end of the main branch gradient module is connected to the other input end of the Concat module, the output end of the Concat module is connected to the input end of the CBS module, and the output end of the CBS module is used as the output end of the LW-C3 module.

[0010] The main branch gradient module includes a 1×1 convolutional layer, a 1×3 convolutional layer, a 3×1 convolutional layer, a 3×3 convolutional layer, a splicing layer, and a fusion layer. The input signal of the main branch gradient module is respectively input into the 1×1 convolutional layer, the 3×3 convolutional layer, and the fusion layer. The output end of the 1×1 convolutional layer is connected to the input end of the 1×3 convolutional layer, the output end of the 1×3 convolutional layer is connected to the input end of the 3×1 convolutional layer, the output ends of the 3×1 convolutional layer and the 3×3 convolutional layer are both connected to the input end of the splicing layer, the output end of the splicing layer is connected to the input end of the fusion layer, and the output end of the fusion layer is used as the output end of the main branch gradient module.

[0011] The Neck network structure is a cross-level weighted feature pyramid network.

[0012] The loss function of the improved YOLOv5 network is the β_CIoU loss function.

[0013] Furthermore, the above cross-level weighted feature pyramid network includes: a downsampling module, a first dual-feature convolutional module, a second dual-feature convolutional module, a three-feature upsampling convolutional module, and a three-feature downsampling convolutional module.

[0014] The image of the measured traction steel wire rope is used as the input of the cross-level weighted feature pyramid network.

[0015] The downsampling module performs two downsamplings on the image of the measured traction steel wire rope to obtain the feature map P3, performs downsampling on the feature map P3 to obtain the feature map P4, and performs downsampling on the feature map P4 to obtain the feature map P5.

[0016] The feature map P5 is convolved through the LW-C3 module and the SPPF module to obtain the feature map P51, and the feature map P31 is convolved through the LW-C3 module to obtain the feature map P32.

[0017] The first dual-feature convolutional module multiplies the feature maps P4 and P51 by corresponding weights respectively and then performs weighted fusion to obtain the feature map P41.

[0018] The three - feature up - sampling convolution module multiplies the feature maps P3, P41, and P51 by their corresponding weights respectively and then performs weighted fusion to obtain the feature map P31.

[0019] The second double - feature convolution module multiplies the feature maps P32 and P4 by their corresponding weights respectively and then performs weighted fusion to obtain the feature map P42.

[0020] The three - feature down - sampling convolution module multiplies the feature maps P51, P42, and P32 by their corresponding weights respectively and then performs weighted fusion to obtain the output of the cross - level weighted feature pyramid network.

[0021] Furthermore, the information expressions of the feature maps output by the three - feature up - sampling convolution module and the three - feature down - sampling convolution module are both:

[0022]

[0023] where O is the output feature map, w i is the i - th trainable weight value, I i is the i - th input feature map, ε is an anti - overflow value, * represents convolution, i = 1, 2,..., n, n is the total number of weight values, and W is the sum of the n weight values.

[0024] Furthermore, the above ε = 0.001.

[0025] Furthermore, the expression of the above β_CIoU loss function is as follows:

[0026]

[0027]

[0028]

[0029] where IoU is the intersection - over - union, d is the distance between the center points of the predicted box and the ground - truth box, c is the diagonal length of the predicted box and the ground - truth box, α is a parameter for balancing the ratio, ω gt and ω are the widths of the ground - truth box and the predicted box respectively, h gt and h are the heights of the ground - truth box and the predicted box respectively, γ is a scaling factor and γ ∈ (0, 1).

[0030] Furthermore, the above main - branch gradient module includes three convolutional branches. In the first convolutional branch, the input of the main - branch gradient module sequentially passes through a 1×1 convolutional layer, a 1×3 convolutional layer, a 3×1 convolutional layer, a splicing layer, and a fusion layer. In the second convolutional branch, the input of the main - branch gradient module sequentially passes through a 3×3 convolutional layer and a splicing layer. In the third convolutional branch, the input of the main - branch gradient module is directly input to the fusion layer.

[0031] Further, before training the improved YOLOv5 network, a training set is first established. The method for establishing the training set is as follows:

[0032] Collect images of the measured traction steel wire rope and images of the experimental traction steel wire rope. The experimental traction steel wire rope is an experimental traction steel wire rope with artificially added defects, constituting an initial image set.

[0033] Perform sample augmentation on the initial image set to constitute a training set.

[0034] Further, performing sample augmentation on the initial image set includes:

[0035] Perform sample augmentation on the samples using one or more of geometric transformation, spatial transformation, and mosaic enhancement.

[0036] A computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the traction steel wire rope defect detection method based on the improved YOLOv5 network as described above.

[0037] An electronic device includes a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor. The processor executes the computer program to implement the traction steel wire rope defect detection method based on the improved YOLOv5 network as described above.

[0038] The beneficial effects of the present invention include:

[0039] The traction steel wire rope defect detection method based on the improved YOLOv5 network of the present invention, compared with the traditional machine vision detection method, is not limited by artificially designed filters, can detect and identify more defect features, and has higher robustness. In addition, for the traction steel wire rope defect detection scenario, the present invention improves the existing YOLOv5 model. Compared with the existing YOLOv5 model and the mainstream detection algorithm framework, the improved YOLOv5 network has higher detection accuracy and frame rate for steel wire rope defects, and is more suitable for traction steel wire rope defect detection; at the same time, the fast inference speed characteristic of the YOLO framework also proves that real-time detection can be performed, which can provide technical reference for the quality inspection of traction steel wire ropes by maintenance personnel in fields such as the elevator industry. Description of the Drawings

[0040] Figure 1 It is a flowchart of the traction steel wire rope defect detection method based on the improved YOLOv5 network described in the specific implementation manner;

[0041] Figure 2 It is a comparison diagram of the C3 and LW-C3 modules in the improved YOLOv5 network;

[0042] Figure 3 It is the structure diagram of LW-Bottleneck in the improved network of YOLOv5;

[0043] Figure 4 It is the structure diagram of CLW-FPN in the improved network of YOLOv5;

[0044] Figure 5 It is the structure diagram of CLW-Add in the cross-level weighted feature pyramid network structure;

[0045] Figure 6 It is the curve diagram of the β coefficient of β_CIoU varying with γ in the improved network of YOLOv5. Specific implementation manners

[0046] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention. It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.

[0047] Specific implementation manner 1: Refer to Figure 1 This specific implementation manner will be specifically described. The method for detecting defects of traction steel ropes based on the improved network of YOLOv5 described in this implementation manner includes:

[0048] S1. Construct a dataset of traction steel rope defects.

[0049] Collect the defects of the on-site traction steel rope and the defects of the traction steel rope self-made in the laboratory through an industrial camera. The specific method is as follows: Start the traction wheel. While the traction steel rope rotates with the traction wheel, use an industrial camera to collect images of the defects of the traction steel rope, and collect images with a size of 640x640. Perform different degrees of supplementary lighting on the traction steel rope and collect it, so as to increase the steel rope defect samples under different light conditions and make the dataset more diverse. The same is true for photographing the defects of the traction steel rope in the laboratory. A total of 1396 pictures are collected. Thus, a dataset of traction steel rope defects is established. The steel rope defects include core extrusion, surface wear, and surface wire breakage.

[0050] S2: Since there is a lack of samples of traction steel ropes with defects, it is necessary to expand the samples. In this implementation manner, methods such as geometric transformation, spatial transformation, and mosaic enhancement are used to expand the dataset samples and label them.

[0051] Among them, data augmentation and annotation are performed on the images of defects in the traction steel wire ropes. Geometric transformation (flipping, rotation, scaling, etc.), pixel transformation (adding salt and pepper noise, Gaussian noise, adjusting HSV contrast, etc.), Mosaic data augmentation and other methods are mainly used to augment the data of 1396 collected pictures, so as to avoid overfitting during the training process, improve the robustness of the model, and reduce problems such as sample imbalance. Due to limited GPU computing resources, 8 pictures are stitched together, and each picture is randomly geometrically transformed, and finally expanded to 2468 pictures. Three types of defects in the data set, namely core extrusion, surface wear, and surface wire breakage, are labeled in the yolo format to obtain a labeled data set. During this process, defective pictures blurred due to movement are screened out and divided into a training set, a test set, and a validation set according to the ratio of 7:2:1.

[0052] S3: Based on the existing YOLOv5 network structure, an improved YOLOv5 network, namely TWRD-Net, is constructed.

[0053] Step 1: In order to make the model more lightweight and be able to be deployed on hardware devices with lower computing power, in this embodiment, the C3 module in the YOLOv5 backbone network is improved, and an LW-C3 module (lightweight C3 module) is designed. The comparison between the LW-C3 module and the C3 module is as Figure 2 shown. The LW-C3 module includes two DSC-BS (depthwise separable convolution) modules, a main branch gradient module (LW-BottleNeck), a Concat (channel concatenation) module, and a CBS (Conv BN Swish, convolution, batch normalization, Swish activation) module. The input ends of the two DSC-BS modules are used as the input ends of the LW-C3 module. The output end of one DSC-BS module is connected to one input end of the Concat module, and the output end of the other DSC-BS module is connected to the input end of the main branch gradient module. The output end of the main branch gradient module is connected to the other input end of the Concat module. The output end of the Concat module is connected to the input end of the CBS module, and the output end of the CBS module is used as the output end of the LW-C3 module.

[0054] Similar to the C3 module, the above LW-C3 module also uses the idea of CSPNet (cross-stage partial network) to extract and split the flow, and stacks residual structure modules in the main gradient flow. The realization of lightweight of the C3 module to obtain the LW-C3 module is mainly reflected in the following two aspects:

[0055] On the one hand, depthwise separable convolution (DSC) is introduced into the CBS module to obtain the DSC-BS module, where DSConv is the depth convolution module. Combining the convolution characteristics of DSC, the computational cost can be reduced compared with the standard convolution operation under the same input, output, and convolution kernel, where N is the number of output channels and D is the convolution kernel size. K

[0056] On the other hand, the main branch gradient module (LW-BottleNeck) is designed. The main branch gradient module is a lightweight module, including a 1×1 convolution layer, a 1×3 convolution layer, a 3×1 convolution layer, a 3×3 convolution layer, a concatenation layer, and a fusion layer. The input signal of the main branch gradient module is respectively input into the 1×1 convolution layer, the 3×3 convolution layer, and the fusion layer. The output end of the 1×1 convolution layer is connected to the input end of the 1×3 convolution layer, the output end of the 1×3 convolution layer is connected to the input end of the 3×1 convolution layer, the output ends of the 3×1 convolution layer and the 3×3 convolution layer are both connected to the input end of the concatenation layer, the output end of the concatenation layer is connected to the input end of the fusion layer, and the output end of the fusion layer is used as the output end of the main branch gradient module. Among them, the three gradient branches are represented as branch i , i ∈ (1, 2, 3), such as Figure 3 ​As shown in the figure. Among them, the input of the main branch gradient module in the branch1 branch sequentially passes through a 1×1 convolutional layer, a 1×3 convolutional layer, a 3×1 convolutional layer, a splicing layer, and a fusion layer. Adding a 1x1 convolution in the branch1 branch can perform dimensionality reduction processing on the feature map information, reduce the number of calculation parameters and complexity, deepen the network depth, and enhance the robustness. After the 1x1 convolution, a 1x3 convolution and a 3x1 convolution are connected. This structure is an asymmetric convolution. The asymmetric convolution structure composed of this cascading method has the same receptive field as the standard 3x3 convolution, enhancing the network's ability of non-linear expression. In terms of the number of parameters and computational overhead, it can save 33% of the computational overhead and parameters while there is a slight decrease in performance. The input of the main branch gradient module in the branch2 branch sequentially passes through a 3×3 convolutional layer and a splicing layer. The purpose of the 3x3 convolution kernel in the branch2 branch is to maintain the balance between the number of parameters and the model accuracy. Since the LW-BottleNeck structure adopts a lightweight structure, the sharp reduction in the number of parameters will also lead to a sharp drop in the mAP accuracy. By increasing the model width in this way, the model complexity can be increased to a certain extent, and more different feature information of the learning samples can be learned to make up for the accuracy loss caused by the reduction in the number of parameters. The input of the main branch gradient module in the branch3 branch is directly input to the fusion layer. The branch3 branch, as a residual branch, will perform an identity mapping with the Concat of branch1 and branch2. On the one hand, it can solve the problem of network degradation and prevent the training difficulties caused by gradient disappearance or explosion. On the other hand, it divides the gradient flow together with the branch1 and branch2 branches, enabling the gradient to be propagated through different network paths. Finally, the output of the Concat of branch3 and the branch1 and branch2 branches is fused by add, realizing a richer combination of gradient information, being able to enhance the effective information in the convolutional feature map while retaining the semantic information of the input feature map, and finally obtaining the output result.

[0057] Step 2: In order to further improve the positioning ability of the improved YOLOv5 network for insignificant defects of the traction steel wire rope, the Neck network (a series of network layers that mix and combine image features and transfer the image features to the prediction layer) was further improved, and a cross-level weighted feature pyramid network (CLW-FPN) was designed as Figure 4 shown. The cross-level weighted feature pyramid network includes: a downsampling module, two dual-feature convolutional modules (CLW-Add2), a three-feature upsampling convolutional module (CLW-Add3 Up), and a three-feature downsampling convolutional module (CLW-Add3 Down).

[0058] The image of the traction steel wire rope to be measured is used as the input of the cross-level weighted feature pyramid network.

[0059] The downsampling module performs two downsamplings on the image of the traction steel wire rope to be measured to obtain the feature map P3, performs downsampling on the feature map P3 to obtain the feature map P4, and performs downsampling on the feature map P4 to obtain the feature map P5.

[0060] The feature map P5 is convolved through the LW-C3 module and the SPPF module to obtain the feature map P51, and the feature map P31 is convolved through the LW-C3 module to obtain the feature map P32.

[0061] The first dual-feature convolution module multiplies the feature maps P4 and P51 by their corresponding weights respectively and then performs weighted fusion to obtain the feature map P41.

[0062] The three-feature upsampling convolution module multiplies the feature maps P3, P41, and P51 by their corresponding weights respectively and then performs weighted fusion to obtain the feature map P31.

[0063] The second dual-feature convolution module multiplies the feature maps P32 and P4 by their corresponding weights respectively and then performs weighted fusion to obtain the feature map P42.

[0064] The three-feature downsampling convolution module multiplies the feature maps P51, P42, and P32 by their corresponding weights respectively and then performs weighted fusion to obtain the output of the cross-level weighted feature pyramid network.

[0065] In this embodiment, CLW-FPN performs cross-level linking, increasing the information fusion from P51 to P31 and from P32 to P52, removing the link from P41 to P42 in PAN, and linking P4 to P42. Among them, the two groups of P41, P51 and P4, P32 pass through the CLW-Add2 convolution module, and the two groups of P51, P41, P3 and P32, P42, P51 pass through the CLW-Add3 Up / Down convolution module respectively. The structures of CLW-Add2 and CLW-Add3 are as Figure 5 shown. CLW-Add follows the fusion mode of BiFPN. CLW-Add multiplies the two input feature maps by their corresponding weights respectively for weighted fusion, and then outputs the feature map through the CBS module; CLW-Add3 is divided into UpSample and DownSample. Since downsampling requires convolution operations, in order to avoid a huge increase in computational complexity caused by adding convolution operations, a 1x1-sized DSC-BS module is used for downsampling and channel up / down dimension adjustment, which well avoids a large increase in computational complexity and assigns different weights to different input feature maps for weighted processing. This scheme follows the BiFPN scheme. For multiple input CLW-Add modules, the weight distribution formula:

[0066]

[0067] Among them, O is the output feature map, w i is the i-th trainable weight value, I i is the i-th input feature map, ε is an anti-overflow value, * represents convolution, i = 1, 2,..., n, n is the total number of weight values, and W is the sum of n weight values.

[0068] By processing in this way, the model can learn the importance of different input features and can perform differentiated fusion on different input features.

[0069] Step 3: This embodiment is improved based on CIoU, introduces the β coefficient, and proposes the β_CIoU loss function. The specific formula:

[0070]

[0071] The β coefficient is a variable parameter that can accelerate the convergence of CIoU. If it is always a constant, when the distance between the predicted box and the target box is close, it may cause huge fluctuations in the loss. Therefore, the value of the β coefficient depends on the following formula:

[0072]

[0073] Among them, is the ratio of the distance between the center points of the predicted box and the target box to the diagonal distance. Therefore, x ∈ (0, 1). γ is a scaling factor and γ ∈ (0, 1), which controls the change rate of the β coefficient. The curve graph of the β coefficient changing with γ is as Figure 6 shown. It can be seen from the curve graph that the β coefficient will gradually decrease slowly as x decreases. That is, when the distance between the predicted box and the target box is far, x approaches 1, and at this time the β coefficient is the largest, which will increase the coordinate regression loss of the bounding box and accelerate the regression. When the predicted box gets closer and closer to the target box, x approaches 0, and the β coefficient will gradually decrease, reducing the proportion of the coordinate regression loss.

[0074] S4: Use the constructed traction wire rope dataset to load into the model for training, and select the group of models with the highest detection accuracy and detection precision (mAP value) as the training result.

[0075] In this embodiment, after the enhanced dataset samples are divided into a training set, a validation set, and a test set, the training set is loaded into the model for model training, the validation set is used to find the optimal network parameters and adjust the hyperparameters, and the test set is used to verify the generalization performance of the model. Table 1 shows the ablation experiment results of TWRD-Net. The number of parameters, mean average precision (mAP@.5 and mAP@.95), frames per second (FPS), floating point operations (GFLOPs), and accuracy rate are selected as evaluation metrics to evaluate the model performance.

[0076] Comparing Scheme B with Scheme A, in Scheme B, the C3 modules in the backbone network and the bottleneck network of the original YOLOv5-s (Scheme A) model are replaced with the LW-C3 module. It can be seen from the experimental results that after the C3 module is replaced with the LW-C3 module, although mAP@.95 drops by 0.3%, the number of parameters is reduced by 12%, and the floating point operations are reduced by up to 30%. Moreover, with the addition of a 3x3 convolution branch in LW-Bottleneck, mAP@.5 can also increase by 0.7%. Thus, it can be seen that the introduction of DSConv and asymmetric convolution in the LW-C3 module is effective in reducing the model parameters, and the addition of a 3x3 convolution branch in LW-Bottleneck can, to a certain extent, keep the model accuracy unchanged.

[0077] Comparing Scheme C with Scheme B, in Scheme C, the PAN structure is replaced with CLW-FPN on the basis of Scheme B. It can be seen from the experimental results that due to the addition of cross-level feature fusion, the added upsampling and dimension raising and lowering operations increase some of the number of parameters and floating point operations compared with Scheme B, but they are still less than the number of parameters and floating point operations of the original Scheme A. For mAP@.5, there is still a 0.4% increase.

[0078] Comparing Scheme D with Scheme C, in Scheme D, CIoU is replaced with β-CIoU on the basis of Scheme C. It can be seen from the experimental results that the number of parameters and floating point operations of Scheme D and Scheme C are basically the same, and mAP@.5 still increases.

[0079] In addition, this embodiment also compares the experimental results of TWRD-Net with those of other mainstream YOLO detection frameworks on the TWRD dataset, including Yolov3, Yolov3-spp, Yolov4-s, YOLOv5-s, Yolov8-s, and YoloX-s. The mAP@.5, mAP@.95, number of parameters (Parameters), frames per second (FPS), and computational complexity (GFLOPs) for all categories are selected, and the results are shown in Table 2. Through comparison, it can be found that the experimental results of the mainstream YOLO model algorithms on the TRWD dataset are similar. The models of Yolov3-v8 have higher experimental results than those of the YOLOv5 improved network proposed in this embodiment in terms of the mAP@.95 performance index. In particular, Yolov8-s is superior in the mAP@.95 performance index. However, the YOLOv5 improved network is not inferior to other mainstream YOLO algorithm models in terms of the mAP@.5 performance index, and has lower parameter numbers and computational complexity, and maintains a high FPS.

[0080] From the above experimental results, it can be seen that this embodiment can show better detection performance for the improved YOLOv5 improved model - TWRD-Net in the defects of traction steel ropes.

[0081] Table 1 Ablation experiment results of the YOLOv5 improved network

[0082]

[0083]

[0084] Table 2 Calculation results

[0085]

[0086] S5: Deploy the model on the designed traction steel rope defect application software for implementation detection.

[0087] In this embodiment, the traction steel rope defect detection device is a dark box, which includes an industrial camera and a fill light. The diagonal positions are the entrances and exits of the traction steel rope. The traction steel rope defect detection software interface is developed based on the Pyqt module. The software can detect and identify the defects of the traction steel rope by loading the trained model. The input object can be static detection of pictures or real-time detection of video streams. The output results will be counted in the table on the right side of the software, and the defect types and numbers contained in the current picture or video will be displayed in real time. Defect detection is carried out after the detection device is installed and the model is deployed.

[0088] Specific Embodiment 2: A computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the traction wire rope defect detection method based on the improved YOLOv5 network as described in the above Specific Embodiment 1.

[0089] Specific Embodiment 3: An electronic device includes a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor. When the processor executes the computer program, it implements the traction wire rope defect detection method based on the improved YOLOv5 network as described in the above Specific Embodiment 1.

[0090] Although the present invention has been described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present invention. Therefore, it should be understood that many modifications can be made to the exemplary embodiments, and other arrangements can be designed, as long as they do not deviate from the spirit and scope of the present invention defined by the appended claims. It should be understood that different dependent claims and the features described herein can be combined in a manner different from that described in the original claims. It should also be understood that the features described in connection with a single embodiment can be used in other described embodiments.

Claims

1. A defect detection method for traction steel ropes based on an improved YOLOv5 network. The image information of the measured traction steel rope is input into the trained improved YOLOv5 network to obtain the detection result. Characterized in that, The improved YOLOv5 network includes a backbone network and a Neck network structure. The C3 module in the backbone network is an LW-C3 module. The LW-C3 module includes two DSC-BS modules, a main branch gradient module, a Concat module, and a CBS module. The input ends of the two DSC-BS modules are both used as the input end of the LW-C3 module. The output end of one DSC-BS module is connected to one input end of the Concat module, and the output end of the other DSC-BS module is connected to the input end of the main branch gradient module. The output end of the main branch gradient module is connected to the other input end of the Concat module. The output end of the Concat module is connected to the input end of the CBS module. The output end of the CBS module is used as the output end of the LW-C3 module. The main branch gradient module includes a 1×1 convolutional layer, a 1×3 convolutional layer, a 3×1 convolutional layer, a 3×3 convolutional layer, a splicing layer, and a fusion layer. The input signal of the main branch gradient module is respectively input into the 1×1 convolutional layer, the 3×3 convolutional layer, and the fusion layer. The output end of the 1×1 convolutional layer is connected to the input end of the 1×3 convolutional layer. The output end of the 1×3 convolutional layer is connected to the input end of the 3×1 convolutional layer. The output ends of the 3×1 convolutional layer and the 3×3 convolutional layer are both connected to the input end of the splicing layer. The output end of the splicing layer is connected to the input end of the fusion layer. The output end of the fusion layer is used as the output end of the main branch gradient module. The Neck network structure is a cross-level weighted feature pyramid network. The loss function of the improved YOLOv5 network is the β_CIoU loss function.

2. The traction wire rope defect detection method based on the improved YOLOv5 network according to claim 1, wherein, The cross-level weighted feature pyramid network includes: a downsampling module, a first dual-feature convolutional module, a second dual-feature convolutional module, a three-feature upsampling convolutional module, and a three-feature downsampling convolutional module. The image of the measured traction steel rope is used as the input of the cross-level weighted feature pyramid network. The downsampling module performs two downsamplings on the image of the measured traction steel rope to obtain the feature map P3, performs downsampling on the feature map P3 to obtain the feature map P4, and performs downsampling on the feature map P4 to obtain the feature map P5. The feature map P5 passes through the LW-C3 module and the SPPF module for convolution to obtain the feature map P51. The feature map P31 passes through the LW-C3 module for convolution to obtain the feature map P32. The first dual-feature convolutional module multiplies the feature maps P4 and P51 by their corresponding weights respectively and then performs weighted fusion to obtain the feature map P41. The three-feature upsampling convolutional module multiplies the feature maps P3, P41, and P51 by their corresponding weights respectively and then performs weighted fusion to obtain the feature map P31. The second dual-feature convolutional module multiplies the feature maps P32 and P4 by their corresponding weights respectively and then performs weighted fusion to obtain the feature map P42. The three-feature downsampling convolutional module multiplies the feature maps P51, P42, and P32 by their corresponding weights respectively and then performs weighted fusion to obtain the output of the cross-level weighted feature pyramid network.

3. The traction wire rope defect detection method based on the improved YOLOv5 network according to claim 2, wherein, The expression of the feature map information of the outputs of the three-feature upsampling convolution module and the three-feature downsampling convolution module is both: Among them, O is the output feature map, w i is the i-th trainable weight value, I i is the i-th input feature map, ε is an anti-overflow value, * represents convolution, i = 1, 2,..., n, n is the total number of weight values, and W is the sum of the n weight values.

4. The traction wire rope defect detection method based on the improved YOLOv5 network according to claim 3, characterized in that ε = 0.

001.

5. The method for detecting defects of traction steel ropes based on the improved YOLOv5 network according to claim 1, 2, 3 or 4, characterized in that The expression of the β_CIoU loss function is as follows: Among them, IoU is the intersection over union, d is the distance between the center points of the predicted box and the ground truth box, c is the diagonal length of the predicted box and the ground truth box, α is a parameter used to balance the ratio, ω gt and ω are the widths of the ground truth box and the predicted box respectively, h gt and h are the heights of the ground truth box and the predicted box respectively, γ is a scaling factor and γ ∈ (0, 1), 6. The traction steel wire rope defect detection method based on the improved YOLOv5 network according to claim 5, characterized in that The main branch gradient module includes three convolutional branches. In the first convolutional branch, the input of the main branch gradient module sequentially passes through a 1×1 convolutional layer, a 1×3 convolutional layer, a 3×1 convolutional layer, a splicing layer, and a fusion layer. In the second convolutional branch, the input of the main branch gradient module sequentially passes through a 3×3 convolutional layer and a splicing layer. In the third convolutional branch, the input of the main branch gradient module is directly input to the fusion layer.

7. The traction wire rope defect detection method based on the improved YOLOv5 network according to claim 1, characterized in that Before training the improved YOLOv5 network, a training set is first established. The method for establishing the training set is: Collect images of the measured traction wire rope and images of the experimental traction wire rope. The experimental traction wire rope is an experimental traction wire rope with artificially added defects, forming an initial image set. Perform sample augmentation on the initial image set to form a training set.

8. The traction wire rope defect detection method based on the improved YOLOv5 network according to claim 7, characterized in that, Performing sample augmentation on the initial image set includes: Using one or more of geometric transformation, spatial transformation, and mosaic enhancement on the samples to achieve sample augmentation.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed, it implements the method according to any one of claims 1 to 8.

10. An electronic device, comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Non-destructive testing methods and devices for steel wire ropes

    CN110568059B

  • A Machine Vision-Based Defect Detection Method for Traction Steel Wire Ropes

    CN114216912B

  • Light-weight gear surface defect detection method based on MSTA-YOLOv5

    CN115953386A

  • Product defect detection method and apparatus, electronic device and storage medium

    US20210407062A1