Visual inspection method for defects of operation guide rail of hoisting machinery
By applying artificial intelligence-based visual recognition technology in the defect detection of lifting machinery guide rails and using the MH-YOLOv8 algorithm to process images, the problems of low detection efficiency and insufficient accuracy in the existing technology are solved, and efficient and accurate defect detection is achieved.
Patent Information
- Application Number
- CN202510098398.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-02-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the detection of the defects of the lifting machinery guide rail mainly relies on manual naked eye observation, and there are problems of low efficiency, high cost and insufficient detection accuracy.
Using visual recognition technology based on artificial intelligence, the image of the lifting machine guide rail is collected through the image acquisition module, and the trained image processing model is used to process the image based on the MH-YOLOv8 algorithm to obtain the defect detection results of the track.
The detection efficiency and accuracy are improved and labor costs are reduced. The improved MH-YOLOv8 algorithm increases the mAP value by 2.2% compared with before the improvement in the detection of the guide rail defect of the lifting machinery.
Smart Images

Figure CN119540239A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of hoisting machinery running guide rail defect detection, and specifically relates to a visual detection method for hoisting machinery running guide rail defects. Background Art
[0002] As important equipment in ports, factories, construction sites, and bridge infrastructure, hoisting machinery plays an important role in lifting and handling. Hoisting machinery, especially the trolley of the gantry crane, is installed on the guide rail. During operation, the hoisting machinery moves back and forth along the guide rail. The quality of the guide rail directly affects the safety of the hoisting machinery.
[0003] Long-term heavy-load service will cause the guide rails of cranes to have appearance defects such as detachment, wear and collapse, which will seriously affect the safety of cranes. Therefore, it is necessary to inspect cranes and their guide rails regularly. At present, the appearance defect identification of guide rail defects is mostly carried out by inspectors' naked eye observation, which has the disadvantages of low efficiency, high labor cost and insufficient detection accuracy. Summary of the invention
[0004] The purpose of the present invention is to provide a method for visually detecting defects in guide rails of a lifting machinery, so as to solve the problems mentioned in the background technology.
[0005] In order to solve the above technical problems, the present invention adopts the following solutions: A method for visually detecting defects in guide rails of a lifting machinery comprises the following steps: Step S1: The image acquisition module acquires an image of the guide rail of the lifting machinery; Step S2: Use the trained image processing model to process the collected images to obtain the defect detection results of the track.
[0006] The training of the image processing model specifically includes: 1) Creating a data set: collecting a large number of images of different defects of crane guide rails, rotating and flipping the images, and performing data expansion to obtain a data set, which is then divided into a training set, a test set, and a validation set in a ratio of 8:1:1; 2) Using the training set to train an image processing model based on the MH-YOLOv8 algorithm, and evaluating the trained model based on the test set and validation set to obtain an optimized image processing model.
[0007] The present invention is based on artificial intelligence visual recognition technology, which can intelligently identify the appearance defects of the lifting machinery guide rails, greatly improve the detection efficiency and accuracy, and reduce labor costs.
[0008] Further improvement, in step S2, the image processing model is based on the MH-YOLOv8 algorithm, specifically: based on YOLOv8, the shuffled convolution HX-Conv is integrated into the C2f module in the neck network. The multi-cooperative attention mechanism MCA is introduced into the SPPF downsampling module, and finally the improved MH-YOLOv8 algorithm is formed.
[0009] Further improvement, the image processing model based on the MH-YOLOv8 algorithm includes the input terminal Input, the backbone network Backbone, the neck network Neck and the detection head Head, and the image is processed as follows, including the following steps: Step S2.1: The input end Input pre-processes the image and improves the image processing efficiency through adaptive scaling.
[0010] Step S2.2: The backbone network Backbone includes convolution, C2f and a downsampling module SPPFMCA that integrates the attention mechanism module MCA. The backbone network Backbone extracts feature information from the input image; C2f includes 2 convolutions and n Bottlenecks to extract richer gradient information; SPPFMCA includes 3 consecutive maximum pooling operations to capture object information at different scales to improve the accuracy of target detection.
[0011] Step S2.3: Integrate the shuffled convolutional network HX-Conv into the C2f module of the neck network Neck. Through the neck network, feature map information from different layers and scales is fused to ensure the model's feature extraction capability in multi-scale scenarios.
[0012] Step S2.4: The detection head adopts a decoupled head structure and an anchor-free frame strategy to complete image detection and classification tasks at different scales, and finally outputs the defect category and detection frame position information in the crane guide rail image.
[0013] Further improvement, in step S2.2, for the feature map of the input downsampling module x The following processing is performed, specifically: Step S2.2.1: Convert feature map x After three maximum pooling layers are connected in series, the feature map is obtained xm 1. xm 2 and xm 3. The specific formula is: ; (1) In formula (1), MaxPool () represents the maximum pooling function; Conv () represents a convolutional layer.
[0014] Step S2.2.2: Introduction GAM Attention module, generating attention map xc 1. xc 2 and xc 3. The specific formula is: ; (2) In formula (2), GAM ()express GAM Attention function; Conv () represents a convolutional layer.
[0015] Step S2.2.3: Concatenate the three attention maps along the channel dimension to form a fused feature map. The formula is: ; (3) In formula (3), xo Represents the fused feature map.
[0016] Step S2.2.4: The fused feature map is expressed as follows using the downsampling module SPPFGAM module: ; (4) In formula (4), Concat () represents the connection function; Conv () represents a convolutional layer.
[0017] Further improvement, in step S2.3, a shuffle convolution network HXConv is designed in the neck network to replace the bottleneck layer convolution network in C2f to form C2f-HX, based on which the image is processed as follows: Step S2.3.1: Divide the input feature map into 5 groups: (5) Among them, F represents the input feature map, F 1 - F 5 They represent the five channels after segmentation, and Split represents channel segmentation.
[0018] Step S2.3.2: Use 5 convolution kernels of 1×1, 3×3, 5×5, 7×7, and 9×9 to perform convolution operations on the corresponding channels respectively, which can be specifically expressed as follows: (6) (7) (8) (9) (10) Among them, G 1 -G 5 They represent the five feature maps after convolution, respectively. k×k Represents k×k convolution operation, k=1,3,5,7,9.
[0019] Step S2.3.3: Group each group of convolutional feature maps evenly, specifically expressed as: (11) (12) (13) (14) (15) Step S2.3.4: After shuffling the channels, aggregate the channels and use 1×1 convolution to perform feature fusion to obtain the final feature map, which is as follows: (16) (17) Among them, HX represents the shuffle operation, G i a means i The ath channel of the group, represents the shuffled feature map, Represents the feature map after feature fusion, i=1,2,3,4,5.
[0020] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention introduces the multi-cooperative attention module MCA into the downsampling module SPPF in the YOLOv8 backbone network to form an SPPFMCA module, thereby improving the detection capability of the downsampling module for small target objects.
[0021] 2. The present invention improves the detection efficiency by designing a shuffled convolutional network structure, using multiple convolution kernels for feature extraction and fusion, and integrating shuffled convolution into the neck network C2f. The mAP value of the improved MH-YOLOv8 algorithm in the detection of hoisting machinery guide rail defects is increased by 2.2% compared with the original algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 This is the structure diagram of the improved MH-YOLOv8 algorithm model; Figure 2 This is the improved SPPFMCA module structure diagram; Figure 3 It is a schematic diagram of the shuffle convolution HXConv process; Figure 4 This is the improved C2f-HX module structure diagram; Figure 5 This is the actual detection effect diagram based on the MH-YOLOv8 algorithm; Figure 6 This is the PR curve corresponding to the algorithm before improvement; Figure 7 This is the PR curve corresponding to the improved algorithm. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] A method for visually detecting defects in guide rails of a lifting machinery comprises the following steps: Step S1: The image acquisition module acquires an image of the guide rail of the lifting machinery; Step S2: Use the trained image processing model based on the MH-YOLOv8 algorithm to process the collected images to obtain the defect detection results of the track.
[0025] The training of the image processing model is as follows: 1) Create a data set: collect a large number of images of different defects of crane guide rails, rotate and flip the images, and perform data expansion to obtain a data set, which is then divided into a training set, a test set, and a validation set in a ratio of 8:1:1; 2) Use the training set to train the image processing model based on the MH-YOLOv8 algorithm, and evaluate the trained model based on the test set and validation set to obtain an optimized image processing model.
[0026] In this embodiment, the image processing model is based on the MH-YOLOv8 algorithm, specifically: YOLOv8 is used as the basic algorithm, and the shuffle convolution HX-Conv is integrated into the C2f module in the neck network. The multi-cooperative attention mechanism MCA is introduced in the SPPF downsampling module, and finally the improved MH-YOLOv8 algorithm is formed, such as Figure 1 shown.
[0027] The image processing model based on the MH-YOLOv8 algorithm processes the image as follows: Step S2.1: The input end Input pre-processes the image and improves the image processing efficiency through adaptive scaling; Step S2.2: The backbone network Backbone includes convolution, C2f and a downsampling module SPPFMCA that integrates the attention mechanism module MCA. The backbone network Backbone extracts feature information from the input image; C2f includes 2 convolutions and n Bottlenecks to extract richer gradient information; SPPFMCA includes 3 consecutive maximum pooling operations to capture object information at different scales to improve the accuracy of target detection.
[0028] For the feature map of the input downsampling module x The following processing is performed, specifically: Step S2.2.1: Convert feature map x After three maximum pooling layers are connected in series, the feature map is obtained xm 1. xm 2 and xm 3. The specific formula is: ; (1) In formula (1), MaxPool () represents the maximum pooling function; Conv () represents a convolutional layer.
[0029] Step S2.2.2: Introduction GAM Attention module, generating attention map xc 1. xc 2 and xc 3. The specific formula is: ; (2) In formula (2), GAM ()express GAM Attention function; Conv () represents a convolutional layer.
[0030] Step S2.2.3: Concatenate the three attention maps along the channel dimension to form a fused feature map. The formula is: ; (3) In formula (3), xo Represents the fused feature map.
[0031] Step S2.2.4: The fused feature map is expressed as follows using the downsampling module SPPFGAM module: ; (4) In formula (4), Concat () represents the connection function; Conv () represents the convolutional layer. The improved downsampling module SPPFGAM module is as follows Figure 2 shown.
[0032] Step S2.3: Integrate the shuffled convolution network HX-Conv into the C2f module of the neck network Neck. Through the neck network, feature map information from different layers and scales is integrated to ensure the model's feature extraction capability in multi-scale scenarios. Figure 3 As shown, specifically: Step S2.3.1: Divide the input feature map into 5 groups: (5) Among them, F represents the input feature map, F 1 - F 5 They represent the five channels after segmentation, and Split represents channel segmentation.
[0033] Step S2.3.2: Use 5 convolution kernels of 1×1, 3×3, 5×5, 7×7, and 9×9 to perform convolution operations on the corresponding channels respectively, which can be specifically expressed as follows: (6) (7) (8) (9) (10) Among them, G 1 -G 5 They represent the five feature maps after convolution, respectively. k×k Represents k×k convolution operation, k=1,3,5,7,9.
[0034] Step S2.3.3: Group each group of convolutional feature maps evenly, specifically expressed as: (11) (12) (13) (14) (15) Step S2.3.4: After shuffling the channels, aggregate the channels and use 1×1 convolution to perform feature fusion to obtain the final feature map, which is as follows: (16) (17) Among them, HX represents the shuffle operation, Gi a means i The ath channel of the group, represents the shuffled feature map, Represents the feature map after feature fusion, i=1,2,3,4,5.
[0035] Integrate the designed shuffle convolution HXConv into C2f to obtain the C2f-HX module, as shown in Figure 4 shown.
[0036] Step S2.4: The detection head adopts a decoupled head structure and an anchor-free frame strategy to complete image detection and classification tasks at different scales, and finally outputs the defect category and detection frame position information in the crane guide rail image.
[0037] Experiment and verification: 1) Experimental environment: The operating system is Ubuntu 20.04.4, the CPU model is Inter(R) i9-13900K, the GPU model is NVIDIA RTX A6000, the deep learning framework is Pytorch 1.11.0, the editing language is Python 3.8, the CUDA version is 11.3.0, and the optimizer is Adam. The experimental setting is 200 epochs and 8 training batches.
[0038] 2) Evaluation indicators: To evaluate the detection effect of the improved algorithm in rail appearance defects, precision (Precision, P), recall (Recall, R) and mean Average Precision (mAP) are selected as evaluation indicators. Precision refers to the proportion of correctly predicted positive samples in the predicted positive samples; recall refers to the proportion of correctly predicted positive samples in the samples; the higher the mean average precision mAP, the better the prediction effect of the algorithm model. mAP is obtained by integrating the PR curve in the average precision (AP), and is divided into mAP0.5 and mAP0.5-0.95. The former refers to the result when the IoU threshold is 0.5, and the latter refers to the average mAP value between the IoU threshold of 0.5 and 0.95.
[0039] 3) Verification of detection effect: Experiments were conducted on the image processing model based on the MH-YOLOv8 algorithm, and compared with the original YOLOv8n model. The detection results based on the MH-YOLOv8 algorithm are as follows: Figure 5 As shown, Figure 5 (a) is a detection and identification effect diagram of the rail surface detachment defect. The rectangular box in the figure indicates the defect location, and the text above the rectangle indicates the type of defect and the probability of determining it as the defect form. Figure 5In the first figure on the left of (a), the probability of detecting and identifying the detachment defect on the surface of the guide rail is 0.9. Figure 5 (b) is the detection and identification effect diagram of the wear defect on the guide rail surface. Figure 5 (c) is the detection and identification effect diagram of the guide rail surface collapse defect. Figure 5 It can be seen that the improved algorithm shows higher detection accuracy.
[0040] The PR curve on the test set is as follows Figure 6 , Figure 7 As shown, Figure 6 This is the PR curve corresponding to the algorithm before improvement. Figure 7 The PR curve corresponding to the improved algorithm. The horizontal axis in the figure is the recall rate, the vertical axis is the precision rate, and the four indicators in the upper right corner are the average accuracy of the detection of the guide rail detachment defect of the crane, the average accuracy of the detection of the collapse defect, the average accuracy of the detection of the wear defect, and the mean average accuracy (mAP value) of the three defect detections.
[0041] In order to verify the separate and combined application effects of the two modules C2f-HX and SPPFMCA in the identification of hoisting machinery guide rail defects, an ablation test was carried out, and the results are shown in Table 1. "√" indicates that the method was used in the experiment, and "-" indicates that the method was not used in the experiment. Through the comparison of ablation tests, compared with the YOLOv8 basic algorithm, the present invention adds two modules respectively, and there is a certain improvement in the mAP0.5 and mAP0.5:0.95 indicators. In particular, when the three are used together, the effect is best. Among them, mAP0.5 represents the average accuracy when the threshold is 0.5, and mAP0.5:0.95 represents the average accuracy of the threshold 0.5-0.95.
[0042] Table 1 Ablation experiment results
[0043] from Figure 6 , Figure 7 As can be seen from Table 1, the average detection accuracy of the improved algorithm for detachment and collapse defects has been improved by 0.7% and 6.7% respectively, and the average detection accuracy of wear defects has slightly decreased. Finally, the improved mAP@0.5 finally stabilized at 95.1%, which is 2.2% higher than the algorithm before improvement, indicating the superiority of the improved algorithm.
[0044] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A visual inspection method for defects in guide rails of hoisting machinery, characterized in that: The following steps are involved: Step S1: The image acquisition module acquires an image of the guide rail of the lifting machinery; Step S2: using the trained image processing model to process the collected images to obtain the defect detection results of the track; The training of the image processing model specifically includes: 1) Creating a data set: collecting a large number of images of different defects of crane guide rails, rotating and flipping the images, and performing data expansion to obtain a data set, which is then divided into a training set, a test set, and a validation set in a ratio of 8:1:1; 2) Using the training set to train an image processing model based on the MH-YOLOv8 algorithm, and evaluating the trained model based on the test set and validation set to obtain an optimized image processing model.
2. The visual detection method for hoisting machinery running guide rail defects according to claim 1 is characterized in that: In the step S2, the image processing model is based on the MH-YOLOv8 algorithm, specifically: taking YOLOv8 as the basic algorithm, the shuffled convolution HXConv is integrated into the C2f module in the neck network; the multi-cooperative attention mechanism MCA is introduced in the SPPF downsampling module, and finally an improved MH-YOLOv8 algorithm is formed.
3. The visual detection method for hoisting machinery running guide rail defects according to claim 2 is characterized in that: Based on the image processing model of the MH-YOLOv8 algorithm, the collected images are processed as follows: Step S2.1: The input end Input pre-processes the image and improves the image processing efficiency through adaptive scaling; Step S2.2: The backbone network Backbone includes convolution, C2f and a downsampling module SPPFMCA that integrates the attention mechanism module MCA. The backbone network Backbone extracts feature information from the input image; Step S2.3: Integrate the shuffled convolutional network HX-Conv into the C2f module of the neck network Neck, and fuse the feature map information from different layers and different scales through the neck network; Step S2.4: The detection head adopts a decoupled head structure and an anchor-free frame strategy to complete image detection and classification tasks at different scales, and finally outputs the defect category and detection frame position information in the crane guide rail image.
4. The visual detection method for hoisting machinery running rail defects according to claim 3 is characterized in that: In step S2.2, for the feature map of the input downsampling module x The following processing is performed, specifically: Step S2.2.1: Feature map x After three maximum pooling layers are connected in series, the feature map is obtained xm 1. xm 2 and xm 3. The specific formula is: ; (1) In formula (1), MaxPool () represents the maximum pooling function; Conv () represents the convolutional layer; Step S2.2.2: Introduction GAM Attention module, generating attention map xc 1. xc 2 and xc 3. The specific formula is: ; (2) In formula (2), GAM ()express GAM Attention function; Conv () represents the convolutional layer; Step S2.2.3: Concatenate the three attention maps along the channel dimension to form a fused feature map. The formula is: ; (3) In formula (3), xo Represents the fused feature map; Step S2.2.4: The fused feature map is expressed as follows using the downsampling module SPPFGAM module: ; (4) In formula (4), Concat () represents the connection function; Conv () represents a convolutional layer.
5. The visual detection method for hoisting machinery running guide rail defects according to claim 4 is characterized in that: In step S2.3, a shuffle convolution network HXConv is designed in the neck network to replace the bottleneck layer convolution network in C2f to form C2f-HX, based on which the image is processed as follows: Step S2.3.1: Divide the input feature map into 5 groups: (5) Among them, F represents the input feature map, F 1 - F 5 They represent the five channels after segmentation, and Split represents channel segmentation; Step S2.3.2: Use 5 convolution kernels of 1×1, 3×3, 5×5, 7×7, and 9×9 to perform convolution operations on the corresponding channels respectively, which can be specifically expressed as follows: (6) (7) (8) (9) (10) Among them, G 1 -G 5 They represent the five feature maps after convolution, respectively. k×k represents k×k convolution operation, k=1,3,5,7,9; Step S2.3.3: Group each group of convolutional feature maps evenly, specifically expressed as: (11) (12) (13) (14) (15) Step S2.3.4: After shuffling the channels, aggregate the channels and use 1×1 convolution to perform feature fusion to obtain the final feature map, which is as follows: (16) (17) Among them, HX represents the shuffle operation, G i a means i The ath channel of the group, represents the shuffled feature map, Represents the feature map after feature fusion, i=1,2,3,4,5.
Citation Information
Patent Citations
Drainage pipeline defect detection method based on improved YOLOv8s
CN119169378A
Environmental monitoring method based on visual identification
CN119314277A
Cross-scale defect detection method based on deep learning
US20230306577A1