Brake analysis method and system

Through the improved YOLOv8m and YOLOv8m-Seg networks, the railway locks are detected and divided in real time, which solves the safety hazards caused by the railway locks, realizes high-precision locks risk identification and early warning, and improves railway operating efficiency and safety.

CN120032328BActive Publication Date: 2025-08-22LIAONING QIHUI ELECTRONIC SYST ENG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the railway hump slip operation, holding the brake causes the vehicle to carry the brake, resulting in accidents such as stoppage, conflict and derailment, affecting the efficiency of railway operations and posing safety hazards. It is difficult for the existing technology to achieve real-time dynamic detection and early warning.

Method used

The improved YOLOv8m network and YOLOv8m-Seg network are adopted, combined with the spatial pyramid pooling module, self-attention module and coordinate attention mechanism, the image of the railway incoming vehicle is detected and segmented, the pin rods and chains are identified, the brake risk is judged through the preset threshold value, and the early warning is issued in real time.

Benefits of technology

Accurate identification and early warning of the risk of holding the brakes is achieved, with the recognition rate reaching 99.9% and 96%, reducing the labor intensity of railway workers and improving work efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120032328B_ABST
    Figure CN120032328B_ABST
Patent Text Reader

Abstract

The present invention discloses a brake analysis method and system, which relates to the field of railway brake detection technology. The method comprises: obtaining a railway train image, axle counting data, and a car number label; determining the carriage number information based on the axle counting data and the car number label; performing target detection on the railway train image based on a target detection model of a first improved YOLOv8m network, and calculating the length of the bellows when the image contains a bellows and a brake cylinder head; issuing a wind lock risk warning when the bellows length exceeds a preset length threshold; and when the image contains a chain, performing chain segmentation on the chain detection frame area image based on an instance segmentation model of a second improved YOLOv8m‑Seg network; and processing the chain segmentation results to obtain the chain bending degree; issuing a chain lock risk warning when the bending degree exceeds a preset bending threshold. The brake detection accuracy of the present invention reaches the millimeter level, which can effectively prevent braked vehicles from slipping during peak hours and ensure the safety of train operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of railway brake detection, and in particular to a brake analysis method and system. Background Art

[0002] During the railway hump shunting operation, if the brake shoes hold the wheels and brake, the vehicle will operate with the brakes on. The shunting process of the vehicle with brakes on may cause it to stop, or even collide or derail, which will seriously affect the railway operation efficiency and may even cause safety accidents.

[0003] Intelligent identification of railway brakes is a critical technology for railway transportation safety. Braking refers to situations where, during hump dismantling and shunting operations, all brake shoes remain pressed against the wheel treads due to problems such as failure to properly ventilate the vehicle being shunted or failure to release the manual brake mechanism as required. This can cause the vehicle to stop mid-flight, leading to frequent collisions, derailments, and other accidents. Railway freight cars use two types of brakes to stop and control speed during operation: air brakes and manual brakes. Air brakes involve injecting air into an air cylinder, pushing a piston, which extends a bellows rod and drives the brake shoes to engage the wheels, creating friction between the brake shoes and the wheels. Manual brakes involve manually turning the manual brake mechanism, which in turn causes the brake chain to pull the brake shoes to engage the wheels, creating friction between the brake shoes and the wheels. Wind lock refers to the situation where the air is not exhausted as required when the vehicle is being slid out during a hump operation, causing the brake shoes to lock onto the wheels, making the vehicle operate with the brakes on; chain lock refers to the situation where the manual brake is not released as required when the vehicle is being slid out during a hump operation, causing the brake shoes to lock onto the wheels, making the vehicle operate with the brakes on.

[0004] In recent years, with the continuous emergence of new models in the field of deep learning, vehicle intelligent detection technology based on computer vision has also made great progress. In the field of target detection, mainstream algorithms are mainly divided into two categories: (1) Single-stage model: This type of model simplifies the target detection task into a regression and classification problem, directly predicting the target category and bounding box by inputting the image. Due to its simple structure, the single-stage model has a high detection speed and is suitable for real-time detection scenarios and devices with limited computing power. (2) Two-stage model: Unlike the single-stage model, the two-stage model divides the detection task into two stages. The first stage generates candidate regions, and the second stage further classifies and regresses these candidate regions. By gradually refining the target features, the model performs better in small target detection and complex scenes. However, the multi-stage computational characteristics make the model structure more complex, which correspondingly increases the computational overhead.

[0005] Therefore, it is worth studying how to use deep learning to dynamically detect and warn of railway brake risks in real time. Summary of the Invention

[0006] In view of the above problems, the present invention proposes a brake analysis method and system to try to solve or alleviate one or more of the above problems.

[0007] According to one aspect of the present invention, a brake analysis method is proposed, the method comprising:

[0008] Obtain the collected railway train images, axle counting data, and vehicle number labels;

[0009] Determine the carriage number information based on the axle counter data and the carriage number label;

[0010] Processing and analyzing the railway vehicle image based on the improved YOLOv8m network to obtain analysis results; including: performing target detection on the railway vehicle image based on the target detection model of the first improved YOLOv8m network; analyzing the detected targets to determine the brake risk type;

[0011] Display image processing results, analysis results and corresponding carriage number information.

[0012] Furthermore, the improvements of the first improved YOLOv8m network include: adding a spatial pyramid pooling module and a partial self-attention module to the original YOLOv8m backbone network; adding a coordinate attention mechanism after the neck network and before the head network; the targets include: a chain, a bellows rod or a brake cylinder head.

[0013] Furthermore, the target detection model based on the first improved YOLOv8m network performs target detection on the railway train image, including: inputting the railway train image into the backbone network for feature extraction, including: utilizing multiple C2f feature extraction modules in the backbone network to extract local features of the image and perform feature fusion; subsequently, aggregating features of different scales through the spatial pyramid pooling module, including: processing features of different scales through convolutional layers, batch normalization and SiLU activation functions to obtain feature maps with half the number of channels; passing through multiple maximum pooling layers in sequence to gradually reduce the size of the feature maps; splicing the feature maps after pooling at different scales in the channel dimension; subsequently, through the partial self-attention module, evenly dividing the feature maps aggregated by the spatial pyramid pooling module into two parts, one part of the feature maps enters the self-attention module to perform global information modeling through matrix operations between the query vector, the key vector and the value vector; the other part of the feature maps is processed through jump connections. The neck network is used to fuse, enhance and process the features extracted by the backbone network; the coordinate attention mechanism is used to generate a feature map with enhanced position information, including: first, performing global average pooling on the features output by the neck network in the horizontal and vertical directions respectively to extract compressed features in different directions; then, these features are fused through a set of convolutions with shared weights; the fused features are re-divided into two parts in the horizontal and vertical directions, and the attention matrix is ​​generated by 1×1 convolution and Sigmoid activation function respectively; finally, the features output by the neck network are weighted by the attention matrix through element-wise multiplication to obtain a feature map with enhanced position information; the head network is used to convert the feature map with enhanced position information into the final target detection result.

[0014] Furthermore, the analysis of the detected target to determine the brake risk type includes: when the detected target includes a bellows rod and a brake cylinder head, determining whether the bellows rod is a valid bellows rod based on the positional relationship between the bellows rod and the brake cylinder head; the judgment standard of the valid bellows rod is: the brake cylinder head in the image is located within a certain pixel range around the bellows rod; when it is determined to be a valid bellows rod, calculating the bellows rod length; comparing the bellows rod length with a preset length threshold, and when the bellows rod length exceeds the preset length threshold When a chain is detected, a chain embrace risk warning is issued; when a chain is included in the detected target, the chain detection frame area image is extracted, and the chain detection frame area image is segmented based on the instance segmentation model of the second improved YOLOv8m-Seg network to obtain a chain mask image; for the chain mask image, the parabola fitting algorithm is used to calculate the chain centerline, and the degree of bending of the chain is evaluated according to the ratio of the chain arc depth to the chain chord length; when the bending degree is greater than the preset bending threshold, a chain embrace risk warning is issued.

[0015] Furthermore, the improvements of the second improved YOLOv8m-Seg network include: adding a spatial pyramid pooling module and a partial self-attention module to the original YOLOv8m-Seg backbone network; adding a multi-scale sequence fusion module between the backbone network and the neck network; adding a feature fusion module between the neck network and the head network; the instance segmentation model based on the second improved YOLOv8m-Seg network performs chain segmentation on the chain detection frame area image, including: inputting the chain detection frame area image into the backbone network for feature extraction, including: using multiple C2f feature extraction modules in the backbone network to extract local features of the image and perform feature fusion ; Then, the features of different scales are aggregated through the spatial pyramid pooling module, including: processing the features of different scales through convolutional layers, batch normalization and SiLU activation functions to obtain feature maps with half the number of channels; passing through multiple maximum pooling layers in sequence to gradually reduce the size of the feature maps; splicing the feature maps after pooling at different scales in the channel dimension; then, through the partial self-attention module, the aggregated feature maps are evenly divided into two parts, one part of the feature maps enters the self-attention module to perform global information modeling through matrix operations between query vectors, key vectors and value vectors; the other part of the feature maps are fused with the output of the self-attention module through jump connections; The features extracted by the backbone network are fused with a multi-scale sequence fusion module, including: extracting feature maps of levels P2 to P5 from the backbone network, and preliminarily fusing low-level local detail information and high-level global semantic information through element splicing after size adjustment to generate a comprehensive description of the target features; then, channel dimensionality reduction is performed through 1×1 convolution, and the features are mapped to a higher-level feature space; the RepVGG module with convolution kernels of 3 and 5 is used to extract the edge details and context information of the target under different receptive fields; the neck network is used to fuse, enhance and process the features extracted by the backbone network; the feature fusion module is used to combine the features extracted by the multi-scale sequence fusion module with the features extracted by the multi-scale sequence fusion module. The obtained fusion features are fused with the feature maps of the P3 level of the neck network, including: splicing the two parts of the feature maps in the channel dimension; generating a feature weight set through 3×3 convolution and Sigmoid activation function; adjusting the features to be fused according to the feature weight set; fusing the adjusted two parts of the features through element addition; using the head network to convert the feature map fused by the feature fusion module into the final instance segmentation result; wherein, the head network includes a segmentation head and a prediction head, the segmentation head is used to generate a high-resolution native mask of the target, and the prediction head is used to predict the target attributes, which include the target box position, category information and mask coefficients related to segmentation.

