Bolt looseness detection method and system for railway vehicle

The object detection network and bolt loose network constructed through deep learning solve the problems of low efficiency and strong contingency in the existing technology caused by relying on template image comparison, and efficient and accurate bolt loose detection is achieved, ensuring the safety and efficiency of rail transit.

CN120259290AActive Publication Date: 2025-07-04CRRC HANGZHOU DIGITAL TECH CO LTD

Patent Information

Application Number
CN202510733261.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-07-04
Estimated Expiration
2045-06-04

AI Technical Summary

Technical Problem

The prior art relies on template image comparison in the detection of bolt loosening of rail vehicles, resulting in low detection efficiency, long time consuming and highly accidental results, making it difficult to efficiently and accurately detect bolt loosening of different sizes and models.

Method used

Deep learning method is adopted to build an object detection network and a bolt loosening network, and programmable gradient information, general efficient layer aggregation network, Ghost module, reversible columnar network, channel attention mechanism and liquid convolution are introduced. Combined with FocalLoss function, it realizes feature automation learning and bolt loosening detection without template comparison.

Benefits of technology

The speed and accuracy of bolt loosening detection are improved, automated detection is realized, manual inspection costs are reduced, missed inspections are avoided, and the stable and safe operation of rail transit is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259290A_ABST
    Figure CN120259290A_ABST
Patent Text Reader

Abstract

The invention provides a bolt looseness detection method and system for a railway vehicle, and the method comprises the steps: obtaining an image containing a bolt and an anti-looseness line, constructing a target detection network which introduces programmable gradient information, a general high-efficiency layer aggregation network and a Ghost module, constructing a bolt looseness network employing a reversible cylindrical network, a channel attention mechanism and the like, and carrying out the detection of the bolt looseness. A corresponding model is obtained through data set training, then the to-be-analyzed image is detected, the feature extraction capacity and the detection speed precision can be improved, key features are focused, interference is suppressed, and the low-resolution detection problem is solved; template comparison is not needed, feature automatic learning is achieved, and robustness and universality are high; automatic detection can be achieved, efficiency is improved, cost is reduced, missing detection is avoided, and rail traffic safety is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of bolt detection, and more specifically, to a method and system for detecting bolt loosening for rail vehicles. Background Art

[0002] In the rail transit industry, bolts are used to fasten various components and play a crucial role in transportation vehicles such as EMUs, urban rails, and subways. However, during normal train operation, due to various factors such as wear, corrosion, and impact deformation, bolts are inevitably loosened or suffer from fatigue fracture and other failure conditions. These problems may not only lead to equipment failures but also cause serious safety accidents and incalculable losses. Therefore, during the maintenance of rail transit tools, bolt loosening detection is particularly important. By detecting and dealing with bolt loosening problems in a timely manner, equipment failures and safety accidents can be effectively prevented, ensuring the stable and safe operation of the rail transit system.

[0003] In the field of rail transit, the detection methods for bolt loosening mainly include manual inspection methods, sensor-based detection methods, and machine vision-based detection methods. Currently, the prior art (Patent No.: CN118411571A) discloses a method for detecting bolt abnormalities for rail vehicles, specifically discloses training relatively accurate bolt models and anti-loosening line models through a large number of data sets, and then constructing a database of various bolts in different states to robustly and accurately detect bolt loosening and missing without template image comparison. However, this method requires a large number of parameter settings and logical judgments for bolts of different sizes and models, resulting in a heavy burden on loosening detection processing, long time consumption, and poor efficiency, and there is still room for improvement. Summary of the Invention

[0004] Aiming at the deficiencies of the prior art, the purpose of the present invention is to provide a method for detecting bolt loosening for rail vehicles, which can robustly and accurately detect bolt loosening without template image comparison and with automatic feature learning.

