Railway track fastener defect detection method based on improved yolov8s

CN117974630BActive Publication Date: 2026-10-20XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410324466.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-21
Publication Date
2026-10-20
Estimated Expiration
2044-03-21

Smart Images

  • Figure CN117974630B_ABST
    Figure CN117974630B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of target detection, and provides a railway track fastener defect detection method based on an improved yolov8s, which comprises the following steps: acquiring a track fastener image; inputting the track fastener image into a constructed defect detection network to output a fastener defect category and a fastener defect position; the defect detection network comprises a backbone network, a feature fusion network and a detection head; wherein the backbone network comprises a plurality of receptive field attention convolution, a plurality of MFE-C2f modules and an SPPF-LSKA module; the feature fusion network comprises an ASFF module and a C2f module; and the detection head comprises a category prediction branch and a position prediction branch. The backbone network and the feature fusion network are redesigned, and the track fastener defect detection precision is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection technology, and specifically to a method for detecting defects in railway track fasteners based on an improved YOLOv8s. Background Technology

[0002] Railways occupy a backbone position in the comprehensive transportation system, transporting a large amount of manpower and material resources for economic construction. Track fasteners are important connecting components on railway tracks. Due to friction and vibration from train operation, rainwater erosion, malicious damage, and other factors, fasteners are prone to loosening and falling off. These abnormalities may lead to serious safety accidents. Therefore, the inspection and maintenance of track fasteners are particularly important.

[0003] Currently, track fastener defects are primarily detected through manual inspection, which suffers from low efficiency, missed detections, and other problems. Existing automated solutions for fastener defects include vibration detection, image processing, and neural networks. Vibration detection determines the fastener's tightness by detecting the vibration state of the rail. This method has significant errors, easily missing anomalies in individual fasteners and failing to provide accurate location information. Image processing methods require prior knowledge of track geometry for location assistance, but this approach suffers from poor robustness and detection performance. Neural network technology has developed rapidly in recent years, but the performance of detection algorithms is mostly evaluated on public datasets. However, actual fastener defect detection is characterized by complex detection environments and imbalanced training set distributions, resulting in low accuracy for existing neural network-based fastener defect detection algorithms. Summary of the Invention

[0004] The technical problem solved by this invention is that existing technologies are insufficient in their ability to extract features in complex environments and cannot handle the problem of uneven distribution of training samples.

[0005] To address the above problems, this invention provides a method for detecting defects in railway track fasteners based on an improved YOLOv8s, comprising:

[0006] Obtain images of the track fasteners;

[0007] The track fastener image is input into the constructed defect detection network, which outputs the fastener defect category and location. The defect detection network includes a backbone network, a feature fusion network, and a detection head. The backbone network includes multiple receptive field attention convolutions, multiple MFE-C2f modules, and SPPF-LSKA modules. The feature fusion network includes ASFF modules and C2f modules. The detection head includes a category prediction branch and a location prediction branch.

[0008] Furthermore, the step of inputting the track fastener image into the constructed defect detection network and outputting the fastener defect category and location includes:

[0009] Feature extraction is performed on the track fastener image in the backbone network to obtain multi-scale features; the multi-scale features include first-scale features, second-scale features and third-scale features.

[0010] The first scale feature, the second scale feature, and the third scale feature are input into the feature fusion network, and the first fused feature is output.

[0011] The first fusion feature is input into the category prediction branch and the location prediction branch respectively, and the fastener defect category and the fastener defect location are output.

[0012] Furthermore, the step of extracting features from the track fastener image in the backbone network to obtain multi-scale features includes:

[0013] The track fastener image is upsampled using receptive field attention convolution to obtain initial features;

[0014] The initial features are input into a cascaded structure consisting of multiple receptive field attention convolutions and multiple MFE-C2f modules, and the first scale feature, the second scale feature, and the first feature are output.

[0015] The first feature is input into the SPPF-LSKA module, and the third scale feature is output.

[0016] Further, the step of inputting the first scale feature, the second scale feature, and the third scale feature into the feature fusion network and outputting the first fused feature includes:

[0017] The first scale feature, the second scale feature, and the third scale feature are input into the ASFF module to obtain the initial fused features;

[0018] The initial fusion feature is input into the C2f module, and the first fusion feature is output.

[0019] Further, the step of inputting the first fused feature into the category prediction branch and the location prediction branch respectively, and outputting the fastener defect category and the fastener defect location includes:

[0020] The first fused feature is processed sequentially through the CBS module, convolutional block, and SlideLoss in the category prediction branch to obtain the fastener defect category; the fastener defect category includes normal fasteners, abnormal elastic fasteners, and missing fasteners.

[0021] The first fused feature is processed sequentially through the CBS module, convolutional block, and EIoU loss in the location prediction branch to obtain the location of the fastener defect.

[0022] Furthermore, the construction process of the MFE-C2f module includes:

[0023] The input features of the MFE-C2f module are processed by convolution and the Split function to obtain the first split feature and the second split feature;

[0024] The second splitting feature is sequentially input into the first MFE-Block module and the second MFE-Block module to obtain the output features of the first MFE-Block module and the output features of the second MFE-Block module; the output features of the second MFE-Block module include a first sub-feature and a second sub-feature;

[0025] The first splitting feature, the output feature of the first MFE-Block module, and the output feature of the second MFE-Block module are concatenated and convolved to obtain the output feature of the MFE-C2f module.

[0026] Furthermore, the construction process of the first MFE-Block module includes:

[0027] The input features of the first MFE-Block module are processed by convolution and Split functions to obtain the third split feature, the fourth split feature and the fifth split feature;

[0028] The third, fourth, and fifth splitting features are input into the cross-level connection module, which outputs multiple reinforcement features.

[0029] The enhanced features are concatenated and input into a cascaded structure consisting of multiple CBR modules and multiple Dropout modules, and the output features of the first MFE-Block module are output.

[0030] Furthermore, the second MFE-Block module has the same structure as the first MFE-Block module.

[0031] Furthermore, the construction process of the SPPF-LSKA module includes:

[0032] The input features of the SPPF-LSKA module are passed through a cascaded structure consisting of a CBR module and multiple max pooling methods to obtain fourth-scale features, fifth-scale features, sixth-scale features, and seventh-scale features.

[0033] The fourth-scale feature, the fifth-scale feature, the sixth-scale feature, and the seventh-scale feature are spliced ​​together to obtain the spliced ​​feature;

[0034] After the splicing feature is input into the residual connection module, it is multiplied with the splicing feature by a Hadamard product to obtain the output feature of the SPPF-LSKA module.

[0035] Furthermore, the residual connection module includes convolution, multiple depthwise separable convolutions, and multiple depthwise dilated convolutions.

[0036] The beneficial effects of the railway track fastener defect detection method based on improved YOLOv8s described in this invention are as follows: In the backbone network, the feature extraction capability is enhanced by receptive field attention convolution, MFE-C2f module and SPPF-LSKA module, the feature fusion network is redesigned, and the feature fusion network is simplified by a single ASFF module, which effectively improves the problem of uneven sample distribution and greatly improves the detection accuracy of track fastener defects. Attached Figure Description

[0037] Figure 1 This is a flowchart illustrating the railway track fastener defect detection method based on the improved YOLOv8s in an embodiment of the present invention.

[0038] Figure 2 This is a schematic diagram of the defect detection network in an embodiment of the present invention;

[0039] Figure 3 This is a schematic diagram of the structure of the MFE-C2f module in an embodiment of the present invention;

[0040] Figure 4 This is a schematic diagram of the structure of the MFE-Block module in an embodiment of the present invention;

[0041] Figure 5 This is a schematic diagram of the SPPF-LSKA module in an embodiment of the present invention;

[0042] Figure 6 This is a diagram showing the detection results of the YOLOv8s algorithm.

[0043] Figure 7 The image shows the detection results of the railway track fastener defect detection method based on the improved YOLOv8s in this embodiment of the invention. Detailed Implementation

[0044] The present invention will now be described in detail with reference to the accompanying drawings.

