Railway passenger train speed sensor hoop loosening fault detection method

Through the improved YOLOv10n network structure and loss function, the problem of low detection accuracy of the clamp loosening fault of the railway passenger bus speed sensor in the prior art is solved, and higher detection accuracy and generalization capabilities are achieved.

CN119672466APending Publication Date: 2025-03-21HARBIN KEJIA GENERAL MECHANICAL & ELECTRICAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411750793.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The existing railway passenger bus speed sensor clamp loose fault detection method based on convolution detection network has low accuracy, many false alarms, and small generalization ability.

Method used

An improved YOLOv10n network structure is proposed, including an improved C2f module, a spatial pyramid pooling and an attention mechanism module, combined with data amplification and an improved loss function refine_mpdIoU, to improve the model's ability to identify small target clamp loose faults.

Benefits of technology

It improves the accuracy of fault detection, reduces the false alarm rate, enhances the generalization ability of the model, and can more effectively identify the clamp loose faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672466A_ABST
    Figure CN119672466A_ABST
Patent Text Reader

Abstract

The invention relates to a method for detecting a loosening fault of a hoop of a speed sensor of a passenger train, and relates to the method for detecting the loosening fault of the hoop of the speed sensor of the passenger train. The objective of the invention is to solve the problems of low accuracy, more false alarms and low generalization ability of speed sensor clamp loosening fault detection based on an original convolution detection network. The method comprises the following steps: acquiring railway carriage images to obtain a training set picture set; constructing a speed sensor clamp loosening fault detection network model; obtaining a trained speed sensor clamp loosening fault detection network model; performing speed sensor clamp loosening fault detection on the to-be-detected passenger train image based on the trained speed sensor clamp loosening fault detection network model, and if no fault exists, continuing to detect the to-be-detected passenger train image; and if a fault exists, an alarm needs to be given. The method is applied to the field of passenger train fault detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for detecting a fault of a railway passenger car speed sensor clamp being loosened. Background Art

[0002] Traditional fault detection methods based on manual image checking are time-consuming and labor-intensive, with high labor costs. Furthermore, due to fatigue and carelessness among inspectors, missed detections and false positives can occur. Railway passenger car fault detection methods using deep learning can effectively reduce detection costs and improve detection efficiency. Speed ​​sensor pipelines and adjacent pipeline components are difficult to distinguish. Furthermore, there are many different types of railway passenger cars, with the distribution of clamps being irregular and small. Different types of clamps are used across different models, and some normal clamps look similar to those after they are loose. Therefore, it is necessary to combine the surrounding features of the component to determine whether the fault is a true fault or a false alarm. Using a conventional convolutional detection network for fault detection is not ideal, resulting in a high number of false positives and poor generalization. Summary of the Invention

[0003] The purpose of the present invention is to solve the problems of low accuracy, high false alarm rate and low generalization ability in speed sensor clamp loosening fault detection based on the original convolutional detection network, and to propose a railway passenger car speed sensor clamp loosening fault detection method.

[0004] A method for detecting a loose clamp fault of a railway passenger car speed sensor is as follows:

[0005] Step 1: Collect railway passenger car images, mark the collected railway passenger car images, and obtain a training set of images;

[0006] Step 2: Construct a speed sensor clamp loosening fault detection network model; the specific process is as follows:

[0007] The speed sensor clamp loose fault detection network model includes:

[0008] The first convolutional layer, the second convolutional layer, the third convolutional layer, the fourth convolutional layer, the fifth convolutional layer, the sixth convolutional layer, the seventh convolutional layer, the eighth convolutional layer, the first improved C2f module, the second improved C2f module, the third improved C2f module, the fourth improved C2f module, the first downsampling module, the second downsampling module, the third downsampling module, the fourth downsampling module, the first connection layer, the second connection layer, the third connection layer, the fourth connection layer, the fifth connection layer, the sixth connection layer, the first CSPStage, the second CSPStage, the third CSPStage, the fourth CSPStage, the fifth CSPStage, the sixth CSPStage, the first upsampling module, the second upsampling module, the third upsampling module, spatial pyramid pooling SPPE, attention mechanism module PSA, detection head 1, detection head 2, detection head 3, detection head 4, detection head 5, detection head 6;

[0009] The specific working process of the speed sensor clamp loose fault detection network model is as follows:

[0010] The image is input into the first convolution layer in the speed sensor clamp loosening fault detection network. The output features of the first convolution layer are input into the second convolution layer. The output features of the second convolution layer are input into the first improved C2f module. The first improved C2f module outputs feature D.

[0011] The output feature D of the first improved C2f module is sequentially input into the third convolutional layer and the second improved C2f module, and the second improved C2f module outputs feature D1;

[0012] Feature D1 is sequentially input into the first downsampling module and the third improved C2f module, and the third improved C2f module outputs feature D2;

[0013] Feature D2 is sequentially input into the second downsampling module, the fourth improved C2f module, and the spatial pyramid pooling SPPE, and the spatial pyramid pooling SPPE outputs feature D3;

[0014] Feature D3 is input into the attention mechanism module PSA, and the attention mechanism module PSA outputs feature A;

[0015] Feature A is input into the seventh convolutional layer, and the seventh convolutional layer outputs feature B;

[0016] The first improved C2f module outputs feature D which is input into the fourth convolutional layer, and the fourth convolutional layer outputs feature C;

[0017] The second improved C2f module outputs feature D1 which is input into the fifth convolutional layer, and the fifth convolutional layer outputs feature E;

[0018] The third improved C2f module outputs feature D2 which is input into the sixth convolutional layer, and the sixth convolutional layer outputs feature F;

[0019] The sixth convolutional layer output feature F and the seventh convolutional layer output feature B are input into the fifth connection layer, and the fifth connection layer outputs feature G;

[0020] The output feature G of the fifth connection layer is sequentially input into the fifth CSPStage and the third upsampling module, and the third upsampling module outputs the feature H;

[0021] The output feature H of the third upsampling module, the output feature D2 of the third improved C2f module, and the output feature E of the fifth convolutional layer are input into the third connection layer, and the third connection layer outputs feature I;

[0022] The third connection layer outputs feature I and inputs it into the third CSPStage, which then outputs feature J.

[0023] Feature J is input into the second upsampling module, and the second upsampling module outputs feature K;

[0024] The second upsampling module outputs feature K, the fourth convolutional layer outputs feature C, and the second improved C2f module outputs feature D1, which is input into the first connection layer, and the first connection layer outputs feature L;

[0025] The output feature L of the first connection layer is sequentially input into the first CSPStage and the first upsampling module, and the first upsampling module outputs the feature M;

[0026] The output feature M of the first upsampling module and the output feature D of the first improved C2f module are input into the second connection layer, and the second connection layer outputs feature N;

[0027] The second connection layer outputs feature N which is input into the second CSPStage, and the second CSPStage outputs feature O;

[0028] The second CSPStage output feature O is input into the eighth convolutional layer, and the eighth convolutional layer outputs feature P;

