A method and system for detecting loose bolts in rail vehicles

The bolt loosening detection model constructed through deep learning methods uses programmable gradient information and channel attention mechanism to replace standard convolution with liquid convolution, solving the problems of low detection efficiency and strong contingency in the existing technology, achieving efficient and accurate bolt loosening detection, and ensuring the safety of the rail transit system.

CN120259290BActive Publication Date: 2025-08-22CRRC HANGZHOU DIGITAL TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art has problems in the detection of bolt loosening of rail vehicles, which are low detection efficiency, long time-consuming and relying on template image comparison, resulting in strong accidental detection results.

Method used

Using deep learning methods, by introducing programmable gradient information and a general efficient layer aggregation network, combining the Ghost module to replace some standard convolution layers, using a reversible columnar network and channel attention mechanism, the standard convolution in the SPFF module is replaced as liquid convolution, and the FocalLoss function is used in the classification network to build a bolt loose detection model.

Benefits of technology

It realizes efficient and accurate bolt loosening detection without template image comparison, improves detection speed and accuracy, reduces manual inspection costs, and ensures the stability and safety of the rail transit transportation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259290B_ABST
    Figure CN120259290B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for detecting loose bolts on rail vehicles, comprising acquiring an image containing bolts and anti-loosening wires, constructing a target detection network that introduces programmable gradient information, a universal high-efficiency layer aggregation network, and a Ghost module, constructing a bolt loosening network that uses a reversible columnar network, a channel attention mechanism, etc., training a corresponding model using a data set, and then performing image detection on the image to be analyzed. The method can improve feature extraction capabilities and detection speed and accuracy, focus on key features, suppress interference, and solve low-resolution detection problems; no template comparison is required, and feature automatic learning is achieved, with strong robustness and versatility; automated detection can be performed, improving efficiency, reducing costs, avoiding missed detections, and ensuring rail transit safety.
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 particularly to a method and system for detecting loose bolts on rail vehicles. Background Art

[0002] In the rail transit industry, bolts are used to fasten various components and play a vital role in transportation vehicles such as EMUs, urban rail, and subways. However, during normal train operation, due to the influence of various factors such as wear, corrosion, and impact deformation, bolts will inevitably become loose, fatigue-fractured, and fail. These problems may not only lead to equipment failure, but also cause serious safety accidents, resulting in immeasurable losses. Therefore, in the maintenance process of rail transit vehicles, bolt loosening detection is particularly important. By timely detecting and handling loose bolts, equipment failures and safety accidents can be effectively prevented, ensuring the stable and safe operation of the rail transportation transportation system.

[0003] In the field of rail transit, the main methods for detecting loose bolts include manual inspection, sensor-based detection, and machine vision-based detection. The current existing technology (patent number: CN118411571A) discloses a bolt anomaly detection method for rail vehicles. Specifically, it discloses training a relatively accurate bolt model and anti-loosening line model through a large data set, and then constructing a database of various types of bolts in different states. Bolt loosening and missing can be robustly and accurately detected without template image comparison. However, this method requires a large amount of parameter setting and logical judgment for bolts of different sizes and models, resulting in a heavy burden on loose detection processing, long time consumption, and poor efficiency, and there is still room for improvement. Summary of the Invention

[0004] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide a method for detecting loose bolts for rail vehicles. This detection method can realize loose bolt detection robustly and accurately through automatic feature learning without the need for template image comparison.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A method for detecting loose bolts on a rail vehicle comprises the following steps:

[0007] An image acquisition step is to acquire an image containing the bolt and the anti-loosening wire captured by the visual camera as an image to be analyzed;

[0008] The target detection network construction step introduces programmable gradient information and a general efficient layer aggregation network into the target detection network, and replaces some standard convolutional layers with Ghost modules;

[0009] The bolt loosening network construction steps include introducing a reversible columnar 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, removing the multi-class classification branch, and using the FocalLoss function for dynamic weight adjustment in the classification layer of the classification network;

[0010] In the model construction step, a dataset is generated by taking historical images containing loose bolts and images containing intact bolts at a certain ratio, and then the dataset is input into the network architecture built in the target detection network construction step to train a bolt target detection model. The dataset is then input into the network architecture built in the bolt loosening network construction step to train a bolt loosening detection model.