[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0046] The YOLOv8s detection algorithm maintains high accuracy on public datasets while having a small number of parameters and fast detection speed, exhibiting excellent detection performance. However, when applied to the field of track fastener defect detection, it cannot solve the problems of uneven training sample distribution and difficulty in feature extraction, thus limiting detection accuracy. Therefore, this invention provides a railway track fastener defect detection method based on an improved YOLOv8s algorithm, such as... Figure 1 As shown, the method includes the following steps:

[0047] 101. Obtain the image of the track fastener.

[0048] Specifically, images of track fasteners can be collected using a track inspection vehicle.

[0049] 102. Input the track fastener image into the constructed defect detection network, and output the fastener defect category and fastener defect location; the defect detection network includes a backbone network, a feature fusion network, and a detection head; wherein, the backbone network includes multiple receptive-field attention convolution (RFAConv), multiple MFE-C2f modules, and SPPF-LSKA modules; the feature fusion network includes an ASFF (Adaptively Spatial Feature Fusion) module and a C2f module; the detection head includes a category prediction branch and a location prediction branch.

[0050] In one possible implementation, inputting the track fastener image into the constructed defect detection network and outputting the fastener defect category and location includes:

[0051] Feature extraction is performed on the track fastener image in the backbone network to obtain multi-scale features; the multi-scale features include first-scale features, second-scale features and third-scale features.

[0052] The first scale feature, the second scale feature, and the third scale feature are input into the feature fusion network, and the first fused feature is output.

[0053] The first fusion feature is input into the category prediction branch and the location prediction branch respectively, and the fastener defect category and the fastener defect location are output.

[0054] Specifically, the structural diagram of the defect detection network is as follows: Figure 2 As shown, the defect detection network consists of a backbone network, a feature fusion network, and a detection head. The backbone network obtains features at three scales: first-scale features, second-scale features, and third-scale features. In the feature fusion network, taking into account the single-scale nature of the track fastener, the features from the three different scales output by the backbone network are fused, simplifying the feature fusion network. In the detection head, a decoupled detection head is used. The idea behind decoupling the detection head is to separate the classification and localization tasks to improve detection accuracy and efficiency. The category prediction branch and the position prediction branch are responsible for category prediction and position regression, respectively. Since the aspect ratio of the fastener's ground truth bounding box is fixed, the regression part uses EIoU loss to introduce an aspect ratio penalty term to improve regression accuracy. The classification part uses Slide Loss to dynamically adjust the class weights to improve the problem of imbalanced samples.

[0055] In this embodiment, an improvement to the YOLOv8s algorithm is proposed, which is a defect detection network based on the improved YOLOv8s algorithm. The backbone network is redesigned to enhance the feature extraction capability, and the feature fusion network is redesigned. The feature fusion network is simplified by using a single ASFF module, which effectively improves the problem of uneven sample distribution and significantly improves the accuracy of track fastener defect detection.

[0056] In one possible implementation, the step of extracting features from the track fastener image in the backbone network to obtain multi-scale features includes:

[0057] The track fastener image is upsampled using receptive field attention convolution to obtain initial features;

[0058] The initial features are input into a cascaded structure consisting of multiple receptive field attention convolutions and multiple MFE-C2f modules, and the first scale feature, the second scale feature, and the first feature are output.

[0059] The first feature is input into the SPPF-LSKA module, and the third scale feature is output.

[0060] Specifically, refer to Figure 2In the backbone network, the track fastener image is processed through receptive field attention convolution (RFAConv) to obtain initial features. RFAConv has stronger feature extraction capabilities than ordinary convolution (Conv). A cascaded structure consisting of multiple RFAConv and MFE-C2f modules contains a total of 4 RFAConv and 4 MFE-C2f modules, while the entire backbone network contains 5 RFAConv and 4 MFE-C2f modules. The initial features are input into the cascaded structure in the backbone network. The second and third MFE-C2f modules in this cascaded structure output first-scale features and second-scale features, respectively. The fourth MFE-C2f module in the cascaded structure obtains the first feature, which is then input into the SPPF-LSKA module in the backbone network to obtain the third-scale feature. The first, second, and third-scale features constitute the output of the backbone network. The scales of the first scale feature, the second scale feature, and the third scale feature are 256×256, 512×512, and 1024×1024, respectively.

