Steel cable surface defect detection method based on improved SSD algorithm
Through improved SSD algorithm and related optimization technology, a neural network for surface defect detection of steel cables is constructed, which solves the problems of noise sensitivity and low detection accuracy of small-size defects in the existing technology, and achieves high accuracy and real-time steel cable surfaces Defect detection.
Patent Information
- Application Number
- CN202411509073.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is sensitive to image noise in the detection of steel cable surface defects, and the detection accuracy of small-size defects is low, resulting in false positive or false negative, affecting the detection accuracy.
Using an improved SSD algorithm, a neural network for detecting steel cable surface defects was constructed, RestNet18 was introduced as the backbone, one-way feature fusion block and improved CBAM attention module, and Focalloss was used as a loss function to optimize the prior box to improve detection accuracy.
It improves the accuracy and real-time detection of steel cable surface defects, reduces false alarms and missed alarms, and improves the efficiency of the steel cable production line.
Smart Images

Figure CN119515789A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of deep learning, and specifically relates to a method for detecting surface defects of steel cables based on an improved SSD algorithm. Background Art
[0002] With the increasing demand for steel cables, the detection technology for steel cable surface defects requires the highest detection accuracy while meeting the real-time requirements. Originally, edge detection, optical feature extraction, and morphological processing were used to detect steel cable surface defects. However, these methods are sensitive to noise in the image and most of the surface defects of the steel cable itself are small in size, which can lead to false positives or false negatives, affecting the detection accuracy. Summary of the invention
[0003] In view of the problems existing in the prior art, the present invention provides a wire rope surface defect detection method based on an improved SSD algorithm, which can improve the detection accuracy and the efficiency of the wire rope production line.
[0004] To solve the above technical problems, the present invention provides the following technical solutions: a method for detecting surface defects of a steel cable based on an improved SSD algorithm, comprising the following steps:
[0005] S1. Construct a steel cable surface defect dataset, including several steel cable images and defect categories corresponding to the steel cable images; preprocess the dataset;
[0006] S2, constructing a steel cable surface defect detection neural network of an improved SSD algorithm, using the steel cable surface defect data set of step S1 to train the steel cable surface defect detection neural network of an improved SSD algorithm, and obtaining a steel cable surface defect detection model of an improved SSD algorithm;
[0007] The improved SSD algorithm for wire rope surface defect detection neural network is built based on the SSD network, introducing RestNet18 as the backbone of the SSD network, unidirectional feature fusion block and improved CBAM attention module, and using Focalloss as the loss function;
[0008] S3. Collect the steel cable image in real time and input it into the steel cable surface defect detection model of the improved SSD algorithm to obtain the corresponding defect category.
[0009] Furthermore, the aforementioned improved SSD algorithm for detecting steel cable surface defects is constructed based on the SSD network, including sequentially connected Conv5_2 layer, Conv6 layer, Conv6_2 layer, Conv7_2 layer, Conv8 layer, Conv9 layer, Conv10 layer, and Conv11 layer;
[0010] A single feature fusion module is introduced in the Conv5_2 layer, the Conv6 layer, and the Conv6_2 layer. Specifically, the cable image is input into the Conv5_2 layer, and a 1*1conv convolution is performed on the feature map output by the Conv5_2 layer to obtain an updated Conv5_2 layer feature map, whose number of channels becomes 256.
[0011] The feature map output by the Conv5_2 layer is input to the Conv6 layer, and the convolution block is used to replace the fully connected layer. After passing through the 3*3conv convolution block and the 1*1conv convolution block in sequence, the feature map output by the Conv6 layer is obtained, and its number of channels is 1024.
[0012] The bilinear interpolation method is used to upsample the feature map output by the Conv6 layer to enlarge the resolution. At the same time, 1*1conv convolution is used to obtain an updated Conv6 layer output feature map, and the number of channels becomes 256.
[0013] The feature map output by the Conv6 layer is input into the Conv6_2 layer, and the convolution block is used to replace the fully connected layer. After passing through the 3*3conv convolution block and the 1*1conv convolution block in sequence, the output feature map of the Conv6_2 layer is obtained, and the number of channels is 512;
[0014] For the feature map output by the Conv6_2 layer, bilinear interpolation is used for upsampling to enlarge the resolution. At the same time, 1*1conv convolution is used to obtain an updated Conv6_2 layer output feature map, and the number of channels becomes 256.
[0015] The updated Conv5_2 layer feature map, the updated Conv6 layer output feature map, and the updated Conv6_2 layer output feature map are input to the merging layer for Concat connection operation, and then input to the BN layer for normalization to obtain the fused feature map F.
[0016] Furthermore, the aforementioned steel cable surface defect detection method based on the improved SSD algorithm constructs an improved CBAM attention module based on the channel attention mechanism CAM and the spatial attention mechanism SAM, specifically: the fused feature map F, Conv7_2 layer, Conv8 layer, Conv9 layer, Conv10 layer, and Conv11 layer are respectively extracted by the improved CBAM attention module, the map output by the channel attention mechanism is multiplied element by element by the feature map F to obtain the channel attention output, and then the channel attention output map is input into the spatial attention module to obtain the output feature map F".
[0017] Furthermore, the aforementioned channel attention module includes: a global maximum pooling unit, a global average pooling unit, K 1*1 convolution blocks, a first sigmoid function layer, and a second sigmoid function layer;
[0018] The channel attention module is configured to perform the following actions: the input feature map F is input into the global maximum pooling unit and the global average pooling unit respectively, and then the global maximum pooling unit and the global average pooling unit respectively input the feature maps output by each of them into K 1*1 convolution blocks for feature aggregation, and the aggregated feature maps are respectively input into the first sigmoid function layer and the second sigmoid function layer, and finally the feature maps output by the first sigmoid function layer and the second sigmoid function layer are element-wise multiplied to obtain the feature map F' output by the channel attention module.
[0019] Furthermore, the aforementioned spatial attention module includes: a dilated convolution block, a third sigmoid function layer;
[0020] The spatial attention module is configured to perform the following actions: input the feature map F' output by the channel attention module into the hole convolution block and the third sigmoid function layer in sequence to obtain the feature map F" output by the spatial attention module.
[0021] Furthermore, the aforementioned atrous convolution block is a 7*7 convolution block, including a maximum pooling layer, an average pooling layer, and a channel number adjustment module connected sequentially;
[0022] The maximum pooling layer serves as the input of the dilated convolution block, receives the feature map F' output by the channel attention module, performs the maximum pooling operation on F', then performs the average pooling layer, and finally performs channel adjustment through the channel number adjustment module, and then inputs it to the third sigmoid function layer to obtain the feature map F".
[0023] Furthermore, the aforementioned wire rope surface defect detection method based on the improved SSD algorithm also includes using the firefly optimization algorithm and the K-Means algorithm to optimize the prior frame, specifically: first, the firefly optimization algorithm is used to select the initial clustering center K value for the aspect ratio in the data set samples, and the K-Means algorithm is used to cluster the samples, and finally the prior frame is obtained.
[0024] Furthermore, the aforementioned training of the wire rope surface defect detection neural network based on the improved SSD algorithm also includes using a Focalloss function to adjust the proportion of simple samples and difficult samples by adding a variable.
[0025] Furthermore, the aforementioned steel cable surface defect detection method based on the improved SSD algorithm also includes connecting the steel cable surface defect detection model based on the improved SSD algorithm to the detection equipment and the alarm system, so as to trigger an alarm once a defective steel cable is detected during real-time monitoring of the steel cable surface defects.
[0026] Compared with the prior art, the beneficial technical effects of the present invention using the above technical solution are as follows:
[0027] 1. High accuracy and real-time performance: Through the improved SSD algorithm and related optimization technologies, the system can accurately detect the situation of steel cables on the production line and monitor and alarm in real time. Compared with traditional methods, the system has achieved significant improvements in the accuracy and real-time performance of target detection.
[0028] 2. Dataset expansion and enhancement: By collecting diverse and complex wire rope surface defect data and applying data set expansion and enhancement techniques, the system improves the generalization and robustness of the model. This enables the system to better adapt to the monitoring requirements of different wire rope production lines and reduce false positives and false negatives.
[0029] 4. Network structure optimization: The network structure of the SSD algorithm is optimized, and RestNet18 is introduced as the backbone of SSD, the unidirectional feature fusion block and the improved CBAM attention module are used, and the firefly optimization algorithm and K-Means algorithm are used to optimize the prior box, etc. This ensures that the system improves the efficiency of target detection while maintaining detection accuracy and generalization ability.
[0030] 5. Real-time monitoring and alarm: The wire rope surface defect monitoring system realizes real-time monitoring and alarm of the wire rope surface by accelerating and optimizing the network reasoning process. Once a defect or abnormality is detected, the system will immediately trigger the alarm system and send an alarm notification to relevant personnel so that timely measures can be taken to improve the production efficiency of the wire rope.
[0031] Through the above technical effects, the steel cable surface defect monitoring system of the present invention can effectively improve the production efficiency of steel cables and reduce labor costs. At the same time, the system is flexible and scalable, and can be customized and optimized according to actual needs to meet the monitoring requirements of different steel cable production lines. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is the structural diagram of the improved SSD model.
[0033] Figure 2 It is a backbone network structure diagram of the present invention.
[0034] Figure 3 It is the structural diagram of the unidirectional feature fusion module.
[0035] Figure 4 This is the structure diagram of the CBAM attention module.
[0036] Figure 5 This is the structure diagram of the channel attention module.
[0037] Figure 6 This is the structure diagram of the spatial attention module.
[0038] Figure 7 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0039] In order to better understand the technical content of the present invention, specific embodiments are given and described as follows in conjunction with the accompanying drawings.
[0040] Various aspects of the invention are described herein with reference to the accompanying drawings, in which many illustrative embodiments are shown. The embodiments of the invention are not limited to those described in the accompanying drawings. It should be understood that the invention is implemented by any of the various concepts and embodiments described above, as well as the concepts and embodiments described in detail below, because the concepts and embodiments disclosed in the invention are not limited to any implementation. In addition, some aspects disclosed in the invention may be used alone or in any appropriate combination with other aspects disclosed in the invention.
[0041] refer to Figure 7 The present invention provides a method for detecting surface defects of a steel cable based on an improved SSD algorithm, comprising the following steps:
[0042] S1. Construct a steel cable surface defect dataset, including several steel cable images and the defect categories corresponding to the steel cable images; preprocess the dataset and expand it through data enhancement technology to improve the generalization ability and robustness of the model.
[0043] During the production process, the steel cable may have various forms that do not meet the production standards. The method of using the general setting of the prior frame aspect ratio is too broad and cannot well reflect the actual defects of the steel cable. The firefly optimization algorithm and the K-Means algorithm are introduced here. First, the firefly optimization algorithm is used to select the initial clustering center K value for the aspect ratio in the data set samples, and the K-Means algorithm is used to cluster the samples, and finally the prior frame is obtained. Compared with the method of using the general setting value, the method of using the firefly optimization and K-Means algorithm to find the prior frame can make the predicted frame better match the real frame.
[0044] S2, constructing a steel cable surface defect detection neural network of an improved SSD algorithm, using the steel cable surface defect data set of step S1 to train the steel cable surface defect detection neural network of an improved SSD algorithm, and obtaining a steel cable surface defect detection model of an improved SSD algorithm;
[0045] like Figure 1 As shown in the figure, the steel cable surface defect detection neural network of the improved SSD algorithm is built based on the SSD network, and the RestNet18 is introduced as the backbone of the SSD network, the unidirectional feature fusion block and the improved CBAM attention module, and the Focalloss is used as the loss function to reduce the weight of negative samples in training and improve the accuracy of target detection;
[0046] S3. Collect the steel cable image in real time and input it into the steel cable surface defect detection model to obtain the corresponding defect category.
[0047] like Figure 2 As shown, the steel cable surface defect detection neural network of the improved SSD algorithm is constructed based on the SSD network, including sequentially connected Conv5_2 layer, Conv6 layer, Conv6_2 layer, Conv7_2 layer, Conv8 layer, Conv9 layer, Conv10 layer, and Conv11 layer;
[0048] When performing object detection, the feature values output by each convolutional layer of the SSD network are not related to each other, making it difficult to detect small objects. However, the low-level feature map is large in size and contains rich information about image edges and object contours, while the high-level convolutional layer is small in size and the output feature map contains a lot of semantic information of the image.
[0049] To address this problem, a lightweight unidirectional feature fusion module is introduced to improve the detection accuracy of the model without significantly reducing the detection speed. Figure 3 As shown in the figure, the 300*300 image is used as input, and the single feature fusion module is introduced in the Conv5_2 layer, the Conv6 layer, and the Conv6_2 layer. Specifically, the steel cable image is input to the Conv5_2 layer, and the 1*1conv convolution is used for the 38*38*512 feature map output by the Conv5_2 layer to obtain the updated Conv5_2 layer feature map, and its channel number becomes 256;
[0050] The feature map output by the Conv5_2 layer is input to the Conv6 layer, and the convolution block is used to replace the fully connected layer. After passing through the 3*3conv convolution block and the 1*1conv convolution block in sequence, the feature map output by the Conv6 layer is obtained, and its number of channels is 1024.
[0051] The feature map output by the Conv6 layer is upsampled by bilinear interpolation to enlarge the resolution. At the same time, 1*1conv convolution is used to obtain an updated Conv6 layer output feature map of 19*19*1024, and the number of channels becomes 256.
[0052] The feature map output by the Conv6 layer is input into the Conv6_2 layer, and the convolution block is used to replace the fully connected layer. After passing through the 3*3conv convolution block and the 1*1conv convolution block in sequence, the output feature map of the Conv6_2 layer is 10*10*512, and the number of channels is 512;
[0053] For the Conv6 layer, the resolution of the feature map in the Conv6_2 layer is less than 38*38. The feature map output by the Conv6_2 layer is upsampled by bilinear interpolation to enlarge the resolution. At the same time, 1*1conv convolution is used to obtain an updated Conv6_2 layer output feature map, and the number of channels becomes 256.
[0054] The updated Conv5_2 layer feature map, the updated Conv6 layer output feature map, and the updated Conv6_2 layer output feature map are input to the merging layer for Concat connection operation, and then input to the BN layer for normalization to obtain the fused feature map F. By combining the higher resolution of the shallow feature map with the larger receptive field of the deep feature map, the recognition accuracy of the model can be improved to a certain extent.
[0055] In the convolutional neural network model, since the convolution kernel is generally small, each convolution operation can only extract partial feature information, and feature information far away from the convolution kernel is not easy to extract. In order to capture the internal correlation between data and features and make long-distance features dependent, the CBAM attention module composed of the channel attention mechanism CAM and the spatial attention mechanism SAM is introduced to improve the feature extraction capability of the SSD-RestNet18 model for steel cable defects.
[0056] As a preferred embodiment of the present invention, Figure 1 and Figure 4 As shown in the figure, an improved CBAM attention module is constructed based on the channel attention mechanism CAM and the spatial attention mechanism SAM. Specifically, the fused feature map F, Conv7_2 layer, Conv8 layer, Conv9 layer, Conv10 layer, and Conv11 layer are respectively extracted through the improved CBAM attention module, and the map output by the channel attention mechanism is multiplied element by element with the feature map F to obtain the channel attention output, and then the channel attention output map is input into the spatial attention module to obtain the output feature map F".
[0057] In the original channel attention module, two full connections are used to compress and expand the number of channels in turn. This process will cause the loss of spatial information when the image is expanded into a vector to a certain extent, and it is difficult to automatically discover more abstract features of the input data. Affected by the ECANet and SENet comparison experiments. The present invention introduces k 1*1 convolutions in the channel attention module to replace the two fully connected layers originally used for feature mapping for channel feature aggregation without reducing feature information.
[0058] like Figure 5 As shown, as a preferred embodiment of the present invention, the channel attention module includes: a global maximum pooling unit, a global average pooling unit, K 1*1 convolution blocks, a first sigmoid function layer, and a second sigmoid function layer;
[0059] The channel attention module is configured to perform the following actions: the input feature map F is input into the global maximum pooling unit and the global average pooling unit respectively, and then the global maximum pooling unit and the global average pooling unit respectively input the feature maps output by each of them into K 1*1 convolution blocks for feature aggregation, and the aggregated feature maps are respectively input into the first sigmoid function layer and the second sigmoid function layer, and finally the feature maps output by the first sigmoid function layer and the second sigmoid function layer are element-wise multiplied to obtain the feature map F' output by the channel attention module.
[0060] In the original spatial attention module, the convolution kernel is too small, resulting in each unit of the output feature layer corresponding to the input layer area being too small, and the information obtained is limited. This paper proposes to use dilated convolution to replace the 3*3 ordinary convolution, such as Figure 5 As shown in the figure, the original convolution kernel is 3*3. After the expansion rate is 3, the convolution kernel becomes 7*7, which expands the receptive field and improves the feature extraction capability of the shape of the steel cable.
[0061] As a preferred embodiment of the present invention, Figure 6 As shown, the spatial attention module includes: a hole convolution block and a third sigmoid function layer; the spatial attention module is configured to perform the following actions: input the feature map F' output by the channel attention module to the hole convolution block and the third sigmoid function layer in sequence to obtain the feature map F" output by the spatial attention module. In the embodiment, the hole convolution block is a 7*7 convolution block, including a maximum pooling layer, an average pooling layer, and a channel number adjustment module connected in sequence;
[0062] The maximum pooling layer serves as the input of the dilated convolution block, receives the feature map F' output by the channel attention module, performs the maximum pooling operation on F', then performs the average pooling layer, and finally performs channel adjustment through the channel number adjustment module, and then inputs it to the third sigmoid function layer to obtain the feature map F".
[0063] As a preferred embodiment of the present invention, the steel cable surface defect detection model is integrated with the detection equipment and the alarm system, and is integrated with the monitoring equipment and the alarm system. Through the steel cable surface defect monitoring system, we can monitor the steel cable production in real time. The system will detect and identify the surface of the steel cable. Once the surface defect of the steel cable is detected, the steel cable surface defect monitoring system will immediately trigger the alarm system and send an alarm notification to the relevant personnel so that timely measures can be taken.
[0064] The present invention can also utilize the idea of human-computer collaboration to combine the system's prediction results with manual review to improve the accuracy and credibility of the system.
[0065] Example 1: Target detection accuracy experiment of wire rope surface defect monitoring system
[0066] This example aims to verify the target detection accuracy of the steel cable surface defect detection model based on the improved SSD algorithm in the steel cable surface defect monitoring system. Through comparative experiments, the detection accuracy of the system under different target categories is evaluated.
[0067] 1. Prepare the dataset: Collect the steel cable defect image dataset.
[0068] 2. Data preprocessing: Preprocess the image data, including image enhancement, size adjustment and data labeling.
[0069] 3. Implement target detection: Run the wire rope surface defect detection model based on the improved SSD algorithm to perform target detection on the images in the dataset and record the number and location information of the detected targets.
[0070] 4. Detection result comparison: Compare with the manually labeled real results to calculate indicators such as target detection accuracy, recall rate, and F1 value.
[0071] 5. Result analysis and interpretation: Based on the comparison results, explain the technical effect of the improved SSD algorithm in terms of target detection accuracy.
[0072] Example 2: Real-time monitoring performance test of the wire rope surface defect monitoring system
[0073] This embodiment aims to evaluate the real-time monitoring performance of the real-time monitoring platform of the wire rope surface defect detection model based on the improved SSD algorithm. Through comparative experiments, the real-time monitoring capability of the system in different scenarios is tested.
[0074] 1. Build a real-time monitoring platform: Build a real-time monitoring platform for the wire rope surface defect monitoring system, including camera equipment, image acquisition and processing modules.
[0075] 2. Scenario selection: Select different steel cable production lines for testing.
[0076] 3. Monitoring system operation: Run the steel cable surface defect detection model of the improved SSD algorithm to monitor the steel cable targets on different production lines in real time, and record the number of monitored targets and the monitoring time.
[0077] 4. Performance test: Evaluate the real-time monitoring performance of the system by comparing the difference between the monitoring time and the actual time.
[0078] 5. Result analysis and interpretation: Based on the test results, the technical effect of the steel cable surface defect detection model with the improved SSD algorithm in real-time monitoring performance is explained and compared with the traditional method to highlight its advantages.
[0079] Through the experiments and tests of the above embodiments, the target detection accuracy and real-time monitoring performance of the steel cable surface defect detection model of the improved SSD algorithm in the steel cable surface defect monitoring system can be verified, and its contribution to the technical effect of the system can be further explained.
[0080] Although the present invention has been described above with preferred embodiments, it is not intended to limit the present invention. A person skilled in the art of the present invention may make various modifications and improvements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the claims.
Claims
1. A wire rope surface defect detection method based on an improved SSD algorithm, characterized in that: The following steps are involved: S1. Construct a steel cable surface defect dataset, including several steel cable images and defect categories corresponding to the steel cable images; Preprocess the dataset; S2, constructing a steel cable surface defect detection neural network of an improved SSD algorithm, using the steel cable surface defect data set of step S1 to train the steel cable surface defect detection neural network of an improved SSD algorithm, and obtaining a steel cable surface defect detection model of an improved SSD algorithm; The improved SSD algorithm for wire rope surface defect detection neural network is built based on the SSD network, introducing RestNet18 as the backbone of the SSD network, unidirectional feature fusion block and improved CBAM attention module, and using Focalloss as the loss function; S3. Collect the steel cable image in real time and input it into the steel cable surface defect detection model of the improved SSD algorithm to obtain the corresponding defect category.
2. According to claim 1, a method for detecting surface defects of a steel cable based on an improved SSD algorithm is characterized in that: The improved SSD algorithm for wire rope surface defect detection neural network is constructed based on the SSD network, including sequentially connected Conv5_2 layer, Conv6 layer, Conv6_2 layer, Conv7_2 layer, Conv8 layer, Conv9 layer, Conv10 layer, and Conv11 layer; A single feature fusion module is introduced in the Conv5_2 layer, the Conv6 layer, and the Conv6_2 layer. Specifically, the cable image is input into the Conv5_2 layer, and a 1*1conv convolution is performed on the feature map output by the Conv5_2 layer to obtain an updated Conv5_2 layer feature map, whose number of channels becomes 256. The feature map output by the Conv5_2 layer is input to the Conv6 layer, and the convolution block is used to replace the fully connected layer. After passing through the 3*3conv convolution block and the 1*1conv convolution block in sequence, the feature map output by the Conv6 layer is obtained, and its number of channels is 1024. The bilinear interpolation method is used to upsample the feature map output by the Conv6 layer to enlarge the resolution. At the same time, 1*1conv convolution is used to obtain an updated Conv6 layer output feature map, and the number of channels becomes 256. The feature map output by the Conv6 layer is input into the Conv6_2 layer, and the convolution block is used to replace the fully connected layer. After passing through the 3*3conv convolution block and the 1*1conv convolution block in sequence, the output feature map of the Conv6_2 layer is obtained, and the number of channels is 512; For the feature map output by the Conv6_2 layer, bilinear interpolation is used for upsampling to enlarge the resolution. At the same time, 1*1conv convolution is used to obtain an updated Conv6_2 layer output feature map, and the number of channels becomes 256. The updated Conv5_2 layer feature map, the updated Conv6 layer output feature map, and the updated Conv6_2 layer output feature map are input to the merging layer for Concat connection operation, and then input to the BN layer for normalization to obtain the fused feature map F.
3. A wire rope surface defect detection method based on improved SSD algorithm according to claim 2, characterized in that: An improved CBAM attention module is constructed based on the channel attention mechanism CAM and the spatial attention mechanism SAM. Specifically, the fused feature map F, Conv7_2 layer, Conv8 layer, Conv9 layer, Conv10 layer, and Conv11 layer are respectively subjected to feature extraction through the improved CBAM attention module, and the map output by the channel attention mechanism is element-wise multiplied with the feature map F to obtain the channel attention output. Then, the channel attention output map is input into the spatial attention module to obtain the output feature map F".
4. A wire rope surface defect detection method based on improved SSD algorithm according to claim 3, characterized in that: The channel attention module includes: global maximum pooling unit, global average pooling unit, K 1*1 convolution blocks, the first sigmoid function layer, and the second sigmoid function layer; The channel attention module is configured to perform the following actions: the input feature map F is input into the global maximum pooling unit and the global average pooling unit respectively, and then the global maximum pooling unit and the global average pooling unit respectively input the feature maps output by each of them into K 1*1 convolution blocks for feature aggregation, and the aggregated feature maps are respectively input into the first sigmoid function layer and the second sigmoid function layer, and finally the feature maps output by the first sigmoid function layer and the second sigmoid function layer are element-wise multiplied to obtain the feature map F' output by the channel attention module.
5. A wire rope surface defect detection method based on improved SSD algorithm according to claim 4, characterized in that: The spatial attention module includes: a dilated convolution block and a third sigmoid function layer; The spatial attention module is configured to perform the following actions: input the feature map F' output by the channel attention module into the hole convolution block and the third sigmoid function layer in sequence to obtain the feature map F" output by the spatial attention module.
6. A wire rope surface defect detection method based on improved SSD algorithm according to claim 5, characterized in that: The dilated convolution block is a 7*7 convolution block, which includes a maximum pooling layer, an average pooling layer, and a channel number adjustment module connected sequentially; The maximum pooling layer serves as the input of the dilated convolution block, receives the feature map F' output by the channel attention module, performs the maximum pooling operation on F', then performs the average pooling layer, and finally performs channel adjustment through the channel number adjustment module, and then inputs it to the third sigmoid function layer to obtain the feature map F".
7. The method for detecting surface defects of a steel cable based on an improved SSD algorithm according to claim 1 is characterized in that: It also includes the use of the firefly optimization algorithm and the K-Means algorithm to optimize the prior frame. Specifically, the firefly optimization algorithm is first used to select the initial clustering center K value for the aspect ratio in the data set samples, and the K-Means algorithm is used to cluster the samples, and finally the prior frame is obtained.
8. The method for detecting surface defects of a steel cable based on an improved SSD algorithm according to claim 1 is characterized in that: The training of the steel cable surface defect detection neural network based on the improved SSD algorithm also includes the use of the Focalloss function to adjust the proportion of simple samples and difficult samples by adding a variable.
9. The method for detecting surface defects of a steel cable based on an improved SSD algorithm according to claim 1, characterized in that: It also includes connecting a steel cable surface defect detection model based on an improved SSD algorithm to a detection device and an alarm system, so as to trigger an alarm once a defective steel cable is detected during real-time monitoring of the steel cable surface defects.