[0029] The output feature P of the eighth convolutional layer and the output feature J of the third CSPStage are input into the fourth connection layer, and the fourth connection layer outputs the feature Q;

[0030] The fourth connection layer outputs feature Q which is input into the fourth CSPStage, and the fourth CSPStage outputs feature R;

[0031] The fourth CSPStage outputs feature R which is input into the fourth downsampling module, and the fourth downsampling module outputs feature S;

[0032] The third CSPStage outputs feature J which is input into the third downsampling module, and the third downsampling module outputs feature T;

[0033] The fourth downsampling module output feature S and the third downsampling module output feature T are input into the sixth connection layer, and the sixth connection layer outputs feature U;

[0034] The sixth connection layer outputs feature U which is input into the sixth CSPStage, and the sixth CSPStage outputs feature V;

[0035] The second CSPStage outputs feature O and inputs it into detection head 1 and detection head 2 respectively. The detection results of detection head 1 and detection head 2 are fused to obtain the detection result P2.

[0036] The fourth CSPStage outputs feature R, which is input to detection head 3 and detection head 4 respectively. The detection results of detection head 3 and detection head 4 are fused to obtain the P3 detection result.

[0037] The sixth CSPStage outputs feature V, which is input to detection head 5 and detection head 6 respectively. The detection results of detection head 5 and detection head 6 are fused to obtain the P4 detection result.

[0038] The P2 detection results, P3 detection results, and P4 detection results are integrated to obtain the final detection results;

[0039] Step 3: Input the training set image set into the constructed speed sensor clamp loose fault detection network model for training to obtain a trained speed sensor clamp loose fault detection network model;

[0040] Step 4: Based on the trained speed sensor clamp loose fault detection network model, the speed sensor clamp loose fault detection is performed on the railway passenger car image to be tested. If no fault exists, the railway passenger car image to be tested is continued to be detected; if a fault exists, an alarm needs to be issued.

[0041] Preferably, in step 1, railway passenger car images are collected, and the collected railway passenger car images are marked to obtain a training set of pictures; the specific process is:

[0042] Step 11: Collect images of railway passenger cars under different time periods and different environments, and select images of railway passenger cars in which the speed sensor clamp is normal and images in which the speed sensor clamp is loose;

[0043] Step 12: performing data amplification on the selected image of the normal speed sensor clamp and the image of the loose speed sensor clamp to obtain amplified images of the normal speed sensor clamp and the image of the loose speed sensor clamp;

[0044] Data augmentation operations include affine transformation, rotation, cropping, and contrast transformation operations;

[0045] Step 13: constructing a normal image dataset of the speed sensor clamp based on the amplified normal image of the speed sensor clamp;

[0046] Step 14: Photoshop an image of the speed sensor clamp being loose on the amplified image of the normal speed sensor clamp;

[0047] Based on the PS-generated clamp loose fault image and the amplified speed sensor clamp loose image, a speed sensor clamp loose image dataset is constructed.

[0048] Step 15: Mark the speed sensor clamp normal image dataset and the speed sensor clamp loose image dataset to generate a marking file;

[0049] The tag file records the image name, size, path, target location, and target category information.

[0050] Preferably, each of the first improved C2f module, the second improved C2f module, the third improved C2f module, and the fourth improved C2f module includes:

[0051] The first CBS module, split, the ninth convolution layer, the first depth-wise separable convolution layer, the first batch of normalization layers, the first activation function, the tenth convolution layer, the first GELU activation function, the eleventh convolution layer, the twelfth convolution layer, the second depth-wise separable convolution layer, the second batch of normalization layers, the second activation function, the thirteenth convolution layer, the second GELU activation function, the fourteenth convolution layer, the fifteenth convolution layer, the third depth-wise separable convolution layer, the third batch of normalization layers, the third activation function, the sixteenth convolution layer, the third GELU activation function, the seventeenth convolution layer, the seventh connection layer, the second CBS module.

[0052] Preferably, the specific working process of each of the first improved C2f module, the second improved C2f module, the third improved C2f module, and the fourth improved C2f module is as follows:

[0053] Feature N1 is sequentially input into the first CBS module and split, and the split outputs feature N2;

[0054] Feature N2 is input into the ninth convolutional layer and the first depth-wise separable convolutional layer respectively. The output features of the ninth convolutional layer, the output features of the first depth-wise separable convolutional layer and feature N2 are added together. The summed features are input into the first batch of normalization layers, the first activation function, the tenth convolutional layer, the first GELU activation function, the eleventh convolutional layer in sequence. The eleventh convolutional layer outputs feature N3.

[0055] Feature N3 is input into the twelfth convolutional layer and the second depth-wise separable convolutional layer respectively. The output features of the twelfth convolutional layer, the output features of the second depth-wise separable convolutional layer and feature N3 are added together. The summed features are input into the second batch normalization layer, the second activation function, the thirteenth convolutional layer, the second GELU activation function, the fourteenth convolutional layer in sequence. The fourteenth convolutional layer outputs feature N4.

[0056] Feature N4 is input into the fifteenth convolutional layer and the third depth-wise separable convolutional layer respectively. The output features of the fifteenth convolutional layer, the output features of the third depth-wise separable convolutional layer and feature N4 are added together. The summed features are input into the third batch normalization layer, the third activation function, the sixteenth convolutional layer, the third GELU activation function, the seventeenth convolutional layer in sequence. The seventeenth convolutional layer outputs feature N5.

[0057] Features N2, N3, N4, and N5 are input into the seventh connection layer, and the output features of the seventh connection layer are input into the second CBS module. The output features of the second CBS module are used as the output features of the improved C2f module.

[0058] Preferably, each CBS module in the first CBS module and the second CBS module includes, in sequence: an eighteenth convolutional layer, a batch normalization layer, and a SiLU activation function layer.

[0059] Preferably, the specific working process of each CBS module in the first CBS module and the second CBS module is:

[0060] The features are sequentially input into the 18th convolutional layer, batch normalization layer, and SiLU activation function layer. The output features of the SiLU activation function layer are used as the output features of the CBS module.

[0061] Preferably, each of the first downsampling module, the second downsampling module, the third downsampling module, and the fourth downsampling module includes:

[0062] The nineteenth convolutional layer 1 and the twentieth convolutional layer 2.

[0063] Preferably, the specific working process of each downsampling module in the first downsampling module, the second downsampling module, the third downsampling module, and the fourth downsampling module is as follows:

[0064] The features are sequentially input into the 19th convolutional layer and the 20th convolutional layer, and the output features of the 20th convolutional layer are the downsampled features.

[0065] Preferably, each of the first CSPStage, the second CSPStage, the third CSPStage, the fourth CSPStage, the fifth CSPStage, and the sixth CSPStage includes:

[0066] Split, 21st convolutional layer, 22nd convolutional layer, module 1, module 2, module 3, eighth connection layer, 23rd convolutional layer;