[0016] Furthermore, the formula for evaluating the degree of chain bending based on the ratio of the chain arc depth to the chain chord length is:

[0017] ;

[0018] in, represents the curvature of the chain centerline, represents the chord length of the chain's centerline, Indicates the maximum depth of the chain's centerline relative to the chord length.

[0019] Furthermore, the method of determining the carriage number information based on the axle counting data and the carriage number label includes: a railway train includes wheels on four axles, and the distances between the wheels of the first axle and the wheels of the second axle, the distances between the wheels of the second axle and the wheels of the third axle, and the distances between the wheels of the third axle and the wheels of the fourth axle are different; the axle counting data includes the time when each wheel passes through magnet A and the time when each wheel passes through magnet B; the speed of each wheel is calculated based on the time difference and the spacing between magnet A and magnet B; the distance between the two wheels is obtained by multiplying the time difference when two adjacent wheels pass through magnet B by the average speed of the two wheels; the distance is matched with the distance between the wheels of each axle to determine the axle numbers of the first axle, the second axle, the third axle, and the fourth axle of the railway carriage and the time when they pass through the axle counting magnet B, thereby determining the railway carriage passing time; and the carriage number information is determined based on the carriage passing time and the carriage number label.

[0020] According to another aspect of the present invention, a brake analysis system is proposed, which includes a data acquisition end, a service end and a user end; the data acquisition end includes a camera component, an axle counter magnetic steel component and a radio frequency identification module; the camera component is used to collect images of incoming railway vehicles; the axle counter magnetic steel component is used to collect axle counter data; the radio frequency identification module is used to collect vehicle number tags; the server end includes an image processing module, a brake analysis module and a car matching module; the image processing module is used to process images of incoming railway vehicles, and includes a target detection submodule, the target detection submodule is used to perform target detection on images of incoming railway vehicles based on a target detection model of a first improved YOLOv8m network, the targets including chains, bellows rods or brake cylinder heads; the brake analysis module is used to perform brake analysis based on the output results of the image processing module to determine the type of brake risk; the car matching module is used to determine the car number information based on the axle counter data and the car number tag; the user end includes a display module, the display module is used to display the output results of the image processing module, the analysis results output by the brake analysis module, and the corresponding car number information output by the car matching module.

[0021] Furthermore, the improvements of the first improved YOLOv8m network in the target detection submodule include: adding a spatial pyramid pooling module and a partial self-attention module to the original YOLOv8m backbone network; adding a coordinate attention mechanism after the neck network and before the head network; the image processing module also includes a target segmentation submodule, and the target segmentation submodule is used to extract the chain detection box area image when the detection result of the target detection submodule contains a chain, and perform chain segmentation on the chain detection box area image based on the instance segmentation model of the second improved YOLOv8m-Seg network; wherein the improvements of the second improved YOLOv8m-Seg network include: adding a spatial pyramid pooling module and a partial self-attention module to the original YOLOv8m-Seg backbone network; adding a multi-scale sequence fusion module between the backbone network and the neck network; between the neck network and the head network. Add a feature fusion module; the brake analysis module includes a windage analysis submodule and a chainage analysis submodule; the windage analysis submodule is used to determine whether the bellows is a valid bellows based on the positional relationship between the bellows and the brake cylinder head when the output result of the target detection submodule is that the railway train image contains a bellows and a brake cylinder head; the judgment standard for the valid bellows is: the brake cylinder head in the image is within a certain pixel range around the bellows; when it is determined to be When the bellows is effective, the bellows length is calculated; the bellows length is compared with a preset length threshold, and when the bellows length exceeds the preset length threshold, a wind lock risk warning is issued; the chain lock analysis submodule is used to calculate the segmentation result output by the target segmentation submodule using a parabola fitting algorithm to obtain the chain centerline, and evaluate the degree of bending of the chain according to the ratio of the chain arc depth to the chain chord length; when the bending degree is greater than the preset bending threshold, a chain lock risk warning is issued.

[0022] Furthermore, the data acquisition end also includes a PLC control unit, which is used to control the train caisson equipment; the server end also includes: a data storage module, a user management module, and an equipment control module; the data storage module is used to store the collected data and data processing results; the user management module is used to manage user-related information; the equipment control module is used to perform data docking and control with the PLC control unit; the user end also includes an alarm module, which is used to issue an alarm signal when the analysis result is a wind risk warning or a chain risk warning.

[0023] The beneficial technical effects of the present invention are:

[0024] This invention proposes a brake analysis method and system. In the data acquisition phase, the system autonomously identifies vehicle information through automatic vehicle detection and automatic door caisson control, enabling automated operation. Upon approaching vehicles, image data is automatically captured, providing high-quality data input for subsequent processing. In the detection phase, the system utilizes YOLOv8m as its core algorithm, customized and improved based on task requirements. In the detection output phase, the system compares the detected data with a set threshold to determine potential risks and issue timely warnings. Among them, the detection part focuses on target detection, and adds a spatial pyramid pooling module and partial self-attention modules to the original YOLOv8m backbone network; adds a coordinate attention mechanism after the neck network and before the head network to meet the high requirements for precise positioning in the task. By adaptively adjusting the feature weights, the model can focus on the target boundary more accurately, thereby achieving efficient detection and positioning of the chain; for target segmentation, for the special form of the handbrake chain of the human brake machine, a spatial pyramid pooling module and partial self-attention modules are added to the original YOLOv8m-Seg backbone network; adds a multi-scale sequence fusion module between the backbone network and the neck network; adds a feature fusion module between the neck network and the head network. By effectively fusing global context information and position information, the model's ability to analyze complex forms at different scales is enhanced, thereby achieving accurate segmentation of the target.

[0025] Thanks to the aforementioned optimizations and improvements, the present invention achieves millimeter-level accuracy in brake detection, with a recognition rate of 99.9% for the bellows rod and 96% for the handbrake chain. Compared to traditional manual or low-precision detection solutions, the present invention significantly improves detection accuracy and efficiency, achieving leading levels of accuracy and automation. Applying the present invention to railway brake detection, through real-time detection and dynamic early warning, can effectively prevent braked vehicles from slipping during peak hours, thereby reducing the labor intensity of railway operators, improving work efficiency, and ensuring train safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily apparent by reading the following detailed description with reference to the accompanying drawings, in which several embodiments of the present invention are shown by way of example and not limitation, in which:

[0027] Figure 1 is a flow chart of a brake analysis method according to an embodiment of the present invention;

[0028] Figure 2 This is an example diagram of the distances between the hump-pushing operation carriage and each axle of the locomotive head in an embodiment of the present invention;

[0029] Figure 32 is a schematic diagram of the structure of the target detection model based on the first improved YOLOv8m network in an embodiment of the present invention;

[0030] Figure 4 2 is a schematic diagram of the structure of an instance segmentation model based on the second improved YOLOv8m-Seg network in an embodiment of the present invention;

[0031] Figure 5 This is a business flow chart of brake analysis in an embodiment of the present invention;

[0032] Figure 6 1 is a schematic structural diagram of a brake analysis system according to an embodiment of the present invention;

[0033] Figure 7 This is a system architecture diagram of a brake analysis system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided solely to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0035] The embodiment of the present invention proposes a brake analysis method, such as Figure 1 As shown, the method includes: S1, acquiring a collected railway train image, axle counting data, and a car number label; S2, determining the car number information of the carriage according to the axle counting data and the car number label; S3, processing and analyzing the railway train image based on the improved YOLOv8m network to obtain the analysis result; specifically including:

[0036] S31. Target detection is performed on the collected railway vehicle image based on the target detection model of the first improved YOLOv8m network, and the targets include chains, bellows or brake cylinder heads; S32. The detected targets are analyzed to determine the brake risk type; including: S321. When the image contains a bellows and a brake cylinder head, whether the bellows is a valid bellows is determined based on the positional relationship between the bellows and the brake cylinder head; the judgment standard for a valid bellows is: the brake cylinder head in the image is within a certain pixel range around the bellows; S322. When it is determined to be a valid bellows, the bellows length is calculated; the bellows length is compared with the preset length threshold, and when the bellows is When the bellows length exceeds the preset length threshold, a wind-lock risk warning is issued; S323, when the image contains a chain, the chain detection frame area image is extracted, and the chain detection frame area image is segmented based on the instance segmentation model of the second improved YOLOv8m-Seg network to obtain a chain mask image; S324, for the chain mask image, the chain centerline is calculated using a parabola fitting algorithm, and the degree of bending of the chain is evaluated based on the ratio of the chain arc depth to the chain chord length; when the degree of bending is greater than the preset bending threshold, a chain-lock risk warning is issued; S4, the image processing results, analysis results and the corresponding carriage number information are displayed.

[0037] The method starts from S1. In S1, the collected railway vehicle images, axle counting data, and vehicle number labels are obtained.

[0038] According to an embodiment of the present invention, when a train approaches, the starting magnet detects the incoming signal and notifies the PLC control unit, which controls the caisson equipment to open the cover. Simultaneously, the car number detection device (RFID) begins reading the car number, the video service begins video capture, and the axle counter magnet begins counting axles, generating axle data. As the car passes the detection camera, a detection image is captured.