[0005] To achieve the above object, the present invention provides the following technical solutions: A method for detecting bolt loosening for rail vehicles, comprising the following steps: An image acquisition step of acquiring an image containing bolts and anti-loosening lines captured by a vision camera as an image to be analyzed; A target detection network construction step of introducing programmable gradient information and a general and efficient layer aggregation network into the target detection network, and replacing some standard convolutional layers with Ghost modules; Steps for constructing the bolt loosening network: During the feature extraction stage of the classification network, introduce a reversible columnar network and a channel attention mechanism. During the task head stage of the classification network, introduce CBAM and ECA-Net, replace the standard convolution in the SPFF module with liquid convolution, then remove the multi-class classification branch, and use the FocalLoss function in the classification layer of the classification network for dynamic weight adjustment; Steps for model construction: Make a dataset from historical images containing bolt loosening and non-loosening in a certain proportion, then input the dataset into the network architecture built in the steps for constructing the object detection network to train a bolt object detection model, and then input the dataset into the network architecture built in the steps for constructing the bolt loosening network to train a bolt loosening detection model; Steps for bolt loosening detection: Input the image to be analyzed into the bolt object detection model to output the bolt region image, and input the bolt region image into the bolt loosening detection model to output the classification result and the confidence of loosening.

[0006] Furthermore, the CBAM includes performing global average pooling on the feature map output by the C3K2 module in the object detection network to generate a channel descriptor, then calculating the channel attention weight through two layers of MLP. The channel attention weight reflects the importance score of each channel. Average pool and max pool the feature after channel attention along the channel dimension to generate the average pooling feature and the max pooling feature, and then fuse them into a spatial weight through a 7x7 convolution.

[0007] Furthermore, the steps for constructing the bolt loosening network include a first optimization strategy. The optimization strategy includes adjusting the channel weight through one-dimensional convolution in ECA-Net and replacing the channel attention module in some C3K2 blocks.

[0008] Furthermore, the steps for constructing the bolt loosening network include a convolution replacement strategy. The convolution replacement strategy includes a sub-step for determining the replacement range and a sub-step for initializing the replacement parameters, In the sub-step for determining the replacement range, analyze the feature response ability of each convolutional layer to low-resolution targets in the SPFF module of the classification network, and select the standard convolutional layer with a relatively low extraction effect on low-resolution bolts and anti-loosening lines as the replacement object; In the sub-step for initializing the replacement parameters, replace the replacement object with liquid convolution based on introducing the time dynamic state, input and weight mapping, and time constant initialization.

[0009] Furthermore, the convolution replacement strategy also includes a sub-step for constructing time series features, In the sub-step of constructing time series features, the replaced liquid convolutions are concatenated in time series, and the displacement trend, deformation trajectory and other time dynamic features of the resolution target in consecutive frames are captured by recursive calculation using the state of the previous time step and the current input.

[0010] Furthermore, the convolution replacement strategy further includes a multi-scale feature fusion sub-step. In the multi-scale feature fusion sub-step, the liquid convolution that processes time series features in the SPFF module is subjected to spatio-temporal feature fusion splicing with other convolutions.

[0011] Furthermore, the model construction step further includes a loosening prevention line attention feedback strategy. The loosening prevention line attention feedback strategy includes analyzing the color distribution characteristics of the heat map generated by the bolt loosening detection model when selecting the images for training after n rounds of training, selecting red as the key color index for the loosening prevention line area, and counting the number and distribution density of red pixel points through a color depth quantization network. When the distribution density of red pixel points exceeds the set threshold, it is determined that the attention of the network to the loosening prevention line area reaches the preset condition; otherwise, a model trimming instruction is output.

[0012] Furthermore, it further includes a loosening sampling inspection step. When n bolts are detected, the heat map corresponding to the next bolt is selected as the sampling inspection map. In the sampling inspection map, the boundary contours of each color are planned according to the color distribution characteristics, and it is judged whether the contour formed by the red pixel points is separated. The judgment result is compared with the classification result of the bolt. If they are consistent, a normal instruction is output. If they do not match, a model doubt instruction is output.

[0013] Furthermore, it further includes a loosening degree analysis step. The contour area formed by the red pixel points is extracted, and the midline in the length direction is selected in this area, and the included angle between the midlines of two adjacent areas is analyzed as the bolt loosening angle.