[0067] Each module in the module 1, module 2, and module 3 includes a depth-separable convolutional layer, a convolutional layer, and a connection layer in sequence;

[0068] The specific working process of each of the first CSPStage, the second CSPStage, the third CSPStage, the fourth CSPStage, the fifth CSPStage, and the sixth CSPStage is as follows:

[0069] The feature input is Split, and the Split output features are input into the 21st convolutional layer and the 22nd convolutional layer respectively;

[0070] The output features of the 22nd convolutional layer are sequentially input into module 1, module 2, and module 3;

[0071] The output features of module three and the output features of the twenty-first convolutional layer are input into the eighth connection layer, the output features of the eighth connection layer are input into the twenty-third convolutional layer, and the output features of the twenty-third convolutional layer are used as the output features of 1 CSPStage.

[0072] Preferably, the training set image set in step 3 is input into the constructed speed sensor clamp loose fault detection network for training to obtain a trained speed sensor clamp loose fault detection network; the specific process is:

[0073] Adopt Adam optimization method for training;

[0074] The loss function is L refine_mpdIoU ;

[0075] The speed sensor clamp loose fault detection network constructed by inputting the training set image set is trained until the loss function converges, thereby obtaining a trained speed sensor clamp loose fault detection network;

[0076] The loss function is L refine_mpdIoU The acquisition process is:

[0077]

[0078] L refine_mpdIoU =r(L mpdIoU +IoU-IoU tmp ) (6)

[0079]

[0080] Where,

[0081] Represents the square of the Euclidean distance between the upper left corner and the lower right corner of the real box, that is, the offset of the real box;

[0082] Represents the square of the Euclidean distance between the upper left corner and the lower right corner of the prediction box, that is, the offset of the prediction box;

[0083] Represents the coordinate of the upper left corner of the prediction box, Represents the coordinate of the lower right corner of the prediction box;

[0084] Represents the coordinate of the upper left corner of the real box, Represents the coordinates of the lower right corner of the real box;

[0085] IoU represents the ratio of the intersection and union of the areas of the real box and the predicted box;

[0086] h1 is the height of the detection image, w2 is the width of the detection image;

[0087] LmpdIOU is the MpdIoU loss function;

[0088] b r 、b l 、b b 、b t Represent the four point coordinates of the prediction box respectively;

[0089] b r gt 、b l gt 、b b gt 、b t gt Represent the four point coordinates of the real frame respectively;

[0090] d tmp is an intermediate variable;

[0091] IOU tmp is an intermediate variable;

[0092] w gt is the width of the real box, h gt is the height of the real frame, w represents the width of the image, h represents the height of the image, and rat represents the calculated scaling factor;

[0093] r is the gradient gain; β and δ are both outlier levels.

[0094] The beneficial effects of the present invention are:

[0095] Compared with the original detection network, the improved YOLOv10n network of the present invention can better utilize the global information of the image and enhance the recognition of small targets such as clamps and small and inconspicuous faults such as loose clamps. Therefore, the present invention uses the improved YOLOv10n network training model to detect the loose clamp fault of the speed sensor, thereby improving the detection accuracy, reducing false alarms, and improving the generalization ability.

[0096] The improved C2f structure adopted in the present invention can more effectively integrate local and global information, and enhance the richness and accuracy of feature expression; the improved lightweight structure replaces the previous C2f module, enabling the module to maintain efficient feature processing while keeping a low computational cost.

[0097] Because the speed sensor clamp accounts for a small proportion of the entire bogie image, compared with the original YOLOv10n, the improved network structure of the present invention adds a small target detection head and reduces the large target detection head, so that the entire network training focuses more on the feature information of small targets and improves the detection effect of the model.

[0098] The present invention adopts an improved loss function refine_mpdIou. During the training process, a scaling factor is used to control the generation of auxiliary bounding boxes of different scales for loss calculation. A smaller gradient gain is assigned to anchor boxes with larger outliers, which effectively prevents low-quality examples from generating large harmful gradients and improves the convergence speed and accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0099] Figure 1 This is a fault identification flow chart of the present invention;

[0100] Figure 2 This is the improved YOLOv10n speed sensor clamp loose fault detection network structure diagram;

[0101] Figure 3 This is the improved C2f network structure diagram;

[0102] Figure 4 This is the CSPStage network structure diagram;

[0103] Figure 5 This is the downsampling SCDown structure diagram;

[0104] Figure 6 This is the PSA network structure diagram of the attention mechanism module. DETAILED DESCRIPTION

[0105] Specific implementation method 1: This implementation method is a vehicle number recognition method based on reverse decoding. The specific process is as follows:

[0106] High-definition imaging equipment is installed around the railway to capture images of passing passenger cars. Images of the bogie workstations, captured by side cameras, are fed into the speed sensor clamp loosening detection network to detect loose speed sensor clamp faults. If a loose clamp fault is detected in the image, an alarm message is uploaded, and railway passenger car inspection personnel address the fault location based on the alarm message.

[0107] Step 1: Collect railway passenger car images, mark the collected railway passenger car images, and obtain a training set of images;

[0108] Step 2: Construct a speed sensor clamp loosening fault detection network model; the specific process is as follows:

[0109] The speed sensor clamp loose fault detection network model includes:

[0110] The first convolutional layer, the second convolutional layer, the third convolutional layer, the fourth convolutional layer, the fifth convolutional layer, the sixth convolutional layer, the seventh convolutional layer, the eighth convolutional layer, the first improved C2f module, the second improved C2f module, the third improved C2f module, the fourth improved C2f module, the first downsampling module, the second downsampling module, the third downsampling module, the fourth downsampling module, the first connection layer Concat, the second connection layer Concat, the third connection layer Concat, the fourth connection layer Concat, the fifth connection layer Concat, the sixth connection layer Concat, the first CSPStage, the second CSPStage, the third CSPStage, the fourth CSPStage, the fifth CSPStage, the sixth CSPStage, the first upsampling module, the second upsampling module, the third upsampling module, spatial pyramid pooling SPPE, attention mechanism module PSA, detection head 1, detection head 2, detection head 3, detection head 4, detection head 5, detection head 6;

[0111] Detection head 1, detection head 2, detection head 3, detection head 4, detection head 5, and detection head 6 have the same structure as the detection head in the traditional C2f network;

[0112] The specific working process of the speed sensor clamp loose fault detection network model is as follows:

[0113] The image is input into the first convolution layer in the speed sensor clamp loosening fault detection network. The output features of the first convolution layer are input into the second convolution layer. The output features of the second convolution layer are input into the first improved C2f module. The first improved C2f module outputs feature D.

[0114] The output feature D of the first improved C2f module is sequentially input into the third convolutional layer and the second improved C2f module, and the second improved C2f module outputs feature D1;

[0115] Feature D1 is sequentially input into the first downsampling module and the third improved C2f module, and the third improved C2f module outputs feature D2;