[0039] Then, step S2 is executed. In S2, the carriage number information is determined based on the axle counting data and the carriage number label, including: a railway train includes wheels on four axles, and the distances between the wheels of the first axle and the wheels of the second axle, the distances between the wheels of the second axle and the wheels of the third axle, and the distances between the wheels of the third axle and the wheels of the fourth axle are different; the axle counting data includes the time when each wheel passes through magnet A and the time when each wheel passes through magnet B; the speed of each wheel is calculated based on the time difference and the spacing between magnet A and magnet B; the distance between the two wheels is obtained by multiplying the time difference when the magnet B of two adjacent wheels passes by the average speed of the two wheels; the distance is matched with the distance between the wheels of each axle to determine the axle numbers of the first axle, the second axle, the third axle, and the fourth axle of the railway carriage and the time when they pass through the axle counting magnet B, thereby determining the passage time of the railway carriage; and the carriage number information is determined based on the passage time of the carriage and the carriage number label.

[0040] According to an embodiment of the present invention, the number of wheels on the carriage and the front of the train is fixed, and the distances between the wheels also vary within a fixed range, with no overlapping distance ranges. Therefore, the distance between the two wheels can be determined by multiplying the time a wheel presses against a magnet by the vehicle's speed. The number of axle counters a carriage has passed through the magnet can be calculated using the direction, distance, and current axle counter. Specifically, two axle counter magnets, magnet A and magnet B, are installed on the rails. The time for magnet A is measured when a wheel passes over magnet A, and the time for magnet B is measured when a wheel passes over magnet B again. If the vehicle passes from magnet A to magnet B, it indicates forward travel; otherwise, it indicates reverse travel. The current wheel speed is calculated by dividing the distance between the two magnets by the ratio (magnet B time - magnet A time). The distance between the two vehicles is then calculated by multiplying (magnet B time of the second wheel - magnet B time of the first wheel) by the average speed of the two wheels.

[0041] As an example, Figure 2 As shown, the wheel distance parameters for ordinary carriages are as follows: Railway freight cars have four wheels, with the distance from the first to the second wheel ranging from 1 meter to 2 meters; the distance from the second to the third wheel ranging from 4.5 meters to 20 meters; the distance from the third to the fourth wheel ranging from 1 meter to 2 meters; and the distance from the fourth wheel to the first axle wheel of the next car ranging from 2 meters to 4.5 meters. The wheel distance parameters for train locomotives are as follows: Train locomotives have six wheels, with the distance from the first to the second wheel ranging from 1 meter to 2 meters; the distance from the second to the third wheel ranging from 1 meter to 2 meters; the distance from the third to the fourth wheel ranging from 4.5 meters to 20 meters; the distance from the fourth to the fifth wheel ranging from 1 meter to 2 meters; and the distance from the fifth to the sixth wheel ranging from 1 meter to 2 meters.

[0042] The business logic for counting axle wheels in train carriages is as follows: During peak-pushing operations, both the carriage and the locomotive push past the axle-counting magnets. Therefore, when a new carriage arrives, the current axle count is 6. Furthermore, the interval between peak-pushing operations generally exceeds 10 minutes. Therefore, the wheelbase calculated when the first axle of the carriage passes over the axle-counting magnet must be greater than 45,000 mm. When the first axle of the carriage passes over the magnet, the axle count needs to be increased by 1 because the distance between the 6th axle of the previous locomotive and the 1st axle of the carriage is greater than 45,000 mm. Since the current axle count is the 6th axle of the previous locomotive, the current axle count is increased by 1 to 1. When the second axle of the carriage passes over the magnet, the wheelbase between axles 1 and 2 is between 1,000 mm and 2, so the axle count needs to be increased by 1. Since the current axle count is 1, the current axle count is increased by 1 to 2. When the third axle of a car passes over the magnet, the axle count needs to be increased by 1, as the wheelbase between axles 2 and 3 is between 4500 mm and 20000 mm. Since the current axle count is 2, the current axle count is increased by 1, becoming 3. When the fourth axle of a car passes over the magnet, the axle count needs to be increased by 1, as the wheelbase between axles 3 and 4 is between 1000 mm and 2000 mm. Since the current axle count is 3, the current axle count is increased by 1, becoming 4. When the first axle of the second car passes over the magnet, the axle count needs to be increased by 1, as the wheelbase between axles 4 and 1 of the next car is between 2000 mm and 4500 mm. Since the current axle count is 4, the current axle count is increased by 1, becoming 1. As each car's wheel passes over the magnet, axle count data for each car is calculated. The cars can be separated one by one based on the time it takes for axles 1 and 4 to pass over the magnet.

[0043] The business logic for counting axle wheels on a train locomotive is as follows: During peak-pushing operations, when the fourth axle of the last car passes the axle counting magnet, the current axle count is 4. When the first axle of the locomotive passes the magnet, because the distance between axles 4 and 1 is between 2000 mm and 4500 mm, the current axle count is increased by 1. Since the current axle count is the fourth axle of the previous car, the current axle count is 1. When the second axle of the locomotive passes the magnet, because the wheelbase between axles 1 and 2 is between 1000 mm and 2000 mm, the axle count needs to be increased by 1. Since the current axle count is 1, the current axle count is increased by 1, resulting in a value of 2. When the third axle of the locomotive passes the magnet, because the wheelbase between axles 2 and 3 is between 1000 mm and 2000 mm, the axle count needs to be increased by 1. Since the current axle count is 2, the current axle count is increased by 1, resulting in a value of 3. When the fourth axle of the locomotive passes over the magnet, the axle count needs to be increased by 1, as the wheelbase between axles 3 and 4 is between 4,500 mm and 20,000 mm. Since the current axle count is 3, the current axle count is increased by 1, making it 4. When the fifth axle of the locomotive passes over the magnet, the axle count needs to be increased by 1, as the wheelbase between axles 4 and 5 is between 1,000 mm and 2,000 mm. Since the current axle count is 4, the current axle count is increased by 1, making it 5. When the sixth axle of the locomotive passes over the magnet, the axle count needs to be increased by 1, as the wheelbase between axles 5 and 6 is between 1,000 mm and 2,000 mm. Since the current axle count is 5, the current axle count is increased by 1, making it 6. After the sixth axle of the locomotive passes over the magnet, the peak push operation is complete.

[0044] Vehicle parking and reversing operations are handled as follows: After the vehicle is parked, the axle count and time of the previous wheel remain unchanged. When the vehicle is parked and started, the direction is determined by the order in which axle counter magnets A and B are pressed. If the vehicle is moving forward, the axle count is incremented by 1 and the car axle counting logic continues. If the vehicle is reversing, the axle count is decremented by 1, and the reverse logic continues. Specifically, the car axle counting logic changes from the current axle count + 1 to the current axle count - 1. If the axle count is 1, the next axle count starts at 4, and the axle counting logic continues in the order of 4, 3, 2, and 1. The process for correcting abnormal data is as follows: When the current vehicle axle is repeatedly pressed against two magnets, the axle count data for one car may be distorted. If the vehicle is traveling in the forward direction, when the fourth wheel of the current car passes the magnet to the first wheel of the next car, if the distance between the two wheels is between 2000 mm and 4500 mm, the current axle count is forcibly changed to 1. Subsequent vehicles passing by will be recounted as if traveling normally. This ensures that the axle count of vehicles behind the disordered car is calculated correctly. If the vehicle is traveling in the reverse direction, when the first wheel of the current car passes the magnet to the fourth wheel of the next car, if the distance between the two wheels is between 2000 mm and 4500 mm, the current axle count is forcibly changed to 4. Subsequent vehicles passing by in reverse will be recounted as if traveling normally. This ensures that the axle count of vehicles behind the car is calculated correctly.

[0045] Then, S3 is executed. In S3, the railway train image is processed and analyzed based on the improved YOLOv8m network to obtain the analysis results.

[0046] According to an embodiment of the present invention, first, in S31, an object detection model based on a first improved YOLOv8m network performs object detection on a captured image of an incoming railway train to determine whether a chain, bellows rod, or brake cylinder head is present in the image. The object detection model training process based on the first improved YOLOv8m network includes the following steps: S311: Acquiring a training dataset. The object detection model is trained and tested using a custom dataset compiled from field data collected from multiple stations and divided into a training set and a test set in an 8:2 ratio. The dataset was meticulously annotated by a professional team according to strict annotation standards, ensuring high data quality and annotation accuracy. During the data collection process, the actual environmental differences between stations were fully considered to enhance the model's adaptability to diverse scenarios. For example, the acquisition tasks encompassed a variety of lighting conditions, including strong daylight, low light at night, and shadowed areas; a variety of equipment; and complex backgrounds, including raindrops, leaves, and debris obstructing the view. S312: Preprocessing the training data. To further improve the model's generalization capabilities across diverse scenarios, data augmentation was performed on the training data. These enhancements include rotation, flipping, scaling, brightness adjustment, etc., so that the model can adapt to complex real-world environments. S313: Input the preprocessed training data set into the target detection model based on the first improved YOLOv8m network for training to obtain a trained target detection model.

[0047] To balance model accuracy and inference speed, the more mature single-stage model, YOLOv8m, was selected as the model's foundational framework. As a member of the YOLO family, YOLOv8m also consists of three networks: the backbone, the neck, and the head. Specifically, the backbone network effectively captures both local and global image information through a C2f feature extraction module designed with stacked multi-gradient flows. The neck network, employing the concept of a path aggregation network, extracts effective information from multiple layers of feature maps by contracting and expanding paths, thereby enhancing the detection capabilities of small objects and multi-scale targets. The head network is responsible for completing the final object detection task, including category prediction, bounding box regression, and object confidence estimation.

