Track fastener state detection method based on improved YOLO11 model

By improving the track fastener condition detection method of the YOLO11 model, and adopting the progressive feature pyramid (AFPN) structure and the lightweight asymmetric detection head (LADH), the problems of poor detection effect and high model complexity in the existing technology are solved, realizing efficient and lightweight detection on the railway site, and improving detection accuracy and response speed.

CN120976840BActive Publication Date: 2025-12-12HUAHAI ENG CO LTD OF CREC SHANGHAI +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511491909.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2025-12-12
Estimated Expiration
2045-10-20

AI Technical Summary

Technical Problem

Existing track fastener status detection methods are ineffective in complex scenarios, have high model complexity, and are not easy to deploy at the edge, resulting in high false negative rates and low real-time performance, making it difficult to meet the high frequency and high precision requirements of railway sites.

Method used

An improved YOLO11 model is adopted, combined with the progressive feature pyramid AFPN structure and the lightweight asymmetric detection head LADH. Through multi-scale feature fusion of bottom-up and top-down paths, ASFF and BasicBlock modules are introduced. The SIoU loss function is used to optimize the orientation, position and shape consistency of the prediction box. Combined with weak augmentation, strong augmentation and virtual data training strategies, the model is lightweight and the detection accuracy is high.

Benefits of technology

While maintaining detection accuracy, it significantly reduces model complexity, making it suitable for resource-constrained track inspection trolleys and portable terminals, thereby improving the efficiency of fastener defect identification and maintenance response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976840B_ABST
    Figure CN120976840B_ABST
Patent Text Reader

Abstract

The application relates to a track fastener state detection method based on an improved YOLO11 model, which comprises the following steps: 1, collecting track fastener picture data, and expanding the data; 2, performing data labeling on the track fastener data set; 3, constructing a track fastener state detection network model based on the improved YOLO11 model, wherein a neck network adopts a progressive feature pyramid structure, a bottom-up and top-down path is combined with a horizontal connection, an ASFF module is introduced to realize dynamic fusion of multi-scale features, and a BasicBlock module is used for deep feature extraction and transformation; a lightweight asymmetric detection head is used as a detection head; a SIoU loss function is used as a model, and angle loss, distance loss, shape loss and IoU loss are combined. The application has the advantages that the problems of poor detection effect of an existing track fastener state detection algorithm in some complex scenes, high model complexity and difficulty in edge deployment and the like are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing detection, in particular to a track fastener state detection method based on an improved YOLO11 model. BACKGROUND

[0002] Track fasteners are key components in railway lines for fastening steel rails on sleepers, and their state directly affects the safety and stability of train operation. In the long-term service process, the fasteners not only bear dynamic impact and vibration from the wheel rail, but also are continuously affected by natural environment such as rain, sand and temperature changes, and are prone to looseness, loss, fracture and other diseases. If not timely discovered and disposed, it may lead to transverse or longitudinal displacement of the steel rail, and further cause train derailment and other major accidents. Therefore, regular and comprehensive state detection of track fasteners is an important link for the maintenance department to ensure train safety.

[0003] The traditional detection method mainly relies on manual inspection, and the operating personnel need to walk along the line during the night "window" period, and check the fasteners one by one through visual inspection, hammering or simple tools. This method not only has high labor intensity and low efficiency, but also is significantly affected by light, weather and personnel experience, with high miss and false detection rates, and has been unable to meet the requirements of increasing operating mileage and train density on detection frequency and accuracy.

[0004] In recent years, with the popularization of machine vision and deep learning technology, image-based automatic detection schemes have begun to be applied in the field of railways. The existing technology generally uses YOLO, SSD or Faster R-CNN, etc. general object detection network, and detects the defects by collecting fastener images through track inspection vehicles or portable cameras, and then inferring the model to judge the defect category. However, these general networks have three shortcomings in the fastener scene: first, the pixel proportion of the fastener in the image is small, and there are scale differences caused by different models and different shooting distances, and the conventional feature pyramid has limited multi-scale information fusion capability, resulting in small target missing; second, the defect form of the fastener is subtle and the boundary is fuzzy, and the existing detection head is difficult to balance between positioning accuracy and parameter quantity, with high model complexity and difficult deployment on edge devices; third, the existing loss function mainly considers the overlapping area, ignores the angle, shape and direction error, and causes the prediction box and the real box to be inconsistent in direction and not to fit the edge, affecting the subsequent defect size measurement and maintenance decision. The above problems make the existing image detection method still face the bottlenecks of insufficient accuracy, low real-time performance and bloated model in field application, and there is an urgent need for a lightweight detection technology specially optimized for the characteristics of the fastener scene. SUMMARY

[0005] The purpose of the present application is to overcome the shortcomings of the prior art and provide a track fastener state detection method based on an improved YOLO11 model to solve the problems of poor detection effect of existing track fastener state detection algorithms in some complex scenes, high model complexity and difficulty in edge deployment, etc.

[0006] In order to achieve the above-mentioned purpose, a track fastener state detection method based on an improved YOLO11 model is designed, which comprises the following steps: step S1: collecting track fastener picture data, using an image augmentation algorithm to expand the data, a part of which is weakly augmented, a part of which is strongly augmented, and finally virtual data is added; step S2: data labeling is performed on the track fastener dataset, and the dataset is divided into a training set, a validation set and a test set; step S3: a track fastener state detection network model based on an improved YOLO11 model is constructed, which specifically includes input Input, backbone network Backbone, neck network Neck, detection head Head and output Output; wherein the neck network Neck adopts an A FPN structure, combines horizontal connections through bottom-up and top-down paths, introduces an ASFF module to realize dynamic fusion of multi-scale features, and performs deep feature extraction and transformation through a BasicBlock module to improve the expression ability and positioning accuracy of different scale track fastener features; the detection head Head adopts a lightweight asymmetric detection head LADH, including a regression branch and a classification branch, the regression branch enhances the positioning ability of the bounding box through a depth separable convolution, and the classification branch maintains a lightweight structure to realize efficient classification; the model adopts a SIoU loss function, combines angle loss, distance loss, shape loss and IoU loss to optimize the consistency of the predicted box and the real box in direction, position, shape and overlap; the overall model realizes lightweight while maintaining detection accuracy, and is suitable for edge deployment; step S4: the training set and the validation set are used to train the track fastener state detection network model, obtain the parameters of the network model, and obtain the trained safety equipment detection network model; step S5: the test dataset is used to test the trained track fastener state detection network model, and the test results are evaluated.