[0116] Feature D2 is sequentially input into the second downsampling module, the fourth improved C2f module, and the spatial pyramid pooling SPPE, and the spatial pyramid pooling SPPE outputs feature D3;

[0117] Feature D3 is input into the attention mechanism module PSA, and the attention mechanism module PSA outputs feature A;

[0118] Feature A is input into the seventh convolutional layer, and the seventh convolutional layer outputs feature B;

[0119] The first improved C2f module outputs feature D which is input into the fourth convolutional layer, and the fourth convolutional layer outputs feature C;

[0120] The second improved C2f module outputs feature D1 which is input into the fifth convolutional layer, and the fifth convolutional layer outputs feature E;

[0121] The third improved C2f module outputs feature D2 which is input into the sixth convolutional layer, and the sixth convolutional layer outputs feature F;

[0122] The sixth convolutional layer output feature F and the seventh convolutional layer output feature B are input into the fifth connection layer, and the fifth connection layer outputs feature G;

[0123] The output feature G of the fifth connection layer is sequentially input into the fifth CSPStage and the third upsampling module, and the third upsampling module outputs the feature H;

[0124] The output feature H of the third upsampling module, the output feature D2 of the third improved C2f module, and the output feature E of the fifth convolutional layer are input into the third connection layer, and the third connection layer outputs feature I;

[0125] The third connection layer outputs feature I and inputs it into the third CSPStage, which then outputs feature J.

[0126] Feature J is input into the second upsampling module, and the second upsampling module outputs feature K;

[0127] The second upsampling module outputs feature K, the fourth convolutional layer outputs feature C, and the second improved C2f module outputs feature D1, which is input into the first connection layer, and the first connection layer outputs feature L;

[0128] The output feature L of the first connection layer is sequentially input into the first CSPStage and the first upsampling module, and the first upsampling module outputs the feature M;

[0129] The output feature M of the first upsampling module and the output feature D of the first improved C2f module are input into the second connection layer, and the second connection layer outputs feature N;

[0130] The second connection layer outputs feature N which is input into the second CSPStage, and the second CSPStage outputs feature O;

[0131] The second CSPStage output feature O is input into the eighth convolutional layer, and the eighth convolutional layer outputs feature P;

[0132] The output feature P of the eighth convolutional layer and the output feature J of the third CSPStage are input into the fourth connection layer, and the fourth connection layer outputs the feature Q;

[0133] The fourth connection layer outputs feature Q which is input into the fourth CSPStage, and the fourth CSPStage outputs feature R;

[0134] The fourth CSPStage outputs feature R which is input into the fourth downsampling module, and the fourth downsampling module outputs feature S;

[0135] The third CSPStage outputs feature J which is input into the third downsampling module, and the third downsampling module outputs feature T;

[0136] The fourth downsampling module output feature S and the third downsampling module output feature T are input into the sixth connection layer, and the sixth connection layer outputs feature U;

[0137] The sixth connection layer outputs feature U which is input into the sixth CSPStage, and the sixth CSPStage outputs feature V;

[0138] The second CSPStage outputs feature O and inputs it into detection head 1 and detection head 2 respectively. The detection results of detection head 1 and detection head 2 are fused (weighted summation) to obtain the P2 detection result.

[0139] The fourth CSPStage outputs feature R, which is input to detection head 3 and detection head 4 respectively. The detection results of detection head 3 and detection head 4 are fused (weighted summation) to obtain the P3 detection result;

[0140] The sixth CSPStage outputs feature V, which is input to detection head 5 and detection head 6 respectively. The detection results of detection head 5 and detection head 6 are fused (weighted summation) to obtain the P4 detection result;

[0141] The P2 detection results, P3 detection results, and P4 detection results are fused (weighted summation) to obtain the final detection result;

[0142] Step 3: Input the training set image set into the constructed speed sensor clamp loose fault detection network model for training to obtain a trained speed sensor clamp loose fault detection network model;

[0143] Step 4: Based on the trained speed sensor clamp loose fault detection network model, the speed sensor clamp loose fault detection is performed on the railway passenger car image to be tested. If no fault exists, the railway passenger car image to be tested is continued to be detected; if a fault exists, an alarm needs to be issued.

[0144] Specific embodiment 2: This embodiment differs from specific embodiment 1 in that in step 1, railway passenger car images are collected and labeled to obtain a training set of images; the specific process is as follows:

[0145] Step 11: Collect images of railway passenger cars under different time periods and different environments, and select images of railway passenger cars in which the speed sensor clamp is normal and images in which the speed sensor clamp is loose;

[0146] Step 12: performing data amplification on the selected image of the normal speed sensor clamp and the image of the loose speed sensor clamp to obtain an amplified image of the normal speed sensor clamp and the image of the loose speed sensor clamp;

[0147] Data augmentation operations include affine transformation, rotation, cropping, and contrast transformation;

[0148] Step 13: constructing a normal image dataset of the speed sensor clamp based on the amplified normal image of the speed sensor clamp;

[0149] Step 14: Photoshop a loose clamp fault image onto the amplified image of the normal speed sensor clamp;

[0150] Based on the PS-generated clamp loose fault image and the amplified speed sensor clamp loose image, a speed sensor clamp loose image dataset is constructed.

[0151] Step 15: Mark the speed sensor clamp normal image dataset and the speed sensor clamp loose image dataset to generate a marking file;

[0152] The tag file records information such as the image name, size, path, target location, target category, etc.

[0153] High-definition imaging equipment was installed around the railway to capture images of passenger trains passing through the railway. Images of bogies captured by side cameras were also collected to prepare for the subsequent dataset compilation. Images of normal speed sensor clamps and images of loose speed sensor clamps were collected for various vehicle types and models as part of the dataset. Due to the limited number of images with loose clamps, loose clamp faults were Photoshopped onto normal bogie images to supplement the loose clamp dataset. The dataset was labeled and a labeled file was generated to complete the dataset compilation.

[0154] The labeling process is implemented using labelImg labeling software to generate a label file corresponding to the image. The normal speed sensor clamp is marked as the normal clamp class, the loose clamp is marked as the loose speed sensor clamp class, and other component targets similar to the loose clamp are marked as the loose clamp interference class. The label file records information such as the image name, size, path, target location, and target category.

[0155] Because speed sensor clamps have many different shapes, are small, and are difficult to identify, the collected dataset cannot cover all clamp shapes. Therefore, data augmentation is required to maximize the number of clamp shapes in the dataset. Data augmentation operations include affine transformation, rotation, cropping, and contrast transformation. Data augmentation can effectively reduce the probability of overfitting in the fault detection network and improve its generalization performance.

[0156] Other steps and parameters are the same as those in the first embodiment.

[0157] Specific embodiment three: This embodiment differs from specific embodiment one or two in that each of the first improved C2f module, the second improved C2f module, the third improved C2f module, and the fourth improved C2f module includes:

[0158] The first CBS module, split, the ninth convolution layer, the first depth-wise separable convolution layer, the first batch of normalization layers, the first activation function, the tenth convolution layer, the first GELU activation function, the eleventh convolution layer, the twelfth convolution layer, the second depth-wise separable convolution layer, the second batch of normalization layers, the second activation function, the thirteenth convolution layer, the second GELU activation function, the fourteenth convolution layer, the fifteenth convolution layer, the third depth-wise separable convolution layer, the third batch of normalization layers, the third activation function, the sixteenth convolution layer, the third GELU activation function, the seventeenth convolution layer, the seventh connection layer, the second CBS module.

[0159] Other steps and parameters are the same as those in the first or second embodiment.

[0160] Specific embodiment 4: This embodiment differs from any one of specific embodiments 1 to 3 in that the specific working process of each improved C2f module in the first improved C2f module, the second improved C2f module, the third improved C2f module, and the fourth improved C2f module is as follows:

[0161] Feature N1 is sequentially input into the first CBS module and split, and the split outputs feature N2;

[0162] Feature N2 is input into the ninth convolutional layer and the first depth-wise separable convolutional layer respectively. The output features of the ninth convolutional layer, the output features of the first depth-wise separable convolutional layer and feature N2 are added together. The summed features are input into the first batch of normalization layers, the first activation function, the tenth convolutional layer, the first GELU activation function, the eleventh convolutional layer in sequence. The eleventh convolutional layer outputs feature N3.

[0163] Feature N3 is input into the twelfth convolutional layer and the second depth-wise separable convolutional layer respectively. The output features of the twelfth convolutional layer, the output features of the second depth-wise separable convolutional layer and feature N3 are added together. The summed features are input into the second batch normalization layer, the second activation function, the thirteenth convolutional layer, the second GELU activation function, the fourteenth convolutional layer in sequence. The fourteenth convolutional layer outputs feature N4.

[0164] Feature N4 is input into the fifteenth convolutional layer and the third depth-wise separable convolutional layer respectively. The output features of the fifteenth convolutional layer, the output features of the third depth-wise separable convolutional layer and feature N4 are added together. The summed features are input into the third batch normalization layer, the third activation function, the sixteenth convolutional layer, the third GELU activation function, the seventeenth convolutional layer in sequence. The seventeenth convolutional layer outputs feature N5.

[0165] Features N2, N3, N4, and N5 are input into the seventh connection layer, and the output features of the seventh connection layer are input into the second CBS module. The output features of the second CBS module are used as the output features of the improved C2f module.

[0166] The other steps and parameters are the same as those in the first to third embodiments.

[0167] Specific embodiment five: This embodiment differs from any one of specific embodiments one to four in that each CBS module in the first CBS module and the second CBS module sequentially includes: an eighteenth convolutional layer, a batch normalization layer, and a SiLU activation function layer.

[0168] The other steps and parameters are the same as those in the first to fourth embodiments.

[0169] Specific embodiment 6: This embodiment differs from specific embodiments 1 to 5 in that the specific working process of each CBS module in the first CBS module and the second CBS module is as follows:

[0170] The features are sequentially input into the 18th convolutional layer, batch normalization layer, and SiLU activation function layer. The output features of the SiLU activation function layer are used as the output features of the CBS module.

[0171] The other steps and parameters are the same as those in the first to fifth embodiments.

[0172] Specific embodiment 7: This embodiment differs from any one of specific embodiments 1 to 6 in that each of the first downsampling module, the second downsampling module, the third downsampling module, and the fourth downsampling module includes:

[0173] The nineteenth convolutional layer 1 (k=1, s=1), the twentieth convolutional layer 2 (k=3, s=2).

[0174] k represents the size of the convolution kernel, and s represents the sliding step size.

[0175] The other steps and parameters are the same as those in the first to sixth embodiments.

[0176] Specific embodiment eight: This embodiment differs from any one of specific embodiments one to seven in that the specific working process of each downsampling module in the first downsampling module, the second downsampling module, the third downsampling module, and the fourth downsampling module is as follows:

[0177] The features are sequentially input into the 19th convolutional layer and the 20th convolutional layer, and the output features of the 20th convolutional layer are the downsampled features.

[0178] The other steps and parameters are the same as those in the first to seventh embodiments.

[0179] Specific embodiment 9: This embodiment differs from any one of specific embodiments 1 to 8 in that each of the first CSPStage, the second CSPStage, the third CSPStage, the fourth CSPStage, the fifth CSPStage, and the sixth CSPStage includes:

[0180] Split, 21st convolutional layer, 22nd convolutional layer, module 1, module 2, module 3, eighth connection layer, 23rd convolutional layer;

[0181] Each module in the module 1, module 2, and module 3 includes a depth-separable convolutional layer, a convolutional layer, and a connection layer in sequence;

[0182] The specific working process of each of the first CSPStage, the second CSPStage, the third CSPStage, the fourth CSPStage, the fifth CSPStage, and the sixth CSPStage is as follows:

[0183] The feature input is Split, and the Split output features are input into the 21st convolutional layer and the 22nd convolutional layer respectively;

[0184] The output features of the 22nd convolutional layer are sequentially input into module 1, module 2, and module 3;

[0185] The output features of module three and the output features of the twenty-first convolutional layer are input into the eighth connection layer, the output features of the eighth connection layer are input into the twenty-third convolutional layer, and the output features of the twenty-third convolutional layer are used as the output features of 1 CSPStage.

[0186] The other steps and parameters are the same as those in Specific Embodiments 1 to 8.

[0187] Specific embodiment ten: This embodiment differs from any one of specific embodiments one to nine in that the training set image set in step three is used as input to the constructed speed sensor clamp loose fault detection network for training, thereby obtaining a trained speed sensor clamp loose fault detection network; the specific process is as follows:

[0188] Adopt Adam optimization method for training;

[0189] The loss function is L refine_mpdIoU ;

[0190] The speed sensor clamp loose fault detection network constructed by inputting the training set image set is trained until the loss function converges, thereby obtaining a trained speed sensor clamp loose fault detection network;

[0191] The loss function is L refine_mpdIoU The acquisition process is:

[0192]

[0193] L refine_mpdIoU =r(L mpdIoU +IoU-IoU tmp ) (6)

[0194]

[0195] Where,

[0196] Represents the square of the Euclidean distance between the upper left corner and the lower right corner of the real box, that is, the offset of the real box;

[0197] Represents the square of the Euclidean distance between the upper left corner and the lower right corner of the prediction box, that is, the offset of the prediction box;

[0198] Represents the coordinate of the upper left corner of the prediction box, Represents the coordinate of the lower right corner of the prediction box;

[0199] Represents the coordinate of the upper left corner of the real box, Represents the coordinates of the lower right corner of the real box;

[0200] IoU represents the ratio of the intersection and union of the areas of the real box and the predicted box;

[0201] h1 is the height of the detection image, w2 is the width of the detection image;

[0202] L mpdIOU is the MpdIoU loss function;

[0203] b r 、b l 、b b 、b t Represent the four point coordinates of the prediction box respectively;