[0011] In the bolt loosening detection step, the image to be analyzed is input into a bolt target detection model to output a bolt area image, and the bolt area image is input into a bolt loosening detection model to output a classification result and a looseness confidence level.

[0012] Furthermore, the CBAM includes performing global average pooling on the feature map output by the C3K2 module in the target detection network to generate channel descriptors, and then calculating the channel attention weights through two layers of MLP. The channel attention weights reflect the importance score of each channel, and the features after channel attention are average pooled and maximum pooled along the channel dimension to generate average pooled features and maximum pooled features, which are then fused into spatial weights through 7x7 convolution.

[0013] Furthermore, the bolt loosening network construction step includes a first optimization strategy, which includes adjusting the channel weights through one-dimensional convolution in ECA-Net and replacing the channel attention modules in some C3K2 blocks.

[0014] Furthermore, the bolt loosening network construction step includes a convolution replacement strategy, which includes

[0015] Determine the replacement range sub-step and the replacement parameter initialization sub-step,

[0016] In the sub-step of determining the replacement range, in the SPFF module of the classification network, the feature response capability of each convolutional layer to the low-resolution target is analyzed, and the standard convolutional layer with a low extraction effect on the low-resolution bolts and anti-loosening wires is selected as the replacement object;

[0017] The replacement parameter initialization sub-step replaces the replacement object with liquid convolution based on introducing time dynamic state, input and weight mapping, and time constant initialization.

[0018] Furthermore, the convolution replacement strategy also includes a sub-step of constructing time series features.

[0019] The sub-step of constructing time series features connects the replaced liquid convolutions in series in time series, and uses recursive calculation of the previous time step state and the current input to capture the temporal dynamic features such as the displacement trend and deformation trajectory of the resolution target in consecutive frames.

[0020] Furthermore, the convolution replacement strategy also includes a multi-scale feature fusion sub-step.

[0021] The multi-scale feature fusion sub-step combines the liquid convolution for processing time series features in the SPFF module with other convolutions to perform spatiotemporal feature fusion and splicing.

[0022] Furthermore, the model construction step also includes an anti-loosening line attention feedback strategy, which includes selecting a heat map generated by a training image after n rounds of training of the bolt loosening detection model, analyzing the color distribution characteristics of the heat map, selecting red as the key color indicator of the anti-loosening line area, and counting the number and distribution density of red pixels through a color depth quantization network. When the distribution density of red pixels exceeds a set threshold, it is determined that the network's attention to the anti-loosening line area meets the preset conditions; otherwise, a model trimming instruction is output.

[0023] Furthermore, it also includes a looseness sampling step. After detecting n bolts, the heat map corresponding to the next bolt is selected as the sampling map. In the sampling map, the boundary contours of each color are planned according to the color distribution characteristics, and it is determined whether the contour composed of red pixels is separated. The judgment result is compared with the classification result of the bolt. If the comparison is consistent, a normal instruction is output. If the comparison is inconsistent, a model-questionable instruction is output.

[0024] Furthermore, the method includes a looseness degree analysis step, extracting a contour area formed by red pixel points, selecting a center line in the length direction in the area, and analyzing the angle between the center lines of two adjacent areas as the bolt looseness angle.

[0025] A bolt loosening detection system for rail vehicles includes: an image acquisition module for acquiring an image containing a bolt and a locking wire captured by a visual camera as an image to be analyzed;

[0026] The target detection network building module introduces programmable gradient information and a general efficient layer aggregation network into the target detection network, and replaces some standard convolutional layers with Ghost modules;

[0027] The bolt-loosening network building module introduces a reversible columnar network and a channel attention mechanism in the feature extraction stage of the classification network. CBAM and ECA-Net are introduced in the task head stage of the classification network. The standard convolution in the SPFF module is replaced with liquid convolution. The multi-class classification branch is removed. The FocalLoss function is used for dynamic weight adjustment in the classification layer of the classification network.

[0028] The model building module generates a dataset by taking historical images containing both loose bolts and images containing intact bolts at a certain ratio. The dataset is then input into the network architecture built in the target detection network building step to train a bolt target detection model. The dataset is then input into the network architecture built in the bolt loosening network building step to train a bolt loosening detection model.

[0029] The bolt loosening detection module 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 the loosening.