[0007] Preferably, the application further comprises: the step S3 further comprises: the adaptive weighted fusion of multi-scale feature maps between the bottom-up and top-down paths is realized through the ASFF_2 and ASFF_3 modules, the feature maps are derived from the initial multi-scale features extracted from the track fastener dataset by the backbone network and transmitted to the neck network, the spatial size is unified through up-sampling in the fusion process, the fusion weight is generated by using 1x1 convolution and Softmax, and finally the fusion feature map is output through 3x3 convolution; the ASFF_2 module is used to fuse two scale feature maps: feature map x0 and feature map x1, first, the feature map x1 is up-sampled to match the size of the feature map x0, then the fusion weight is calculated through 1x1 convolution and Softmax, then the feature map x0 and the up-sampled feature map x1 are weighted and summed, and finally the fusion feature map is output through 3x3 convolution; the ASFF_3 module is used to fuse three scale feature maps: feature map x0, feature map x1 and feature map x2, first, the feature map x1 and the feature map x2 are up-sampled to match the size of x0, then the fusion weight of each feature map is calculated through 1x1 convolution and Softmax, then the feature map x0, the up-sampled feature map x1 and the feature map x2 are weighted and summed, and finally the fusion feature map is output through 3x3 convolution; the BasicBlock module is arranged after the ASFF module and is used to extract deep features from the fused feature map, and the structure includes twice convolution, batch normalization, SiLU activation operation, and residual connection is used to enhance feature expression and training stability.

[0008] Preferably, the application further comprises: the regression branch of the lightweight asymmetric detection head LADH includes one standard convolution, two deep separable convolutions and one ordinary convolution, which is used to extract spatial features and output bounding box regression parameters; the classification branch includes one standard convolution, one deep separable convolution and one ordinary convolution, which is used to output class prediction results.

[0009] Preferably, the application further comprises: the angle loss in the SIoU loss function is used to guide the predicted box to approach the real box along the X or Y axis direction preferentially, and reduce the direction deviation; the distance loss combines the angle information to adjust the spatial distance between the predicted box and the real box; the shape loss optimizes the shape of the predicted box by comparing the width and height difference; the IoU loss measures the overlap degree of the predicted box and the real box, and cooperatively improves the positioning accuracy and shape adaptability.

[0010] Preferably, the application further comprises: the specific method of step S1 is as follows: step S1.1: obtaining track fastener picture data sets in different states; step S1.2: expanding the data set by using an image augmentation algorithm, a part of which is rotated, cropped, translated and other weak augmentation methods, and another part is randomly noisy, grayscale, color transformation and other strong augmentation methods; step S1.3: adding virtual data to the data set, which is a three-dimensional model rendering picture of the track fastener; the specific method of step S2 is as follows: step S2.1: using a labeling website to manually label the detection target in the track fastener data set, the state of the track fastener including: loose, missing, normal; step S2.2: dividing the labeled track fastener data set into training set, validation set and test set according to a certain proportion; step S2.3: dividing the virtual data into the validation set and the test set, so as to improve the robustness and generalization of the model training.

[0011] Preferably, the application further comprises: the neck network Neck in step S3 gradually features pyramid AFPN structure as follows: step S3.1.1: the whole neck network adopts bottom-up and top-down paths combined with lateral connection to realize efficient multi-scale feature fusion, and the specific structure includes three parallel feature processing paths, which usually correspond to small, medium and large target scale features of the input, from top to bottom, high-resolution shallow layer features, medium-resolution middle layer features and low-resolution deep layer features, realizing comprehensive detection of track fasteners of different sizes; step S3.1.2: each path first passes through continuous Conv for preliminary feature transformation and dimension adjustment, and the Conv module is composed of three parts: first, a two-dimensional convolution layer is used for convolution operation on the input feature map to extract local spatial features; then, batch normalization is applied to normalize the convolution output, stabilize the training process and speed up the convergence speed; finally, SiLU activation function is introduced to introduce nonlinearity, so that the model can better capture the complex edges, morphological details and texture changes of track fasteners; step S3.1.3: then, through the ASFF_2 module: first, the weight calculation is performed on the feature map x0 and the feature map x1 respectively; the feature map x1 is adjusted to the same size as the feature map x0 through upsampling to make the spatial sizes of the two feature maps of the track fastener consistent; then, the weights of the two feature maps are further processed through 1x1 convolution, and normalized through Softmax function to generate the weight coefficients of the weighted fusion; then, the feature map x0 and the upsampled feature map x1 are weighted and summed according to the weights to obtain the preliminary fused feature map; finally, a 3x3 convolution layer is used to further process the fused features to output the fused feature map; step S3.1.4: the feature map enters the BasicBlock module: first, a two-dimensional convolution layer is used, then two-dimensional batch normalization is used for normalization to stabilize the training, and then SiLU activation function is applied to introduce nonlinearity; then, the second two-dimensional convolution and two-dimensional batch normalization operation is performed, and the output is added through residual connection with the original input, and then SiLU activation function is used again to generate further output; step S3.1.5: the feature map enters the ASFF_3 module: the ASFF_3 module is used to fuse three feature maps of different scales of track fasteners, denoted as feature map x0, feature map x1 and feature map x2, and its process is similar to ASFF_2 but more complex: first, the weight calculation is performed on the feature map x0, the feature map x1 and the feature map x2 respectively; in order to align the spatial size, the feature map x1 and the feature map x2 are adjusted to the same size as the feature map x0 through upsampling; then, the three groups of weights are processed through 1x1 convolution, and normalized through Softmax function to generate the fusion weights of each feature map; then, the feature map x0, the upsampled feature map x1 and the feature map x2 are weighted and summed according to the weights to obtain the preliminary fused feature map; finally, a 3x3 convolution layer is used to further process the fused features to output the final feature map; step S3.1.6: The feature map enters the BasicBlock module again, which performs deeper feature extraction while ensuring the stability of the training. The ASFF module and the BasicBlock module are used alternately to ensure the adaptive fusion of multi-scale features and continuously strengthen deep feature extraction, prompting the model to maintain high expression capability in multi-scale space, especially for the variable shape and complex texture of the rail fastener; step S3.1.7: Finally, each path outputs the processed features through Conv, providing rich and stable multi-scale features for the subsequent detection head; step S3.1.8: The ASFF module is responsible for dynamically fusing features of multiple scales to achieve more comprehensive multi-scale perception and help the model adapt to the features exhibited by the rail fastener at different distances and angles; step S3.1.9: The BasicBlock module is responsible for deep feature extraction and transformation on the fused feature map to improve the expression capability, thereby improving the recognition rate and positioning accuracy of the rail fastener.