[0204] b r gt 、b l gt 、b b gt 、b t gt Represent the four point coordinates of the real frame respectively;

[0205] d tmp is an intermediate variable;

[0206] IOU tmp is an intermediate variable;

[0207] w gt is the width of the real box, h gt is the height of the real frame, w represents the width of the image, h represents the height of the image, and rat represents the calculated scaling factor;

[0208] r is the gradient gain; β and δ are the degree of outliers.

[0209] The other steps and parameters are the same as those in Specific Embodiments 1 to 9.

[0210] Since the side speed sensor clamps are not fixed in position, have variable shapes, and the clamp loosening fault is not obvious, and the clamp target is small, it is necessary to determine whether it is a normal speed sensor clamp or a loose speed sensor clamp based on the surrounding image features and component features. At the same time, there are many clamps on a train, and it is required to improve the detection efficiency while ensuring the recognition accuracy. Therefore, it is considered to use an improved YOLOv10n detection network to realize the speed sensor clamp loosening fault detection. Compared with the original YOLOv10n detection network, the improved YOLOv10n detection network can better utilize the global information of the image and enhance the recognition of small targets such as clamps and small and inconspicuous faults such as clamp loosening. In response to the speed sensor clamp loosening fault, the present invention makes the following improvements to the original YOLOv10n detection network: the input is imaged by sliding the window of the bogie area image near the axle end to avoid missing images. The improved C2f structure is used in the backbone network to improve the richness and accuracy of feature expression, while optimizing the computational efficiency. The depth-separable convolution reduces the number of parameters and computation requirements. Because the speed sensor clamp occupies a small area in the entire bogie image, compared with the original YOLOv10n, the improved network structure adds small target detection heads and reduces large target detection heads. This allows the entire network training to focus more on the feature information of small targets and improve the detection effect of the model.

[0211] Enter the selected image

[0212] Because there are many types of railway passenger cars (models such as 25T and 25G; types such as YW hard sleeper and YZ hard seat), the position distribution of the speed sensor clamp is not fixed. We summarize the prior information and use a sliding window to capture the image of the bogie area to ensure that all clamp components are captured. Loose clamp faults are difficult to distinguish from normal clamps. In order to ensure a balanced positive and negative sample data set, it is necessary to amplify the existing real fault images. In this invention, the main methods of amplification are image brightness, image flipping, etc.

[0213] Backbone network

[0214] The original C2f network is improved by using an improved C2f structure. For the input image of size 480*480*3, it first passes through two levels of convolutional layers, then inputs into the improved C2f network structure, and uses the result as the input of the convolutional layer, and then passes through another C2f network structure to obtain the result D1; D1 is downsampled, and the downsampled result passes through the improved C2f network structure again to obtain the result D2; D2 is downsampled again, and then passes through the improved C2f network structure and spatial pyramid pooling to obtain the result D3. The improved C2f network structure is as follows: Figure 3 As shown in the figure, the improved C2f module uses the advantages of combining lightweight visual converters and convolutional neural networks on the original C2f module technology. First, input N1 passes through the CBS structure (Conv: convolution layer, Batch Normalization: batch normalization layer, SiLU: activation function) to obtain the result N2. Then it passes through the deep convolution layer and the 1*1 convolution layer, adds the outputs of the two convolution layers, and then fuses them with the original input N2 to achieve residual connection. After passing through the batch normalization layer, the output is finally output through the activation function and simple convolution layer to obtain the result N3. N3 is used as input and passes through the network layer from N1 to N3 again to obtain N4. At the same time, N4 passes through the network structure from N1 to N3 again to output N5. Finally, N3, N4, and N5 are fused and then passed through the CBS network structure. This is the network result of the entire C2f, which enhances the feature processing capability of the network, improves the richness and accuracy of feature expression, and optimizes computational efficiency. The depth-wise separable convolution reduces the number of parameters and computational requirements.

[0215] Neck and Head

[0216] The receptive fields of detection layers of different sizes are used to detect targets of different sizes. The present invention takes into account that the speed sensor clamp occupies a small area in the entire bogie, and the clamp loosening fault is small and not obvious. Since the feature map generated by the large target detection layer in the original YOLOv10n has a large downsampling multiple and contains less small target information, resulting in less feature information of the clamp loosening fault and the detection accuracy cannot reach the optimal situation. In order to improve the model's detection effect on the small target clamp loosening fault and meet the needs of lightweight models, the small target detection head is increased and the large target detection head is reduced. The original input 480*480*3 image is subjected to the first improved C2f result D1 and the subsequent D2 and D3 through upsampling and pooling operations to obtain the detection results of P2, P3, and P4. Let the entire network training pay more attention to the feature information of small targets, and improve the detection effect of the model.

[0217] Loss function optimization

[0218] The original YOLOv10n network loss function used GIoU for classification. When the ground-truth bounding box and the predicted bounding box have the same height and width, the aspect ratio penalty term is zero, rendering the penalty ineffective. The loss function loses its effectiveness at this point, reducing the model's convergence speed and accuracy. Different car models and types of speed sensor clamps, as well as the varying scaling ratios of captured thumbnail images, can result in the width and height of the speed sensor clamps being consistent across different images. This improved MPDIoU algorithm uses a scaling factor during training to control the generation of auxiliary bounding boxes of varying scales for loss calculation. Smaller gradient gains are assigned to anchor frames with higher outliers, effectively preventing low-quality examples from generating large, harmful gradients and improving the model's convergence speed and accuracy.

[0219] The network improved loss function L of the present invention refine_mpdIoU The specific process is shown in formulas (1)-(7), where and d2 2 Represents the square of the Euclidean distance between the upper left corner and the lower right corner of the real box and the predicted box, that is, the offset between the real box and the predicted box. h represents the height of the image, w represents the width of the image, Represents the coordinate of the upper left corner of the prediction box, Represents the coordinate of the lower right corner of the prediction box, Represents the coordinate of the upper left corner of the real box, Represents the coordinates of the lower right corner of the real box; IoU represents the ratio of the intersection and union of the areas of the real box and the predicted box; b r 、b l 、b b 、b t The four point coordinates of the auxiliary box representing the predicted box, b r gt 、b lgt 、b b gt 、b t gt The coordinates of the four points of the auxiliary box representing the ground-truth box, and rat represents the scaling factor used for the calculation. β and δ represent the degree of outliers. When the outlier degree is the same, the gradient gain r is 1. The scaling factor is used to control the calculation loss of auxiliary boxes of different sizes. This produces a regression gain effect on samples with high IoU. Smaller gradient gains are assigned to anchor boxes with larger outliers, reducing harmful gradients in low-quality samples and facilitating model convergence.

[0220] Fault detection network training parameters

[0221] The network was trained using Adam optimization, with an initial learning rate of 0.002. The dataset was divided into training, validation, and test sets in a ratio of 7:2:1. The detection network was trained using images from the training set and tested on the validation set. Images from the validation set that were incorrectly identified were then added to the training set and the detection network was retrained. Finally, the network's performance was tested on the test set.