[0014] A bolt loosening detection system for rail vehicles includes: an image acquisition module that acquires an image containing bolts and a loosening prevention line captured by a vision camera as an image to be analyzed; A target detection network construction module that introduces programmable gradient information and a general and efficient layer aggregation network into the target detection network, and replaces some standard convolution layers through a Ghost module; A bolt loosening network construction module that introduces a reversible column network and a channel attention mechanism in the feature extraction stage of the classification network, introduces CBAM and ECA-Net in the task head stage of the classification network, replaces the standard convolution in the SPFF module with a liquid convolution, then removes the multi-class classification branch, and uses a FocalLoss function in the classification layer of the classification network for dynamic weight adjustment; The model construction module makes a data set from historical images including bolt loosening and non-loosening bolts at a certain ratio, and then inputs the data set into the network architecture built in the target detection network construction step to train a bolt target detection model, and then inputs the data set into the network architecture built in the bolt loosening network construction step to train a bolt loosening detection model; The bolt loosening detection module inputs the image to be analyzed into the bolt target detection model to output the bolt region image, and inputs the bolt region image into the bolt loosening detection model to output the classification result and the confidence of loosening.

[0015] The beneficial effects of the present invention are as follows: 1. In the construction of the target detection network, programmable gradient information and a general and efficient layer aggregation network are introduced, and some standard convolutional layers are replaced by Ghost modules. While reducing the computational amount of the model, the feature extraction ability for targets such as bolts and anti-loosening lines is enhanced, and the detection speed and accuracy are improved. When constructing the bolt loosening network, a reversible column network and a channel attention mechanism are introduced in the feature extraction stage, and CBAM and ECA-Net are fused in the task head stage. Through the attention mechanism in the channel and spatial dimensions, the network focuses more on the key features of bolt loosening, effectively suppressing background interference and improving the classification accuracy. The standard convolution in the SPFF module is replaced by liquid convolution, combined with the construction of time series features and multi-scale feature fusion, which can capture the dynamic features of low-resolution targets in consecutive frames, and solves the problem of poor detection effect of traditional methods on low-resolution images.

[0016] 2. The present invention does not need to rely on template image comparison, realizes automatic feature learning through deep learning, overcomes the defect of strong contingency of detection results of traditional template comparison methods, and improves the robustness and generality of detection. At the same time, the entire detection process does not require manual intervention, can realize automatic detection of bolt loosening, greatly improves the detection efficiency, reduces the time and energy costs of manual inspection, avoids the missed detection problem caused by manual visual fatigue, provides a feasible solution for large-scale and efficient detection of bolt loosening in rail vehicles, and effectively guarantees the stable and safe operation of the rail transit system. Description of the Drawings

[0017] Figure 1 is the overall flowchart in the present invention; Figure 2 is the bolt annotation format diagram; Figure 3 is the image to be detected in the present invention; Figure 4 is the bolt diagram and the corresponding heat map when the bolt is not loosened in the present invention; Figure 5 is the bolt diagram and the corresponding heat map when the bolt is loosened in the present invention. Detailed Embodiments

[0018] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. The same components are denoted by the same reference numerals. It should be noted that the terms "front", "rear", "left", "right", "upper" and "lower" used in the following description refer to the directions in the drawings, and the terms "bottom surface" and "top surface", "inner" and "outer" refer to the directions towards or away from the geometric center of a specific component, respectively.

[0019] At present, for the sensor-based detection method, strain gauges are usually installed on bolts to measure the change in the force on the bolts. However, the installation of strain gauges is complex, and they are susceptible to environmental factors such as moisture and corrosion during long-term use, resulting in performance degradation, shortened lifespan, and increased maintenance costs. For the machine vision-based detection method, anti-loosening lines are usually used, and template images are adopted. Deep learning-related algorithms are used to compare the template images and the current images to detect whether the bolts are loose. This method highly depends on the template images, and the detection results of the method of comparing with the template images have strong contingency. Therefore, the present invention designs this bolt loosening detection method for rail vehicles, as Figure 1 shown, which includes the following steps: Image acquisition step: acquiring an image captured by a vision camera that contains bolts and anti-loosening lines as the image to be analyzed; Dataset construction step: obtaining multiple images that contain bolts and anti-loosening lines when the bolts are not loose from the historical database as positive sample data, loosening some of the target bolts, collecting images that contain loosened bolts and corresponding marked lines to make negative samples in the bolt loosening detection dataset. In addition, it also includes images in the extreme case of simulating that parts of the bolts and anti-loosening lines are adhered with dirt in the form of manually applying dust, dirt, etc. during the train operation.