[0061] In one possible implementation, inputting the first scale feature, the second scale feature, and the third scale feature into the feature fusion network and outputting the first fused feature includes:

[0062] The first scale feature, the second scale feature, and the third scale feature are input into the ASFF module to obtain the initial fused features;

[0063] The initial fusion feature is input into the C2f module, and the first fusion feature is output.

[0064] Specifically, refer to Figure 2 In the feature fusion network portion of this invention, the embodiment introduces an ASFF module, which adaptively fuses information from feature maps at different levels to enhance the model's ability to detect targets at different scales. In addition to the ASFF module, the embodiment also introduces a C2f module. After fusing the first-scale, second-scale, and third-scale features in the ASFF module, an initial fused feature is obtained, with a scale of 512×512. This initial fused feature is then enhanced using the C2f module to obtain a first fused feature. The scale of the first fused feature remains unchanged at 512×512 compared to the initial fused feature.

[0065] In this embodiment of the invention, the feature fusion network is simplified by using a single ASFF module.

[0066] In one possible implementation, the step of inputting the first fused feature into the category prediction branch and the location prediction branch respectively, and outputting the fastener defect category and the fastener defect location includes:

[0067] The first fused feature is processed sequentially through the CBS module, convolutional block, and SlideLoss in the category prediction branch to obtain the fastener defect category; the fastener defect category includes normal fasteners, abnormal elastic fasteners, and missing fasteners.

[0068] The first fused feature is processed sequentially through the CBS module, convolutional block, and EIoU loss in the location prediction branch to obtain the location of the fastener defect.

[0069] Specifically, refer to Figure 2 The detection head part in the middle, Figure 2 The upper part of the detection head is the category prediction branch. Figure 2 The lower layer of the detection head is the location prediction branch. The CBS module includes a combination of convolution, batch normalization, and SiLU activation functions. In the category prediction branch, the first fused feature is processed sequentially through the CBS module, convolutional block, and Slide Loss to obtain the fastener defect category. Slide Loss is used to supervise the classification loss. In the location prediction branch, the first fused feature is processed sequentially through the CBS module, convolutional block, and EIoU loss, outputting the coordinates of the predicted bounding box center point, the width, and the height of the predicted bounding box, thereby determining the location of the fastener defect.

[0070] In one possible implementation, the construction process of the MFE-C2f module includes:

[0071] The input features of the MFE-C2f module are processed by convolution and the Split function to obtain the first split feature and the second split feature;

[0072] The second splitting feature is sequentially input into the first MFE-Block module and the second MFE-Block module to obtain the output features of the first MFE-Block module and the output features of the second MFE-Block module; the output features of the second MFE-Block module include a first sub-feature and a second sub-feature;

[0073] The first splitting feature, the output feature of the first MFE-Block module, and the output feature of the second MFE-Block module are concatenated and convolved to obtain the output feature of the MFE-C2f module.

[0074] Specifically, Figure 3The diagram illustrates the structure of the MFE-C2f module. This embodiment of the invention designs an MFE-Block module, which is combined with the original C2f module in the backbone network to propose the MFE-C2f module, which is then used in the backbone network. The MFE-C2f module retains the residual connection design of the original C2f module, and uses two MFE-Block modules with multi-scale feature extraction capabilities to replace the single Bottleneck module in the original C2f module.

[0075] In the MFE-C2f module, the input features are first processed by a 1×1 standard convolution, and then the Split function splits the features into two parts with the same number of channels, namely the first split feature and the second split feature. One part of the features, the first split feature, enters the first residual branch, while the other part, the second split feature, is processed by two K×K MFE-Block modules, namely the first MFE-Block module and the second MFE-Block module. Each MFE-Block module generates a residual branch after processing. The residual connection features of the first residual branch and the residual branch generated by the first MFE-Block module are the first split feature and the output feature of the first MFE-Block module, respectively. The output feature of the second MFE-Block module is split according to the number of channels to obtain the first sub-feature and the second sub-feature. The first sub-feature and the second sub-feature are the same. The first sub-feature is the residual connection feature corresponding to the other residual branch, namely the residual branch generated by the second MFE-Block module. The gradients of the first split feature, the output feature of the first MFE-Block module, and the first sub-feature are different. After concatenating the first split feature, the output feature of the first MFE-Block module, the first sub-feature, and the second sub-feature, the final feature is output through a 1×1 standard convolution. The MFE-C2f module uses a large number of residual connections to enhance the interaction of feature information flow.