[0030] 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 efficient layer aggregation network are introduced, and the Ghost module is combined to replace some standard convolutional layers. While reducing the amount of model calculation, the feature extraction capability of targets such as bolts and anti-loosening wires is enhanced, thereby improving the detection speed and accuracy. When constructing the bolt loosening network, a reversible columnar network and a channel attention mechanism are introduced in the feature extraction stage. CBAM and ECA-Net are integrated in the task head stage. Through the attention mechanism of the channel and spatial dimensions, the network is more focused on the key features of bolt loosening, effectively suppressing background interference and improving classification accuracy. The standard convolution in the SPFF module is replaced by liquid convolution. Combining time series feature construction with multi-scale feature fusion can capture the dynamic features of low-resolution targets in continuous frames, solving the problem that traditional methods have poor detection effects on low-resolution images.

[0031] 2. This invention eliminates the need for template image comparison and instead achieves automated feature learning through deep learning. This overcomes the inherent haphazardness of traditional template comparison-based detection methods and enhances the robustness and versatility of detection. Furthermore, the entire detection process requires no human intervention, enabling automated detection of loose bolts. This significantly improves detection efficiency, reduces the time and effort required for manual inspections, and avoids missed inspections caused by visual fatigue. This provides a feasible solution for large-scale, efficient detection of loose bolts on rail vehicles, effectively ensuring the stable and safe operation of rail transportation systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is the overall flow chart of the present invention;

[0033] Figure 2 It is a bolt marking format drawing;

[0034] Figure 3 is the graph to be detected in the present invention;

[0035] Figure 4 The bolt diagram and the corresponding thermal diagram when the bolt is not loosened in the present invention;

[0036] Figure 5 It is a bolt diagram and a corresponding thermal diagram when the bolt is loose in the present invention. DETAILED DESCRIPTION

[0037] The present invention will be described in further detail below with reference to the accompanying drawings and embodiments. Identical 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 directions in the accompanying drawings, and the terms "bottom," "top," "inner," and "outer" refer to directions toward or away from the geometric center of a particular component, respectively.

[0038] Since the current sensor-based detection method usually uses strain gauges installed on bolts to measure the force changes on the bolts, the installation of strain gauges is complicated and they are easily affected by environmental factors such as moisture and corrosion during long-term use, resulting in performance degradation, shortened lifespan, and increased maintenance costs. For the detection method based on machine vision, it is usually with the help of anti-loosening wires, template images, and deep learning-related algorithms to compare the template image and the current image to detect whether the bolts are loose. This method is heavily dependent on the template image, and the detection results of the template image comparison method are more accidental. Therefore, the present invention designs this bolt loosening detection method for rail vehicles, such as Figure 1 As shown, the following steps are included:

[0039] An image acquisition step is to acquire an image containing the bolt and the anti-loosening wire captured by the visual camera as an image to be analyzed;

[0040] The dataset construction steps are as follows: multiple images containing bolts and anti-loosening wires when the bolts are not loose are obtained from the historical database as positive sample data. Some target bolts are loosened, and images containing loose bolts and corresponding marking lines are collected to create negative samples in the bolt loosening detection dataset. In addition, it also includes images in extreme cases where dirt is attached to some parts of the bolts and anti-loosening wires by artificially applying dust and dirt to simulate train operation.

[0041] Data preprocessing: Convert the RGB images collected in the dataset and in real time into the HSV color space, and use the Single Scale Retinex (SSR) algorithm to enhance low-brightness images: ,in is the input image, is the Gaussian filter kernel;

[0042] Then, we created a bolt target detection dataset and a bolt loosening detection dataset. Specifically, we used LabelImg software to frame the minimum circumscribed rectangular frame of the bolts and their anti-loosening wires in all images in YOLO format to form a corresponding txt file. We organized all images and the corresponding annotation files in the ImageNet dataset format, and divided the training set, validation set, and test set into a ratio of 7:2:1. Finally, we formed a bolt target detection dataset, as shown in the following example: Figure 2 As shown in the figure, the bolt loosening detection dataset is prepared by using the image of the minimum circumscribed rectangular frame of the bolt and the anti-loosening line output by the bolt target detection model, dividing the training set, validation set and test set in a ratio of 7:2:1, and organizing them into a bolt loosening detection dataset in the CIFAR-10 dataset format.