[0012] Preferably, the application further comprises: the lightweight asymmetric detection head LADH structure in step S3 is as follows: step S3.2.1: the overall design of the LADH detection head is divided into two parallel branches: a regression branch and a classification branch, and the overall design adopts an asymmetric structure, so that the regression branch has a deeper feature extraction capability to cope with the complex requirements of the bounding box positioning, while the classification branch remains relatively simple to balance the calculation efficiency and detection performance of the model, effectively improving the detection speed and accuracy in resource-constrained environments; step S3.2.2: the regression branch is composed of a regular convolution, two deep separable convolutions, and a normal convolution, which is mainly used for accurate positioning of the bounding box: first, a standard convolution layer is used to extract preliminary features, then two deep separable convolution layers are applied in succession to utilize deep convolution decomposition of space and channel convolution, greatly reducing the calculation complexity and parameter quantity while maintaining the effective expression of spatial features, and finally a normal convolution layer is used to output the bounding box regression result, helping the model accurately adjust the position and size of the rail fastener bounding box under limited computing resources, adapting to the shape changes of the fastener and complex scenes in different states; step S3.2.3: the classification branch is composed of a regular convolution, a deep separable convolution, and a normal convolution, which focuses on target class discrimination: first, a standard convolution layer is used for feature extraction, then a deep separable convolution is used for lightweight feature processing, and finally a normal convolution layer is used to output the class prediction.

[0013] Preferably, the application further comprises: the SIoU loss function in the step S3 works as follows: step S3.3.1: the SIoU loss function is composed of angle loss, distance loss, shape loss and IoU loss, which significantly improves the detection accuracy of the track fastener; step S3.3.2: first, the design purpose of the angle loss is to reduce the number of variables in the distance-related adjustment of the prediction box, and the model will preferentially move the prediction box to the nearest X or Y axis, and then further approach the real box along the axis, align the actual position of the track fastener, reduce the error caused by the direction deviation, and ensure that the prediction box is more consistent with the main direction characteristics of the fastener; step S3.3.3: secondly, the distance loss considers the influence of the angle loss when calculating, and the distance loss adjusts the spatial distance between the prediction box and the real box combined with the angle information, only when the angle is close, the distance loss works, which avoids the misleading of the prediction box when the direction deviates significantly, and strengthens the spatial consistency of the box and the target; step S3.3.4: the shape loss is used to measure the difference between the prediction box and the real box in shape, by comparing the width and height of the prediction box with the real box, the shape loss is calculated to guide the optimization of the prediction box shape, so that it is more consistent with the standard size and shape of the track fastener, and avoids unreasonable boxes that are too long or too wide; step S3.3.5: the IoU loss is a commonly used measurement index in target detection, which is used to represent the overlap degree between the prediction box and the real box; combined with the four parts, the SIoU loss function not only improves the positioning accuracy in track fastener detection, but also enhances the adaptability to shape and direction, helping the model to more stably identify the fastener, and improving the detection efficiency and reliability in actual application.

[0014] Compared with the prior art, the application has the advantages of:

[0015] In the track fastener state detection task, the application improves the YOLO11 network structure, simultaneously realizes the detection precision improvement and model lightening, and meets the railway field edge deployment requirement. First, the neck network adopts the AFTP structure, the ASFF module is used for adaptively weighting and fusing the multi-scale feature maps output by the backbone network, the feature information of small, medium and large three sizes of fasteners is fully integrated, and the small target missing detection problem is effectively relieved; the BasicBlock residual unit is connected after fusion, deep semantic features are further extracted, and the expression ability of the fastener edge, texture and slight defects is enhanced. Secondly, the detection head adopts the light weight asymmetric detection head LADH, the double depth separable convolution is used in the regression branch, the parameter amount is reduced while the positioning accuracy is kept; the single depth separable convolution is used in the classification branch, the calculation amount is significantly reduced, the overall structure is lighter than the conventional detection head, and is suitable for the operation of resource limited equipment. Thirdly, the SIoU loss function is introduced, the angle loss, distance loss, shape loss and IoU loss are combined, the direction, position, size and overlap of the prediction box are simultaneously optimized, the boundary box regression result is closer to the real box, and the positioning accuracy and shape consistency are improved. Finally, through the training strategy combining weak augmentation, strong augmentation and virtual data, the model has strong generalization ability under different light, pollution and shooting angles, can be directly deployed on the edge device such as track inspection trolley or portable terminal, does not need additional compression processing, and significantly improves the identification efficiency and maintenance response speed of the fastener disease. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 The method flowchart in the embodiment of the application is shown in the figure.

[0017] Figure 2 The three-dimensional model rendering diagram in the embodiment of the application is shown in the figure.

[0018] Figure 3 The network structure diagram of the improved YOLO11 model in the embodiment of the application is shown in the figure.

[0019] Figure 4 The improved neck network structure diagram in the embodiment of the application is shown in the figure.

[0020] Figure 5 The Conv module structure diagram in the embodiment of the application is shown in the figure.

[0021] Figure 6 The ASFF and BasicBlock module structure diagram in the embodiment of the application is shown in the figure.

[0022] Figure 7 The module action process diagram of the improved neck network in the embodiment of the application is shown in the figure.

[0023] Figure 8This is a structural diagram of the LADH detection head in an embodiment of the present invention;

[0024] Figure 9 This is a comparison chart of experimental results for the improved algorithm model in the embodiments of the present invention;

[0025] Figure 10 This is a comparison chart of the complexity of the improved algorithm model in the embodiments of the present invention;

[0026] Figure 11 The image shows the test results of the improved algorithm in this embodiment of the invention. Detailed Implementation

[0027] To make the purpose, principle and structure of the present invention clearer, the following description is provided in conjunction with the accompanying drawings and specific embodiments.

[0028] This invention provides a method for detecting the status of track fasteners based on an improved YOLO11 model.

[0029] The overall process is as follows Figure 1 As shown, images of track fasteners on the operating line were first acquired using high-definition industrial cameras along the track during nighttime "maintenance windows." The image resolution was uniformly scaled to 640×640 pixels to form the initial sample set. To improve sample diversity and alleviate class imbalance, a hybrid augmentation strategy was adopted: weak augmentation such as rotation, translation, and cropping was applied to some samples; strong augmentation such as random noise, grayscale conversion, and color perturbation was applied to the remaining samples. Furthermore, fastener renderings generated by 3D modeling software were used as virtual data and only mixed into the validation and test sets to avoid information leakage during the training phase. All images were then manually annotated using the MakeSense online annotation platform. The labels were divided into three categories: "normal," "loose," and "missing." The annotation format adopted the normalized center coordinates and width / height representation required by YOLO, and the sets were divided into training, validation, and test sets in a 7:2:1 ratio.