[0222] Network inference for detecting loose clamp faults in railway passenger car speed sensors

[0223] Images of a railway passenger car passing through high-definition imaging equipment are captured. Images from the side cameras are fed into a trained detection network. If the network detects a loose speed sensor clamp, this indicates a fault in that image. A fault message is uploaded, and the next image is inspected. Based on the uploaded fault message and artificial prior knowledge, the inspector further identifies the fault location.

[0224] The present invention may have many other embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art may make various corresponding changes and modifications based on the present invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for detecting a loose clamp fault of a railway passenger car speed sensor, characterized in that: The specific process of the method is: Step 1: Collect railway passenger car images, mark the collected railway passenger car images, and obtain a training set of pictures; Step 2: construct a speed sensor clamp loosening fault detection network model; The specific process is: The speed sensor clamp loose fault detection network model includes: The first convolution layer, the second convolution layer, the third convolution layer, the fourth convolution layer, the fifth convolution layer, the sixth convolution layer, the seventh convolution layer, the eighth convolution layer, the first improved C2f module, the second improved C2f module, the third improved C2f module, the fourth improved C2f module, the first downsampling module, the second downsampling module, the third downsampling module, the fourth downsampling module, the first connection layer, the second connection layer, the third connection layer, the fourth connection layer, the fifth connection layer, the sixth connection layer, the first CSPStage, the second CSPStage, the third CSPStage, the fourth CSPStage, the fifth CSPStage, the sixth CSPStage, the first upsampling module, the second upsampling module, the third upsampling module, spatial pyramid pooling SPPE, attention mechanism module PSA, detection head 1, detection head 2, detection head 3, detection head 4, detection head 5, detection head 6; The specific working process of the speed sensor clamp loose fault detection network model is as follows: The image is input into the first convolution layer in the speed sensor clamp loosening fault detection network, the first convolution layer outputs features which are input into the second convolution layer, the second convolution layer outputs features which are input into the first improved C2f module, and the first improved C2f module outputs features D; The output feature D of the first improved C2f module is sequentially input into the third convolutional layer and the second improved C2f module, and the second improved C2f module outputs feature D1; Feature D1 is sequentially input into the first downsampling module and the third improved C2f module, and the third improved C2f module outputs feature D2; Feature D2 is sequentially input into the second downsampling module, the fourth improved C2f module, and the spatial pyramid pooling SPPE, and the spatial pyramid pooling SPPE outputs feature D3; Feature D3 is input into the attention mechanism module PSA, and the attention mechanism module PSA outputs feature A; Feature A is input into the seventh convolutional layer, and the seventh convolutional layer outputs feature B; The first improved C2f module outputs feature D which is input into the fourth convolutional layer, and the fourth convolutional layer outputs feature C; The second improved C2f module outputs feature D1 which is input into the fifth convolutional layer, and the fifth convolutional layer outputs feature E; The third improved C2f module outputs feature D2 which is input into the sixth convolutional layer, and the sixth convolutional layer outputs feature F; The sixth convolutional layer output feature F and the seventh convolutional layer output feature B are input into the fifth connection layer, and the fifth connection layer outputs feature G; The output feature G of the fifth connection layer is sequentially input into the fifth CSPStage and the third upsampling module, and the third upsampling module outputs the feature H; The output feature H of the third upsampling module, the output feature D2 of the third improved C2f module and the output feature E of the fifth convolutional layer are input into the third connection layer, and the output feature I of the third connection layer; The third connection layer outputs feature I which is input into the third CSPStage, and the third CSPStage outputs feature J; Feature J is input into the second upsampling module, and the second upsampling module outputs feature K; The second upsampling module outputs feature K, the fourth convolutional layer outputs feature C, and the second improved C2f module outputs feature D1 which are input into the first connection layer, and the first connection layer outputs feature L; The output feature L of the first connection layer is sequentially input into the first CSPStage and the first upsampling module, and the first upsampling module outputs the feature M; The output feature M of the first upsampling module and the output feature D of the first improved C2f module are input into the second connection layer, and the second connection layer outputs feature N; The second connection layer outputs feature N which is input into the second CSPStage, and the second CSPStage outputs feature O; The second CSPStage outputs feature O which is input into the eighth convolutional layer, and the eighth convolutional layer outputs feature P; The output feature P of the eighth convolutional layer and the output feature J of the third CSPStage are input into the fourth connection layer, and the output feature Q of the fourth connection layer; The fourth connection layer outputs feature Q which is input into the fourth CSPStage, and the fourth CSPStage outputs feature R; The fourth CSPStage outputs feature R which is input into the fourth downsampling module, and the fourth downsampling module outputs feature S; The third CSPStage outputs feature J which is input into the third downsampling module, and the third downsampling module outputs feature T; The fourth down-sampling module output feature S and the third down-sampling module output feature T are input into the sixth connection layer, and the sixth connection layer outputs feature U; The sixth connection layer outputs feature U which is input into the sixth CSPStage, and the sixth CSPStage outputs feature V; The second CSPStage outputs feature O which is input into detection head 1 and detection head 2 respectively, and the detection results of detection head 1 and detection head 2 are fused to obtain the detection result P2; The fourth CSPStage outputs feature R which is input into detection head 3 and detection head 4 respectively, and the detection results of detection head 3 and detection head 4 are fused to obtain the detection result P3; The sixth CSPStage outputs feature V which is input into detection head 5 and detection head 6 respectively, and the detection results of detection head 5 and detection head 6 are fused to obtain the detection result P4; The detection results of P2, P3 and P4 are integrated to obtain the final detection result; Step 3: Input the training set image set into the constructed speed sensor clamp loose fault detection network model for training, and obtain the trained speed sensor clamp loose fault detection network model; Step 4: Based on the trained speed sensor clamp loose fault detection network model, the speed sensor clamp loose fault detection is performed on the railway passenger car image to be tested. If no fault exists, the railway passenger car image to be tested is continued to be detected; if a fault exists, an alarm needs to be issued.

2. According to claim 1, a method for detecting a loose clamp fault of a railway passenger car speed sensor, characterized in that: In the step 1, railway passenger car images are collected, and the collected railway passenger car images are marked to obtain a training set of pictures; The specific process is: Step 11: Collect images of railway passenger cars in different time periods and different environments, and select images of railway passenger cars in which the speed sensor clamp is normal and images in which the speed sensor clamp is loose; Step 12: performing data amplification operation on the selected image of the normal speed sensor clamp and the image of the loose speed sensor clamp to obtain the amplified image of the normal speed sensor clamp and the image of the loose speed sensor clamp; Data augmentation operations include affine transformation, rotation, cropping, and contrast transformation operations; Step 13: construct a speed sensor clamp normal image data set based on the amplified speed sensor clamp normal image; Step 14: PS a loose clamp fault image on the amplified image of the normal speed sensor clamp; Based on the PS-generated clamp loose fault image and the amplified speed sensor clamp loose image, a speed sensor clamp loose image dataset is constructed; Step 15: Mark the speed sensor clamp normal image dataset and the speed sensor clamp loose image dataset to generate a marking file; The tag file records the image name, size, path, target location, and target category information.