[0043] The target detection network construction steps use the IYOLOv11 target detection network. 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 process information loss in deep networks and can provide complete input information for the target task to calculate the objective function, thereby obtaining reliable gradient information to update the network weights. GELAN is an architecture based on gradient path planning, which enables PGI to achieve superior detection results on lightweight models. The Ghost module replaces some standard convolutional layers. Although the standard convolutional layer can effectively extract image features during feature extraction, the amount of computation and parameters is large, which limits the application of the network on resource-constrained devices. The Ghost module reduces the amount of computation while maintaining or even improving the feature extraction capability of the network through linear transformation and reorganization of the feature map. In the network, the standard convolutional layer, which consumes a lot of computing resources and has high feature extraction repetition, 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, thereby significantly reducing the network's computing cost and parameter quantity without losing too much feature expression ability.

[0044] The bolt loosening network construction step introduces reversible column networks (RevCol) and channel attention mechanisms in the feature extraction stage of the classification network. The reversible column networks are embedded between appropriate network layers. By constructing a columnar information transmission path, data can be efficiently and reversibly exchanged between different layers during the feature extraction process, ensuring information integrity. A channel attention module is added in parallel to analyze each channel of the feature map, assigning different weights according to the importance of the channel, enhancing key channel features, and suppressing irrelevant channel information. The classification network introduces the RevCol module in the first convolutional block after the input layer. Through the reversible network structure design, RevCol solves the problem of layer-by-layer loss of information when transferring from low-level (input) to high-level (output) in deep learning models, 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 expressiveness of key features and suppress the interference of irrelevant features.

[0045] 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 channel and spatial dimensions, 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, thereby improving the network's sensitivity to bolt loosening features. The purpose is to increase 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 data characteristics, making the module more flexible and adaptable when extracting bolt loosening features. Then, the multi-category classification branch is removed, the network structure is simplified, and the network is focused on the binary classification task of whether the bolt is loose. This reduces redundant calculations and improves network training and inference efficiency. 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 loosening samples, balance the training weights of positive and negative samples, and improve the network's classification accuracy of bolt loosening.

[0046] 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;

[0047] ,in is the channel attention weight, the shape is Represents the importance score of each channel, with a value between [0, 1]; is a Sigmoid activation function used to map the MLP output to the range [0, 1]. MLP: Multilayer Perceptron, consisting of two fully connected layers, is used to learn complex relationships between channels. Input feature map Perform global average pooling to generate channel descriptors with the shape of , the specific calculation is: ,in Represent the number of channels, height and width of the input image respectively, is the spatial location;

[0048] ,in Is the input feature map, the shape is ; is the number of channels, and the features after channel attention are further Perform average pooling and maximum pooling along the channel dimension to generate average pooling features and max pooling features , fused into spatial weights through 7x7 convolution , in order to insert CBAM after each residual connection of the C3K2 module of the YOLOv11 target detection network to reduce the computational cost.

[0049] in , is the spatial attention weight, with the shape of , represents the importance score of each spatial position in the feature map, with a value between [0, 1]; It is a 7x7 convolutional layer with 2 input channels and 1 output channel, which is used to generate spatial weights. For the general and Splicing along the channel dimension, the resulting shape is characteristics; To map the feature map along the channel dimension Perform maximum pooling, the shape is , calculated as: .

[0050] ECA-Net is optimized as follows: one-dimensional convolution is used to efficiently adjust the channel weights and replace the channel attention module in some C3K2 blocks. The kernel size is dynamically calculated by the number of channels C, and the calculation formula is: ,in =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 information redundancy or insufficient feature extraction caused by the fixed convolution kernel size. When processing bolt loosening features, the dynamically adjusted one-dimensional convolution kernel can accurately capture the key channel features related to bolt loosening. Without increasing the amount of computation, it efficiently captures the important connections between channels, which enhances the network's response to the bolt loosening feature channel. Compared with the traditional channel attention module, it significantly improves the network's feature extraction efficiency and accuracy.

[0051] 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 and introduces temporal dynamic behavior. The core formula is:

[0052]

[0053] in is the current state, For input, is the convolution kernel weight, is the time constant (initial set to 0.1, which can be learned).

[0054] The specific steps to replace the standard convolution in some SPFF modules with liquid convolution are:

[0055] ①. Determine the replacement scope of SPFF modules

[0056] In the SPFF (Spatial Pyramid Feature Fusion) module of the YOLOv11 object detection network, the feature response capabilities of each convolutional layer to low-resolution targets are analyzed, and standard convolutional layers with weaker feature extraction effects on small targets (such as low-resolution bolts and anti-loosening wires) are selected as replacements for liquid convolution.

[0057] ② Liquid convolution core formula definition and parameter initialization

[0058] For the selected standard convolution layer, replace it with liquid convolution according to the following rules: 1. Introduce time dynamic state: define the current state Represents liquid convolution at time step The output features of include the memory of historical input features; 2. Input and weight mapping: the input of the original standard convolution and convolution kernel weights Reserved as the basis for spatial feature extraction of liquid convolution; 3. Time constant initialization: set the time constant The initial value of is 0.1. This parameter can be automatically learned and optimized through network training to adjust the fusion ratio of historical state and current input.

[0059] ③. Build a time series feature processing chain to achieve time dimension accumulation of features, compensate for the lack of details in single-frame images, and adapt to dynamic detection scenarios:

[0060] In the SPFF module, liquid convolution is connected in series in time series to form the dynamic feature extraction capability of continuous frame images: 1. Initial state setting: When processing the first frame image, initialize Or generate the initial feature state through random noise; 2. Multi-frame feature recursive processing: For each subsequent frame image, perform the following operations: input the feature map of the current frame image To liquid convolution, calculate the current state according to the core formula , fusion of the previous frame state With the current spatial characteristics ,Will As the output feature, it is passed to the next layer of the SPFF module. Through recursive calculation, liquid convolution can capture the time dimension features such as displacement trend and deformation trajectory of low-resolution targets in continuous frames, making up for the problem of insufficient details in single-frame images.

[0061] ④. Integrate the multi-scale feature fusion of the SPFF module to enhance the feature expression capability of low-resolution targets and improve the detection accuracy of small targets:

[0062] In the multi-branch structure of the SPFF module, liquid convolution and convolution layers of other scales (such as void convolution and standard convolution) are deployed in parallel 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 void convolution branch is responsible for extracting multi-scale spatial features of single-frame images (such as global shape and local edges); 2. Feature fusion: The feature maps output by each branch are spliced ​​in the channel dimension (such as through the Concat operation) and input into the subsequent convolution layer for cross-scale and cross-time feature fusion to enhance the comprehensive expression ability of low-resolution targets.

[0063] Removing the multi-category classification branch involves simplifying the prediction head, focusing on a single category, optimizing the bounding box regression loss, and the prediction head output is Channels, 1 for confidence, 4 for bounding box coordinates , using a 1x1 convolutional layer to directly map features to the predicted output.

[0064] The classification layer in the classification network uses the Focal Loss function as the loss function. Focal Loss dynamically adjusts the loss weight and introduces Visual Enhanced Loss to improve image clarity and the saturation of the anti-loosening line in the image. This allows the model to maintain high detection performance when processing blurred images and a small number of loose samples. The formula for Focal Loss is as follows:

[0065] ,

[0066] in, is the predicted probability, is the weight to balance positive and negative samples, is a hyperparameter that adjusts the loss weight, is the weight parameter, It is a loss term that measures the clarity of the image and the saturation of the anti-loosening line in the image. Specifically, the image quality loss can be defined as follows:

[0067] ,

[0068] ,

[0069] ,

[0070] in, 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 index of the image, used to traverse each pixel of the image.

[0071] In the model construction step, the bolt target detection dataset is input into the network architecture built in the target detection network construction step to train the bolt target detection model, and then the bolt loosening dataset is input into the network architecture built in the bolt loosening network construction step to train the bolt loosening detection model; which also includes the anti-loosening line attention feedback strategy, such as Figure 4 and Figure 5 As shown in the figure, the anti-loosening line attention feedback strategy includes selecting a training image after n rounds of bolt loosening detection model training, generating a model attention distribution heat map through the GradCAM algorithm, analyzing the color distribution characteristics of the heat map, selecting red as the key color indicator of the anti-loosening line area, and counting the number and distribution density of red pixels through the color depth quantization network. When the distribution density of red pixels exceeds the set threshold, it is determined that the network's attention to the anti-loosening line area meets the preset conditions; otherwise, the model correction instruction is output.