[0020] Data preprocessing: converting the RGB images in the dataset and the real-time acquired images into the HSV color gamut, and using the single-scale Retinex (SSR) algorithm to enhance the low-brightness images: , where is the input image, is the Gaussian filter kernel; Then, a bolt target detection dataset and a bolt loosening detection dataset are respectively made. For the production of the target detection dataset, specifically, the LabelImg software is used to frame the minimum circumscribed rectangle of the bolts and the corresponding anti-loosening lines in all images in the YOLO format to form the corresponding txt files, and all images and the corresponding annotation files are sorted in the ImageNet dataset format, and the training set, validation set, and test set are divided in the ratio of 7:2:1, and finally a bolt target detection dataset is formed, as Figure 2As shown in the figure, the production of the bolt loosening detection dataset specifically uses the images of the bolts and the minimum circumscribed rectangles of the anti-loosening lines to which they belong output by the bolt target detection model, and divides the training set, validation set, and test set according to the ratio of 7:2:1, and organizes them into a bolt loosening detection dataset in the CIFAR-10 dataset format.

[0021] Steps for constructing the target detection network: The IYOLOv11 target detection network is adopted. The IYOLOv11 target detection network is an improved network based on the YOLOv11 target detection network. It introduces Programmable Gradient Information (PGI) and Generalized Efficient Layer Aggregation Network (GELAN). PGI is used to handle information loss in the deep network, which can provide complete input information for the target task to calculate the objective function, so as to obtain reliable gradient information to update the network weights. GELAN is an architecture based on gradient path planning, which can enable PGI to achieve superior detection results on lightweight models. The Ghost module replaces some standard convolutional layers. Since the standard convolutional layer can effectively extract image features during feature extraction, but the computational cost and the number of parameters are large, which limits the application of the network on resource-constrained devices. The Ghost module reduces the computational cost while maintaining or even improving the feature extraction ability of the network through linear transformation and recombination of the feature map. In the IYOLOv11 network, the standard convolutional layer with high computational resource consumption and high feature extraction repeatability is replaced by the Ghost module. The Ghost module generates a small number of original feature maps and then generates more similar feature maps through low-cost operations, achieving a significant reduction in the computational cost and the number of parameters of the network without losing too much feature expression ability.

[0022] The bolt loosening network construction step introduces reversible column networks (Reversible Column Networks, RevCol) and channel attention mechanism in the feature extraction stage of the classification network, embeds the reversible column network between appropriate network layers, and constructs a columnar structure information transmission path so that during the feature extraction process, data can be efficiently and reversibly exchanged between different levels to ensure information integrity. Channel attention modules are added in parallel to analyze each channel of the feature map, and different weights are assigned according to the importance of the channel to enhance key channel features and suppress irrelevant channel information. The classification network introduces the RevCol module in the first convolutional block after the input layer. RevCol solves the problem of layer-by-layer loss of information when it is transmitted from the low layer (input) to the high layer (output) in the deep learning model through a reversible network structure design, ensuring the integrity and stability of feature information. In addition, based on the features extracted by RevCol, channel attention weights and spatial attention weights are generated to dynamically enhance the expression ability of key features and suppress the interference of irrelevant features. CBAM (Convolutional Block Attention Module) and ECA-Net (Efficient Channel Attention Network) are introduced in the task head stage of the classification network. The addition of CBAM (Convolutional Block Attention Module) recalibrates the features from the two dimensions of channel and space, focusing on the key feature areas related to bolt loosening. At the same time, the introduction of ECA-Net (Efficient Channel Attention Network) accurately captures the important connections between channels without increasing too much computational effort, and improves the network's sensitivity to bolt loosening features. The purpose is to increase the attention to low-brightness targets. The standard convolution in the module is replaced by liquid convolution. Liquid convolution dynamically adjusts the convolution kernel parameters according to the data characteristics, making the module more flexible and adaptable when extracting bolt loose features. Then the multi-category classification branches are removed, the network structure is simplified, and the network is focused on the binary classification task of whether the bolts are loose, reducing redundant calculations and improving the efficiency of network training and reasoning. The FocalLoss function is used in the classification layer of the classification network for dynamic weight adjustment. Its purpose is to dynamically adjust the weight according to the difficulty of the sample, focus on the difficult-to-classify bolt loose samples, balance the training weights of positive and negative samples, and improve the network's classification accuracy of bolt looseness.