[0048] In complex scenes, since the background and the target share similar texture or color features, the feature extraction process of the model is easily disturbed, resulting in false detection and missed detection. In order to better meet the detection requirements of the task target, the target detection model proposed in this paper has been targetedly improved and optimized based on YOLOv8m. The specific architecture of the improved model is as follows: Figure 3The improved model structure still consists of the backbone, neck, and head. Improvements include the introduction of a spatial pyramid pooling module and a partial self-attention module in the fourth stage of the backbone network, and a coordinate attention mechanism in the third stage of the neck network. This aims to further enhance the model's ability to accurately locate object boundaries, enabling it to better meet the system's actual detection accuracy requirements while maintaining efficient inference speed.

[0049] The backbone network is responsible for extracting multi-level, multi-scale universal features from the input image, forming a feature map with high-level semantic information to support subsequent detection tasks. First, the C2f feature extraction module, as the basic unit of the network, is responsible for extracting local features at each stage and enhancing the expression of multi-scale information through feature fusion. This module adopts the CSP structure design and divides the input feature map into two branches through 1×1 convolution: one branch is through multiple residual modules. The first branch performs processing, while the other branch directly performs convolution operations. The outputs of the two branches are then concatenated using the Concat operation. After batch normalization (BN) and SiLU activation functions, the features are finally organized through convolution operations to obtain the final output. By stacking multiple C2f modules, the network can learn rich feature expressions at different levels, while optimizing the fusion of high-level semantic information and low-level detail information at different stages. The formula for the C2f feature extraction module can be expressed as follows:

[0050]

[0051] in, is the input feature, is the output feature, represents 1×1 convolution, Represents the channel splitting operation, is the residual module, Represents a feature concatenation operation. It is the intermediate feature of the module processing process and is the output obtained after N times of residual module processing.

[0052] Subsequently, the Spatial Pyramid Pooling-Fast (SPPF) module aggregates features of different scales, allowing the network to better retain semantic information when processing complex scenes and generate richer feature representations. The SPPF module first processes the input feature map through a convolutional layer, batch normalization (BN), and SiLU activation function to obtain a feature map with half the number of channels. Next, the feature map passes through three 5×5 maximum pooling layers in sequence, and the size of the feature map is gradually reduced after each pooling. The output of each pooling layer serves as the input for the next pooling. This serial pooling process can effectively capture information at different scales and improve the model's ability to capture details and global information in the image. Finally, by splicing the feature maps after pooling at different scales in the channel dimension, the SPPF module can integrate feature information from different scales to form a multi-scale feature representation. The formula of the spatial pyramid pooling module can be expressed as follows:

[0053]

[0054] in, is the input feature, is the output feature of the module, represents the maximum pooling operation of 5×5, Represents the output obtained after k times of maximum pooling.

[0055] When separating target and background features, models often inevitably introduce unnecessary background information, interfering with the target features and leading to false and missed detections. To address this issue, a common approach is to introduce attention mechanisms deep within the model to highlight target features. However, existing mainstream attention mechanisms are mostly implemented using convolution operators, whose inherent limitations make it difficult to establish long-range dependencies between features, which are crucial for accurate target localization. In contrast, the Transformer architecture, through its self-attention mechanism, can efficiently capture global, long-range dependencies. However, the Transformer's high computational complexity and memory usage often result in significant time overhead in real-time inference tasks. Therefore, a partial self-attention module (PSA) is introduced into the backbone network. The PSA module is designed to effectively enhance the network's ability to model long-range dependencies while avoiding the computational overhead associated with the global self-attention mechanism. Specifically, the input feature map is evenly split into two parts, keeping the complexity of the self-attention computation low. A portion of the feature maps is fed into the self-attention module for global information modeling, capturing long-range dependencies and enhancing contextual understanding of the target. Key features are extracted through matrix operations between the query vector (Query), key vector (Key), and value vector (Value) to capture long-range correlations between features. Another portion of the feature maps is fused with the output of the self-attention module via skip connections. Furthermore, to further improve inference efficiency, the PSA module optimizes the dimensions of the query and key vectors in the self-attention mechanism, setting them to half the size of the value vector, thereby reducing computational effort. Furthermore, the module uses batch normalization (BN) instead of layer normalization (LN) for normalization, improving model speed and stability. This module is placed after the fourth stage, the lowest-resolution stage in the model, and focuses on extracting and sorting key information from high-level, abstract features. Due to the lower feature resolution of the fourth stage, the quadratic complexity of the self-attention computation is significantly reduced, ensuring that overall inference speed still meets real-time requirements. The formula for a portion of the self-attention module can be expressed as follows:

[0056]

[0057] in, is the input feature, is the output feature, Represents the Transformer module. Through the above operations, without significantly increasing the computational overhead, we can effectively capture the long-range dependencies between features, thereby better processing the semantic information deep in the network.

[0058] The neck network integrates features extracted from the backbone network, fusing, enhancing, and processing them to help the model better detect objects of varying scales. Specifically, the neck network receives features from the P3, P4, and P5 levels of the backbone network as input. It first enhances low-level features through a bottom-up information flow pathway and then fuses them with high-level features to ensure the network captures a rich, multi-level feature representation. Subsequently, the network propagates detailed information to deeper layers of the network through a top-down information flow pathway, enhancing the interaction between high-level semantic features and low-level detail features, further improving the model's sensitivity to detail. This combined bottom-up and top-down information flow ensures the network maintains efficient detection performance in complex scenarios, demonstrating significant advantages in multi-scale object detection tasks. To further improve the model's ability to extract object location information, a coordinate attention mechanism (CA) is introduced at the output of the third stage of the neck network, before the head network, to enhance the precise localization of object boundaries. The coordinate attention mechanism extracts compressed features in different directions by performing global average pooling in the horizontal and vertical directions. These features are then passed through a set of convolutional layers with shared weights for information interaction and integration, improving the expressiveness of the features. The fused features are re-divided into two parts, horizontal and vertical, and the corresponding attention matrices are generated through 1×1 convolution and Sigmoid activation functions. Finally, the original features are weighted using the attention matrix through element-wise multiplication, enhancing the position information in the feature map and effectively improving the model's accuracy in locating the target boundary. The formula for the coordinate attention mechanism can be expressed as follows:

[0059]

[0060] in, is the input feature, is the output feature, and Represents the average pooling operation in the horizontal and vertical directions of the feature, is the Sigmoid activation function.

[0061] The head network is responsible for converting feature maps processed from the trunk and neck into final object detection results. Specifically, the network consists of three detection heads, each of which can be divided into two parts: two 3×3 convolutions and one 1×1 convolution, which are used to predict coordinate regression information and category confidence information, respectively.

[0062] Furthermore, in order to prevent the model from overfitting, regularization techniques such as weight decay and Dropout are introduced during the model training process to improve the robustness of the model.

[0063] Then, in S32, the detected target is analyzed to determine the brake risk type; first, in S321, when the image contains a bellows and a brake cylinder head, whether the bellows is a valid bellows is determined based on the positional relationship between the bellows and the brake cylinder head; the judgment standard for a valid bellows is: the brake cylinder head in the image is located within a certain pixel range around the bellows; S322, when it is determined to be a valid bellows, the length of the bellows is calculated; the length of the bellows is compared with a preset length threshold, and when the length of the bellows exceeds the preset length threshold, a wind brake risk warning is issued.

[0064] Specifically, the brake cylinder of a railway freight car is a key component of railway brakes. The brake valve converts air pressure into mechanical thrust, pushing the brake pads against the wheels and generating braking action. During braking, the air pressure pushes the bellows rod out of the brake cylinder. If the bellows rod and brake cylinder head are detected, the system further determines whether the brake cylinder head is within a 50-pixel range of the bellows rod. If this condition is met, subsequent calculations proceed; otherwise, detection for that frame ends. When the positional relationship between the bellows rod and the brake cylinder meets the requirements, the aspect ratio of the brake cylinder is used to determine whether a complete brake cylinder head exists in the image. If a complete brake cylinder head is detected, the model output is used to match the brake cylinder dimensions corresponding to the vehicle's bottom component, and the bellows rod length is automatically calibrated and calculated. Since the diameter of the brake cylinder head is a known fixed value, the model output can be used to calculate the actual physical length corresponding to a single pixel. By further analyzing the number of detected bellows rod pixels, its length can be accurately calculated using the following formula:

[0065]

[0066] in, and are the actual lengths of the bellows rod and the diameter of the brake cylinder head, and The length of the bellows rod and the diameter of the brake cylinder head are measured in pixels, respectively. Subsequently, the system determines whether the length exceeds a set threshold and sends a notification to the main program based on the result. If so, an alert is issued. If the entire brake cylinder head is not detected, the current frame's detection ends.

[0067] Furthermore, for the analysis results of multiple frames of images, the following validity verification can be formulated according to the position and proportion of the brake cylinder and the bellows rod: 1) At least 3 air cylinder data verification: Because the speed of railway freight cars during pushing operations is relatively slow, multiple images will be generated when the train brake cylinder passes through the chain-holding detection equipment. Setting 3 consecutive brake cylinder verifications can eliminate false alarm data caused by misidentification; 2) Valid range verification: The bellows rod is generally more than 50 mm, which is greater than 50 pixels when converted into pixels. The image recognition area is defined and the maximum range of the image is reduced by 50 pixels. For example, the image pixels , the valid range is 50 to 1230 in width and 50 to 670 in height. If the bellows rod appears in the valid range, it is deemed as valid data, otherwise it is invalid data, which can prevent other edge devices from identifying it as a bellows rod problem; 3) Verification of the ratio of the brake cylinder to the bellows rod: The width of the bellows rod is generally less than 1 / 2 of the air cylinder. If the width of the bellows rod is less than 1 / 2 of the air cylinder, it is valid data, otherwise it is invalid data, which can prevent the problem of the bellows rod being disproportionate to the air cylinder. 4) Brake cylinder and bellows overlap ratio verification: The air cylinder and bellows are connected and do not overlap. Setting the overlap ratio to no more than 50% of the bellows area effectively prevents fuzzy brake cylinder identification and bellows recognition issues. 5) Valid data ratio verification: Within a car, valid data is considered valid when the number of bellows exceeding the threshold / total number of recognized brake cylinder data exceeds 50%. This prevents issues caused by angled identification of bellows that are too long. 6) Threshold verification: If the above verification passes, the longest bellows length is compared against a set threshold of 65 pixels. If the bellows length exceeds 65, it is considered warning data, and a voice and web page warning is issued. Specifically, based on the processing results of multiple frames of images, the above rules are used to determine whether to issue a windshield risk warning.