[0030] In the network construction stage, YOLOv1 is used as the basis, and the input layer and backbone network are retained, and the neck network and detection head are replaced. The backbone network extracts multi-scale features from the input image, and outputs three feature maps x0, x1, x2 with different spatial resolutions, which are directly sent to the improved neck network. The neck network uses the A FPN structure: three parallel paths correspond to small, medium and large target scales, and the internal paths first complete preliminary feature transformation through the Conv module (in order of two-dimensional convolution, two-dimensional batch normalization, and SiLU activation); then the ASFF_2 and ASFF_3 modules are inserted between the paths to realize adaptive fusion. When ASFF_2 processes x0 and x1, x1 is upsampled to the resolution of x0, and then 1x1 convolution + Softmax is used to generate normalized weights, and the weighted sum of the two features is output after 3x3 convolution to obtain the fusion result; when ASFF_3 processes x0, x1 and x2, x1 and x2 are upsampled to the size of x0, and then the same method is used to obtain three weights and complete fusion. After each fusion, a BasicBlock module is connected, which is composed of two layers of "convolution, two-dimensional batch normalization, and SiLU" in series, and a residual connection is introduced at the end to enhance deep semantic expression and stabilize training. Finally, the three paths output enhanced multi-scale features for the subsequent detection head.

[0031] The detection head uses a lightweight asymmetric detection head LADH, which is divided into two parallel branches of regression and classification. The regression branch is sequentially provided with a standard convolution, two depth separable convolutions and a 1x1 convolution, which are used to output four regression quantities of center point coordinates, width and height; the classification branch is sequentially provided with a standard convolution, a depth separable convolution and a 1x1 convolution, which are used to output class confidence. The depth separable convolution decouples spatial convolution and channel convolution, significantly reduces parameter quantity and calculation quantity while maintaining feature expression, making the overall detection head more suitable for edge device operation.

[0032] In the training stage, the model is supervised by using the SIoU loss function. The loss is linearly combined by angle loss, distance loss, shape loss and IoU loss: angle loss guides the prediction box to approach the nearest principal axis first and then along the axis, reducing the directional error; distance loss only works when the angle is close, avoiding misleading when the direction deviates; shape loss calculates the difference between width and height respectively, suppressing too long or too wide boxes; IoU loss measures the overlapping area to ensure the final fitting degree. The four parts are optimized together to make the bounding box consistent with the true box in direction, position and size.

[0033] The training environment is Windows 11 system, Python 3.10, PyTorch 2.6, CUDA 12.4, and GPU uses RTX4050Laptop with 6GB of video memory. The input size is 640x640, the batch size is 16, the iteration is 100 rounds, the optimizer uses the automatically selected AdamW, and the training process is started with online enhancements such as hue, saturation, brightness, random flip, Mosaic, MixUp, Copy-Paste to prevent overfitting. During inference, the input image is subjected to one forward propagation to obtain the candidate frame, and after non-maximum suppression, the final class and confidence are output. The whole process can be completed in real time on the RTX4050 mobile GPU without additional quantization or pruning.

[0034] Through the above steps, the model is lightened while the detection accuracy is maintained, and can be directly deployed on track inspection trolleys, portable terminals and other resource-limited devices, significantly improving the efficiency of fastener disease identification and the speed of maintenance response.

[0035] Embodiment 1:

[0036] The disclosure includes a track fastener state detection method based on an improved YOLO11 model, comprising the following steps:

[0037] S1: Collecting track fastener picture data, using image augmentation algorithm to expand the data, a part is weakly augmented, and a part is strongly augmented, and finally virtual data is added.

[0038] S2: Data labeling of track fastener dataset, dividing the dataset into training set, validation set and test set.

[0039] S3: Constructing a track fastener state detection network model based on an improved YOLO11 model, the network model specifically includes input Input, backbone network Backbone, neck network Neck, detection head Head and output Output; the main improvement part includes: the neck network Neck is an A FPN structure, containing ASFF, BasicBlock and other modules; the detection head Head is a lightweight asymmetric detection head LADH, containing two branches of regression and classification; the SIoU loss function is applied, containing angle loss, distance loss, shape loss and IoU loss four parts of loss; the model can effectively reduce the model complexity while ensuring the detection accuracy, and finally realizes the light weight.

[0040] S4: Training the track fastener state detection network model using the training set and the validation set, obtaining the parameters of the network model, and obtaining the trained safety equipment detection network model.

[0041] S5: Test the trained track fastener state detection network model with the test data set, and evaluate the test results.

[0042] Further, the specific method of step S1 is as follows:

[0043] S1.1: Obtain a track fastener picture data set in different states.

[0044] S1.2: Expand the data set using an image augmentation algorithm, and perform weak augmentation such as rotation, cropping, and translation on a part of the data set, and perform strong augmentation such as random noise, grayscale, and color transformation on another part of the data set.

[0045] S1.3: Add virtual data to the data set, which is a three-dimensional model rendering of the track fastener.

[0046] Further, the specific method of step S2 is as follows:

[0047] S2.1: Use the MakeSense labeling website to manually label the detection targets in the track fastener data set, including: loose, missing, and normal.

[0048] S2.2: Divide the labeled track fastener data set into training set, validation set, and test set according to a certain proportion.

[0049] S2.3: Divide the virtual data into the validation set and the test set to improve the robustness and generalization of the model training.

[0050] Further, the AFPN structure of the neck network Neck in step S3 is as follows:

[0051] S3.1.1: The neck network adopts a bottom-up and top-down path combined with horizontal connection to achieve efficient multi-scale feature fusion. The specific structure includes three parallel feature processing paths, which usually correspond to small, medium, and large target scale features. From top to bottom, they are high-resolution shallow features, medium-resolution middle features, and low-resolution deep features, realizing comprehensive detection of track fasteners of different sizes.

[0052] S3.1.2: Each path first passes through a continuous Conv for preliminary feature transformation and dimension adjustment. The Conv module consists of three parts: first, a two-dimensional convolution layer is used to perform convolution operation on the input feature map to extract local spatial features; then, batch normalization is applied to normalize the convolution output, stabilizing the training process and speeding up the convergence; finally, a SiLU activation function is introduced to introduce nonlinearity, making the model better capture the complex edges, shape details, and texture changes of track fasteners.

[0053] S3.1.3: After that, through the ASFF_2 module: First, weight calculation is performed on x0 and x1 respectively. In order to ensure the spatial size consistency of the two feature maps of the track fastener, x1 is adjusted to the same size as x0 through upsampling. Then, the weights of the two feature maps are further processed through 1x1 convolution, and normalized through the Softmax function, to generate the weight coefficients of the weighted fusion. Subsequently, x0 and the upsampled x1 are weighted and summed according to these weights, to obtain the preliminary fused feature map. Finally, a 3x3 convolution layer is used to further process the fused feature, and output the fused feature map.

[0054] S3.1.4: The feature map enters the BasicBlock module: First, a 2D convolution layer is used, followed by BatchNorm2d for normalization to stabilize training, and then a SiLU activation function is applied to introduce nonlinearity. Then, a second 2D convolution and BatchNorm2d operation are performed, and the output is added to the original input through a residual connection, and finally a SiLU activation function is used again to generate further output.