[0023] The integrated CBAM is specifically: the output feature map of the C3K2 module in the YOLOv11 target detection network: , apply global average pooling to generate channel descriptors , channel weights are calculated through two layers of MLP , realize channel attention; ,in is the channel attention weight, with the shape of Represents the importance score of each channel, with values in the range [0, 1]; Is the Sigmoid activation function, used to map the output of the MLP to the range [0, 1]; MLP: Multi-Layer Perceptron, consisting of two fully connected layers, used to learn complex relationships between channels; Is the input feature map Performs global average pooling to generate a channel descriptor, with a shape of , and the specific calculation is: , where Represent the number of channels, height, and width of the input image respectively, Is the spatial position; , where Is the input feature map, with a shape of ; Is the number of channels, and further average pools and max pools the features after channel attention Along the channel dimension to generate the average pooled feature And the max pooled feature , which are fused into the spatial weight through a 7x7 convolution To achieve inserting CBAM after each residual connection in the C3K2 module of the YOLOv11 object detection network, reducing the computational cost.

[0024] Where , Is the spatial attention weight, with a shape of , representing the importance score of each spatial position in the feature map, with values in the range [0, 1]; Is a 7x7 convolutional layer, with an input channel number of 2 and an output channel number of 1, used to generate the spatial weight, Is to And Concatenated along the channel dimension to generate a feature with a shape of ; Is to max pool the feature map Along the channel dimension, with a shape of , and the calculation is: .

[0025] The ECA-Net is optimized as: using one-dimensional convolution to efficiently adjust the channel weights, replacing the channel attention module in some C3K2 blocks, where the size of the kernel is dynamically calculated by the number of channels C, and the calculation formula is: , where = 2, = 1, this dynamic calculation method can adaptively adjust the convolution kernel size according to the actual number of channels in the network, avoiding the problems of information redundancy or insufficient feature extraction caused by a fixed convolution kernel size. When dealing with bolt loosening features, the dynamically adjusted one-dimensional convolution kernel can accurately capture the key channel features related to bolt loosening, efficiently capture the important connections between channels without adding excessive computational complexity, that is, enhance the network's response to the bolt loosening feature channels, and significantly improve the network's feature extraction efficiency and accuracy compared with the traditional channel attention module.

[0026] Replace the standard convolution in some SPFF modules with liquid convolution to dynamically adapt to the feature changes of low-resolution targets. Liquid convolution is based on the concept of liquid neurons, introducing temporal dynamic behavior, and the core formula is:

[0027] Where is the current state, is the input, is the convolution kernel weight, is the time constant (initially set to 0.1, learnable).

[0028] The specific steps to replace the standard convolution in some SPFF modules with liquid convolution are as follows: ①. Determine the replacement range of the SPFF module In the SPFF (Spatial Pyramid Feature Fusion) module of the YOLOv11 object detection network, analyze the feature response ability of each convolution layer to low-resolution targets, and select the standard convolution layer with relatively weak feature extraction effect for small targets (such as low-resolution bolts and anti-loosening lines) as the replacement object for liquid convolution.

[0029] ②. Definition of the core formula of liquid convolution and parameter initialization For the selected standard convolution layer, replace it with liquid convolution according to the following rules: 1. Introduce temporal dynamic state: Define the current state indicating the output feature of the liquid convolution at time step , including the memory of historical input features; 2. Input and weight mapping: Keep the input and the convolution kernel weight of the original standard convolution as the basis for spatial feature extraction of liquid convolution; 3. Time constant initialization: Set the initial value of the time constant to 0.1, and this parameter can be automatically learned and optimized through network training to adjust the fusion ratio of the historical state and the current input.

[0030] ③. Build a time series feature processing link to achieve the accumulation of features in the time dimension, make up for the lack of details in single-frame images, and adapt to dynamic detection scenarios: In the SPFF module, liquid convolutions are concatenated in a time series to form the ability to extract dynamic features of consecutive frame images: 1. Initial state setting: When processing the first frame image, initialize or generate the initial feature state through random noise; 2. Recursive processing of multi-frame features: For each subsequent frame image, perform the following operations: Input the feature map of the current frame image into the liquid convolution, calculate the current state according to the core formula , fuse the previous frame state with the current spatial features , and use as the output feature and pass it to the next layer of the SPFF module. Through recursive calculation, the liquid convolution can capture time-dimensional features such as the displacement trend and deformation trajectory of low-resolution targets in consecutive frames, making up for the lack of details in single-frame images.