[0068] Then, S323, when the image contains chains, the chain detection box area image is extracted, and the chain detection box area image is segmented based on the instance segmentation model of the second improved YOLOv8m-Seg network; wherein, the training process of the instance segmentation model based on the second improved YOLOv8m-Seg network includes: S3231, obtaining a training data set; S3232, preprocessing the training data; S3233, inputting the preprocessed training data set into the instance segmentation model based on the second improved YOLOv8m-Seg network for training to obtain a trained instance segmentation model.

[0069] Since the local area of ​​slender targets is extremely narrow and occupies only a small number of pixels, it is easily obscured by complex background interference during feature transfer. In addition, the aspect ratio of slender targets is much larger than that of conventional targets. Due to the limitation of the detector's receptive field, it is difficult to generate complete target features, which affects the model's accurate segmentation of slender targets. In view of the special morphology of slender targets, the instance segmentation model proposed in this paper is improved and optimized based on the YOLOv8m-Seg network. The specific model structure is as follows: Figure 4Specifically, a spatial pyramid pooling module and a partial self-attention module are added to the original YOLOv8m-Seg backbone network; a multi-scale sequence fusion module is added between the backbone network and the neck network; and a feature fusion module is added between the neck network and the head network. The multi-scale sequence fusion module aggregates feature maps of different scales in the backbone network to generate a more detailed global information representation, thereby enhancing the network's sensitivity to target edge details and morphological changes. In the third stage of the neck network, the feature fusion module effectively fuses global context information with position information and passes it down layer by layer, allowing the downstream segmentation head to use more accurate information to complete fine segmentation.

[0070] The backbone network plays a core role in the task. It extracts multi-level, multi-scale common features from the input image to generate feature maps with high-level semantic information, providing a solid foundation for subsequent tasks. First, the C2f feature extraction module, as the fundamental unit of the network, extracts local features at each stage and enhances the representation of multi-scale information through feature fusion. Subsequently, the spatial pyramid pooling module aggregates features from different scales to enhance the network's semantic understanding capabilities when handling complex scenes. The SPPF module first processes the input feature map through a convolutional layer, batch normalization (BN), and SiLU activation function to produce a feature map with half the number of channels. Next, the feature map passes through three 5×5 max pooling layers, with the size of the feature map gradually reduced after each pooling. The output of each pooling layer serves as the input for the next pooling layer. This serial pooling process effectively captures information at different scales and improves the model's ability to capture both detailed and global information in the image. Finally, by concatenating the pooled feature maps at different scales along the channel dimension, the SPPF module integrates feature information from different scales to form a multi-scale feature representation. A partial self-attention module is introduced into the backbone network. The input feature map is evenly split into two parts. One part is fed into the self-attention module for global information modeling, capturing long-range dependencies and enhancing contextual understanding of the target. Global information modeling is performed through matrix operations between the query vector, key vector, and value vector to capture long-range dependencies between features. The other part of the feature map is fused with the output of the self-attention module via skip connections.

[0071] To further improve segmentation accuracy, a multi-scale sequence fusion module (MSF) was designed. This module aggregates multi-scale features to generate global contextual information, effectively compensating for the limitations of the receptive field. Specifically, this module extracts feature maps at levels P2 to P5 from the backbone network. After resizing, it initially fuses low-level local details with high-level global semantic information through element-by-element concatenation to generate a comprehensive description of the target features. To avoid information loss during excessive upsampling or downsampling, feature maps at all levels are resized to the same size as the P3 feature map. Subsequently, channel dimensionality reduction is performed using 1×1 convolutions, and features are mapped to a higher-level feature space to simplify computational complexity while preserving key information. Furthermore, a RepVGG module with convolution kernels of 3 and 5 is used to extract edge details and contextual information of the target at different receptive fields, further enhancing the representation of global context and ensuring that the network accurately captures the complete features of the target even in complex backgrounds. The formula for the multi-scale sequence fusion module can be expressed as follows:

[0072]

[0073] in, represents the feature map of level i, is the output feature of the module, Represents the RepVGG module.

[0074] The neck network consists of a bottom-up expansion path and a top-down contraction path, which is used to integrate, enhance, and process features extracted from the backbone network to help the model better detect objects of different scales. The neck network receives the features of the P3, P4, and P5 levels in the backbone network as input. It first enhances the low-level features through a bottom-up expansion path and then fuses them with high-level features to ensure that the network can obtain rich multi-level feature representations. The neck network diffuses detail information to deeper levels of the network through a top-down contraction path, enhancing the interaction between high-level semantic features and low-level detail features, further improving the model's sensitivity to details. The combination of bottom-up and top-down information flow ensures that the neck network exhibits significant advantages in the segmentation of slender targets.

[0075] Subsequently, the feature fusion module (FFM) is used to fuse the feature maps from the multi-scale sequence fusion module and the P3 level of the neck network expansion path to enhance the network's accurate segmentation ability. Specifically, the module first splices the two feature maps in the channel dimension to initially achieve information complementarity. Then, a feature weight set is generated through 3×3 convolution and Sigmoid activation function to reflect the importance of each feature. According to the feature weight set, the features to be fused are adjusted separately to enhance the response of key features and suppress redundant information. Finally, the two parts of the features are fused by element-wise addition to ensure that the final output has stronger feature expression capabilities, thereby improving the network's segmentation effect on slender targets. The formula of the feature fusion module is:

[0076]

[0077] in, and is the feature to be fused, is the output feature, is the Sigmoid activation function.

[0078] The head network is responsible for converting the feature maps fused by the feature fusion module into the final instance segmentation result. The head network consists of a segmentation head and three prediction heads. The segmentation head's primary task is to generate a high-resolution native mask of the object. Composed of multiple convolutional layers, it gradually extracts and restores spatial information to produce accurate segmentation results. First, the input feature map is processed using 3×3 convolutions to extract spatial information and enhance feature detail. Subsequently, the feature map is upsampled using transposed convolutions to restore the spatial resolution of the image, preserving the fine-grained information of the object. Finally, a 1×1 convolutional layer performs channel dimensionality reduction to generate a high-resolution object mask. The prediction head is designed for feature maps at different levels and is primarily responsible for predicting object attributes, including the location of the object bounding box, category information, and segmentation-related mask coefficients. 3×3 convolutions are first used to enhance the perception of the object region, followed by 1×1 convolutions for object category classification, bounding box regression, and prediction of mask coefficients. Finally, the outputs of the segmentation and prediction heads are used to generate the object segmentation mask.

[0079] Then, S324, a parabola fitting algorithm is used to calculate the chain centerline on the chain mask image, and the degree of bending of the chain is evaluated according to the ratio of the chain arc depth to the chain chord length; when the degree of bending is greater than the preset bending threshold, a chain hugging risk warning is issued.

[0080] Specifically, the brake chain of a railway freight car is the main component of a railway manual brake. The brake chain is stirred by a winch, which tightens the brake chain and pushes the brake pads to press the wheels, producing a braking effect. When braking, the brake chain at the bottom of the car will be tightened, and the curvature of the brake chain will become smaller. The chain segmentation result is approximated by a parabola, and the curvature of the brake chain is calculated based on the ratio of the arc depth of the brake chain to the chord length of the chain. By analyzing the segmentation results, the curvature calculated from the segmentation results is compared with the preset threshold, and the change in curvature is used to identify potential risk situations. All segmented images under the same regression frame are regarded as the same target to avoid the influence of occlusion. In order to accurately obtain the geometric characteristics of the target, a parabola fitting algorithm based on the least squares method is used to obtain the center line of the chain: Subsequently, the curvature of the chain centerline is calculated using a mathematical derivation method to quantitatively reflect the degree of chain deformation. The specific formula is:

[0081]

[0082] in, is the curvature of the chain centerline, represents the chord length of the chain's centerline, Indicates the maximum depth of the chain's centerline relative to the chord length.

[0083] Furthermore, for the analysis results of multiple frames of images, the following rules were designed to determine the validity of the chain lock detection data: 1) Verification based on at least three brake chain data points: Because railway freight cars travel at relatively slow speeds during push operations, multiple images are generated when the train's brake chain passes through the chain lock detection equipment. Setting a minimum of three consecutive images with brake chain data points for verification can eliminate false positives due to misidentification. 2) Verification based on the percentage of valid data: Within a carriage, invalid data is considered if the number of brake chain curvatures greater than 0.06 (relatively curved) exceeds 25% of the total number of brake chains; invalid data is considered if the number of brake chain curvatures less than 0.035 (relatively straight) exceeds 25%. This prevents false positives when the brake chain is straight at one angle and curved at other angles. 3) Threshold verification: If the above verification passes, the image with the longest brake chain chord length is obtained and the curvature of the brake chain is compared with a threshold of 0.035. If the value is less than the threshold, a voice and webpage warning is issued. In other words, based on the processing results of multiple frames of images, the above rules are used to determine whether to issue a chain lock risk warning.

