Steel cable defect identification method fusing double-layer routing attention mechanism
By introducing a two-layer routing attention mechanism and an improved spatial pyramid pooling module in the YOLO11s model, the problems of low detection accuracy and high detection difficulty of steel cable cable defects are solved, high-precision and real-time defect recognition are achieved, and the safety and reliability of detection are improved.
Patent Information
- Application Number
- CN202411820561.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, the detection accuracy of steel cable defects is low and the detection difficulty is high, making it difficult to meet the requirements of modern engineering for safety and efficiency.
The YOLO11s model, which integrates the dual-layer routing attention mechanism, improves the model's ability to capture defect characteristics of steel cables through improved spatial pyramid pooling module and dual-layer routing attention mechanism.
It significantly improves the accuracy and detection speed of defect recognition, can realize real-time identification in complex environments, and improves the safety and reliability of detection.
Smart Images

Figure CN119810508A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a steel cable defect detection method based on multi-scale feature fusion. Background Art
[0002] In modern industry and infrastructure construction, steel cables are widely used in bridges, cranes, cableways, and marine engineering. These applications require steel cables to have high strength and durability to withstand huge tension and harsh environmental conditions. However, during long-term use, steel cables are easily affected by various external factors, resulting in defects such as breakage and lightning flashover damage. These defects not only affect the carrying capacity of steel cables, but may even lead to major safety accidents. Therefore, it is particularly important to detect and identify defects in steel cables in a timely and accurate manner.
[0003] Traditional steel cable inspection methods mainly rely on manual inspection, visual inspection and some simple mechanical inspection methods. These methods have the disadvantages of low inspection efficiency, high labor intensity and strong subjectivity of inspection results, which are difficult to meet the requirements of modern engineering for safety and efficiency. With the development of science and technology, automated inspection and intelligent recognition technologies have gradually attracted attention. Among them, computer vision technology has become an important means of steel cable defect detection with its high efficiency and accuracy.
[0004] In the prior art, a wind turbine blade detection method, system, device and storage medium with application number CN202411551982.3 creates a complex data set by acquiring target image information; preprocesses the complex data set to determine the training data set and the verification data set; introduces the C2f_DWR module, ACmix attention module and ADdown module into the preset yolov8 detection model to optimize the model's downsampling module to generate a target detection model; inputs the training data set into the target detection model for training to obtain an improved model; and inputs the verification data set into the improved model to determine the final blade detection result. This type of prior art is not suitable for defect detection of steel cables and ropes for the following reasons:
[0005] 1) This type of technology, model accuracy, and mAP50 are all around 85%, which means there is still a large false detection and missed detection rate, resulting in deviations in the final results, which will bring some measurement deviations to actual engineering and increase safety risks, making it difficult to apply to actual engineering.
[0006] 2) This type of existing technology does not consider the improvement of detection speed. If the detection speed is too slow, it is difficult to achieve the requirements and goals of real-time detection.
[0007] Therefore, the applicant proposed a steel cable defect recognition method integrating a double-layer routing attention mechanism based on the YOLO (You Only Look Once) technology. Summary of the invention
[0008] The purpose of the present invention is to solve the technical problems of low detection accuracy and great detection difficulty of steel cable and rope defects in the prior art pointed out in the background technology, to improve the speed and accuracy of detection through technical improvements to meet the requirements of real-time detection, and to provide a steel cable and rope defect recognition method integrating a double-layer routing attention mechanism.
[0009] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0010] A steel cable defect recognition method integrating a double-layer routing attention mechanism comprises the following steps:
[0011] Step S1: collecting cable images, screening out defective cable images, distinguishing cable defects, and classifying them into lightning flashover defects and broken wire defects;
[0012] Step S2: Use Labelimg to annotate the dataset and divide it into training set, validation set, and test set;
[0013] Step S3: obtaining an improved YOLO11s model for steel cable defect recognition;
[0014] Step S4: Input the obtained data set into the YOLO11s model for steel cable defect recognition, combine the model to identify the acquired steel cable defect image, and use precision Precision, recall Recall, mean average precision mAP and frames per second FPS as evaluation indicators.
[0015] Step S5: Compare the improved model with the original model to verify the prominence of the improved model.
[0016] Step S6: Predict the dataset images and verify the accuracy of the experiment.
[0017] In step S1, cable images are collected on an open source dataset website, and defective cable images are screened out. The defects of the cables are visually distinguished and divided into lightning flashover defects and broken wire defects. Lightning flashover defects are manifested as burns and deformations; broken wire defects are manifested as broken wires and wear. Through screening, a special defect image dataset is established to ensure that the dataset can fully represent the diversity of each defect.
[0018] In step S2, the following steps are included:
[0019] S2.1: After collecting enough images, the images are annotated in detail, and the defect type and location are recorded for the defect area in each image; to ensure the accuracy of the annotation, the annotation results are reviewed and the defect characteristics are confirmed; during the processing of the data set, the Labelimg tool is used to annotate the collected cable images in detail; the defects are divided into two categories: lightning flashover defects and broken wire defects, among which the lightning flashover defect is "thunderbolt" and the broken wire defect is "break";
[0020] S2.2: After the annotation is completed, the entire dataset is divided into training set, validation set and test set to ensure the effectiveness and generalization ability of the model.
[0021] In step S3 and step S4, the YOLO11 model obtained for steel cable defect recognition is specifically:
[0022] Initialize the input image input to the first Conv module (standard convolution module), the output of the first Conv module is connected to the input of the second Conv module, the output of the second Conv module is connected to the input of the first C3k2 module, the output of the first C3k2 module is connected to the input of the third Conv module, the output of the third Conv module is connected to the input of the second C3k2 module, the output of the second C3k2 module is connected to the input of the fourth Conv module, the output of the fourth Conv module is connected to the input of the third C3k2 module, the output of the third C3k2 module is connected to the input of the improved spatial pyramid module FocalModulation module, the output of the improved spatial pyramid module FocalModulation module is connected to the input of the C2PSA_biformer module, and the output of the C2PSA_biformer module is connected to the input of the first Upsample module and the input of the seventh C3k2 module;
[0023] The output of the first Upsample module is connected to the input of the first Concat module, the output of the first Concat module is connected to the input of the fourth C3k2 module, the output of the fourth C3k2 module is connected to the input of the second Upsample module, the output of the second Upsample module is connected to the input of the second Concat module, the output of the second Concat module is connected to the input of the fifth C3k2 module, and the output of the fifth C3k2 module is connected to the input of the first 11Detect detection head module and the input of the fifth Conv module;
[0024] The output of the fifth Conv module is connected to the input of the third Concat module, the output of the third Concat module is connected to the input of the sixth C3k2 module, and the output of the sixth C3k2 module is connected to the input of the sixth Conv module and the input of the second 11Detect detection head module;
[0025] The output of the sixth Conv module is connected to the input of the fourth Concat module, the output of the fourth Concat module is connected to the input of the seventh C3k2 module, and the output of the seventh C3k2 module is connected to the input of the third 11Detect detection head module.
[0026] The output of the first 11Detect detection head module, the output of the second 11Detect detection head module, and the output of the third 11Detect detection head module constitute the output of the overall feature.
[0027] The improved spatial pyramid module FocalModulation is specifically as follows:
[0028] The input features of the improved spatial pyramid module FocalModulation are input to the first Linear module and the second Linear module. The output of the first Linear module is connected to the input of the query module, the output of the second Linear module is connected to the input of the Aggregate module, the output of the q module is connected to the input of the splicing module, the output of the Aggregate module is connected to the input of the Modulator module, the output of the Modulator module is connected to the input of the splicing module, and the output of the splicing module constitutes the output of the total features of the improved spatial pyramid module FocalModulation.
[0029] The C2PSA_biformer module is as follows:
[0030] Input feature information to the Patch Embedding module, the output of the Patch Embedding module is connected to the input of the first Bifomer Block module group, the total output of the first Bifomer Block module group is connected to the input of the first PatchMerging module, the output of the first Patch Merging module is connected to the input of the second Bifomer Block module group, the total output of the second Bifomer Block module group is connected to the input of the second Patch Merging module, the output of the second PatchMerging module is connected to the input of the third Bifomer Block module group, the total output of the third Bifomer Block module group is connected to the input of the third Patch Merging module, the output of the third Patch Merging module is connected to the input of the fourth Bifomer Block module group, and the total output of the fourth Bifomer Block module group is used to output the output features of the C2PSA_biformer module.
[0031] The Biformer Block module is specifically as follows: the feature information is input to the 3*3 DW convolution module and the first splicing module, the output of the DW convolution module is connected to the input of the first splicing module, the output of the first splicing module is connected to the input of the first LN module, the output of the first LN module is connected to the input of the first Bi-level Routing Attention module, the output of the first Bi-level Routing Attention module is connected to the input of the second splicing module, the output of the second splicing module is connected to the input of the third splicing module and the input of the second LN module, the output of the second LN module is connected to the input of the second MLP module, the output of the second MLP module is connected to the input of the third splicing module, and the output of the third splicing module is used to output the output features of the BiformerBlock module.
[0032] Compared with the prior art, the present invention has the following technical effects:
[0033] 1) High-precision defect recognition: By introducing a dual-layer routing attention mechanism and an improved spatial pyramid pooling module, the model of the present invention can effectively capture the subtle defect characteristics of steel cables and ropes, especially the accurate positioning of common defect types such as lightning flashover and wire breakage. This improvement significantly improves the detection accuracy and meets the high-precision requirements of actual engineering.
[0034] 2) Enhanced real-time detection capability: The improved model based on YOLO11s in this invention has a high detection speed and can achieve real-time recognition in industrial and field detection environments. Through lightweight design and optimized feature extraction mechanism, the model can be quickly deployed on embedded devices to meet the real-time inspection requirements of mobile platforms such as drones.
[0035] 3) Improved adaptability to complex environments: The combination of the dual-layer routing attention mechanism and the FocalModulation module enables the model to better cope with detection tasks in complex backgrounds, ensuring high-precision detection under harsh conditions such as variable lighting and noise interference. This adaptability expands the application scenarios of the model and can adapt to steel cable detection in environments such as bridges, cranes, and marine engineering.
[0036] 4) Improved safety and reliability: The present invention can efficiently detect and alarm at the early stage of steel cable defects, timely discover potential safety hazards, prevent possible breakage or major accidents, and thus ensure the safety of people and equipment.
[0037] 5) Multi-scenario application capability: Due to the high efficiency and adaptability of the model design, the present invention is not only suitable for high-altitude inspections by drones, automatic detection of steel cables and ropes on bridges and cableways, but can also be extended to other industrial defect detection applications to meet cross-domain detection needs.
[0038] In summary, the purpose of the present invention is to design a steel cable classification detection method based on multi-scale feature fusion, which can be embedded in the device to improve the accuracy and speed of real-time detection. The method aims to significantly improve the real-time and accuracy of defect detection through the improved YOLO11s model, laying a solid foundation for the algorithm setting and practical deployment of embedded systems. Specifically, the double-layer routing attention mechanism can help the model to more effectively capture long-distance dependent features and enhance the recognition ability of lightning flashover and broken wire defects. At the same time, by adopting spatial pyramid pooling and FocalModulation modules, the detection stability and accuracy of the model in complex backgrounds are further improved. The method has broad application prospects in scenarios such as drone inspections and automated monitoring. It can quickly and accurately detect steel cable defects, avoid safety accidents, and ensure equipment and personal safety; the present invention surpasses traditional detection methods in terms of detection accuracy, real-time and environmental adaptability, and provides technical support for the safe maintenance of steel cables and cables, with significant economic and social value. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0040] Figure 1 It is a schematic diagram of the network structure of the present invention;
[0041] Figure 2 It is a flow chart of the present invention;
[0042] Figure 3 It is a schematic diagram of the structure of the FocalModulation spatial pyramid module in the present invention;
[0043] Figure 4 It is a schematic diagram of the structure of the C2PSA_biformer module in the present invention;
[0044] Figure 5 It is a structural schematic diagram of the Biformer Block module in the present invention;
[0045] Figure 6 This is an example diagram of the detection result of “lightning flashover defect” (thunderbolt) in an embodiment of the present invention;
[0046] Figure 7 This is an example diagram of the detection results of “break defect” (break) in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] A steel cable defect recognition method integrating a double-layer routing attention mechanism comprises the following steps:
[0048] S1. Collect cable images from the open source dataset website, select defective cable images, visually distinguish cable defects, and classify them into lightning flashover defects and broken wire defects, and let laboratory staff review the annotation content;
[0049] S2. Labelimg was used to annotate the dataset and divide it into training set, validation set and test set. There are 919 images in the training set, 265 images in the validation set and 134 images in the test set.
[0050] S3, train under the original YOLO11s model and record relevant indicators;
[0051] S4. Replace the spatial pyramid pooling module (SPPF module) of the original backbone network with the new spatial pyramid pooling module with higher accuracy - FocalModulation module.
[0052] S5. A two-layer routing attention mechanism (Biformer) is introduced at the end of the backbone network and combined with the original C2PSA module to form the C2PSA_biformer module. The Biformer module implements dynamic, query-aware sparse attention and captures long-distance dependencies, thereby improving the C2PSA_biformer module's ability to capture long-distance features.
[0053] S6. Input the obtained data set into the improved YOLO11s model, combine the model to identify the acquired steel cable defect images, and use precision (Precision), recall rate (Recall), mean average precision (mAP) and frames per second (FPS) as evaluation indicators.
[0054] S7. Compare the improved model with the original model to verify the salience of the improved model.
[0055] S8. Prediction dataset images to verify the accuracy of the experiment.
[0056] The improved YOLO11 model includes the backbone network Backbone module group, the neck layer Neck module group, and the detection head Head module group. Backbone is the part of this model used to extract image features, including the standard convolution Conv module, C3k2 module, FocalModulation module, and C2PSA_biformer attention mechanism module; the neck layer Neck module group is the part of this model used to connect the Backbone module and the detection head Head module, including the concat splicing module, the upsample Upsample module, and the C3k2 module; the detection head Head module group is the part of this model used to predict the target bounding box and category probability, including the Detect module.
[0057] The structure of this model is as follows: initialize the input image input to the output of the first Conv module (standard convolution module) and connect it to the input of the second Conv module, the output of the second Conv module is connected to the input of the first C3k2 module, the output of the first C3k2 module is connected to the input of the third Conv module, the output of the third Conv module is connected to the input of the second C3k2 module, the output of the second C3k2 module is connected to the input of the fourth Conv module, the output of the fourth Conv module is connected to the input of the third C3k2 module, the output of the third C3k2 module is connected to the input of the improved spatial pyramid module FocalModulation module, the output of the FocalModulation module is connected to the input of the C2PSA_biformer module, the output of the C2PSA_biformer module is connected to the input of the first Upsample module and the input of the seventh C3k2 module, the output of the first Upsample module is connected to the input of the first Concat module, The output of the first Concat module is connected to the input of the fourth C3k2 module, the output of the fourth C3k2 module is connected to the input of the second Upsample module, the output of the second Upsample module is connected to the input of the second Concat module, the output of the second Concat module is connected to the input of the fifth C3k2 module, the output of the fifth C3k2 module is connected to the input of the first 11Detect detection head module and the input of the fifth Conv module, the output of the fifth Conv module is connected to the input of the third Concat module, the output of the third Concat module is connected to the input of the sixth C3k2 module, the output of the sixth C3k2 module is connected to the input of the sixth Conv module and the input of the second 11Detect detection head module, the output of the sixth Conv module is connected to the input of the fourth Concat module, the output of the fourth Concat module is connected to the input of the seventh C3k2 module, and the output of the seventh C3k2 module is connected to the input of the third 11Detect detection head module. The output of the first 11Detect detection head module, the output of the second 11Detect detection head module, and the output of the third 11Detect detection head module constitute the output of the total feature.
[0058] Specifically, step S1 includes:
[0059] S1.1: When conducting research on cable defect identification, we first systematically collect cable images using open source dataset websites, paying special attention to images that show obvious defects. These defects are mainly divided into lightning flashover defects and broken wire defects. The former are characterized by burns and deformations, while the latter are broken wires and wear. Through screening, a special defect image dataset is established to ensure that it can fully represent the diversity of each defect.
[0060] S1.2: The reviewed labeled data will serve as an important basis for training the YOLO11s model through this systematic data processing process.
[0061] Specifically, step S2 includes:
[0062] S2.1: After collecting enough images, detailed annotations will be performed to record the defect type and location for the defective area in each image. To ensure the accuracy of the annotations, laboratory staff will review the annotation results and use their professional knowledge to confirm the defect characteristics. This review mechanism can effectively eliminate incorrect annotations and subjective biases to ensure the high quality of the final data set. During the processing of the data set, the Labelimg tool was used to annotate the collected cable images in detail. LabelImg is an open source image annotation tool that can efficiently select defective areas in images and add corresponding labels, which provides a solid foundation for subsequent model training. Defects are divided into two categories: lightning flashover defects and broken wire defects. The lightning flashover defect is "thunderbolt" and the broken wire defect is "break":
[0063] S2.2: After the annotation is completed, the entire dataset is divided into training set, validation set and test set to ensure the effectiveness and generalization ability of the model. Specifically, the training set contains 919 annotated images, which will be used to train the YOLO11s model to learn to identify different types of defects. In order to evaluate the performance of the model, 265 images are set as a validation set to facilitate hyperparameter adjustment and model optimization during training. In addition, the test set consists of 134 images for the final model evaluation to verify its performance on unseen data.
[0064] This division method ensures the diversity of the data set and helps to systematically improve the detection accuracy and robustness of the model through different stages of training, verification and testing, providing strong support for cable defect identification;
[0065] Specifically, step S3 includes:
[0066] After labeling and dividing the dataset, training is performed based on the original YOLO11s model. During the training process, a series of relevant indicators are carefully recorded to fully evaluate the performance of the model. These indicators include training loss, validation loss, mean average precision (mAP), recall and precision, speed (FPS), etc.
[0067] By monitoring the training loss, we can determine the convergence of the model during the learning process; the validation loss helps evaluate the performance of the model on the validation set to prevent overfitting. In addition, mean average precision (mAP), a commonly used evaluation criterion in target detection tasks, will provide the comprehensive performance of the model in various defect recognition. The recall rate and precision rate reflect the model's defect detection capability and recognition accuracy, respectively. FPS reflects the real-time and rapid nature of the detection.
[0068] Recording these indicators not only helps analyze the training effect of the model, but also provides a basis for subsequent model optimization. Through regular evaluation and adjustment, the accuracy and reliability of YOLO11s in the cable defect identification task can be continuously improved;
[0069] Specifically, step S4 includes:
[0070] S4: A new spatial pyramid pooling module with higher accuracy, the FocalModulation module, will be used to replace the spatial pyramid pooling module (SPPF module) in the original backbone network.
[0071] The FocalModulation module can more effectively capture multi-scale features by introducing a focal modulation mechanism, thereby enhancing the model's ability to detect complex backgrounds and small targets. The design of this module not only improves the flexibility of feature extraction, but also increases the model's sensitivity to defects at different scales, thereby enhancing the accuracy and robustness of detection.
[0072] The replaced model will accept corresponding data input during the training phase and evaluate the actual effect of the FocalModulation module by recording its performance indicators on the validation set. This improvement can significantly improve the performance of YOLO11s in the cable defect recognition task and provide strong support for more efficient and reliable defect detection.
[0073] Specifically, the operation process of the Focal Modulation spatial pyramid module includes the following steps:
[0074] 1) Focal Contextualization: Use deep convolutional layer stacking to encode visual context at different ranges. Focal Contextualization is a component of Focal Modulation. Focal Contextualization uses a series of depth-wise convolutional layers to encode visual context information at different ranges. These layers can capture visual features from near to far, allowing the network to understand image content at different levels. In this way, the network is able to maintain sensitivity to local details while aggregating contextual information and enhance awareness of global structure.
[0075] 2) Gated aggregation: Through a gating mechanism, contextual information is selectively aggregated into the modulator of each query token. The purpose of gated aggregation is to selectively aggregate contextual information for each query token (i.e., the data unit being processed). This means that the network is able to decide which specific contextual information is important for the query token currently being processed, thereby focusing on the most relevant information.
[0076] 3) Element-wise affine transformation: The aggregated modulator is injected into each query token through affine transformation. Through element-wise affine transformation, the model can adjust the features of each query token more finely, enhancing or suppressing certain features based on contextual information. This fine-tuning mechanism allows the network to better adapt to complex visual scenes and improve the ability to capture details, thereby improving the performance of the model in various visual tasks.
[0077] The benefits of the Focal Modulation space pyramid module are mainly reflected in the following aspects:
[0078] The Focal Modulation spatial pyramid module uses the attention mechanism to focus on key areas in the image, thereby improving the model's recognition ability of these areas. Compared with SPPF, FocalModulation can not only process input images of different sizes, but also more accurately identify and locate objects in the image. This technology is particularly suitable for processing small target objects that are difficult to detect. The basic principle of Focal Modulation Networks (FocalNets) is to replace the Self-Attention module and use the focal modulation mechanism to capture long-distance dependencies and contextual information in the image.
[0079] The structure of the Focal Modulation spatial pyramid module is as follows: the input feature information is connected to the input of the first Linear module and the input of the second Linear module, the output of the first Linear module is connected to the input of the q module, the output of the second Linear module is connected to the input of the Aggregate module, the output of the q module is connected to the input of the splicing module, the output of the Aggregate module is connected to the input of the Modulator module, the output of the Modulator module is connected to the input of the splicing module, and the output of the splicing module is all the features of the output module.
[0080] Specifically, step S5 includes:
[0081] S5: A two-layer routing attention mechanism (Biformer) is introduced at the end of the backbone network and combined with the original C2PSA module to form the C2PSA_biformer module. The Biformer module implements dynamic, query-aware sparse attention and captures long-distance dependencies, thereby improving the C2PSA_biformer module's ability to capture long-distance features.
[0082] Down Figure 1 The overall architecture of BiFormer. The architecture consists of a stack of multiple BiFormer blocks, and can be configured differently depending on the specific task and requirements. BiFormer introduces a two-layer routing attention mechanism to achieve content-aware sparsity in each block, thereby improving computational performance and task performance.
[0083] Down Figure 2 for Figure 1 The structural channel diagram of the key module BiFormer Block in Figure 1 shows the detailed information of the BiFormer block. The BiFormer block is the basic building block of BiFormer and consists of multiple sublayers. These include the self-attention sublayer and the feed-forward neural network sublayer. The self-attention sublayer uses a two-layer routing attention mechanism to adaptively focus on the most relevant key-value pairs based on the query. The feed-forward neural network sublayer performs nonlinear transformation and feature extraction on the attention output through a multi-layer perceptron. This combination makes BiFormer adaptable and expressive, and can perform well in different computer vision tasks.
[0084] The design concept of Biformer is to implement a dynamic, query-aware sparse attention mechanism that can dynamically adjust the feature area of interest based on different queries of the input features. In this way, Biformer can effectively reduce unnecessary calculations and focus on important features, thereby improving the efficiency of the model when dealing with complex scenarios. At the same time, Biformer makes the transfer of features between different levels more flexible through its two-layer routing structure, thereby enhancing the model's ability to capture long-distance features.
[0085] After combining with the C2PSA module, the C2PSA_biformer module can not only use spatial information for effective feature fusion, but also achieve more accurate feature selection through Biformer. This combination enables the model to more keenly perceive key long-distance features when identifying cable defects, improving the accuracy and robustness of detection.
[0086] Through this structural innovation, the C2PSA_biformer module can show better feature extraction capabilities.
[0087] The overall structure of Biformer is as follows: feature information is input to the Patch Embedding module, the output of the Patch Embedding module is connected to the input of the first Bifomer Block module group, the total output of the first Bifomer Block module group is connected to the input of the first Patch Merging module, the output of the first Patch Merging module is connected to the input of the second Bifomer Block module group, the total output of the second Bifomer Block module group is connected to the input of the second PatchMerging module, the output of the second Patch Merging module is connected to the input of the third Bifomer Block module group, the total output of the third Bifomer Block module group is connected to the input of the third Patch Merging module, the output of the third PatchMerging module is connected to the input of the fourth Bifomer Block module group, and the total output of the fourth Bifomer Block module group completes the entire process.
[0088] The structure of Biformer Block, a key submodule of Biformer, is as follows: the feature information is input to the 3*3 DW convolution module and the first splicing module, the output of the DW convolution module is connected to the input of the first splicing module, the output of the first splicing module is connected to the input of the first LN module, the output of the first LN module is connected to the input of the first Bi-level Routing Attention module, the output of the first Bi-level Routing Attention module is connected to the input of the second splicing module, the output of the second splicing module is connected to the input of the third splicing module and the input of the second LN module, the output of the second LN module is connected to the input of the second MLP module, the output of the second MLP module is connected to the input of the third splicing module, and the output of the third splicing module completes the whole process.
[0089] Specifically, step S6 includes:
[0090] The obtained data set is input into the improved YOLO11s model, and the model is combined to identify the steel cable defect images. To evaluate the performance of the model, indicators such as precision, recall, mean average precision (mAP) and frames per second (FPS) are used.
[0091] Specifically, step S7 includes:
[0092] S7: Evaluate the two models using the same test set and record their accuracy and speed in defect detection tasks. The analysis of the results clearly demonstrates the advantages of the improved model in long-distance feature capture and feature extraction capabilities. In addition, the response speed and stability of the improved model when handling complex scenarios will also be key evaluation aspects.
[0093] This comparison will not only help verify the effectiveness of the improvement measures, but will also provide valuable reference for subsequent research and practical applications. Ultimately, through these comparative results, it is possible to clearly point out the advantages of the improved model in cable defect identification, laying the foundation for technological progress in related fields.
[0094] Specifically, step S8 includes:
[0095] S8: After completing model training and evaluation, make predictions on the images in the dataset to verify the accuracy of the experiment. This step will check the performance of the model in the actual defect recognition task by applying the improved YOLO11s model to the images in the test set.
[0096] Specifically, each image is first input into the model, and the defect location and category identified by the model are recorded. By comparing with the annotated real data, the accuracy of the model in defect detection, including recognition rate and positioning accuracy, will be evaluated. At the same time, the model's misidentification and missed detection will be analyzed to further understand the model's limitations and room for improvement.
[0097] The following is a table of analysis of the results compared with the original model
[0098] Table 1 Comparative test results
[0099]
[0100] The platform used for the test of the present invention is Pycharm11.0.15, the model framework is Pytorch1.13.1, the CPU is 15vCPU Intel(R)Xeon(R)Platinum 8358P CPU@2.60GHz, and the GPU is RTX3090, 24GB.
[0101] When setting hyperparameters, the number of training rounds was set to 200, the optimizer used was SGD, and the batch size was set to 16.
[0102] As can be seen from Table 1, the improved model has improved accuracy and speed compared with the original model, and the speed reaches 135.14 frames per second, with good real-time performance and reliability.
[0103] In modern infrastructure construction and maintenance, steel cables, as an important load-bearing material, are widely used in bridges, buildings, and various types of lifting equipment. However, with the increase in service life and changes in environmental conditions, the safety and reliability of steel cables are facing increasingly severe challenges. Lightning flashover and broken wire defects are the main problems affecting the performance of steel cables. These defects may not only lead to a decrease in the load-bearing capacity of the steel cables, but may even cause serious safety accidents. Therefore, carrying out effective steel cable defect detection is of great significance to ensuring public safety and extending the service life of structures.
[0104] The present invention proposes a wire rope defect detection method based on the improved YOLOv11 algorithm, and performs deep learning optimization on the characteristics of lightning flashover defects and broken wire defects. By introducing the improved YOLOv11 algorithm, efficient and accurate detection of wire rope defects is achieved, greatly improving the sensitivity and accuracy of detection. This method can not only monitor the health status of wire ropes in real time, but also automatically process detection data through image recognition technology, reducing the need for manual intervention, thereby improving the efficiency and safety of detection.
[0105] In terms of application background, with the acceleration of urbanization, more and more infrastructure needs to rely on steel cables for support. The safety of these structures is closely related to the status of the steel cables. Any minor defects may lead to unpredictable consequences in a rapidly changing environment. Therefore, regular and effective steel cable inspection has become an indispensable part of various engineering projects.
[0106] In addition, traditional wire rope defect detection methods mostly rely on manual inspection, which has problems such as low efficiency, strong subjectivity and high missed detection rate. By introducing intelligent detection technology, the method described in the present invention can greatly improve the reliability of wire rope detection. The automated detection system based on the improved YOLOv11 algorithm can quickly identify lightning flashover and wire break defects in various complex environments, issue alarms in time, and provide reliable data support for subsequent maintenance and repair.
[0107] In future applications, with the further development of Internet of Things (IoT) and artificial intelligence (AI) technologies, the detection method of the present invention will be able to be combined with various monitoring devices to achieve real-time monitoring and early warning of the status of the steel cable. Such a system will not only be limited to a single detection, but will be able to build a comprehensive steel cable health management platform, providing a solid technical guarantee for the long-term safe operation of infrastructure such as bridges and buildings.
[0108] In summary, the present invention provides a novel and efficient method for detecting defects in steel cables, which fills the gaps in traditional detection technology and provides a new solution for the safe monitoring and maintenance of steel cables.
Claims
1. A steel cable defect recognition method integrating a double-layer routing attention mechanism, characterized in that: The following steps are involved: Step S1: collecting cable images, screening out defective cable images, distinguishing cable defects, and classifying them into lightning flashover defects and broken wire defects; Step S2: Use Labelimg to annotate the dataset and divide it into training set, validation set, and test set; Step S3: obtaining an improved YOLO11s model for steel cable defect recognition; Step S4: Input the obtained data set into the YOLO11s model for steel cable defect recognition, and use the model to recognize the acquired steel cable defect image, and use precision Precision, recall rate Recall, mean average precision mAP and transmission frame rate per second FPS as evaluation indicators; Step S5: Compare the improved model with the original model to verify the prominence of the improved model; Step S6: Predict the dataset images and verify the accuracy of the experiment.
2. The method according to claim 1, characterized in that In step S1, cable images are collected on an open source dataset website, and defective cable images are screened out. Cable defects are visually distinguished and divided into lightning flashover defects and broken wire defects. Lightning flashover defects are characterized by burns and deformations; broken wire defects are characterized by broken wires and wear. Through screening, a special defect image dataset is established to ensure that the dataset can fully represent the diversity of each defect.
3. The method according to claim 1, characterized in that In step S2, the following steps are included: S2.1: After collecting enough images, the images are annotated in detail, and the defect type and location are recorded for the defect area in each image; to ensure the accuracy of the annotation, the annotation results are reviewed and the defect characteristics are confirmed; during the processing of the data set, the Labelimg tool is used to annotate the collected cable images in detail; the defects are divided into two categories: lightning flashover defects and broken wire defects, among which the lightning flashover defect is "thunderbolt" and the broken wire defect is "break"; S2.2: After the annotation is completed, the entire dataset is divided into training set, validation set and test set to ensure the effectiveness and generalization ability of the model.
4. The method according to claim 1, characterized in that: In step S3 and step S4, the YOLO11 model obtained for steel cable defect recognition is specifically: Initialize the input image input to the first Conv module, the output of the first Conv module is connected to the input of the second Conv module, the output of the second Conv module is connected to the input of the first C3k2 module, the output of the first C3k2 module is connected to the input of the third Conv module, the output of the third Conv module is connected to the input of the second C3k2 module, the output of the second C3k2 module is connected to the input of the fourth Conv module, the output of the fourth Conv module is connected to the input of the third C3k2 module, the output of the third C3k2 module is connected to the input of the improved spatial pyramid module FocalModulation module, the output of the improved spatial pyramid module FocalModulation module is connected to the input of the C2PSA_biformer module, and the output of the C2PSA_biformer module is connected to the input of the first Upsample module and the input of the seventh C3k2 module; The output of the first Upsample module is connected to the input of the first Concat module, the output of the first Concat module is connected to the input of the fourth C3k2 module, the output of the fourth C3k2 module is connected to the input of the second Upsample module, the output of the second Upsample module is connected to the input of the second Concat module, the output of the second Concat module is connected to the input of the fifth C3k2 module, and the output of the fifth C3k2 module is connected to the input of the first 11Detect detection head module and the input of the fifth Conv module; The output of the fifth Conv module is connected to the input of the third Concat module, the output of the third Concat module is connected to the input of the sixth C3k2 module, and the output of the sixth C3k2 module is connected to the input of the sixth Conv module and the input of the second 11Detect detection head module; The output of the sixth Conv module is connected to the input of the fourth Concat module, the output of the fourth Concat module is connected to the input of the seventh C3k2 module, and the output of the seventh C3k2 module is connected to the input of the third 11Detect detection head module; The output of the first 11Detect detection head module, the output of the second 11Detect detection head module, and the output of the third 11Detect detection head module constitute the output of the overall feature.
5. The method according to claim 4, characterized in that The improved spatial pyramid module FocalModulation is specifically as follows: The input features of the improved spatial pyramid module FocalModulation are input to the first Linear module and the second Linear module. The output of the first Linear module is connected to the input of the query module, the output of the second Linear module is connected to the input of the Aggregate module, the output of the q module is connected to the input of the splicing module, the output of the Aggregate module is connected to the input of the Modulator module, the output of the Modulator module is connected to the input of the splicing module, and the output of the splicing module constitutes the output of the total features of the improved spatial pyramid module FocalModulation.
6. The method according to claim 4, characterized in that The C2PSA_biformer module is as follows: Input feature information to the Patch Embedding module, the output of the Patch Embedding module is connected to the input of the first Bifomer Block module group, the total output of the first Bifomer Block module group is connected to the input of the first PatchMerging module, the output of the first Patch Merging module is connected to the input of the second Bifomer Block module group, the total output of the second Bifomer Block module group is connected to the input of the second Patch Merging module, the output of the second PatchMerging module is connected to the input of the third Bifomer Block module group, the total output of the third Bifomer Block module group is connected to the input of the third Patch Merging module, the output of the third Patch Merging module is connected to the input of the fourth Bifomer Block module group, and the total output of the fourth Bifomer Block module group is used to output the output features of the C2PSA_biformer module.
7. The method according to claim 6, characterized in that The Biformer Block module is specifically as follows: the feature information is input to the 3*3 DW convolution module and the first splicing module, the output of the DW convolution module is connected to the input of the first splicing module, the output of the first splicing module is connected to the input of the first LN module, the output of the first LN module is connected to the input of the first Bi-level RoutingAttention module, the output of the first Bi-level Routing Attention module is connected to the input of the second splicing module, the output of the second splicing module is connected to the input of the third splicing module and the input of the second LN module, the output of the second LN module is connected to the input of the second MLP module, the output of the second MLP module is connected to the input of the third splicing module, and the output of the third splicing module is used to output the output features of the Biformer Block module.
Citation Information
Patent Citations
Wind turbine generator blade detection method, system and equipment and storage medium
CN119048885A
Cited By
Smoke identification method and system suitable for comprehensive pipe gallery fire
CN121259962A