[0031] ④. Incorporate multi-scale feature fusion of the SPFF module to enhance the feature expression ability of low-resolution targets and improve the detection accuracy of small targets: In the multi-branch structure of the SPFF module, liquid convolutions are deployed in parallel with convolutional layers of other scales (such as dilated convolutions, standard convolutions) to form a hybrid feature extraction network: 1. Multi-branch feature extraction: Branch 1: The replaced liquid convolution branch is responsible for processing the time series features of low-resolution targets; Branch 2: The retained standard convolution or dilated convolution branch is responsible for extracting the multi-scale spatial features of single-frame images (such as global shape, local edges); 2. Feature fusion: Concatenate the feature maps output by each branch in the channel dimension (such as through the Concat operation), and input them into the subsequent convolutional layer for cross-scale and cross-time feature fusion to enhance the comprehensive expression ability of low-resolution targets.

[0032] Removing the multi-class classification branch specifically means: Simplify the prediction head, focus on a single class, optimize the bounding box regression loss, and the output of the prediction head is channels, 1 represents the confidence level, and 4 represents the bounding box coordinates , and use a 1x1 convolutional layer to directly map the features to the prediction output.

[0033] In the classification layer of the classification network, the Focal Loss function is used as the loss function. Focal Loss dynamically adjusts the loss weights and introduces Visual Enhanced Loss to improve the clarity of the image and the saturation of the anti-loosening lines in the image, enabling the model to maintain high detection performance when processing blurred images and a small number of loose samples. The formula of Focal Loss is as follows: , where is the predicted probability, is to balance the weights of positive and negative samples, is the hyperparameter for adjusting the loss weight, is the weight parameter, is the loss term for measuring the clarity of the image and the saturation of the anti-loosening line in the figure. Specifically, the image quality loss can be defined as follows: , , , Among them, is the gradient, is the gradient of the image, is the target gradient, is the saturation of the image, is the target saturation, represents the row and column indices of the image, which are used to traverse each pixel point of the image.

[0034] Model construction steps: Input the bolt target detection dataset into the network architecture built in the target detection network construction step to train the bolt target detection model, and then input the bolt loosening dataset and the bolt loosening network construction step into the network architecture built in the bolt loosening network construction step to train the bolt loosening detection model; among them, it also includes the anti-loosening line attention feedback strategy, such as Figure 4 and Figure 5 shown, the anti-loosening line attention feedback strategy includes selecting the training image once every n rounds of training of the bolt loosening detection model to generate the model attention distribution heat map through the GradCAM algorithm, analyzing the color distribution characteristics of the heat map, selecting red as the key color index for the anti-loosening line area, statistically analyzing the number and distribution density of red pixel points through the color depth quantization network, and when the distribution density of red pixel points exceeds the set threshold, it is determined that the attention of the network to the anti-loosening line area reaches the preset condition; otherwise, output the model trimming instruction.

[0035] Bolt loosening detection steps, such as Figure 3 shown, input the image to be analyzed into the bolt target detection model to output the bolt area image. The bolt area image contains the position information of all bolt areas and the length and width of the minimum bounding rectangle corresponding to the area. Input the bolt area image into the bolt loosening detection model to output the classification result and the confidence level of loosening. The classification result is output as loosening and not loosening, and the confidence level is 0.8 points for loosening and 0.2 points for not loosening.

[0036] It also includes a loosening sampling inspection step, that is, the heat map continues to be analyzed downward. When n bolts are detected, the heat map corresponding to the next bolt is selected as the sampling inspection map. Through image segmentation algorithms (such as threshold segmentation and edge detection), according to the color distribution characteristics of the heat map (red represents the high-attention area, and blue represents the low-attention area), the boundary contours of each color area are planned, and the contour of the anti-loosening line area composed of red pixel points is extracted. Analyze whether there is a separation phenomenon in the red pixel contour. For example, Figure 4 as shown, the bolt is in an unloosened state. As Figure 5 shown, the bolt is in a loosened state, and there is yellow separation between the red contours, that is, whether the attention distribution in the anti-loosening line area is broken or dispersed. Then, compare the judgment result with the classification result of the bolt. If they are consistent, a normal instruction is output. If they do not match, a model doubt instruction is output.