[0055] S3.1.5: The feature map enters the ASFF_3 module: The ASFF_3 module is used to fuse three different scale feature maps of the track fastener, denoted as x0, x1 and x2, and its process is similar to ASFF_2 but more complex: First, weight calculation is performed on x0, x1 and x2 respectively. In order to align the spatial size, x1 and x2 are adjusted to the same size as x0 through upsampling. Then, the three sets of weights are processed through 1x1 convolution, and normalized through the Softmax function, to generate the fusion weights of each feature map. Next, according to these weights, x0, the upsampled x1 and x2 are weighted and summed to obtain the preliminary fused feature map. Finally, a 3x3 convolution layer is used to further process the fused feature, and output the final feature map.

[0056] S3.1.6: The feature map enters the BasicBlock module again for deeper feature extraction while ensuring the stability of training. The ASFF and BasicBlock modules are used alternately to ensure adaptive fusion of multi-scale features and continuously strengthen deep feature extraction, so that the model maintains high expression ability in multi-scale space, especially for the variable shape and complex texture of the track fastener.

[0057] S3.1.7: Finally, the features processed by Conv are output for each path, providing rich and stable multi-scale features for the subsequent detection head.

[0058] S3.1.8: ASFF is responsible for dynamically fusing features of multiple scales to achieve more comprehensive multi-scale perception, helping the model adapt to the features exhibited by the track fastener at different distances and angles.

[0059] S3.1.9: BasicBlock is responsible for deep feature extraction and transformation on the fused feature map, improving the expression ability, thereby improving the recognition rate and positioning accuracy of the rail fastener.

[0060] Further, the lightweight asymmetric detection head LADH in step S3 has the following structure:

[0061] S3.2.1: The overall design of the LADH detection head is divided into two parallel branches: a regression branch and a classification branch. The overall design adopts an asymmetric structure, so that the regression branch has a deeper feature extraction capability to cope with the complex requirements of the bounding box positioning, while the classification branch remains relatively simple to balance the calculation efficiency and detection performance of the model, effectively improving the detection speed and accuracy in resource-constrained environments.

[0062] S3.2.2: The regression branch consists of a regular convolution, two deep separable convolutions, and a normal convolution, which is mainly used for accurate positioning of the bounding box. First, a standard convolution layer is used to extract preliminary features, then two deep separable convolution layers are applied in succession, which utilize deep convolution to decompose spatial and channel convolutions, greatly reducing the computational complexity and parameter quantity while maintaining the effective expression of spatial features. Finally, a normal convolution layer is used to output the bounding box regression result, helping the model accurately adjust the position and size of the rail fastener bounding box in limited computing resources, adapting to different state categories and complex scenarios of the fastener.

[0063] S3.2.3: The classification branch consists of a regular convolution, a deep separable convolution, and a normal convolution, which focuses on target class discrimination. First, a standard convolution layer is used for feature extraction, then a deep separable convolution is used for lightweight feature processing, and finally a normal convolution layer is used to output the class prediction.

[0064] Further, the SIoU loss function in step S3 has the following effect:

[0065] S3.3.1: The SIoU loss function consists of angle loss, distance loss, shape loss, and IoU loss, which significantly improves the detection accuracy of the rail fastener.

[0066] S3.3.2: First, the purpose of the angle loss is to reduce the number of variables in the distance-related adjustment of the predicted box. The model will first align the predicted box to the nearest X or Y axis, and then further approach the real box along that axis, aligning the actual position of the rail fastener, reducing the error caused by directional deviation, and ensuring that the predicted box better fits the main directional features of the fastener.

[0067] S3.3.3: Second, the distance loss takes into account the influence of the angle loss when calculating. The distance loss adjusts the spatial distance between the predicted box and the real box in combination with the angle information. Only when the angle is close does the distance loss work. This avoids misleading when the predicted box is significantly deviated in direction, and strengthens the spatial consistency of the box and the target.

[0068] S3.3.4: Shape loss is used to measure the difference in shape between the predicted box and the real box. By comparing the width and height of the predicted box with the real box, the shape loss is calculated to guide the model to optimize the shape of the predicted box, making it more consistent with the standard size and shape of the track fastener, and avoiding unreasonable boxes that are too long or too wide.

[0069] S3.3.5: IoU loss is a commonly used measure in target detection, used to represent the degree of overlap between the predicted box and the real box. In combination with the four parts, the SIoU loss function not only improves the positioning accuracy in track fastener detection, but also enhances the adaptability to shape and direction, helping the model to more stably identify the fastener and improve the monitoring efficiency and reliability in actual application.

[0070] Further, the model training process of step S4 is as follows:

[0071] S4.1: The environment is configured before training. The training environment is a GPU training environment. The specific device model and hyperparameters are shown in Table 1:

[0072] Table 1, device model and parameters.

[0073]

[0074] S4.2: Data augmentation is performed during the training process to prevent model overfitting, including the following methods: tone enhancement, saturation enhancement, brightness enhancement, random vertical flip, random horizontal flip, Mosaic, MixUp, Copy-Paste.

[0075] Further, the specific method of step S5 is as follows:

[0076] S5.1: The track fastener image to be detected is input into the trained track fastener state detection model.

[0077] S5.2: The track fastener image undergoes candidate box generation, classification, and position regression, and outputs the final detection result, including the class and score.

[0078] S5.3: The following evaluation indicators are used to evaluate the results:

[0079] Precision (P): Precision is defined as the proportion of positive samples predicted by the model that are truly positive, reflecting the accuracy of the model's predictions. The formula is:

[0080] ;

[0081] where TP represents true positives, i.e., positive examples correctly predicted by the model; FP represents false positives, i.e., negative examples incorrectly predicted as positive by the model. High precision indicates that the model has a low false positive rate when predicting positive examples.

[0082] Recall (R): Recall is defined as the proportion of all true positive examples correctly predicted by the model, reflecting the model's coverage of positive examples. The formula is:

[0083] ;

[0084] where FN represents false negatives, i.e., true positive examples that the model fails to detect. High recall indicates that the model can effectively identify most positive examples, reducing the rate of missed detection.

[0085] F1 score is the harmonic mean of precision and recall, used to comprehensively measure the precision and recall of the model. The formula is:

[0086] .

[0087] It is worth noting that:

[0088] In the target detection task, the ground truth box refers to the rectangular box given by the annotator corresponding to the true position of the target in the image, whose coordinates and dimensions are considered as the "correct answer". The prediction box refers to the rectangular box output by the model after forward reasoning for each possible target, whose coordinates and dimensions are obtained by network regression, representing the model's "guess" of the target's position. In the training phase, the difference between the prediction box and the ground truth box (such as center point offset, width and height error, IoU, etc.) is used to calculate the loss, guiding the network parameter update; in the inference phase, the prediction box is directly used as the final detection result.