[0084] Then, S4 is executed, in which the image processing result, the analysis result and the corresponding carriage number information are displayed.

[0085] The following is an example of a complete process. Figure 5As shown in the figure, when a car approaches, the starting magnet detects the incoming signal and notifies the PLC control unit, which controls the caisson equipment to open the cover. Simultaneously, the vehicle number detection device begins reading the vehicle number, the video service begins video capture, and the axle counter magnet begins counting axles. When a car passes the detection camera, a detection image is pulled and the brake detection service performs recognition and detection. If the image does not contain the detection target, it exits and proceeds to the next image detection. If the target is detected, YOLOv8m is used as the core algorithm for the detection task to perform intelligent detection of the brake cylinder, bellows rod, and brake chain. The brake cylinder is detected based on the brake cylinder detection model. A partial self-attention module and coordinate attention mechanism are introduced to meet the high precision positioning requirements of the task. By adaptively adjusting feature weights, the model can more accurately focus on the target boundary, automatically calibrate the brake cylinder dimensions to match the bottom components of the corresponding vehicle model, and calculate the bellows rod length. The chain detection model detects the brake chain, and the ROI region is obtained based on the model output and used as input for the segmentation model. The obtained segmentation results will be approximated by a parabola, and the curvature of the chain will be evaluated based on the ratio of the chain arc depth to the chain chord length. If the test result meets the set threshold, the wind-holding bellows threshold is set to 65, the chain-holding curvature threshold is set to 0.035, a message is sent to the main program, and the test result is pushed to the brake detection business unit. The detection unit summarizes the submitted test results based on the axle counting data of the axle counting magnet, and simultaneously obtains the vehicle number data uploaded by the vehicle number recognition device in the time period from axle 1 to axle 4 of the carriage as the current carriage number. After the detection of the same carriage is completed, the current carriage data is checked for validity. More than 3 brake cylinder images are valid data, and the proportion of brake chain curvature greater than 0.06 is less than 25% and the proportion of curvature less than 0.035 is greater than 75%. If there is no valid data, the non-warning pictures and videos are directly saved, and the data is pushed to the large screen for display. If the data is valid and exceeds the threshold, a warning picture, carriage video and warning voice are generated, and the warning voice is pushed to the hump building and the work site to ask the operators to stop the vehicle and deal with the brake problem.

[0086] The target detection model and segmentation model in this invention use YOLOv8m as the core algorithm and are customized and improved according to task requirements. For target detection, a spatial pyramid pooling module and a partial self-attention module are added to the original YOLOv8m backbone network; a coordinate attention mechanism is added after the neck network and before the head network to meet the high requirements for precise positioning in the task. By adaptively adjusting the feature weights, the model can more accurately focus on the target boundary, thereby achieving efficient detection and positioning of the chain; for target segmentation, a spatial pyramid pooling module and a partial self-attention module are added to the original YOLOv8m-Seg backbone network for the special form of the human brake handbrake chain; a multi-scale sequence fusion module is added between the backbone network and the neck network; and a feature fusion module is added between the neck network and the head network. By effectively fusing global context information and position information, the model's ability to analyze complex forms at different scales is enhanced, thereby achieving accurate segmentation of the target.

[0087] Another embodiment of the present invention provides a brake analysis system, such as Figure 6As shown, the system includes: a data acquisition terminal 610, a service terminal 620 and a user terminal 630; the data acquisition terminal 610 includes a camera component 6110, an axle counter magnetic steel component 6120 and a radio frequency identification module 6130; the camera component 6110 is used to collect images of incoming railway vehicles; the axle counter magnetic steel component 6120 is used to collect axle counter data; the radio frequency identification module 6130 is used to collect vehicle number tags; the service terminal 620 includes an image processing module 6210, a brake analysis module 6220, and a car matching module 6230; the image processing module 6210 is used to process images of incoming railway vehicles, and includes a target detection submodule 62110 and a target segmentation submodule 62120; the target detection submodule Block 62110 is used to perform target detection on the railway vehicle image based on the target detection model of the first improved YOLOv8m network to determine whether there is a chain, bellows rod or brake cylinder head in the image; the target segmentation submodule 62120 is used to extract the chain detection frame area image when the output result of the target detection submodule 62110 is that the image contains a chain, and perform chain segmentation on the chain detection frame area image based on the instance segmentation model of the second improved YOLOv8m-Seg network; the brake analysis module 6220 is used to perform brake analysis based on the output result of the image processing module 6210 to determine whether to perform a brake warning, including the wind lock analysis submodule 62210 and the chain lock analysis submodule. Analysis submodule 62220; Wind lock analysis submodule 62210 is used to determine whether the bellows is a valid bellows based on the positional relationship between the bellows and the brake cylinder head when the output result of the target detection submodule 62110 is that the railway vehicle image contains a bellows and a brake cylinder head; the judgment standard of a valid bellows is: the brake cylinder head in the image is located within a certain pixel range around the bellows; when it is determined to be a valid bellows, the bellows length is calculated; the bellows length is compared with a preset length threshold, and when the bellows length exceeds the preset length threshold, a wind lock risk warning is issued; the chain lock analysis submodule 62220 is used to use parabolic fitting to the chain segmentation result output by the target segmentation submodule 62120 The combined algorithm calculates the chain centerline and evaluates the degree of chain bending based on the ratio of the chain arc depth to the chain chord length; when the degree of bending is greater than the preset bending threshold, a chain lock risk warning is issued; the car matching module 6230 is used to determine the car number information based on the axle counting data and the car number label; the user terminal 630 includes a display module 6310 and an alarm module 6320; the display module 6310 is used to display the output results of the image processing module 6210 and the analysis results output by the brake analysis module 6220, as well as the corresponding car number information output by the car matching module 6230; the alarm module 6320 is used to issue an alarm signal when the analysis result is a wind lock risk warning or a chain lock risk warning.

[0088] In this embodiment, preferably, the data acquisition end 610 also includes a PLC control unit 6140, which is used to control the train caisson equipment; the server end 620 also includes: a data storage module 6240, a user management module 6250, and an equipment control module 6260; the data storage module 6240 is used to store the collected data and data processing results; the user management module 6250 is used to manage user-related information; and the equipment control module 6260 is used to perform data docking and control with the PLC control unit 6140.

[0089] In this embodiment, preferably, the improvements of the first improved YOLOv8m network in the target detection submodule 62110 include: adding a spatial pyramid pooling module and a partial self-attention module to the original YOLOv8m backbone network; adding a coordinate attention mechanism after the neck network and before the head network; the improvements of the second improved YOLOv8m-Seg network in the target segmentation submodule 62120 include: adding a spatial pyramid pooling module and a partial self-attention module to the original YOLOv8m-Seg backbone network; adding a multi-scale sequence fusion module between the backbone network and the neck network; and adding a feature fusion module between the neck network and the head network.

[0090] According to an embodiment of the present invention, Figure 7As shown, the business functions of the system include: 1) Core functions: registration management, log management, database connection, etc. for managing sub-services; 2) Image recognition service: through deep learning, a recognition model is built to parse the camera video stream, identify the extension length of the brake cylinder piston stroke, the manual brake handbrake chain, and the curvature of the brake cylinder chain, and by setting the width ratio of the brake cylinder and the bellows rod to be within 0.5; the brake cylinder and the bellows rod are in the same centerline position; the bellows rod is within 50 pixels of the image from the surrounding edges and more than 3 brake cylinder images are detected; the proportion of the brake chain curvature greater than 0.06 is less than 25% and the proportion of the curvature less than 0.035 is greater than 75% as valid data rules, combined with the set thresholds of windage 65 and chainage 0.035, it is determined to be a brake vehicle if the threshold is exceeded; 3) Equipment control service: data docking with the PLC control unit, which can be checked through the PLC control unit View and control various hardware devices; 4) Video Capture Service: Automatically captures camera video streams and generates car and train videos based on the vehicle; 5) File Storage Service: Provides storage and access to brake warning images and video files; 6) Vehicle Number Recognition Service: Through the vehicle number recognition hardware device, RFID identifies the undercarriage tag, parses the vehicle number, model, and other information, and automatically matches it to the detected vehicle, providing basic data for real-time warnings and data statistics; 7) Warning Service: When a vehicle approaches, the PLC receives the incoming vehicle signal after the wheel passes over the starting magnet, notifying the system to open the caisson cover, and the imaging service begins detection. During the detection process, if the image analysis exceeds the threshold for wind lock or chain lock, the data is pushed to the large screen page for warning. The large screen also displays the warning identification image and the alarm location, allowing the Humpback team to intuitively view the detection results. According to the car and detection type, intelligent voice synthesis is generated, and the warning voice is sent to the service site for voice broadcast. After hearing the voice, the vehicle can stop and communicate with the Humpback team member using the intercom to confirm whether the brake is engaged. If so, the brake is engaged. The system can also be configured with real-time reminder devices such as voice alarm lights and large screens at the station that can display early warning data to remind on-site personnel to pay attention to running vehicles; 8) Authority verification: Filter the station hump data according to authority, allowing different managers to see the data within their authority. The authority is divided into administrator authority, station administrator authority, and hump shift member authority.Administrators have all system permissions and can set system parameters to assign permissions to relevant business personnel; station administrators can view multiple hump data permissions and access data statistics pages, conduct big data analysis to warn vehicle types and times, and guide and communicate with hump site personnel to pay attention to operating specifications based on data analysis results; hump site staff only need to view their own hump data permissions, check the warning information in real time, confirm whether to brake, and communicate with on-site workers in real time to handle warning issues; 9) Braking business function: integrate detection data, generate specified WEB API interfaces according to customer needs to facilitate viewing of relevant content on the front-end large screen; 10) Management backend: can set system permissions, personnel divisions, management thresholds and other information; 11) Data visualization large screen: the page displays the latest brake warning data, the latest vehicle passing data, real-time monitoring data, visual data analysis, historical brake warning data and historical vehicle passing data, etc.