[0072] Bolt loosening detection steps, such as Figure 3 As shown, the image to be analyzed is input into the bolt target detection model to output the bolt area image. The bolt area image contains the location information of all bolt areas and the length and width of the minimum circumscribed rectangle corresponding to the area. The bolt area image is input into the bolt loosening detection model to output the classification result and the confidence level of looseness. The classification result is output as loose and not loose. If the confidence level is 0.8 points for looseness, it is 0.2 points for not loose.

[0073] It also includes the loosening spot check step, that is, the heat map continues to analyze. After detecting n bolts, the heat map corresponding to the next bolt is selected as the spot check map. Through image segmentation algorithms (such as threshold segmentation and edge detection), according to the color distribution characteristics of the heat map (red represents high attention area, blue represents low attention area), the boundary contours of each color area are planned, and the outline of the anti-loosening line area composed of red pixels is extracted. It is analyzed whether there is a separation phenomenon in the red pixel outline, such as Figure 4 As shown, the bolts are not loosened. Figure 5 As shown, the bolt is loose, and there are yellow separations between the red outlines, that is, whether the attention distribution in the anti-loosening line area is broken or scattered. The judgment result is then compared with the classification result of the bolt. If they are consistent, a normal instruction is output. If the comparison is inconsistent, a model questionable instruction is output.

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

[0075] A detection system is provided correspondingly, specifically comprising: an image acquisition module, which acquires an image containing the bolt and the anti-loosening wire captured by the visual camera as an image to be analyzed;

[0076] The target detection network building module introduces programmable gradient information and a general efficient layer aggregation network into the target detection network, and replaces some standard convolutional layers with Ghost modules;

[0077] The bolt-loosening network building module introduces a reversible columnar network and a channel attention mechanism in the feature extraction stage of the classification network. CBAM and ECA-Net are introduced in the task head stage of the classification network. The standard convolution in the SPFF module is replaced with liquid convolution. The multi-class classification branch is removed. The FocalLoss function is used for dynamic weight adjustment in the classification layer of the classification network.

[0078] The model building module generates a dataset by taking historical images containing both loose bolts and images containing intact bolts at a certain ratio. The dataset is then input into the network architecture built in the target detection network building step to train a bolt target detection model. The dataset is then input into the network architecture built in the bolt loosening network building step to train a bolt loosening detection model.

[0079] The bolt loosening detection module 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 the loosening.

[0080] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions based on the principles of the present invention are within the scope of protection of the present invention. It should be noted that improvements and modifications that do not depart from the principles of the present invention are within the scope of protection of the present invention.

Claims

1. A method for detecting loose bolts in rail vehicles, characterized in that: The steps include: An image acquisition step is to acquire an image containing the bolt and the anti-loosening wire captured by the visual camera as an image to be analyzed; The target detection network construction step introduces programmable gradient information and a general efficient layer aggregation network into the target detection network, and replaces some standard convolutional layers with Ghost modules; The bolt loosening network construction step introduces a reversible columnar 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, removes the multi-category classification branch, and uses the FocalLoss function to perform dynamic weight adjustment in the classification layer of the classification network; the CBAM includes performing global average pooling on the feature map output by the C3K2 module in the target detection network to generate channel descriptors, and then calculating the channel attention weight through two layers of MLP. The channel attention weight reflects the importance score of each channel, and the features after channel attention are average pooled and maximum pooled along the channel dimension to generate average pooling features and maximum pooling features, which are then fused into spatial weights through 7x7 convolution; the bolt loosening network construction step includes a first optimization strategy, which includes adjusting the channel weights through one-dimensional convolution in ECA-Net and replacing the channel attention modules in some C3K2 blocks; In the model construction step, a dataset is generated by taking historical images containing loose bolts and images containing intact bolts at a certain ratio, and then the dataset is input into the network architecture built in the target detection network construction step to train a bolt target detection model. The dataset is then input into the network architecture built in the bolt loosening network construction step to train a bolt loosening detection model. In the bolt loosening detection step, the image to be analyzed is input into a bolt target detection model to output a bolt area image, and the bolt area image is input into a bolt loosening detection model to output a classification result and a looseness confidence level.