[0089] Softmax function is a normalized exponential function that maps a real number vector (logits) to a probability distribution vector: As the last layer of a multi-classification network, it calculates errors with cross-entropy loss, and generates normalized weights in attention mechanisms and weighted fusion (such as ASFF). Softmax converts any real number vector into a probability vector with a sum of 1, acting as a "normalization switch" in classification and weighting scenarios.

[0090] BasicBlock is a residual building block in Residual Network (ResNet), which is used to realize "skip connection" in deep network to alleviate gradient vanishing, improve training stability and accuracy. Structurally, the input x is added to the main path and the short path after ReLU / SiLU activation, and the final output y is obtained. It makes the network only need to learn residual mapping, rather than complete mapping, thereby reducing the optimization difficulty. In the present application, the neck network AFPN is inserted with BasicBlock after each multi-scale fusion (ASFF) to further extract deep features and strengthen the residual, thereby enhancing the expression ability of the edge and texture details of the track fastener, while maintaining the multi-scale information without being diluted.

[0091] The track fastener state detection method based on the improved YOLO11 model disclosed in the present embodiment mainly comprises the following steps:

[0092] (1) Data set preparation. The data set of the present embodiment is obtained by manually collecting track fastener images on a track test line using a camera. The collected track fastener image data is classified, and the track fastener state is divided into three categories: missing, loose, and normal. Due to the limited length of the track test line, the sample size of the data set is limited. Image augmentation algorithms are used to expand the data set. A part is subjected to weak augmentation methods such as rotation, cropping, and translation, and another part is subjected to strong augmentation methods such as random noise, grayscale, and color transformation. At the same time, some virtual data, i.e. three-dimensional model rendering images of track fasteners, are added, as shown in Figure 2 , which are only used in the validation set and the test set.

[0093] (2) After the image samples are collected, the MakeSense website is used to manually label the targets in the track fastener data set, and finally a YOLO format label txt file is generated, including target categories, coordinates, and other information. All data is divided into training set, validation set, and test set in proportion.

[0094] (3) Constructing a track fastener state detection network model based on the improved YOLO11 model. The improved YOLO11 track fastener state detection model is as shown in Figure 3 , which includes a backbone network, a neck network, and a detection head. The main improvement is in the neck network and the detection head.

[0095] The neck network is improved by replacing the original structure with an AFPN structure. The improved neck network structure diagram is as shown in Figure 4 , the Conv module structure in the neck network is as shown in Figure 5 , and the ASFF and BasicBlock module structures are as shown in Figure 6 , and the main module action process is asFigure 7 As shown in the figure, the ASFF is responsible for dynamically fusing features of multiple scales to achieve more comprehensive multi-scale perception, helping the model to adapt to the features exhibited by the track fastener at different distances and angles, and the BasicBlock is responsible for deep feature extraction and transformation on the fused feature map to improve the expression ability, thereby improving the recognition rate and positioning accuracy of the track fastener.

[0096] The specific action process of the neck network is as follows:

[0097] The structure includes three parallel feature processing paths corresponding to the input multi-scale features of the track fastener. In track fastener state detection, the neck network pre-processes the multi-scale features from the backbone network through multiple convolution layers, dynamically fuses different scale features through the ASFF_2 and ASFF_3 modules, effectively integrates shallow, medium, and deep layer information, cooperates with the BasicBlock for deep feature extraction and residual connection, enhances the feature expression ability, improves the detection of fastener details and state changes, provides accurate multi-scale fused features for the subsequent detection head, and significantly improves the accuracy and stability of fastener state recognition.

[0098] (4) A lightweight asymmetric detection head LADH is adopted, and the structure of the detection head is as shown in Figure 8 .

[0099] The regression branch is composed of one regular convolution, two depthwise separable convolutions, and one ordinary convolution, which is mainly used for accurate positioning of the bounding box. The classification branch is composed of one regular convolution, one depthwise separable convolution, and one ordinary convolution, which is focused on the discrimination of target categories.

[0100] The specific action process of each branch is as follows:

[0101] Regression branch (used for predicting the position box information of the target):

[0102] Conv: The input features are first passed through a standard convolution to improve the expression ability.

[0103] DWConv: Perform a depthwise separable convolution to fully extract spatial features.

[0104] DWConv: Perform another depthwise separable convolution to further improve feature extraction capability while reducing parameter quantity.

[0105] nn.Conv2d: Finally, a 1x1 convolution is used to obtain the regression parameters of the target box, such as the center point, width, etc.

[0106] Classification branch (used for predicting the category of the target):

[0107] Conv: The input features are also first passed through a standard convolution.

[0108] DWConv: Extract spatial features using one depthwise separable convolution.

[0109] nn.Conv2d: Directly output class prediction scores.

[0110] (5) The prepared track fastener dataset is input into the improved YOLO11 model for training. In the experiment, the dataset is divided into a training set, a validation set, and a test set according to a ratio of 7:2:1. The experimental hardware configuration is a 12th Gen Intel(R) Core(TM) i7-12650H@2.30GHz processor, a NVIDIA GeForce RTX4050 Laptop GPU with 6G video memory, 24GB of memory, a Windows 11 operating system, a VScode development platform, a python programming language, a Pytorch deep learning framework, a torch version of 2.6.0, and a CUDA version of 12.4. The model training picture size is 640*640, the Workers is set to 6, the Batch is set to 16, data augmentation is enabled during training, the optimization is set to automatic, the optimizer and related parameters are automatically selected, and the training round is set to 100 rounds.

[0111] (6) To evaluate the track fastener state detection model, commonly used evaluation indicators in the target detection field are used, mainly precision and recall.

[0112] Precision (P): Precision is defined as the proportion of true positive samples in the samples predicted as positive by the model, reflecting the accuracy of the model prediction. The calculation formula is:

[0113] ;

[0114] Where TP represents the true positive, i.e., the positive correctly predicted by the model; FP represents the false positive, i.e., the negative incorrectly predicted as positive by the model. High precision indicates that the model has a low false positive rate when predicting positive examples.

[0115] Recall (R): Recall is defined as the proportion of all true positives correctly predicted by the model, reflecting the coverage ability of the model for positive examples. The calculation formula is:

[0116] ;

[0117] Where FN represents the false negative, i.e., the true positive that the model fails to detect. High recall indicates that the model can effectively identify most positive examples and reduce the rate of missed detection.

[0118] The F1 score is the harmonic mean of precision and recall, used to comprehensively measure the precision and recall of the model, and the calculation formula is:

[0119] .

[0120] (7) The present embodiment is compared with the basic model, YOLOv5 model and YOLOv8 model, in order to better reflect the generalization performance of the model, the test set is used for testing, and the model detection performance comparison results are shown in Figure 7 , the main reference evaluation index is precision and recall, the model complexity comparison results are shown in Figure 8 , the main comparison parameters are Weights and GFLOPs, and the test result data is shown in Table 2.