[0091] For the undescribed parts of the brake analysis system according to the embodiment of the present invention, please refer to the above detailed description of the method embodiment.

[0092] The technical effects of the present invention were further verified through experiments. The experiment used multiple data sets collected on site for training and testing. The wind hold detection data set contains two types of images: the gate cylinder and the bellows rod, totaling 17,251 images; the chain hold detection data set contains 16,051 images, and the segmentation data set contains 14,832 images. The system model is built based on the PyTorch deep learning framework, the batch size is set to 16, and the SGD optimizer with an initial learning rate of 0.01 and a momentum of 0.937 is used for a total of 300 cycles. In order to ensure the stability and convergence speed of the training process, a learning rate scheduling strategy is adopted to reduce the learning rate by 10 times every 100 cycles to achieve a balance between model exploration and convergence. In order to achieve the best detection accuracy, the data enhancement was carefully adjusted and optimized. The final data enhancement parameters of the detection model and segmentation model are shown in Tables 1 and 2.

[0093] Table 1 Data augmentation parameters of the detection model

[0094]

[0095] Table 2 Data augmentation parameters of the segmentation model

[0096]

[0097] 1) The experimental verification of the wind embrace detection model is as follows. To verify the advanced nature of the detection model, the wind embrace detection model proposed in this invention is compared with advanced methods in the field, including Faster R-CNN, SSD, YOLOv5m, YOLOv8m, etc. Faster R-CNN is a two-stage target detection model, and the other methods are single-stage target detection models. To ensure a fair comparison, the network structure of these methods was reproduced using the public codes of these methods, and the models were trained and evaluated in the same training environment. The experiments used the same hyperparameter settings, datasets, and evaluation metrics to ensure the comparability of the results. As shown in Table 3, the model proposed in this invention achieved the highest evaluation index in the comparison with other target detection methods, demonstrating its advantage in target detection accuracy.

[0098] Table 3 Comparison of the present invention with other target detection methods

[0099]

[0100] To verify the effectiveness of the introduced modules, ablation experiments were conducted. Using YOLOv8m as the baseline model, the experiment sequentially added a partial self-attention module to the backbone network and a coordinate attention mechanism to the head network to verify the contribution and effectiveness of each module. The experimental results are shown in Table 4. The partial self-attention module effectively enhanced the model's understanding of global context and improved detection accuracy, while the coordinate attention mechanism further improved the ability to localize the object, especially in complex backgrounds. These results demonstrate the practical value of the design of each module, and their combination significantly improves overall model performance, validating the effectiveness and rationality of the approach.

[0101] Table 4 Experimental results

[0102]

[0103] To improve inference speed, the detection model underwent a conversion from PyTorch to TensorRT to fully leverage hardware acceleration. The inference GPU deployed on-site was an NVIDIA GeForce RTX 4070, supporting both FP16 and FP32 computations, each delivering 29.15 TFLOPS of computing performance. TensorRT optimization significantly improved the model's inference speed, bringing the inference time for a single image (including pre- and post-processing) to approximately 12ms. To further enhance processing efficiency, multi-threaded inference was implemented during deployment, enhancing concurrent processing capabilities. Ultimately, the optimized and deployed Fengbao recognition system, in actual field operation, was able to process image data captured by multiple cameras at a real-time speed of 125 frames per second, meeting the requirements of real-time monitoring and inspection. Testing confirmed that the Fengbao recognition model accurately identified and located targets, quickly determined changes in the status of key components, and met the requirements of industrial-grade high-precision inspection. Detection accuracy reached ±5mm, demonstrating its excellent performance and reliability.

[0104] 2) The experimental verification of the chain embrace detection model is as follows. To verify the effectiveness of the segmentation model, the instance segmentation model proposed in this paper was comprehensively compared with various mainstream methods in the field, including Mask R-CNN, YOLACT, YOLOv5m-seg, and YOLOv8m-seg. To ensure the fairness and authority of the comparison, the network structure of these methods was reproduced using the public code of these methods, and the models were trained and evaluated in the same training environment. The experiment strictly unified the hyperparameter settings, datasets, and evaluation metrics to ensure the comparability of the results. As shown in Table 5, the proposed segmentation model outperformed other instance segmentation methods in all evaluation metrics, fully demonstrating its advantages in the instance segmentation task.

[0105] Table 5 Comparison of the segmentation model of the present invention with other instance segmentation methods

[0106]

[0107] In order to verify the effectiveness of the introduced modules, an ablation experiment was conducted. The experiment used YOLOv8m-seg as the baseline model, and added the multi-scale sequence fusion module and the feature fusion module in turn to verify the contribution and effectiveness of each module. The experimental results are shown in Table 6. Among them, the multi-scale sequence fusion module significantly enriched the diversity of feature expression by modeling and fusing information of different scales, so that the model has higher recognition ability and robustness when dealing with complex scenes or diverse targets. The feature fusion module effectively fuses features from different sources while passing key information downward through the contraction path, further enhancing the transmission and representation capabilities of semantic information, thereby optimizing the performance of the model in the segmentation task. These results show that the design of each module has practical value, and their combination can significantly improve the overall model performance, verifying the effectiveness and rationality of the method of the present invention.

[0108] Table 6 Experimental results

[0109]

[0110] After comprehensive testing, the chain brake recognition model demonstrated excellent performance, with a detection accuracy exceeding 95%. Regardless of complex environments or changing conditions, the model can efficiently and accurately identify and detect brake risks, providing a strong guarantee for the safe operation of trains.

[0111] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.

Claims

1. A brake analysis method, characterized in that: include: Obtain the collected railway train images, axle counting data, and vehicle number labels; Determine the carriage number information based on the axle counter data and the carriage number label; The railway train image is processed and analyzed based on the improved YOLOv8m network to obtain analysis results; including: performing target detection on the railway train image based on the target detection model of the first improved YOLOv8m network, and the improvements of the first improved YOLOv8m network include: adding a spatial pyramid pooling module and a partial self-attention module to the original YOLOv8m backbone network; adding a coordinate attention mechanism after the neck network and before the head network; the targets include: chains, bellows rods or brake cylinder heads; the target detection model based on the first improved YOLOv8m network performs target detection on the railway train image, including: inputting the railway train image into the backbone network for feature extraction, including: utilizing multiple C2f feature extraction modules in the backbone network to extract local features of the image and perform feature fusion; subsequently, aggregating features of different scales through the spatial pyramid pooling module; subsequently, through the partial self-attention module, evenly dividing the feature map aggregated by the spatial pyramid pooling module into two parts, and one part of the feature map enters the self-attention module through query Global information modeling is performed by matrix operations between query vectors, key vectors and value vectors. The dimension of query vectors and key vectors in the partial self-attention module is half of the value vector, and batch normalization is used instead of layer normalization for normalization. Another part of the feature map is fused with the output of the self-attention module through jump connections. The features extracted by the backbone network are fused, enhanced and processed using the neck network. A feature map with enhanced position information is generated using the coordinate attention mechanism, including: first, performing global average pooling on the features output by the neck network in the horizontal and vertical directions respectively to extract compressed features in different directions; then, these features are fused through a set of convolutions with shared weights; the fused features are re-divided into two parts in the horizontal and vertical directions, and an attention matrix is ​​generated by 1×1 convolution and Sigmoid activation function respectively; finally, the features output by the neck network are weighted by the attention matrix through element-wise multiplication to obtain a feature map with enhanced position information; the feature map with enhanced position information is converted into the final target detection result using the head network; Analyzing the detected target to determine the brake risk type; including: when the detected target includes a bellows rod and a brake cylinder head, determining whether the bellows rod is a valid bellows rod based on the positional relationship between the bellows rod and the brake cylinder head; calculating the bellows rod length when it is determined to be a valid bellows rod; comparing the bellows rod length with a preset length threshold, and issuing a brake risk warning when the bellows rod length exceeds the preset length threshold; When the detected target contains a chain, the chain detection frame area image is extracted, and the chain detection frame area image is segmented based on the instance segmentation model of the second improved YOLOv8m-Seg network to obtain a chain mask image; for the chain mask image, the parabola fitting algorithm is used to calculate the chain centerline, and the curvature of the chain is evaluated based on the ratio of the chain arc depth to the chain chord length. The formula is: Wherein, κ represents the curvature of the chain centerline, l represents the chord length of the chain centerline, and h represents the maximum depth of the chain centerline compared to the chord length; when the degree of curvature is greater than the preset curvature threshold, a chain hug risk warning is issued; wherein, the improvements of the second improved YOLOv8m-Seg network include: adding a spatial pyramid pooling module and a partial self-attention module to the original YOLOv8m-Seg backbone network; adding a multi-scale sequence fusion module between the backbone network and the neck network; adding a feature fusion module between the neck network and the head network; The example segmentation model based on the second improved YOLOv8m-Seg network performs chain segmentation on the chain detection frame area image, including: inputting the chain detection frame area image into the backbone network for feature extraction, including: using multiple C2f feature extraction modules in the backbone network to extract local features of the image and perform feature fusion; then, aggregating features of different scales through the spatial pyramid pooling module, including: processing features of different scales through convolution layers, batch normalization and SiLU activation functions to obtain feature maps with half the number of channels; sequentially passing through multiple maximum pooling layers to gradually reduce the size of the feature maps; splicing the feature maps after pooling at different scales in the channel dimension; then, through the partial self-attention module, evenly dividing the aggregated feature maps into two parts, one part of the feature maps performs global information modeling through matrix operations between query vectors, key vectors and value vectors; the other part of the feature maps is fused with the output of the self-attention module through skip connections; The features extracted by the backbone network are fused using a multi-scale sequence fusion module. This involves extracting feature maps at levels P2 to P5 from the backbone network, resizing them, and initially fusing low-level local detail information with high-level global semantic information through element-wise splicing to generate a comprehensive description of the target features. Subsequently, 1×1 convolution is used to reduce the channel dimension and map the features to a higher-level feature space. Finally, the RepVGG module with convolution kernels of 3 and 5 is used to extract edge details and contextual information of the target under different receptive fields. The neck network is used to fuse, enhance and process the features extracted by the backbone network; The fusion features extracted by the multi-scale sequence fusion module are fused with the feature map of the neck network P3 level using a feature fusion module, including: splicing the two feature maps in the channel dimension; generating a feature weight set through 3×3 convolution and Sigmoid activation function; adjusting the features to be fused according to the feature weight set; and fusing the adjusted two features through element-wise addition. The head network is used to convert the feature maps fused by the feature fusion module into the final instance segmentation result. The head network includes a segmentation head and a prediction head. The segmentation head is used to generate a high-resolution native mask of the target, and the prediction head is used to predict target attributes, such as the target box position, category information, and mask coefficients related to segmentation. Display image processing results, analysis results and corresponding carriage number information.