[0076] As network depth increases, the convolutional kernels of the MFE-Block module used in the MFE-C2f module continuously increase in size, successively to 3×3, 5×5, 7×7, and 9×9, referring to... Figure 2 That is Figure 3 In the MFE-C2f modules, K takes values ​​of 3, 5, 7, and 9 respectively. In shallow layers, using small kernel convolutions helps process high-resolution feature information. However, as depth increases, continuing to use small kernel convolutions becomes limited by the receptive field, failing to capture high-level semantics in low-resolution features, thus affecting the detection performance of medium to large targets. Since fastener targets are relatively large, increasing the size of the convolution kernel as the network depth increases helps capture a wider range of information, thereby improving the feature extraction capability of the backbone network.

[0077] In one possible implementation, the construction process of the first MFE-Block module includes:

[0078] The input features of the first MFE-Block module are processed by convolution and Split functions to obtain the third split feature, the fourth split feature and the fifth split feature;

[0079] The third, fourth, and fifth splitting features are input into the cross-level connection module, which outputs multiple reinforcement features.

[0080] The enhanced features are concatenated and input into a cascaded structure consisting of multiple CBR modules and multiple Dropout modules, and the output features of the first MFE-Block module are output.

[0081] In one possible implementation, the second MFE-Block module has the same structure as the first MFE-Block module.

[0082] Specifically, to effectively improve feature extraction performance in complex environments, this embodiment of the invention designs an MFE-Block module, such as... Figure 4 As shown. In the MFE-Block module, the features are first subjected to a 1×1 standard convolution to expand the number of channels to three times the original number. Then, the Split function is used to split them into three groups for processing separately. The number of channels is restored to be consistent with the original input features. These three groups are the third split feature, the fourth split feature, and the fifth split feature.

[0083] The cross-level connection module connects the three branches, processing the third, fourth, and fifth split features differently. The third split feature retains the original input feature information, similar to a residual connection. The other two sets of features are processed through an inverted Bottleneck structure, using 1×1 standard convolutions to expand the number of channels, followed by residual connections of 1×K, K×1, and K×K standard convolutions. This increases the network's feature extraction capability by deepening the network layers, and then 1×1 standard convolutions are used to compress the number of channels. The combination of 1×K and K×1 standard convolutions replaces a single K×K standard convolution, but significantly reduces the number of parameters, resulting in excellent performance. Simultaneously, the increased convolutions and residual connections in the inverted Bottleneck structure help efficiently utilize input features, addressing the issue of potential loss of channel information during channel compression in the Bottleneck structure. The MFE-Block module employs cross-level connections between the three branches, enhancing the interaction between information and strengthening the original feature information for the inverted Bottleneck branch. Finally, the feature information from the three branches, i.e., multiple enhancement features, is concatenated. Different scales are used to encode features in each branch, facilitating the extraction of multi-scale information from complex features.

[0084] Due to the imbalanced distribution of training samples, two Dropout operations were used at the end of the MFE-Block algorithm. The neuron hiding probability P was set to 0.2 to randomly ignore 20% of neurons in each training batch, thereby reducing overfitting and enhancing the algorithm's generalization ability. Furthermore, before each Dropout operation, the algorithm underwent processing by the CBR module, which includes convolution, batch normalization, and the ReLU activation function.

[0085] In this embodiment of the invention, cross-level connections between three branches and Dropout operation are used to enhance feature extraction capabilities while avoiding network overfitting.

[0086] In one possible implementation, the construction process of the SPPF-LSKA module includes:

[0087] The input features of the SPPF-LSKA module are passed through a cascaded structure consisting of a CBR module and multiple max pooling methods to obtain fourth-scale features, fifth-scale features, sixth-scale features, and seventh-scale features.

[0088] The fourth-scale feature, the fifth-scale feature, the sixth-scale feature, and the seventh-scale feature are spliced ​​together to obtain the spliced ​​feature;

[0089] After the splicing feature is input into the residual connection module, it is multiplied with the splicing feature by a Hadamard product to obtain the output feature of the SPPF-LSKA module.

[0090] In one possible implementation, the residual connection module includes convolution, multiple depthwise separable convolutions, and multiple depthwise dilated convolutions.

[0091] Specifically, SPPF-LSKA modules were used at the ends of the backbone network. Figure 5 The diagram illustrates the structure of the SPPF-LSKA module. The input features of the SPPF-LSKA module are first processed through a cascaded structure consisting of a CBR module and multiple max-pooling operations to obtain fourth-scale, fifth-scale, sixth-scale, and seventh-scale features. Specifically, the cascaded max-pooling operations transform the feature map into three different scales: 5×5, 9×9, and 13×13, representing the fifth, sixth, and seventh-scale features, respectively. The fourth-scale feature is the feature before pooling. These four scale features are then concatenated to obtain the concatenated feature. This concatenated feature is then passed through a residual connection containing a 1×3 depthwise separable convolution (DWConv), a 3×1 depthwise separable convolution (DWConv), a 1×5 depthwise dilated convolution (DWDConv), a 5×1 depthwise dilated convolution (DWDConv), and a 1×1 standard convolution. Finally, a Hadamard product is performed with the concatenated feature to obtain the output features of the SPPF-LSKA module.

[0092] In this embodiment of the invention, the SPPF-LSKA module uses the LSKA (Large Separable Kernel Attention) mechanism, which can learn features at different scales and capture richer feature information.

[0093] As shown in Table 1 below, the railway track fastener defect detection method based on improved YOLOv8s proposed in this embodiment of the invention is significantly superior to YOLOv8s in terms of detection accuracy. Here, FLOPs (Floating Point Operations) refers to the number of floating-point operations, where G is the unit; the number of floating-point operations is used to measure the computational complexity of the algorithm. mAP (mean Average Precision) is the mean average precision. 50 AP refers to the mean precision when the IoU threshold is 0.5. 50This refers to the average accuracy when the IoU threshold is 0.5. This invention embodiment has three categories: AP refers to the detection accuracy of a specific category, and mAP refers to the average of the three categories' average accuracy. With a slight increase in the number of parameters, the accuracy is improved by 1.6%. Furthermore, the single-class prediction for each type of fastener maintains high accuracy: 99.2% for normal fasteners; 93.4% for error fasteners (a 3.0% improvement compared to YOLOv8s); and 98.4% for missing fasteners (a 1.6% improvement compared to YOLOv8s).

[0094] Table 1

[0095]

[0096] Figure 6 This is an image showing the detection results from the YOLOv8s algorithm. Figure 7 This is a detection result diagram of the railway track fastener defect detection method based on the improved YOLOv8s in an embodiment of the present invention, with reference to... Figure 6 and Figure 7 Both detection algorithms correctly classified fastener defects, but the algorithm proposed in this embodiment of the invention scored higher in category confidence. When detecting abnormal elastic clip fasteners, the YOLOv8s algorithm generated two prediction boxes, predicting them as a missing fastener and an abnormal elastic clip respectively, resulting in an incorrect category prediction. In contrast, the algorithm proposed in this embodiment of the invention generated only one prediction box, correctly predicting the elastic clip as an abnormal clip.

[0097] This article uses specific embodiments to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims

1. A method for detecting defects in railway track fasteners based on an improved YOLOv8s, characterized in that, include: Obtain images of the track fasteners; The image of the track fastener is input into the constructed defect detection network, which outputs the fastener defect type and the fastener defect location. The defect detection network includes a backbone network, a feature fusion network, and a detection head; wherein, the backbone network includes multiple receptive field attention convolutions, multiple MFE-C2f modules, and SPPF-LSKA modules; the feature fusion network includes an ASFF module and a C2f module; and the detection head includes a category prediction branch and a location prediction branch. The construction process of the MFE-C2f module includes: The input features of the MFE-C2f module are processed by convolution and the Split function to obtain the first split feature and the second split feature; The second splitting feature is sequentially input into the first MFE-Block module and the second MFE-Block module to obtain the output features of the first MFE-Block module and the output features of the second MFE-Block module; the output features of the second MFE-Block module include a first sub-feature and a second sub-feature; The first splitting feature, the output feature of the first MFE-Block module, and the output feature of the second MFE-Block module are concatenated and convolved to obtain the output feature of the MFE-C2f module; The construction process of the first MFE-Block module includes: The input features of the first MFE-Block module are processed by convolution and Split functions to obtain the third split feature, the fourth split feature and the fifth split feature; The third, fourth, and fifth splitting features are input into the cross-level connection module, which outputs multiple reinforcement features. The enhanced features are concatenated and input into a series structure consisting of multiple CBR modules and multiple Dropout modules, and the output features of the first MFE-Block module are output. The second MFE-Block module has the same structure as the first MFE-Block module.

2. The railway track fastener defect detection method based on improved YOLOv8s as described in claim 1, characterized in that, The step of inputting the track fastener image into the constructed defect detection network and outputting the fastener defect category and fastener defect location includes: Feature extraction is performed on the track fastener image in the backbone network to obtain multi-scale features; the multi-scale features include first-scale features, second-scale features and third-scale features. The first scale feature, the second scale feature, and the third scale feature are input into the feature fusion network, and the first fused feature is output. The first fusion feature is input into the category prediction branch and the location prediction branch respectively, and the fastener defect category and the fastener defect location are output.

3. The railway track fastener defect detection method based on improved YOLOv8s as described in claim 2, characterized in that, The step of extracting features from the track fastener image in the backbone network to obtain multi-scale features includes: The track fastener image is upsampled using receptive field attention convolution to obtain initial features; The initial features are input into a cascaded structure consisting of multiple receptive field attention convolutions and multiple MFE-C2f modules, and the first scale feature, the second scale feature, and the first feature are output. The first feature is input into the SPPF-LSKA module, and the third scale feature is output.

4. The railway track fastener defect detection method based on improved YOLOv8s as described in claim 2, characterized in that, The step of inputting the first scale feature, the second scale feature, and the third scale feature into the feature fusion network and outputting the first fused feature includes: The first scale feature, the second scale feature, and the third scale feature are input into the ASFF module to obtain the initial fused features; The initial fusion feature is input into the C2f module, and the first fusion feature is output.

5. The railway track fastener defect detection method based on improved YOLOv8s as described in claim 2, characterized in that, The step of inputting the first fused feature into the category prediction branch and the location prediction branch respectively, and outputting the fastener defect category and the fastener defect location includes: The first fused feature is processed sequentially through the CBS module, convolutional block, and Slide Loss in the category prediction branch to obtain the fastener defect category; the fastener defect category includes normal fasteners, abnormal elastic fasteners, and missing fasteners; The first fused feature is processed sequentially through the CBS module, convolutional block, and EIoU loss in the location prediction branch to obtain the location of the fastener defect.

6. The railway track fastener defect detection method based on improved YOLOv8s as described in claim 3, characterized in that, The construction process of the SPPF-LSKA module includes: The input features of the SPPF-LSKA module are passed through a cascaded structure consisting of a CBR module and multiple max pooling methods to obtain fourth-scale features, fifth-scale features, sixth-scale features, and seventh-scale features. The fourth-scale feature, the fifth-scale feature, the sixth-scale feature, and the seventh-scale feature are spliced ​​together to obtain the spliced ​​feature; After the splicing feature is input into the residual connection module, it is multiplied with the splicing feature by a Hadamard product to obtain the output feature of the SPPF-LSKA module.

7. The railway track fastener defect detection method based on improved YOLOv8s as described in claim 6, characterized in that, The residual connection module includes convolution, multiple depthwise separable convolutions, and multiple depthwise dilated convolutions.