[0121] Table 2, experimental data table.

[0122]

[0123] From Figure 9 , 10 and Table 2, it can be seen that the track fastener state detection method based on the improved YOLO11 model proposed in the present application has significant advantages in target detection performance and model complexity. In terms of detection performance, the number of true positives (TP) of the algorithm reaches 289, which is the highest among all comparison models; the number of false negatives (FN) is only 13, which is significantly lower than YOLO11, YOLOv5 and YOLOv8, indicating that its capture ability for real targets is stronger and the miss rate is lower. In the corresponding derived indicators, the recall rate of the algorithm reaches 0.9570, the F1 score reaches 0.8934, and both are ranked first, and the precision is 0.8377, which is close to 0.8387 of YOLOv8, which comprehensively reflects better detection accuracy and target coverage. In terms of model complexity, the weight file size (Weights) of the algorithm is 4.7MB, the calculation amount (GFLOPs) is 6.0, and the parameter quantity (Parameters) is 2176598, among which the parameter quantity is the least among all models, and the weight size and calculation amount are at a relatively low level, only slightly higher than YOLOv5, and far lower than YOLO11 and YOLOv8.

[0124] From Figure 11 , it can be seen that the track fastener state detection method based on the improved YOLO11 model proposed in the present application has a high accuracy in actual test results and has good detection effect.

[0125] The above results show that the track fastener state detection method based on the improved YOLO11 model can reduce the model complexity to ensure the lightweight deployment characteristics, effectively improve the comprehensive performance of target detection, solve the technical problem that the existing model is difficult to balance between detection precision and complexity, and has better practical application value.

[0126] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can make equivalent replacement or change within the technical range disclosed by the present application according to the technical solution and concept of the present application, which should be covered within the protection scope of the present application.

Claims

1. A track fastener state detection method based on an improved YOLO11 model, characterized in that, The method comprises the following steps: Step S1: collecting track fastener picture data, expanding the data using an image augmentation algorithm, weakly augmenting a part of the data, strongly augmenting a part of the data, and finally adding virtual data; Step S2: performing data labeling on the track fastener dataset, and dividing the dataset into a training set, a validation set and a test set; Step S3: constructing a track fastener state detection network model based on an improved YOLO11 model, wherein the network model specifically comprises input Input, backbone network Backbone, neck network Neck, detection head Head and output Output; Wherein, The neck network Neck adopts an AFPN structure, combines a top-down path and a bottom-up path through a horizontal connection, introduces an ASFF module to realize dynamic fusion of multi-scale features, and performs deep feature extraction and transformation through a BasicBlock module to improve the expression ability and positioning accuracy of features of different scales of the track fastener; The detection head Head adopts a lightweight asymmetric detection head LADH, including a regression branch and a classification branch, the regression branch enhances the positioning ability of the bounding box through a depth separable convolution, and the classification branch maintains a lightweight structure to realize efficient classification; The model adopts a SIoU loss function, combines angle loss, distance loss, shape loss and IoU loss, and optimizes the consistency of the predicted box and the real box in direction, position, shape and overlap; The overall model is lightweight while maintaining detection accuracy, and is suitable for edge deployment; Step S4: training the track fastener state detection network model using the training set and the validation set, obtaining parameters of the network model, and obtaining the trained safety equipment detection network model; Step S5: testing the trained track fastener state detection network model using the test dataset, and evaluating the test results.

2. The track fastener state detection method based on the improved YOLO11 model according to claim 1, wherein, The step S3 further comprises: The ASFF_2 and ASFF_3 modules are used to realize adaptive weighted fusion of multi-scale feature maps between the top-down and bottom-up paths, the feature maps are derived from initial multi-scale features extracted from the track fastener dataset by the backbone network Backbone and transmitted to the neck network Neck, the spatial size is unified through up-sampling during the fusion process, and 1x1 convolution and Softmax are used to generate fusion weights, and finally 3x3 convolution is used to output the fusion feature map; The ASFF_2 module is used to fuse two scale feature maps: feature map x0 and feature map x1, first up-sample the feature map x1 to match the size of the feature map x0, then calculate the fusion weight through 1x1 convolution and Softmax, then weighted sum the feature map x0 and the up-sampled feature map x1, and finally output the fusion feature map through 3x3 convolution; The ASFF_3 module is used for fusing feature maps of three scales: feature map x0, feature map x1 and feature map x2, first, feature map x1 and feature map x2 are up-sampled to match the x0 size, then the fusion weight of each feature map is calculated through 1x1 convolution and Softmax, then the feature map x0, the up-sampled feature map x1 and feature map x2 are weighted and summed, and finally a 3x3 convolution is performed to output the fused feature map; The BasicBlock module is arranged after the ASFF module and is used for deep feature extraction of the fused feature map, and the structure includes twice convolution, batch normalization, SiLU activation operation, and residual connection is used to enhance the feature expression and training stability.

3. The track fastener state detection method based on the improved YOLO11 model according to claim 1, wherein, The regression branch of the lightweight asymmetric detection head LADH includes one standard convolution, two deep separable convolutions and one ordinary convolution, which is used for extracting spatial features and outputting bounding box regression parameters; the classification branch includes one standard convolution, one deep separable convolution and one ordinary convolution, which is used for outputting class prediction results.

4. The track fastener state detection method based on the improved YOLO11 model according to claim 1, wherein, The angle loss in the SIoU loss function is used to guide the predicted box to approach the real box along the X or Y axis direction, and to reduce the direction deviation; the distance loss combines the angle information to adjust the spatial distance between the predicted box and the real box; the shape loss optimizes the shape of the predicted box by comparing the width and height difference; the IoU loss measures the overlap degree of the predicted box and the real box, and cooperates to improve the positioning accuracy and shape adaptability.

5. The track fastener condition detection method based on the improved YOLO11 model according to claim 1, wherein, The specific method of step S1 is as follows: Step S1.1: obtaining track fastener picture data sets in different states; Step S1.2: expanding the data set by using an image augmentation algorithm, a part of which is weakly augmented, including rotation, cropping, translation, and another part of which is strongly augmented, including random noise, grayscale, and color transformation; Step S1.3: adding virtual data to the data set, which is a three-dimensional model rendering image of the track fastener; The specific method of step S2 is as follows: Step S2.1: manually labeling the detection targets in the track fastener data set using a labeling website, including loose, missing and normal states of the track fastener; Step S2.2: dividing the labeled track fastener data set into training set, validation set and test set according to a certain proportion; Step S2.3: dividing the virtual data into the validation set and the test set to improve the robustness and generalization of the model training.