[0037] It also includes a loosening degree analysis step. For the anti-loosening line contour area composed of red pixel points, the central axis (i.e., the geometric center line of the contour area) is extracted in its length direction. This central line represents the theoretical reference position of the anti-loosening line. Analyze the included angle between the central lines of two adjacent areas as the bolt loosening angle. The larger the angle, the greater the rotation angle of the bolt and the more serious the loosening degree.

[0038] A detection system is correspondingly set up, specifically including: an image acquisition module that acquires the image captured by a vision camera containing bolts and anti-loosening lines as the image to be analyzed; a target detection network construction module that introduces programmable gradient information and a general and efficient layer aggregation network into the target detection network, and replaces some standard convolutional layers through the Ghost module; a bolt loosening network construction module that introduces a reversible column network and a channel attention mechanism in the feature extraction stage of the classification network, introduces CBAM and ECA-Net in the task head stage of the classification network, replaces the standard convolution in the SPFF module with liquid convolution, and then removes the multi-class classification branch. The FocalLoss function is used in the classification layer of the classification network for dynamic weight adjustment; a model construction module that makes a data set from historical images containing bolt loosening and non-loosening bolts in a certain proportion, and then inputs the data set into the network architecture built in the target detection network construction step to train a bolt target detection model, and then inputs the data set into the network architecture built in the bolt loosening network construction step to train a bolt loosening detection model; a bolt loosening detection module that inputs the image to be analyzed into the bolt target detection model to output the bolt area image, and inputs the bolt area image into the bolt loosening detection model to output the classification result and the confidence level of loosening.

[0039] The above are only the preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the concept of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art, several improvements and refinements made without departing from the principle of the present invention should also be regarded as within the protection scope of the present invention.

Claims

1. A method for detecting bolt loosening of rail vehicles, characterized in that: The steps include the following: An image acquisition step of acquiring an image captured by a vision camera and containing bolts and anti-loosening lines as an image to be analyzed; A target detection network construction step of introducing programmable gradient information and a general and efficient layer aggregation network into the target detection network, and replacing some standard convolutional layers with Ghost modules; A bolt loosening network construction step of introducing a reversible column network and a channel attention mechanism in the feature extraction stage of the classification network, introducing CBAM and ECA-Net in the task head stage of the classification network, replacing the standard convolution in the SPFF module with liquid convolution, then removing the multi-class classification branch, and using the FocalLoss function in the classification layer of the classification network for dynamic weight adjustment; A model construction step of making a dataset from historical images including bolt loosening and non-loosening bolts in a certain proportion, then inputting the dataset into the network architecture built in the target detection network construction step to train a bolt target detection model, and then inputting the dataset into the network architecture built in the bolt loosening network construction step to train a bolt loosening detection model; A bolt loosening detection step of inputting the image to be analyzed into the bolt target detection model to output a bolt region image, and inputting the bolt region image into the bolt loosening detection model to output a classification result and a loosening confidence level.

2. The method for detecting bolt loosening for rail vehicles according to claim 1, wherein: The CBAM includes performing global average pooling on the feature map output by the C3K2 module in the target detection network to generate a channel descriptor, then calculating the channel attention weight through two layers of MLP, where the channel attention weight reflects the importance score of each channel, performing average pooling and max pooling on the feature after channel attention along the channel dimension to generate an average pooling feature and a max pooling feature, and then fusing them into a spatial weight through a 7x7 convolution.

3. The bolt loosening detection method for rail vehicles according to claim 2, wherein: The bolt loosening network construction step includes a first optimization strategy, and the optimization strategy includes adjusting the channel weight through one-dimensional convolution in ECA-Net and replacing the channel attention module in some C3K2 blocks.