2. A method for detecting loose bolts for rail vehicles according to claim 1, characterized in that: The bolt loosening network construction step includes a convolution replacement strategy, which includes Determine the replacement range sub-step and the replacement parameter initialization sub-step, In the sub-step of determining the replacement range, in the SPFF module of the classification network, the feature response capability of each convolutional layer to the low-resolution target is analyzed, and the standard convolutional layer with a low extraction effect on the low-resolution bolts and anti-loosening wires is selected as the replacement object; The replacement parameter initialization sub-step replaces the replacement object with liquid convolution based on introducing time dynamic state, input and weight mapping, and time constant initialization.

3. A method for detecting loose bolts for rail vehicles according to claim 2, characterized in that: The convolution replacement strategy also includes a sub-step of constructing time series features. The sub-step of constructing time series features connects the replaced liquid convolutions in series in time series, and uses recursive calculation of the previous time step state and the current input to capture the temporal dynamic features such as the displacement trend and deformation trajectory of the resolution target in consecutive frames.

4. A method for detecting loose bolts for rail vehicles according to claim 3, characterized in that: The convolution replacement strategy also includes a multi-scale feature fusion sub-step. The multi-scale feature fusion sub-step combines the liquid convolution for processing time series features in the SPFF module with other convolutions to perform spatiotemporal feature fusion and splicing.

5. A method for detecting bolt loosening for a rail vehicle according to any one of claims 1 to 3, characterized in that: The model construction step also includes an anti-loosening line attention feedback strategy, which includes selecting a heat map generated by a training image after the bolt loosening detection model has been trained for n rounds, analyzing the color distribution characteristics of the heat map, selecting red as the key color indicator of the anti-loosening line area, and counting the number and distribution density of red pixels through a color depth quantization network. When the distribution density of red pixels exceeds a set threshold, it is determined that the network's attention to the anti-loosening line area meets the preset conditions; otherwise, a model trimming instruction is output.

6. A method for detecting bolt loosening for a rail vehicle according to claim 5, characterized in that: It also includes a looseness spot check step. After detecting n bolts, the heat map corresponding to the next bolt is selected as the spot check map. In the spot check map, the boundary contours of each color are planned according to the color distribution characteristics, and it is determined whether the contour composed of red pixels is separated. The judgment result is compared with the classification result of the bolt. If the comparison is consistent, a normal instruction is output. If the comparison is inconsistent, a model-questionable instruction is output.

7. A method for detecting loose bolts for rail vehicles according to claim 6, characterized in that: The method also includes a looseness degree analysis step, extracting the contour area formed by the red pixel points, selecting the center line in the length direction in the area, and analyzing the angle between the center lines of two adjacent areas as the bolt looseness angle.

8. A bolt loosening detection system for rail vehicles, characterized by: include: An image acquisition module acquires an image containing bolts and anti-loosening wires captured by a visual camera as an image to be analyzed; The target detection network building module introduces programmable gradient information and a general efficient layer aggregation network into the target detection network, and replaces some standard convolutional layers with Ghost modules; The bolt loosening network construction module introduces a reversible columnar 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, removes the multi-category classification branch, and uses the FocalLoss function to perform dynamic weight adjustment in the classification layer of the classification network; the CBAM includes global average pooling based on the feature map output by the C3K2 module in the target detection network to generate channel descriptors, and then calculates the channel attention weight through two layers of MLP. The channel attention weight reflects the importance score of each channel, and the features after channel attention are average pooled and maximum pooled along the channel dimension to generate average pooled features and maximum pooled features, which are then fused into spatial weights through 7x7 convolution; the bolt loosening network construction step includes a first optimization strategy, which includes adjusting the channel weights through one-dimensional convolution in ECA-Net and replacing the channel attention module in part of the C3K2 block; The model building module generates a dataset by taking historical images containing both loose bolts and images containing intact bolts at a certain ratio. The dataset is then input into the network architecture built in the target detection network building step to train a bolt target detection model. The dataset is then input into the network architecture built in the bolt loosening network building 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 area image, and inputs the bolt area image into the bolt loosening detection model to output the classification result and the confidence level of the loosening.

Citation Information

Patent Citations

  • Bolt anomaly detection method for railway vehicle

    CN118411571A

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

    CN113902680A

  • Target detection method and apparatus based on attention mechanism, and computer device

    WO2021208726A1