2. A brake analysis method according to claim 1, characterized in that: The aggregating features of different scales through the spatial pyramid pooling module includes: processing features of different scales through convolution layers, batch normalization and SiLU activation functions to obtain feature maps with half the number of channels; passing through multiple maximum pooling layers in sequence to gradually reduce the size of the feature maps; and splicing the feature maps after pooling at different scales in the channel dimension.

3. A brake analysis method according to claim 1 or 2, characterized in that: The judgment standard of the effective bellows is: the brake cylinder head in the image is located within a certain pixel range around the bellows; when it is determined to be a valid bellows, the bellows length is calculated.

4. A brake analysis method according to claim 1, characterized in that: Determining the carriage number information based on the axle counter data and the carriage number label includes: A railway train includes wheels on four axles, and the distances between the wheels of the first axle and the wheels of the second axle, the distances between the wheels of the second axle and the wheels of the third axle, and the distances between the wheels of the third axle and the wheels of the fourth axle are all different. The axle counting data includes the time when each wheel passes through magnet A and the time when each wheel passes through magnet B. The speed of each wheel is calculated based on the time difference and the distance between magnet A and magnet B. The distance between the two wheels is obtained by multiplying the time difference when magnet B of two adjacent wheels passes by the average speed of the two wheels. The distance is matched with the distance between the wheels of each axle to determine the axle numbers of the first axle, the second axle, the third axle, and the fourth axle of the railway car and the time when they pass through axle counting magnet B, thereby determining the passage time of the railway car. The car number information is determined based on the car passage time and the car number label.

5. A brake analysis system, characterized in that: Including data collection end, service end and user end; The data acquisition terminal includes a camera assembly, an axle counter magnetic steel assembly and a radio frequency identification module; the camera assembly is used to collect images of incoming railway vehicles; the axle counter magnetic steel assembly is used to collect axle counter data; the radio frequency identification module is used to collect vehicle number tags; The server includes an image processing module, a brake analysis module, and a carriage matching module; the image processing module is used to process the railway vehicle image, and includes a target detection submodule, and the target detection submodule is used to perform target detection on the railway vehicle image based on the target detection model of the first improved YOLOv8m network, wherein the target includes a chain, a bellows rod, or a brake cylinder head; The improvements of the first improved YOLOv8m network include: adding a spatial pyramid pooling module and a partial self-attention module to the original YOLOv8m backbone network; adding a coordinate attention mechanism after the neck network and before the head network; the target detection model based on the first improved YOLOv8m network performs target detection on the railway train image, including: inputting the railway train image into the backbone network for feature extraction, including: using multiple C2f feature extraction modules in the backbone network to extract local features of the image and perform feature fusion; then, aggregating features of different scales through the spatial pyramid pooling module; then, through the partial self-attention module, averaging the feature maps aggregated by the spatial pyramid pooling module. The method is evenly divided into two parts. One part of the feature map enters the self-attention module and performs global information modeling through matrix operations between the query vector, key vector and value vector. The dimension of the query vector and key vector in the self-attention module is half of the value vector, and batch normalization is used instead of layer normalization for normalization. The other part of the feature map is fused with the output of the self-attention module through jump connection. The neck network is used to fuse, enhance and process the features extracted by the backbone network. The coordinate attention mechanism is used to generate a feature map with enhanced position information, including: first, performing global average pooling on the features output by the neck network in the horizontal and vertical directions respectively to extract compressed features in different directions; then, these features are combined into a single layer. The features are fused through a set of convolutions with shared weights; the fused features are re-divided into two parts in the horizontal direction and the vertical direction, and the attention matrix is ​​generated by 1×1 convolution and Sigmoid activation function respectively; finally, the features output by the neck network are weighted by the attention matrix through element multiplication to obtain a feature map with enhanced position information; the feature map with enhanced position information is converted into the final target detection result using the head network; the image processing module also includes a target segmentation submodule, which is used to extract the chain detection box area image when the detection result of the target detection submodule contains a chain, and to perform segmentation on the target based on the instance segmentation model of the second improved YOLOv8m-Seg network. The chain detection frame area image is chain segmented; wherein the improvements of the second improved YOLOv8m-Seg network include: adding a spatial pyramid pooling module and a partial self-attention module to the original YOLOv8m-Seg backbone network; adding a multi-scale sequence fusion module between the backbone network and the neck network; adding a feature fusion module between the neck network and the head network; the instance segmentation model based on the second improved YOLOv8m-Seg network performs chain segmentation on the chain detection frame area image, including: inputting the chain detection frame area image into the backbone network for feature extraction, including: using multiple C2f feature extraction modules in the backbone network to extract local features of the image and perform feature fusion;Subsequently, features of different scales are aggregated through the spatial pyramid pooling module, including: processing features of different scales through convolutional layers, batch normalization and SiLU activation functions to obtain feature maps with half the number of channels; passing through multiple maximum pooling layers in sequence to gradually reduce the size of the feature maps; splicing the feature maps after pooling at different scales in the channel dimension; then, through the partial self-attention module, the aggregated feature maps are evenly divided into two parts. One part of the feature map is global information modeled through matrix operations between the query vector, key vector and value vector; the other part of the feature map is fused with the output of the self-attention module through skip connections; The features extracted by the backbone network are fused using a multi-scale sequence fusion module. This involves extracting feature maps at levels P2 to P5 from the backbone network, resizing them, and initially fusing low-level local detail information with high-level global semantic information through element-wise splicing to generate a comprehensive description of the target features. Subsequently, 1×1 convolution is used to reduce the channel dimension and map the features to a higher-level feature space. Finally, the RepVGG module with convolution kernels of 3 and 5 is used to extract edge details and contextual information of the target under different receptive fields. The neck network is used to fuse, enhance and process the features extracted by the backbone network; The fusion features extracted by the multi-scale sequence fusion module are fused with the feature map of the neck network P3 level using a feature fusion module, including: splicing the two feature maps in the channel dimension; generating a feature weight set through 3×3 convolution and Sigmoid activation function; adjusting the features to be fused according to the feature weight set; and fusing the adjusted two features through element-wise addition. The head network is used to convert the feature maps fused by the feature fusion module into the final instance segmentation result. The head network includes a segmentation head and a prediction head. The segmentation head is used to generate a high-resolution native mask of the target, and the prediction head is used to predict target attributes, such as the target box position, category information, and mask coefficients related to segmentation. The brake analysis module is used to perform brake analysis based on the output results of the image processing module to determine the brake risk type; the brake analysis module includes a wind lock analysis submodule and a chain lock analysis submodule; the wind lock analysis submodule is used to determine whether the bellows is a valid bellows based on the positional relationship between the bellows and the brake cylinder head when the output result of the target detection submodule is that the railway train image contains a bellows and a brake cylinder head; the judgment standard of the valid bellows is: the image The head of the middle brake cylinder is located within a certain pixel range around the bellows; when it is determined to be a valid bellows, the bellows length is calculated; the bellows length is compared with a preset length threshold, and when the bellows length exceeds the preset length threshold, a wind lock risk warning is issued; the chain lock analysis submodule is used to calculate the chain centerline using a parabola fitting algorithm based on the segmentation result output by the target segmentation submodule, and evaluate the degree of chain bending based on the ratio of the chain arc depth to the chain chord length. The formula is: Where κ represents the curvature of the chain centerline, l represents the chord length of the chain centerline, and h represents the maximum depth of the chain centerline relative to the chord length. When the degree of curvature exceeds the preset curvature threshold, a chain lock risk warning is issued. The carriage matching module is used to determine the carriage number information based on the axle counting data and the carriage number label; The user terminal includes a display module, which is used to display the output results of the image processing module, the analysis results output by the brake analysis module, and the car number information output by the corresponding car matching module.

6. A brake analysis system according to claim 5, characterized in that: The data acquisition end also includes a PLC control unit, which is used to control the train caisson equipment; the service end also includes: a data storage module, a user management module, and an equipment control module; the data storage module is used to store the collected data and data processing results; the user management module is used to manage user-related information; the equipment control module is used to perform data docking and control with the PLC control unit; the user end also includes an alarm module, which is used to issue an alarm signal when the analysis result is a wind lock risk warning or a chain lock risk warning.

Citation Information

Patent Citations

  • Train brake chain state recognition method and device, equipment and storage medium

    CN114758150A

  • Intelligent pre-detection and alarm system for hump humping vehicle

    CN115923875A