A method and device for detecting abnormalities in the tread of high-speed train wheels
By combining the improved YOLOv5-SEG model with coordinate attention and the ASFF module, anomaly detection is performed on the wheel tread of high-speed trains. This solves the problems of high false alarm rate, high false negative rate and excessive manual intervention in existing methods, and achieves efficient, accurate and automated fault detection.
Patent Information
- Application Number
- CN202510474799.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-04-16
AI Technical Summary
Existing methods for detecting abnormalities in train wheel treads suffer from high false alarm rates, high false negative rates, difficulty in accurately locating and segmenting faults, and the need for extensive manual intervention, which affect detection efficiency and safety.
An improved YOLOv5-SEG model, combined with a coordinate attention mechanism and the spatial adaptive fusion module ASFF, is used to detect anomalies in wheel tread images. Fault areas are identified through a target detection and segmentation model, and after initial screening by an unsupervised anomaly detection algorithm, manual verification and pixel-by-pixel annotation are performed.
It has improved the accuracy and efficiency of fault detection, reduced manual intervention, and achieved non-destructive testing and automated testing, thus ensuring the safe operation of high-speed trains.
Smart Images

Figure CN120318199B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method and apparatus for detecting abnormalities in the tread surface of train wheels. Background Technology
[0002] Train wheels are a crucial component of the running gear of high-speed trains, playing a vital role in ensuring safe train operation. The wheel tread is the part that contacts the rails; common faults such as abrasions, peeling, and chafing not only cause significant impact and severe vibration to the wheels but can also affect the safe operation of the train, shorten the service life of the wheels and other components, extend braking distance, and even damage the rails and tracks. These faults seriously jeopardize the safety and stability of railway transportation.
[0003] Traditional methods for inspecting the wheel treads of high-speed trains typically rely on manual inspection. After a train enters a maintenance depot, staff use equipment to inspect the wheel condition. With increasing railway transport demand and a rapid increase in the number of high-speed trains, manual inspection faces significant pressure, being inefficient and time-consuming. This is especially true when wheel tread faults are subtle or difficult to detect, making traditional methods even more problematic, prone to missed or false detections, impacting overall maintenance efficiency and vehicle operational safety. In recent years, the rapid development of artificial intelligence technology, particularly advancements in deep learning and image processing, has brought new opportunities for high-speed train wheel tread anomaly detection. Image processing-based intelligent detection methods can automatically detect wheel tread images in a short time, quickly identifying potential abnormal areas and feeding back fault information to maintenance personnel, thereby significantly improving detection efficiency and accuracy and reducing the burden of manual inspection. However, existing image processing-based anomaly detection methods still have some shortcomings, mainly in the following aspects.
[0004] Existing anomaly detection methods suffer from high false alarm and false negative rates, especially when dealing with small-sized or complex background fault areas, where accuracy and efficiency are often insufficient, affecting practical application results. Most existing methods struggle to simultaneously achieve accurate fault location and fine-grained segmentation of fault areas, particularly when dealing with low-resolution images or complex backgrounds, resulting in poor segmentation performance and an inability to accurately determine the type and severity of the fault. Although some existing methods can improve the efficiency of anomaly detection through unsupervised learning or preliminary screening algorithms, the inability to automatically label fault areas still requires significant manual intervention for labeling and confirmation, increasing workload and human resource costs.
[0005] Therefore, deep learning-based methods for detecting abnormalities in train wheel treads, especially those employing improved target detection and image segmentation techniques, can effectively improve the accuracy and efficiency of fault detection, reduce manual intervention, and enhance the level of intelligence. This has become an effective solution to the aforementioned problems. Summary of the Invention
[0006] This application provides a method and apparatus for detecting abnormalities in the tread surface of high-speed train wheels, the technical solution of which is as follows:
[0007] On the one hand, a method for detecting abnormalities in the wheel tread of high-speed trains is provided. This method is used in a comprehensive dynamic image detection system for high-speed trains entering a depot. The detection system includes a tread acquisition module, and the method includes:
[0008] The tread acquisition module acquires images of the train wheelset tread.
[0009] The collected wheel tread images were organized and annotated.
[0010] Anomaly detection is performed on the wheel tread image using a target detection and segmentation model.
[0011] For the detected target fault area information, small areas are filtered out by area and the location of the fault is returned to the platform in a timely manner.
[0012] Optionally, the all-round dynamic image detection system for EMU entering the depot is equipped with four tread acquisition modules. Each tread acquisition module includes two sets of acquisition modules, one on the left and one on the right. Each set of acquisition modules includes five area array cameras, and each area array camera adopts an oblique upward shooting angle.
[0013] Each set of acquisition modules is connected to a trigger magnetic cylinder. The tread acquisition module is communicatively connected to a vehicle receiving magnetic cylinder, and the vehicle receiving magnetic cylinder is connected to a converter for information calculation.
[0014] Optionally, acquiring the wheelset tread image through the tread acquisition module includes:
[0015] In response to the receiving magnetic cylinder receiving the receiving signal for the first time, the time of the receiving signal is recorded by the converter, wherein the receiving signal is the signal generated by the corresponding sensor of the receiving magnetic cylinder when the train rolls onto the rail;
[0016] In response to each subsequent wheel passing over a trigger cylinder, the converter calculates the passing speed based on the actual distance between the current trigger cylinder and the receiving cylinder;
[0017] The delay time of the area scan camera in different acquisition modules is calculated, thereby controlling the acquisition trigger time of different cameras;
[0018] In response to the tread acquisition module receiving the train reception signal, the corresponding acquisition camera is activated through the tread acquisition module to start sequentially capturing images of the train wheelset tread.
[0019] The collected images of the train wheelset treads are transmitted to the server.
[0020] Optionally, the process of organizing and labeling the acquired wheel tread images includes:
[0021] Suspected fault images are initially screened from the wheel tread images using an unsupervised anomaly detection algorithm;
[0022] The suspected faulty images were manually reviewed and the faulty areas were marked pixel by pixel.
[0023] Optionally, before performing anomaly detection on the wheel-tread image using the target detection and segmentation model, the method further includes building the target detection and segmentation model;
[0024] The construction of the object detection and segmentation model includes:
[0025] Modify the original Proto module in the yolov5-seg model. The network structure of the yolov5-seg model consists of four parts: input, backbone network, neck structure, and head prediction layer.
[0026] The target detection and segmentation model is obtained by adding a coordinate attention module and a spatial adaptive fusion ASFF module to the YOLOv5-SEG model.
[0027] Optionally, the step of performing anomaly detection on the wheel tread image using a target detection segmentation model includes:
[0028] The wheel tread image is preprocessed using the input terminal;
[0029] The BackBone network is used to extract useful features from the preprocessed wheel pair tread image to obtain the corresponding feature map.
[0030] The feature maps are fused using the Neck structure, and the spatial location information of the feature maps at different scales is enhanced using the coordinate attention module. The enhanced multi-scale feature maps are then passed to the Head prediction layer.
[0031] The ASFF module adaptively selects feature maps of different levels for weighted fusion to obtain a multi-scale feature map after adaptive fusion. The criterion for adaptive selection is to ensure that feature maps of different sizes are processed simultaneously. The ASFF module is added in front of the Head prediction layer.
[0032] The head prediction layer performs target detection on the multi-scale feature map to obtain target fault region information, which includes fault region bounding boxes, fault category information, and segmented image information.
[0033] Optionally, the step of adaptively selecting feature maps of different levels through the ASFF module and performing weighted fusion to obtain an adaptively fused multi-scale feature map includes:
[0034] The ASFF module takes feature maps of different sizes as input, upsamples the small feature maps at different ratios, and keeps the spatial features of the large feature maps unchanged, maintaining the same resolution.
[0035] Feature maps from different layers are fused and normalized using softmax. They are then multiplied and added with features of the same resolution to obtain adaptively fused multi-scale feature maps.
[0036] Optionally, the step of enhancing the spatial location information of feature maps at different scales through the coordinate attention module and passing the enhanced multi-scale feature maps to the Head prediction layer includes:
[0037] The input feature map is pooled and encoded along the X and Y directions by the coordinate attention module.
[0038] The encoded information in the X and Y directions is concatenated and fused, and then decomposed into two independent tensors along the spatial dimension.
[0039] Perform convolution transformation on the two tensors and adjust their number of channels until they match the number of channels of the input feature map;
[0040] The attention information in the X and Y directions is fused with the original input feature map;
[0041] The fused multi-scale feature map is passed to the Head prediction layer for target detection.
[0042] Optionally, the step of performing target detection on the multi-scale feature map through the Head prediction layer to obtain target fault region information including fault region bounding boxes, fault category information, and segmented image information includes:
[0043] The multi-scale feature map is processed through the Head prediction layer, which includes convolutional layers, pooling layers, and fully connected layers.
[0044] A segmentation branch, Proto, is added to the yolov5-seg model. The image is restored to the input size through a bottom-up decoding process, and the final image segmentation result is generated.
[0045] In the yolov5-seg model, feature maps of different resolutions extracted from the Neck end are passed to the target detection head. The target detection head is used to optimize the target bounding box, category regression and box position regression tasks, and finally outputs the bounding box, category information and pixel-level segmentation results of the target fault region.
[0046] By borrowing the bottom-up decoding structure from PaNet through the Proto module, the feature size is restored layer by layer from 80×80 to 640×640 resolution. Through concatenated CBL and upsampling pooling operations, the input features are gradually restored to the size of 640×640, and pixel-level segmentation of target regions of different sizes is performed.
[0047] After processing by the target detection head and segmentation part, the bounding box, category information, and pixel-level segmentation image of the target fault region are obtained.
[0048] On the other hand, a device for detecting abnormal wheel tread patterns of high-speed trains is provided. This device is used in a comprehensive dynamic image detection system for high-speed trains entering a depot. The detection system includes a tread acquisition module, and the device includes:
[0049] The image acquisition module is used to acquire images of the wheelset tread through the tread acquisition module;
[0050] The image processing module is used to organize and annotate the acquired wheel tread images;
[0051] Anomaly detection module is used to perform anomaly detection on the wheel tread image using a target detection and segmentation model;
[0052] The fault detection module is used to filter out small areas based on the detected target fault area information and promptly return the location of the fault to the platform.
[0053] On the other hand, a server is provided, the server including a processor and a memory; the memory stores at least one instruction, the at least one instruction being executed by the processor to implement the train wheel tread anomaly detection method as described above.
[0054] On the other hand, a computer-readable storage medium is provided, the storage medium storing at least one instruction, the at least one instruction being executed by a processor to implement the train wheel tread anomaly detection method as described above.
[0055] On the other hand, a computer program product is also provided, which stores at least one instruction, which is loaded and executed by the processor to implement the train wheel tread anomaly detection method described above.
[0056] This application discloses a method for detecting abnormalities in the wheel tread of high-speed trains. Based on deep learning image processing technology, this method effectively improves the detection accuracy and efficiency of wheel tread faults by introducing an improved YOLOv5-SEG model. By combining a coordinate attention mechanism and the spatial adaptive fusion module ASFF, the model demonstrates excellent performance in multi-scale feature fusion and target localization accuracy, particularly in accurately identifying fault regions of different sizes, and exhibits strong real-time performance. Compared with traditional manual inspection methods, this method has significant advantages in non-destructive testing, automated detection, and fault information feedback. It not only significantly improves detection efficiency and reduces manual labor intensity but also enables timely detection and localization of wheel tread faults, ensuring the safe operation of high-speed trains. Attached Figure Description
[0057] Figure 1 A layout diagram of a detection system provided in an exemplary embodiment of this application is shown;
[0058] Figure 2 A flowchart of a method for detecting abnormalities in the tread surface of a train wheel provided in an exemplary embodiment of this application is shown;
[0059] Figure 3 A diagram illustrating the fault is shown.
[0060] Figure 4 A picture of a normal tread surface is shown;
[0061] Figure 5 These are fault images detected by the VAND algorithm.
[0062] Figure 6 This is a schematic diagram of the Backbone network structure;
[0063] Figure 7 A schematic diagram of pooling encoding in the X and Y directions;
[0064] Figure 8 This is a flowchart of the processing within the ASFF module;
[0065] Figure 9 This is a schematic diagram of the bottom-up decoding structure in PaNet;
[0066] Figure 10 This is a flowchart illustrating the tread image anomaly detection system used on-site at the EMU depot.
[0067] Figure 11 This is a schematic diagram of the tread failure area. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0069] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0070] Please refer to Figure 2 The document illustrates a flowchart of a method for detecting abnormal wheel tread patterns on high-speed trains, provided in an exemplary embodiment of this application. This method is used in a dynamic image detection system for high-speed trains entering a depot, the detection system including a tread pattern acquisition module, and the method comprising:
[0071] Step 201: Acquire images of the wheelset tread using the tread acquisition module.
[0072] like Figure 1 As shown, the layout of the detection system will be explained first. The all-round dynamic image detection system for EMU entering the depot is equipped with four tread acquisition modules. Each tread acquisition module includes two sets of acquisition modules, one on the left and one on the right. Each set of acquisition modules includes five area array cameras. Each area array camera adopts an oblique upward shooting angle.
[0073] Each set of acquisition modules is connected to a trigger magnetic cylinder. The tread acquisition module is communicatively connected to a vehicle receiving magnetic cylinder, and the vehicle receiving magnetic cylinder is connected to a converter for information calculation.
[0074] Therefore, in one possible implementation, step 201 includes the following.
[0075] Content 1: In response to the receiving magnetic cylinder receiving the receiving signal for the first time, the time of the receiving signal is recorded by a converter, wherein the receiving signal is the signal generated by the corresponding sensor of the receiving magnetic cylinder when the train rolls onto the rail.
[0076] Content 2: In response to each subsequent wheel passing over a triggering magnetic cylinder, the converter will calculate the passing speed based on the actual distance between the current triggering magnetic cylinder and the receiving magnetic cylinder.
[0077] Content 3: Calculate the delay time of the area array camera in different acquisition modules, thereby controlling the acquisition trigger time of different cameras.
[0078] Content 4: In response to the tread acquisition module receiving the train reception signal, the corresponding acquisition camera is activated through the tread acquisition module to start sequentially capturing images of the train wheelset tread.
[0079] Item 5: Transmit the collected images of the train wheelset treads to the server.
[0080] In one possible implementation, after the train passes the acquisition area, the 360-degree dynamic image detection system for the EMU entering the depot will send a transmission command to the transmission program, and the transmission program will start transmitting the images in the acquisition machine to the server. The acquisition machine is an acquisition and management machine connected to the area array camera.
[0081] Combined with appendix Figure 1 Specifically, four tread acquisition modules (31, 32, 33, 34) were installed on site. Each module consists of two sets of acquisition modules, one on the left and one on the right. Each module contains five area array cameras with an oblique, upward-facing view. When trigger cylinder 1 receives a trigger signal, it activates the five cameras on the left side of modules 31 and 33 to acquire images. When trigger cylinder 2 receives a trigger signal, it activates the five cameras on the right side of modules 31 and 33, and so on. Trigger cylinders 3 and 4 control the acquisition work of the cameras in modules 32 and 34, respectively. After the train passes, the system sends a transmission command to initiate the transmission program, transferring the acquired images from the acquisition unit to the data processing server.
[0082] Step 202: Organize and label the collected wheel tread images.
[0083] In one possible implementation, step 202 includes the following.
[0084] Content 1: Suspected fault images are initially screened from the wheel tread images using an unsupervised anomaly detection algorithm.
[0085] Part Two: Manually review the suspected faulty images and mark the faulty areas pixel by pixel.
[0086] The reason for adding a manual review process needs to be explained in detail here. Because the number of tread images (i.e., wheel-to-tread images) collected for each train is large (1280 images for 8 train sets, 2560 images for 16 train sets), and the camera shooting angle is fixed, it would be too time-consuming and labor-intensive to judge each image one by one. Therefore, we first use an unsupervised anomaly detection algorithm to initially screen out suspected fault images, and then manually review the initially screened fault images and mark the fault areas pixel by pixel.
[0087] In one example Figure 3 A diagram illustrating the fault is shown. Figure 4 A normal tread surface image is shown. Figure 5These are fault images detected by the VAND algorithm (red areas indicate abnormal regions). The initial dataset consists of images from six trains reviewed by the EMU depot team between May 19th and May 23rd, 2024. Common fault images (such as dents and foreign objects; however, samples of major faults like peeling and abrasions are scarce and are being collected continuously) were selected. The unsupervised anomaly detection algorithm VAND (Visual Anomaly and Novelty Detection) was used for initial screening of tread anomalies. From the initial dataset, 2927 normal images were selected as the training set, 732 normal and 85 abnormal images as the validation set, and the remaining 3840 images as the test set. The tread anomaly images detected by VAND are shown below. Figure 5 As shown, 81 anomalies were detected in the test set (after review, 15 were positive reports, 66 were false positives, and there were no missed reports). This demonstrates that unsupervised anomaly detection algorithms can detect most anomalies, but they cannot provide precise fault area sizes (e.g., area) and have a high number of false positives, making them unsuitable for direct on-site detection. Therefore, we used unsupervised anomaly detection as the initial screening tool, with professionals annotating the fault areas of the selected anomaly images pixel-by-pixel as the gold standard for subsequent analysis.
[0088] Step 203: Perform anomaly detection on the wheel tread image using an object detection and segmentation model.
[0089] In one possible implementation, step 203 includes the following.
[0090] Content 1: Preprocess the wheel tread image through the input terminal.
[0091] The input end is responsible for image preprocessing, using Mosaic data augmentation. By randomly scaling, cropping, and arranging the input images, new images are stitched together to simulate various perspectives (including imaging distance and imaging angle) that may appear in the acquired images. This enriches the diversity of the original dataset and also helps to improve the detection performance of small targets, thereby improving the robustness of the model.
[0092] Content 2: Useful features are extracted from the preprocessed wheel pair tread image using the BackBone network to obtain the corresponding feature map.
[0093] The backbone network is used to extract image features. Its main function is to transform the original input image into multi-layer feature maps for subsequent object detection tasks. For example... Figure 6As shown, the preprocessed image is first subjected to feature extraction using a 6×6 convolution with a stride and expansion of 2. This reduces the resolution of the original image (from 640×640 to 320×320) and distributes image information across different channels, ensuring increased computational speed without losing image information. Similar to common backbones, yolov5-seg uses the basic convolutional neural network CBL module, as well as the C3 module containing residual structures and the spatial pyramid pooling module SPPF.
[0094] Content 3: The feature maps are fused using the Neck structure, and the spatial location information of the feature maps at different scales is enhanced using the coordinate attention module. The enhanced multi-scale feature maps are then passed to the Head prediction layer.
[0095] Neck structure ( Figure 6 The middle two columns can perform multi-scale feature fusion on the feature map and pass these features to the Head prediction layer.
[0096] like Figure 7 As shown, the input features are encoded using pooling along the X and Y directions respectively through the coordinate attention module;
[0097] The encoded information from the two directions is spliced and fused, and then decomposed into two independent tensors along the spatial dimension.
[0098] Perform a convolution transformation to change the number of channels in the two tensors to the same dimension as the number of channels in the input features;
[0099] Therefore, we add the coordinate attention mechanism to the feature maps with smaller resolutions (20×20, 40×40) before the Head prediction layer, while fusing inter-channel relationships and positional information, so that the model can more accurately locate and identify the target fault area.
[0100] Content 4: The ASFF module adaptively selects feature maps of different levels and performs weighted fusion to obtain an adaptively fused multi-scale feature map. The criterion for adaptive selection is to ensure that feature maps of different sizes are processed simultaneously. The ASFF module is added in front of the Head prediction layer.
[0101] The ASFF module takes feature maps of different sizes as input, upsamples the small feature maps at different ratios, and keeps the spatial features of the large feature maps unchanged, maintaining the same resolution. The feature maps from different layers are fused and normalized by softmax, and then multiplied and added with features of the same resolution to obtain the adaptively fused multi-scale feature map.
[0102] In one example, such as Figure 8 As shown, the ASFF module takes features of different sizes as input; in our experiment, we used... Figure 3 The features from layers 17, 21, and 25 are used as input. Small-sized semantic features are upsampled at different ratios, while large-sized spatial features remain unchanged, maintaining the same resolution. Then, the feature information from different layers is fused and normalized by softmax. It is then multiplied and added with features of the same resolution. As the neural network parameters are continuously iterated and optimized, this module acts as an adaptive weight feature fusion module, which can locate faults from a larger field of view while retaining fine-grained fault information, thereby improving the accuracy of segmentation and localization.
[0103] Content 5: Target detection is performed on the multi-scale feature map through the Head prediction layer to obtain target fault region information including fault region bounding box, fault category information, and segmented image.
[0104] Head prediction layer Figure 6 The model structure in the last column can make final predictions on feature maps of different sizes (20×20, 40×40, 80×80). Among them, the smaller feature maps (20×20, 40×40) have undergone multiple convolutional feature extractions, resulting in richer semantic information and stronger non-linear fitting capabilities, which is more helpful in improving the accuracy of large bounding box regression in classification and detection tasks. The larger feature map (80×80) represents richer image spatial information and is suitable for fine-grained pixel-level segmentation tasks.
[0105] First, it should be noted that before performing anomaly detection on the wheel-tread image using the object detection and segmentation model, it is necessary to build the object detection and segmentation model. Building the object detection and segmentation model includes:
[0106] Content 1: Modify the original Proto module in the yolov5-seg model. The network structure of the yolov5-seg model consists of four parts: the input end, the BackBone network, the Neck structure, and the Head prediction layer.
[0107] In one possible implementation, four convolutional and upsampling pooling operations are concatenated after the original output features to expand the original feature map from 80×80 to 640×640, which facilitates fine-grained segmentation tasks.
[0108] Content 2: Based on the YOLOv5-SEG model, a coordinate attention module and an ASFF module are added to obtain the target detection and segmentation model.
[0109] YOLOv5 is currently the mainstream object detection framework in industrial inspection, characterized by its high speed, small model size, high accuracy, and ease of use. YOLOv5-SEG is an image segmentation model based on YOLOv5, adding a segmentation head to YOLOv5, enabling the model to perform object detection and segmentation simultaneously. In one possible implementation, a coordinate attention module and a spatial adaptive network ASFF are added to YOLOv5-SEG, and the original Proto module is modified, which can improve the model's detection performance for small target fault regions. Figure 6 A schematic diagram of the improved YOLOv5-SEG model framework is shown. The YOLOv5-SEG network structure mainly consists of four parts: the input layer, the Backbone network, the Neck structure, and the Head prediction layer.
[0110] Step 204: Filter out small areas based on the detected target fault area information and promptly return the location of the fault to the platform.
[0111] The head layer processes features of different sizes (20×20, 40×40, 80×80) using convolutional layers, pooling layers, and fully connected layers. The modified YOLOv5-SEG model adds a segmentation branch, Proto, which, referencing the decoding part of PaNet, implements a bottom-up feature decoding process, ultimately restoring the image to the input size to generate the image segmentation result. The object detection part follows the original idea of YOLOv5-SEG, feeding the features extracted at different resolutions from the neck layer back into the object detection head for optimization tasks such as bounding box, category, and bounding box position regression. Finally, it returns the object detection bounding boxes and category information, as well as pixel-level segmentation results.
[0112] like Figure 9 The diagram shows the bottom-up decoding structure in PaNet. The segmentation model structure Proto borrows from the bottom-up decoding structure in PaNet. The ASFF-enhanced feature information has a feature size of 80×80, while the original image is 640×640. Within the 80×80 size, segmentation optimization of some small fault regions is quite difficult. Therefore, we use concatenated and upsampling pooling operations to gradually restore the input features from 80×80 to 640×640, achieving pixel-level segmentation of target regions of different sizes within a larger field of view.
[0113] In addition, the object detection and segmentation model provided in this application also includes subsequent model training and iterative parameter updates.
[0114] The YOLOv5-SEG model uses stochastic gradient descent as the optimizer to iteratively optimize the model parameters. It was trained for 70 epochs on a Windows 11 machine with a 3090 graphics card, and the optimal model parameters were saved on the validation set. The YOLOv5-SEG loss function includes loss functions for object detection and segmentation. The loss function for object detection is Loss... det Consistent with the loss function in the original YOLOv5, including regression loss for the location box. Target confidence loss and category loss .
[0115]
[0116] Where K, S, and B represent the feature maps of different output categories, the total number of pixels, and the number of anchor boxes, respectively. , , express , , The weights of the three loss functions have default values of 0.05, 0.3, and 0.7. The parameters are optimized by calculating the intersection-union ratio between the target box and the predicted box, while the confidence loss and the class loss are both optimized using the binary cross-entropy function. This indicates whether the j-th anchor box of the i-th center pixel in the k-th feature map is a positive sample; 1 indicates positive and 0 indicates negative. The weights used to balance the output feature maps at each scale (20×20, 40×40, 80×80), with a default value of [4.0, 1.0, 0.4].
[0117] Loss function for image segmentation seg It consists of two parts: the binary cross-entropy loss function. BCE and Dice loss function Dice Before the predicted image is fed into the loss function, it is first normalized to the range (0, 1) using the Sigmoid function, and then the probability distribution difference between the predicted result and the labeling standard is statistically calculated. The Dice loss function focuses on the model's accurate classification of foreground and background. Combining the two loss functions can better improve the model's performance in both segmentation boundaries and distinguishing foreground and background classification. As shown in the formula below, This represents the value of the i-th pixel in the prediction result. This represents the value of the i-th pixel in the labeled image.
[0118]
[0119] The trained model is saved as a .pt file, which is designed for Python environments and requires the original model definition to load. However, most recognition machines do not have a Python environment configured, making cross-platform deployment and operation impossible. Moreover, in hardware environments with GPUs, the conversion between the two does not result in a decrease in inference speed or detection performance. Therefore, we convert the .pt file to a torchscript file, enabling the model to perform inference in an environment that does not require Python.
[0120] The specific process of the tread image anomaly detection system used on-site at the EMU depot is as follows: Figure 10 The train passes by the data acquisition equipment, which takes pictures and transmits them back to the processing server. After transmission, the scheduling program sends the current train information and the location of the acquired images to the recognition program. When the recognition program receives the task vehicle information, it begins to traverse the images in the target folder. Each image is processed by the YOLOv5-SEG model for target detection and segmentation (where the confidence level for tread fault detection is 0.5; a confidence level greater than 0.5 indicates a tread fault, and a confidence level less than 0.5 indicates no fault). When a fault is detected, the pixel attributes (area, etc.) of the fault region within the current fault box are calculated. Then, the pixel attributes are multiplied by the pixel conversion ratio of the currently acquired image (actually taken as 0.15 mm / pixel) to obtain the tread fault area. Figure 11 After traversing and processing the entire train (for an 8-car train, a normal 8-car train will collect 1280 tread images, with a processing speed of approximately 0.1 seconds per image), the system returns the fault information of the entire train and the corresponding wheel positions to the platform. The platform is responsible for inserting the data into the database and filtering the data according to the alarm threshold of the tread (different models and different fault identification areas are different), and finally displaying it on the platform.
[0121] This application also provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the train wheel tread anomaly detection method provided in the above embodiments.
[0122] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM).
[0123] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0124] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0125] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for detecting abnormalities in the tread surface of a high-speed train wheel, characterized in that, The method is used in a full-range dynamic image detection system for EMU trains entering a depot. The detection system includes a tread surface acquisition module, and the method includes: The tread acquisition module acquires images of the train wheelset tread. The collected wheel tread images were organized and annotated. The object detection and segmentation model is constructed by modifying the original Proto module in the yolov5-seg model. The network structure of the yolov5-seg model includes four parts: input, backbone network, neck structure, and head prediction layer. A coordinate attention module and a spatial adaptive fusion ASFF module are added to the yolov5-seg model to obtain the object detection and segmentation model. The anomaly detection of the wheel pair tread image using the target detection and segmentation model includes: preprocessing the wheel pair tread image through the input terminal; extracting useful features from the preprocessed wheel pair tread image using the BackBone network to obtain corresponding feature maps; fusing the feature maps using the Neck structure, enhancing the spatial location information of feature maps at different scales using the coordinate attention module, and passing the enhanced multi-scale feature maps to the Head prediction layer; adaptively selecting feature maps at different levels for weighted fusion using the Spatial Adaptive Fusion (ASFF) module to obtain an adaptively fused multi-scale feature map, wherein the adaptive selection criterion is to ensure simultaneous processing of feature maps of different sizes, and wherein the ASFF module is added before the Head prediction layer; and performing target detection on the multi-scale feature map using the Head prediction layer to obtain target fault region information including fault region bounding boxes, fault category information, and segmented image information. For the detected target fault area information, small areas are filtered out by area and the location of the fault is returned to the platform in a timely manner.
2. The method according to claim 1, characterized in that, The all-round dynamic image detection system for EMU entering the depot is equipped with four tread acquisition modules. Each tread acquisition module includes two sets of acquisition modules, one on the left and one on the right. Each set of acquisition modules includes five area array cameras, and each area array camera adopts an oblique upward shooting angle. Each set of acquisition modules is connected to a trigger magnetic cylinder. The tread acquisition module is communicatively connected to a vehicle receiving magnetic cylinder, and the vehicle receiving magnetic cylinder is connected to a converter for information calculation.
3. The method according to claim 2, characterized in that, The acquisition of the wheelset tread image via the tread acquisition module includes: In response to the receiving magnetic cylinder receiving the receiving signal for the first time, the time of the receiving signal is recorded by the converter, wherein the receiving signal is the signal generated by the corresponding sensor of the receiving magnetic cylinder when the train rolls onto the rail; In response to each subsequent wheel passing over a trigger cylinder, the converter calculates the passing speed based on the actual distance between the current trigger cylinder and the receiving cylinder; The delay time of the area scan camera in different acquisition modules is calculated, thereby controlling the acquisition trigger time of different cameras; In response to the tread acquisition module receiving the train reception signal, the corresponding acquisition camera is activated through the tread acquisition module to start sequentially capturing images of the train wheelset tread. The collected images of the train wheelset treads are transmitted to the server.
4. The method according to claim 1, characterized in that, The process of organizing and labeling the acquired wheel tread images includes: Suspected fault images are initially screened from the wheel tread images using an unsupervised anomaly detection algorithm; The suspected faulty images were manually reviewed and the faulty areas were marked pixel by pixel.
5. The method according to claim 1, wherein The process of adaptively selecting feature maps of different levels through the ASFF module and performing weighted fusion to obtain an adaptively fused multi-scale feature map includes: The ASFF module takes feature maps of different sizes as input, upsamples the small feature maps at different ratios, and keeps the spatial features of the large feature maps unchanged, maintaining the same resolution. Feature maps from different layers are fused and normalized using softmax. They are then multiplied and added with features of the same resolution to obtain adaptively fused multi-scale feature maps.
6. The method according to claim 1, characterized in that, The step of enhancing the spatial location information of feature maps at different scales through the coordinate attention module and passing the enhanced multi-scale feature maps to the Head prediction layer includes: The input feature map is pooled and encoded along the X and Y directions by the coordinate attention module. The encoded information in the X and Y directions is concatenated and fused, and then decomposed into two independent tensors along the spatial dimension. Perform convolution transformation on the two tensors and adjust their number of channels until they match the number of channels of the input feature map; The attention information in the X and Y directions is fused with the original input feature map; The fused multi-scale feature map is passed to the Head prediction layer for target detection.
7. The method according to claim 1, characterized in that, The step of performing target detection on the multi-scale feature map through the Head prediction layer to obtain target fault region information including fault region bounding boxes, fault category information, and segmented image information includes: The multi-scale feature map is processed through the Head prediction layer, which includes convolutional layers, pooling layers, and fully connected layers. A segmentation branch, Proto, is added to the yolov5-seg model. The image is restored to the input size through a bottom-up decoding process, and the final image segmentation result is generated. In the yolov5-seg model, feature maps of different resolutions extracted from the Neck end are passed to the target detection head. The target detection head is used to optimize the target bounding box, category regression and box position regression tasks, and finally outputs the bounding box, category information and pixel-level segmentation results of the target fault region. By borrowing the bottom-up decoding structure from PaNet through the Proto module, the feature size is restored layer by layer from 80×80 to 640×640 resolution. Through concatenated CBL and upsampling pooling operations, the input features are gradually restored to the size of 640×640, and pixel-level segmentation of target regions of different sizes is performed. After processing by the target detection head and segmentation part, the bounding box, category information, and pixel-level segmentation image of the target fault region are obtained.
8. A device for detecting abnormalities in the tread surface of a high-speed train wheel, characterized in that, The device is used in a full-range dynamic image detection system for EMU train entry into the depot. The detection system includes a tread surface acquisition module, and the device includes: The image acquisition module is used to acquire images of the wheelset tread through the tread acquisition module; The image processing module is used to organize and annotate the acquired wheel tread images; An anomaly detection module is used to modify the original Proto module in the YOLOv5-SEG model. The YOLOv5-SEG model's network structure includes four parts: an input layer, a Backbone network, a Neck structure, and a Head prediction layer. A coordinate attention module and a spatial adaptive fusion (ASFF) module are added to the YOLOv5-SEG model to obtain an object detection and segmentation model. The module is also used to preprocess the wheel pair tread image through the input layer; extract useful features from the preprocessed wheel pair tread image through the Backbone network to obtain the corresponding feature map; and extract features through the Neck structure. The feature maps are fused, and the spatial location information of feature maps at different scales is enhanced by the coordinate attention module. The enhanced multi-scale feature maps are then passed to the Head prediction layer. The spatial adaptive fusion (ASFF) module adaptively selects feature maps at different levels for weighted fusion to obtain an adaptively fused multi-scale feature map. The adaptive selection criterion is to ensure simultaneous processing of feature maps of different sizes. The ASFF module is added before the Head prediction layer. The Head prediction layer performs target detection on the multi-scale feature maps to obtain target fault region information including fault region bounding boxes, fault category information, and segmented image information. The fault detection module is used to filter out small areas based on the detected target fault area information and promptly return the location of the fault to the platform.
Citation Information
Patent Citations
Vehicle tread scratch fault detection method
CN112712552A
TensorRT accelerated yolov5s-seg-based infrared image instance segmentation and low-light image background fusion algorithm
CN118505723A