6. The track fastener condition detection method based on the improved YOLO11 model of claim 2, wherein, The structure of the progressive feature pyramid AFPN of the neck network Neck in step S3 is as follows: Step S3.1.1: the neck network adopts a bottom-up and top-down path combined with horizontal connection to realize efficient multi-scale feature fusion, and the specific structure includes three parallel feature processing paths, which usually correspond to small, medium and large target scale features from top to bottom, i.e. high-resolution shallow layer features, medium-resolution middle layer features and low-resolution deep layer features, realizing comprehensive detection of track fasteners of different sizes; Step S3.1.2: Each path first passes through a continuous Conv for preliminary feature transformation and dimension adjustment. The Conv module consists of three parts: first, a two-dimensional convolution layer is used to perform convolution operation on the input feature map to extract local spatial features; then, batch normalization is applied to normalize the convolution output, stabilize the training process and speed up the convergence; finally, a SiLU activation function is introduced to introduce nonlinearity, making the model better capture the complex edges, morphological details and texture changes of the track fastener; Step S3.1.3: Then, through the ASFF_2 module: first, the weight calculation is performed on the feature map x0 and the feature map x1 respectively; the feature map x1 is adjusted to the same size as the feature map x0 through upsampling to make the spatial sizes of the two feature maps of the track fastener consistent; then, the weights of the two feature maps are further processed through 1x1 convolution, and normalized through the Softmax function to generate the weight coefficients of the weighted fusion; then, the feature map x0 and the upsampled feature map x1 are weighted and summed according to these weights to obtain the preliminary fused feature map; finally, a 3x3 convolution layer is used to further process the fused feature, and the fused feature map is output; Step S3.1.4: The feature map enters the BasicBlock module: first, a two-dimensional convolution layer is used, then a two-dimensional batch normalization is used for normalization to stabilize the training, and then a SiLU activation function is used to introduce nonlinearity; then, the second two-dimensional convolution and two-dimensional batch normalization operation is performed, and the output is added through residual connection with the original input, and finally the SiLU activation function is used again to generate further output; Step S3.1.5: The feature map enters the ASFF_3 module: the ASFF_3 module is used to fuse three feature maps of different scales of the track fastener, denoted as feature map x0, feature map x1 and feature map x2, and the process is as follows: first, the weight calculation is performed on the feature map x0, the feature map x1 and the feature map x2 respectively; in order to align the spatial size, the feature map x1 and the feature map x2 are adjusted to the same size as the feature map x0 through upsampling; then, the three groups of weights are processed through 1x1 convolution, and normalized through the Softmax function to generate the fusion weights of each feature map; then, the feature map x0, the upsampled feature map x1 and the feature map x2 are weighted and summed according to these weights to obtain the preliminary fused feature map; finally, a 3x3 convolution layer is used to further process the fused feature, and the final feature map is output; Step S3.1.6: The feature map enters the BasicBlock module again for deeper feature extraction while ensuring the stability of the training, and the ASFF module and the BasicBlock module are used alternately to ensure adaptive fusion of multi-scale features and continuously strengthen deep feature extraction, promoting the model to maintain high expression ability in multi-scale space; Step S3.1.7: Finally, the processed features of each path are output through Conv to provide rich and stable multi-scale features for the subsequent detection head; Step S3.1.8: The ASFF module is responsible for dynamically fusing features of multiple scales, achieving more comprehensive multi-scale perception, and helping the model adapt to the features exhibited by the track fastener at different distances and angles; Step S3.1.9: The BasicBlock module is responsible for deep feature extraction and transformation on the fused feature map, improving expression ability, and thus improving the recognition rate and positioning accuracy of the track fastener.

7. The track fastener state detection method based on the improved YOLO11 model according to claim 3, wherein, The lightweight asymmetric detection head LADH structure in step S3 is as follows: Step S3.2.1: The overall design of the LADH detection head is divided into two parallel branches: a regression branch and a classification branch. The overall design adopts an asymmetric structure, allowing the regression branch to have more in-depth feature extraction capabilities to address the complex requirements of bounding box positioning, while the classification branch remains relatively simple to balance the model's computational efficiency and detection performance, effectively improving detection speed and accuracy in resource-constrained environments; Step S3.2.2: The regression branch consists of a regular convolution, two depthwise separable convolutions, and a normal convolution, focusing on accurate positioning of the bounding box. First, a standard convolution layer is used to extract initial features. Then, two depthwise separable convolution layers are applied in succession, utilizing depthwise convolution decomposition of spatial and channel convolutions to significantly reduce computational complexity and parameter quantity while maintaining effective expression of spatial features. Finally, a normal convolution layer outputs the bounding box regression results, helping the model accurately adjust the position and size of the track fastener bounding box under limited computational resources, adapting to the shape changes of the fastener in different states and complex scenarios; Step S3.2.3: The classification branch consists of a regular convolution, a depthwise separable convolution, and a normal convolution, focusing on target class discrimination. First, a standard convolution layer is used for feature extraction, followed by a depthwise separable convolution for lightweight feature processing, and finally a normal convolution layer outputs the class prediction.

8. The track fastener state detection method based on the improved YOLO11 model according to claim 4, wherein, The SIoU loss function in step S3 works as follows: Step S3.3.1: The SIoU loss function consists of angle loss, distance loss, shape loss, and IoU loss, significantly improving the accuracy of track fastener detection; Step S3.3.2: First, the purpose of the angle loss is to reduce the number of variables in the distance-related adjustment of the predicted box. The model will first align the predicted box to the nearest X or Y axis, and then further approach the real box along that axis, aligning the actual position of the track fastener and reducing errors caused by directional deviation, ensuring that the predicted box better fits the main directional features of the fastener; Step S3.3.3: Second, the distance loss takes into account the influence of the angle loss. The distance loss adjusts the spatial distance between the predicted box and the real box in combination with the angle information. Only when the angle is close does the distance loss take effect, avoiding misleading when the predicted box is significantly deviated in direction and strengthening the spatial consistency of the box and the target. Step S3.3.4: Shape loss is used to measure the difference between the predicted box and the true box in shape. By comparing the width and height of the predicted box with the true box, the shape loss is calculated to guide the model to optimize the shape of the predicted box, making it more consistent with the standard size and shape of the track fastener, and avoiding unreasonable boxes that are too long or too wide. Step S3.3.5: IoU loss is a commonly used measure in target detection, used to represent the degree of overlap between the predicted box and the true box. Combining these four parts, the SIoU loss function not only improves the positioning accuracy in track fastener detection, but also enhances the adaptability to shape and direction, helping the model to more stably identify the fastener and improve the detection efficiency and reliability in actual application.

Citation Information

Patent Citations

  • Track fastener state identification method based on real-time instance segmentation

    CN116721263A

  • Method for enhancing object detection

    EP4614454A1