3. A method for detecting a loose clamp fault of a railway passenger car speed sensor according to claim 2, characterized in that: Each of the first improved C2f module, the second improved C2f module, the third improved C2f module, and the fourth improved C2f module comprises: The first CBS module, split, the ninth convolution layer, the first depth-wise separable convolution layer, the first batch of normalization layers, the first activation function, the tenth convolution layer, the first GELU activation function, the eleventh convolution layer, the twelfth convolution layer, the second depth-wise separable convolution layer, the second batch of normalization layers, the second activation function, the thirteenth convolution layer, the second GELU activation function, the fourteenth convolution layer, the fifteenth convolution layer, the third depth-wise separable convolution layer, the third batch of normalization layers, the third activation function, the sixteenth convolution layer, the third GELU activation function, the seventeenth convolution layer, the seventh connection layer, the second CBS module.

4. A method for detecting a loose clamp fault of a railway passenger car speed sensor according to claim 3, characterized in that: The specific working process of each improved C2f module in the first improved C2f module, the second improved C2f module, the third improved C2f module, and the fourth improved C2f module is as follows: Feature N1 is sequentially input into the first CBS module and split, and split outputs feature N2; Feature N2 is input into the ninth convolutional layer and the first depth-separable convolutional layer respectively. The output features of the ninth convolutional layer, the output features of the first depth-separable convolutional layer and feature N2 are added. The added features are sequentially input into the first batch of normalization layers, the first activation function, the tenth convolutional layer, the first GELU activation function, and the eleventh convolutional layer. The eleventh convolutional layer outputs feature N3. Feature N3 is input into the twelfth convolutional layer and the second depth-separable convolutional layer respectively, and the output features of the twelfth convolutional layer, the output features of the second depth-separable convolutional layer and feature N3 are added. The added features are sequentially input into the second batch normalization layer, the second activation function, the thirteenth convolutional layer, the second GELU activation function, and the fourteenth convolutional layer. The fourteenth convolutional layer outputs feature N4; Feature N4 is input into the fifteenth convolutional layer and the third depth-separable convolutional layer respectively, and the output features of the fifteenth convolutional layer, the output features of the third depth-separable convolutional layer and feature N4 are added. The added features are sequentially input into the third batch normalization layer, the third activation function, the sixteenth convolutional layer, the third GELU activation function, and the seventeenth convolutional layer. The seventeenth convolutional layer outputs feature N5; The features N2, N3, N4 and N5 are input into the seventh connection layer, the output features of the seventh connection layer are input into the second CBS module, and the output features of the second CBS module are used as the output features of the improved C2f module.

5. A method for detecting a loose clamp fault of a railway passenger car speed sensor according to claim 4, characterized in that: Each CBS module in the first CBS module and the second CBS module includes in sequence: an eighteenth convolutional layer, a batch normalization layer, and a SiLU activation function layer.

6. A method for detecting a loose clamp fault of a railway passenger car speed sensor according to claim 5, characterized in that: The specific working process of each CBS module in the first CBS module and the second CBS module is as follows: The features are sequentially input into the eighteenth convolutional layer, batch normalization layer, and SiLU activation function layer. The output features of the SiLU activation function layer are used as the output features of the CBS module.

7. A method for detecting a loose clamp fault of a railway passenger car speed sensor according to claim 6, characterized in that: Each of the first down-sampling module, the second down-sampling module, the third down-sampling module, and the fourth down-sampling module comprises: The nineteenth convolutional layer 1, the twentieth convolutional layer 2.

8. A method for detecting a railway passenger car speed sensor clamp loosening fault according to claim 7, characterized in that: The specific working process of each downsampling module in the first downsampling module, the second downsampling module, the third downsampling module, and the fourth downsampling module is as follows: The features are input into the 19th convolutional layer and the 20th convolutional layer in sequence, and the output features of the 20th convolutional layer are the downsampled features.

9. A method for detecting a railway passenger car speed sensor clamp loosening fault according to claim 8, characterized in that: Each of the first CSPStage, the second CSPStage, the third CSPStage, the fourth CSPStage, the fifth CSPStage, and the sixth CSPStage includes: Split, 21st convolutional layer, 22nd convolutional layer, module 1, module 2, module 3, 8th connection layer, 23rd convolutional layer; Each module in the module 1, module 2 and module 3 includes a depth-separable convolutional layer, a convolutional layer and a connection layer in sequence; The specific working process of each CSPStage in the first CSPStage, the second CSPStage, the third CSPStage, the fourth CSPStage, the fifth CSPStage and the sixth CSPStage is as follows: The feature input is Split, and the Split output features are input into the 21st convolutional layer and the 22nd convolutional layer respectively; The output features of the 22nd convolutional layer are sequentially input into module 1, module 2, and module 3; The output features of module three and the output features of the twenty-first convolutional layer are input into the eighth connection layer, the output features of the eighth connection layer are input into the twenty-third convolutional layer, and the output features of the twenty-third convolutional layer are used as 1 CSPStage output features.

10. A method for detecting a loose clamp fault of a railway passenger car speed sensor according to claim 9, characterized in that: In the step 3, the training set image set is input into the constructed speed sensor clamp loose fault detection network for training to obtain a trained speed sensor clamp loose fault detection network; the specific process is: Adopt Adam optimization method for training; The loss function is L refine_mpdIoU ; The training set image set is input into the constructed speed sensor clamp loose fault detection network for training until the loss function converges, thereby obtaining a trained speed sensor clamp loose fault detection network; The loss function is L refine_mpdIoU The acquisition process is: L refine_mpdIoU =r(L mpdIoU +IoU-IoU tmp ) (6) In the formula, Represents the square of the Euclidean distance between the upper left corner and the lower right corner of the real frame, that is, the offset of the real frame; Represents the square of the Euclidean distance between the upper left corner and the lower right corner of the prediction box, that is, the offset of the prediction box; Represents the coordinate of the upper left corner of the prediction box, Represents the coordinates of the lower right corner of the prediction box; Represents the coordinates of the upper left corner of the real box, Represents the coordinates of the lower right corner of the real box; IoU represents the ratio of the intersection and union of the areas of the real box and the predicted box; h1 is the height of the detection image, w2 is the width of the detection image; L mpdIOU is the MpdIoU loss function; b r , b l , b b , b t Represent the four point coordinates of the prediction box respectively; b r gt , b l gt , b b gt , b t gt Represent the coordinates of the four points of the real box respectively; d tmp is an intermediate variable; IOU tmp is an intermediate variable; w gt is the width of the real box, h gt is the height of the real box, w represents the width of the image, h represents the height of the image, and rat represents the calculated scaling factor; r is the gradient gain; β and δ are the degree of outliers.