4. The method for detecting bolt loosening for a rail vehicle according to claim 3, wherein: The bolt loosening network construction step includes a convolution replacement strategy, and the convolution replacement strategy includes A replacement range determination sub-step and a replacement parameter initialization sub-step, In the replacement range determination sub-step, analyze the feature response ability of each convolutional layer to low-resolution targets in the SPFF module of the classification network, and select the standard convolutional layer with a lower extraction effect on low-resolution bolts and anti-loosening lines as the replacement object; In the replacement parameter initialization sub-step, initialize the replacement object as a liquid convolution based on the introduction of time dynamic state, input and weight mapping, and time constant; 5. The method for detecting bolt loosening for rail vehicles according to claim 4, wherein: The convolution replacement strategy further includes a time series feature construction sub-step, In the time series feature construction sub-step, concatenate the replaced liquid convolutions in a time series, and use the recursive calculation of the previous time step state and the current input to capture time dynamic features such as the displacement trend and deformation trajectory of the resolution target in consecutive frames; 6. The bolt loosening detection method for rail vehicles according to claim 5, wherein: The convolution replacement strategy further includes a multi-scale feature fusion sub-step, In the multi-scale feature fusion sub-step, spatio-temporal feature fusion splicing is performed between the liquid convolution for processing time series features in the SPFF module and other convolutions.

7. A method for detecting bolt loosening of a rail vehicle according to any one of claims 1-5, characterized in that: The model construction step further includes a loose line attention feedback strategy. The loose line attention feedback strategy includes analyzing the color distribution characteristics of the heat map generated from the images selected for training after the bolt loosening detection model has been trained for n rounds, selecting red as the key color index for the loose line area, counting the number and distribution density of red pixel points through a color depth quantization network. When the distribution density of red pixel points exceeds a set threshold, it is determined that the attention of the network to the loose line area reaches a preset condition; otherwise, a model trimming instruction is output.

8. The method for detecting bolt loosening for a rail vehicle according to claim 7, wherein: It further includes a loose inspection sampling step. When n bolts are detected, the heat map corresponding to the next bolt is selected as the sampling inspection map. In the sampling inspection map, the boundary contours of each color are planned according to the color distribution characteristics, and it is judged whether the contour formed by the red pixel points is separated. The judgment result is compared with the classification result of the bolt. If they are consistent, a normal instruction is output. If they do not match, a model doubt instruction is output.

9. The bolt loosening detection method for a rail vehicle according to claim 8, characterized in that: It further includes a loosening degree analysis step. The contour area formed by the red pixel points is extracted, and the midline in the length direction is selected in this area. The included angle between the midlines of two adjacent areas is analyzed as the bolt loosening angle.

10. A bolt loosening detection system for rail vehicles, characterized in that: It includes: An image acquisition module that acquires the image captured by the vision camera containing the bolt and the loose line as the image to be analyzed. A target detection network construction module that introduces programmable gradient information and a general and efficient layer aggregation network into the target detection network, and replaces some standard convolutional layers with Ghost modules. A bolt loosening network construction module that introduces a reversible column network and a channel attention mechanism in the feature extraction stage of the classification network, introduces CBAM and ECA-Net in the task head stage of the classification network, replaces the standard convolution in the SPFF module with liquid convolution, then removes the multi-class classification branch, and uses the FocalLoss function in the classification layer of the classification network for dynamic weight adjustment. A model construction module that makes a data set from historical images containing bolt loosening and non-loosening bolts in a certain proportion, and then inputs the data set into the network architecture built in the target detection network construction step to train a bolt target detection model, and then inputs the data set into the network architecture built in the bolt loosening network construction step to train a bolt loosening detection model. A bolt loosening detection module that inputs the image to be analyzed into the bolt target detection model to output the bolt area image, and inputs the bolt area image into the bolt loosening detection model to output the classification result and the confidence of loosening.

Citation Information

Patent Citations

  • Railway vehicle bolt looseness detection method and system

    CN110246132A

  • Bolt looseness detection method for multi-scale feature fusion SSD with introduction of attention mechanism

    CN113902680A

  • Bolt looseness detection method and device

    CN114387268A

  • Bolt loosening state detection system and method

    CN115861912A

  • Bolt looseness detection system and method for railway vehicle and storage medium

    CN117593515A

Cited By

  • Method and system for detecting abnormity of splayed anti-loosening line of rail train

    CN120876457A