Methods, devices and electronic equipment for detecting floor damage in railway freight cars

CN121661059BActive Publication Date: 2026-05-26HUBEI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUBEI UNIV
Filing Date
2026-02-09
Publication Date
2026-05-26

Smart Images

  • Figure CN121661059B_ABST
    Figure CN121661059B_ABST
Patent Text Reader

Abstract

This invention relates to a method, apparatus, and electronic equipment for detecting floor damage in railway freight cars, belonging to the field of railway maintenance technology. The method includes: inputting acquired images of the railway freight car floor into a trained target model to obtain the floor damage detection result output by the target model. The railway freight car floor damage detection method provided by this invention proposes a frequency domain enhancement module in the backbone network, replacing the traditional downsampling convolution module with a DMA module. In the feature interaction part, it replaces the traditional AIFI module with a Rep-AIFI module, thereby obtaining an improved RT-DETR model. While maintaining the backbone network hierarchy and downsampling rhythm unchanged, it improves the adaptability of the target shape, enhances the expression of feature capabilities, controls computational complexity, adapts to the requirements of lightweight detection tasks, and improves the detection quality and efficiency of faults.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of railway maintenance technology, and in particular to a method, device and electronic equipment for detecting damage to the floor of railway freight cars. Background Technology

[0002] With the rapid development of my country's railway freight transport, the number of freight cars has continued to grow, placing higher demands on vehicle operation safety. The Train Fault Detection System (TFDS) uses high-speed trackside cameras to collect real-time images of key parts of freight cars, significantly improving fault detection efficiency. However, the TFDS system currently relies mainly on manual visual image interpretation, resulting in high workload for dynamic inspectors, low analysis efficiency, and frequent missed detections of common critical faults, posing potential risks to vehicle operation safety.

[0003] In recent years, intelligent detection methods centered on machine vision have been introduced into the TFDS system, significantly improving detection performance by automatically identifying fault characteristics. Early research employed traditional image processing algorithms for fault detection; however, with advancements in hardware computing power, the accumulation of fault sample data, and the development of deep learning algorithms, algorithms such as YOLO and Faster R-CNN have been applied to the TFDS system, enabling detection to be completed in seconds with improved accuracy, providing more reliable technical support for truck condition-based repair.

[0004] Among various truck malfunctions, floor damage is one of the key issues affecting transportation safety. Truck floors are prone to cracks, holes, and deformation due to long-term impacts from cargo, corrosion, and mechanical wear. However, floor damage detection faces many challenges: (1) complex image backgrounds are affected by lighting, dirt, and shadows; (2) diverse damage morphologies, with significant differences in features such as cracks, rust, and holes; and (3) blurred images under dynamic shooting conditions, affecting detail recognition. To address these issues, existing research has attempted different methods, such as using wavelet decomposition to extract features, using neural network ensembles for classification, achieving better performance than single-classification networks; using multi-level convolutional neural network (CNN) features for fault detection, achieving a detection rate exceeding that of manual methods, but lacking real-time performance; and applying YOLO for fault detection, which improves the detection rate, but small-target damage is still easily missed.

[0005] However, the above methods show that existing technologies have not fully solved the practical problems of floor damage detection, and there is an urgent need to build a dedicated model that takes into account detection accuracy, real-time performance, and sensitivity to small targets. Summary of the Invention

[0006] In view of this, it is necessary to provide a method, device and electronic equipment for detecting floor damage in railway freight cars, so as to improve the detection quality and efficiency of floor damage.

[0007] To achieve the above objectives, in a first aspect, the present invention provides a method for detecting floor damage in railway freight cars, comprising:

[0008] The collected floor images of railway freight cars are input into the trained target model to obtain the floor damage detection results output by the target model; the target model is obtained by training an improved RT-DETR model based on sample fault image data;

[0009] The improved RT-DETR model is obtained by replacing the downsampling convolution of the original RT-DETR model with a DMA module, adding a frequency domain enhancement module before the first DMA module, and replacing the AIFI module in the original RT-DETR model with a Rep-AIFI module; the Rep-AIFI module is obtained by introducing RepConv and RepBN into the AIFI module.

[0010] The frequency domain enhancement module is used for:

[0011] The feature map of the input image is mapped to the frequency domain space to obtain the frequency domain features;

[0012] The frequency domain features are weighted and modulated to obtain the weighted frequency domain features;

[0013] The weighted frequency domain features are divided into a high-frequency subset and a low-frequency subset according to their frequency amplitude;

[0014] Convolutional enhancement is performed on the high-frequency subset and the low-frequency subset respectively to obtain the enhanced high-frequency subset and low-frequency subset;

[0015] The enhanced high-frequency subset and low-frequency subset are fused to obtain a frequency domain enhanced feature map.

[0016] In one possible implementation, the DMA module is used for:

[0017] The input features are partially split into two channels to obtain the first channel feature map and the second channel feature map.

[0018] Perform depthwise convolution on the first channel feature map to obtain a hybrid feature map;

[0019] Based on a gating mechanism, the first channel feature map and the mixed feature map are filtered to obtain gated features;

[0020] The gated feature, the first channel feature map, and the second channel feature map are merged to obtain the merged feature;

[0021] Based on the merged features, deformable sampling is performed to obtain a target feature map with consistent output dimensions.

[0022] In one possible implementation, the step of performing deformable sampling based on the merged features to obtain a target feature map with consistent output dimensions includes:

[0023] Based on the aforementioned merging features, the sampling point offset of the biaxial strip convolution is predicted;

[0024] Linear interpolation is performed based on the sampling point offset to determine the sampling features;

[0025] Based on spatial attention-weighted fusion, the sampled features are multiplied by the attention weights to obtain the target feature map.

[0026] In one possible implementation, the expression for the merging feature is as follows:

[0027]

[0028] in, Indicates the merged feature, Indicates gating features, Represents the residual weight kernel. This represents the feature map of the first channel. Represents convolution. This represents the feature map of the second channel.

[0029] In one possible implementation, the Rep-AIFI module is used for:

[0030] The multi-scale features extracted from the backbone network are aligned and stitched together to obtain the first fused feature map.

[0031] The first fused feature map and the batch normalized features are fused to obtain the second fused feature map;

[0032] The second fused feature and the layer normalized feature are progressively transitioned to obtain the third fused feature map after training.

[0033] Based on the third fused feature map, the first fused feature map is inferred to obtain the final output feature map.

[0034] In one possible implementation, the target model is trained in the following manner:

[0035] Image enhancement processing is performed on the acquired sample fault image data to obtain enhanced data;

[0036] Training data is constructed based on the sample fault image data and the augmented data;

[0037] The improved RT-DETR model is trained based on the training data, with the goal of minimizing the total training loss, to obtain the target model;

[0038] The total training loss is constructed based on classification loss, regression loss, sampling point offset loss, and Rep-AIFI transition loss.

[0039] In one possible implementation, the expression for the total training loss is as follows:

[0040]

[0041] in, Indicates the total training loss. Represents classification loss. This represents the regression loss weight coefficient. Indicates regression loss, This represents the sampling point offset loss weighting coefficient. This represents the sampling point offset loss. This represents the Rep-AIFI transition loss weighting coefficient. This represents the Rep-AIFI transition loss.

[0042] In one possible implementation, the image enhancement process includes:

[0043] Brightness adjustment, blurring, image flipping, and image panning.

[0044] Secondly, the present invention also provides a railway freight car floor damage detection device, comprising:

[0045] The detection unit is used to input the collected floor images of railway freight cars into the trained target model to obtain the floor damage detection results output by the target model; the target model is obtained by training an improved RT-DETR model based on sample fault image data;

[0046] The improved RT-DETR model is obtained by replacing the downsampling convolution of the original RT-DETR model with a DMA module, adding a frequency domain enhancement module before the first DMA module, and replacing the AIFI module in the original RT-DETR model with a Rep-AIFI module; the Rep-AIFI module is obtained by introducing RepConv and RepBN into the AIFI module.

[0047] The frequency domain enhancement module is used for:

[0048] The feature map of the input image is mapped to the frequency domain space to obtain the frequency domain features;

[0049] The frequency domain features are weighted and modulated to obtain the weighted frequency domain features;

[0050] The weighted frequency domain features are divided into a high-frequency subset and a low-frequency subset according to their frequency amplitude;

[0051] Convolutional enhancement is performed on the high-frequency subset and the low-frequency subset respectively to obtain the enhanced high-frequency subset and low-frequency subset;

[0052] The enhanced high-frequency subset and low-frequency subset are fused to obtain a frequency domain enhanced feature map.

[0053] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein,

[0054] The memory is used to store programs;

[0055] The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the railway freight car floor damage fault detection method described in any of the above implementations.

[0056] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instruction, which, when executed by a processor, can implement the steps in the railway freight car floor damage fault detection method described in any of the above implementations.

[0057] The beneficial effects of this invention are as follows: The railway freight car floor damage detection method, device, and electronic equipment provided by this invention propose a frequency domain enhancement module in the backbone network part, and use a DMA module to replace the traditional downsampling convolution module. In the feature interaction part, the Rep-AIFI module is used to replace the traditional AIFI module, thereby obtaining an improved RT-DETR model. While maintaining the backbone network hierarchy and downsampling rhythm unchanged, it improves the adaptability of target shape, enhances the expression of feature capabilities, controls computational complexity, and adapts to the requirements of lightweight detection tasks. The improved RT-DETR model is trained using sample fault image data, and the trained target model can accurately identify whether the railway freight car floor is damaged, thus improving the detection quality and efficiency of faults. Attached Figure Description

[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0059] Figure 1 A schematic flowchart of an embodiment of the railway freight car floor damage detection method provided by the present invention;

[0060] Figure 2 This is a schematic diagram of the structure of the improved RT-DETR model provided by the present invention;

[0061] Figure 3 This is a schematic diagram of the frequency domain enhancement module provided by the present invention;

[0062] Figure 4 A schematic flowchart of the image enhancement processing method provided by the present invention;

[0063] Figure 5 This is a schematic diagram of the DMA module provided by the present invention;

[0064] Figure 6 This is a schematic diagram of the Rep-AIFI module provided by the present invention;

[0065] Figure 7 A schematic diagram of an embodiment of the railway freight car floor damage detection device provided by the present invention;

[0066] Figure 8 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation

[0067] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0068] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0069] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.

[0070] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0071] This invention provides a method, apparatus, and electronic device for detecting damage to the floor of railway freight cars, which will be described below.

[0072] Figure 1 This is a schematic flowchart of an embodiment of the railway freight car floor damage detection method provided by the present invention, as shown below. Figure 1 As shown, the methods for detecting damage to the floor of railway freight cars include:

[0073] S101. Input the collected floor images of railway freight cars into the trained target model to obtain the floor damage detection results output by the target model; the target model is obtained by training the improved RT-DETR model based on sample fault image data;

[0074] The improved RT-DETR model is obtained by replacing the downsampling convolution of the original RT-DETR model with a DMA module, adding a frequency domain enhancement module before the first DMA module, and replacing the AIFI module in the original RT-DETR model with a Rep-AIFI module; the Rep-AIFI module is obtained by introducing RepConv and RepBN into the AIFI module.

[0075] The frequency domain enhancement module is used for:

[0076] The feature map of the input image is mapped to the frequency domain space to obtain the frequency domain features;

[0077] The frequency domain features are weighted and modulated to obtain the weighted frequency domain features;

[0078] The weighted frequency domain features are divided into a high-frequency subset and a low-frequency subset according to their frequency amplitude;

[0079] Convolutional enhancement is performed on the high-frequency subset and the low-frequency subset respectively to obtain the enhanced high-frequency subset and low-frequency subset;

[0080] The enhanced high-frequency subset and low-frequency subset are fused to obtain a frequency domain enhanced feature map.

[0081] It should be noted that this invention optimizes the backbone network of the original RT-DETR model by proposing a Frequency Enhanced Module (FEM) in the backbone network. By introducing a frequency domain modeling mechanism in the shallow feature stage, it achieves synergistic enhancement of frequency domain features and spatial features.

[0082] This paper proposes replacing traditional downsampling convolutions with a DMA (DSA-Mambaout) module. This improves the adaptability to target shape, enhances feature representation, controls computational complexity, and suits lightweight detection tasks while maintaining the backbone network hierarchy and downsampling rhythm. The improved backbone network can more efficiently preserve low-level detailed features, providing high-quality feature input for subsequent detection tasks.

[0083] This invention also optimizes the feature interaction part by proposing the Rep-AIFI module to replace the traditional AIFI module. It can gradually replace the module during training and reparameterize the fusion during inference, thereby reducing inference time and improving lightweight deployment adaptability while maintaining the feature aggregation capability.

[0084] For example, Figure 2 This is a schematic diagram of the structure of the improved RT-DETR model provided by the present invention. Figure 2 This diagram details the overall architecture design of the improved RT-DETR, highlighting the location and interactions of the core improvement modules. It clearly illustrates the integration of the improved modules with the original network, providing an intuitive reference for understanding the model structure and verifying the technical details.

[0085] like Figure 2 As shown, this invention optimizes the backbone network by introducing a frequency domain enhancement module, which is placed before the DMA module, to achieve synergistic enhancement of frequency domain features and spatial features.

[0086] Figure 3 This is a schematic diagram of the frequency domain enhancement module provided by the present invention, as shown below. Figure 3 As shown, by introducing a frequency domain modeling mechanism in the shallow feature stage, the frequency domain enhancement module can effectively capture global contextual relationships, suppress pseudo-feature interference, and enhance texture boundary details, thereby providing higher quality input features for the DMA module.

[0087] The frequency domain enhancement module introduces a frequency domain feature modeling mechanism in the shallow stages of the backbone network to achieve synergistic enhancement of spatial and frequency domain features, thereby effectively improving feature representation and detail fidelity without significantly increasing computational load. This module utilizes Fast Fourier Transform (FFT) to extract the frequency domain components of features and adaptively adjusts the weights of high and low frequency features through frequency-weighted mapping to enhance edge details and suppress background noise interference.

[0088] First, the input feature map is mapped to the frequency domain space to obtain the frequency domain features:

[0089]

[0090] in, , For batch size, Input the number of channels. These represent the vertical and horizontal dimensions of the feature map, respectively.

[0091] To achieve frequency domain weighting, this module designs a frequency attention function, which uses a learnable weight matrix. Adaptive modulation of different frequency components:

[0092]

[0093] in, This represents a 1×1 convolution kernel. This indicates a batch normalization operation. It is a non-linear activation function. This is the Sigmoid activation function, used to generate frequency-response weights in the range of 0-1.

[0094] Subsequently, the frequency domain features are weighted and modulated to enhance significant frequency components, resulting in weighted frequency domain features:

[0095]

[0096] in, This indicates a group element-wise multiplication operation.

[0097] The weighted frequency domain features are then mapped back to the spatial domain using the inverse Fourier transform (IFFT):

[0098]

[0099] Furthermore, residual connections are introduced to stabilize the gradient and preserve the original structural information:

[0100]

[0101] To further enhance the model's frequency domain modeling capabilities and spatial structure perception, the frequency domain enhancement module introduces a frequency partitioning and mixing strategy in the shallow backbone stage, achieving adaptive fusion by distinguishing between low-frequency and high-frequency response features.

[0102] The FFC output characteristics are divided into low-frequency components according to the channel dimension. (i.e., low-frequency subset) and high-frequency part (i.e., high-frequency subset):

[0103]

[0104] in, For frequency domain partitioning functions, This is the frequency division threshold, used to control the ratio of low-frequency to high-frequency characteristics.

[0105] Then, convolution enhancement is performed on the low-frequency and high-frequency branches respectively to enhance structural and detailed information:

[0106]

[0107]

[0108] in, This is a 3×3 convolution operation.

[0109] Learnable fusion coefficients Achieve weighted fusion of bi-branch features and output frequency domain enhanced feature map. :

[0110]

[0111]

[0112] in, For learnable fusion coefficients, This indicates an element-wise multiplication operation.

[0113] Through the synergistic enhancement method of frequency domain features and spatial features described above, the backbone network can efficiently complete frequency domain feature enhancement and global modeling in the shallow stage, significantly enhancing boundary perception ability and target discrimination characteristics, providing structurally clear and detailed input features for the subsequent DMA module, and effectively improving detection performance and model generalization ability in complex backgrounds.

[0114] The sample fault image data consists of images labeled with damaged wooden or steel floors. This invention uses the sample fault image data to train an improved RT-DETR model, thereby training a target model that can accurately identify whether the floor of a railway freight car is damaged, thus improving the quality and efficiency of fault detection.

[0115] In summary, the railway freight car floor damage detection method provided in this embodiment of the invention proposes a frequency domain enhancement module in the backbone network and replaces the traditional downsampling convolution module with a DMA module. In the feature interaction part, the traditional AIFI module is replaced with a Rep-AIFI module, thereby obtaining an improved RT-DETR model. While maintaining the backbone network hierarchy and downsampling rhythm, it improves the adaptability of target shape, enhances feature expression, controls computational complexity, and adapts to the requirements of lightweight detection tasks. The improved RT-DETR model is trained using sample fault image data, and the trained target model can accurately identify whether the railway freight car floor is damaged, thus improving the detection quality and efficiency.

[0116] In some embodiments of the present invention, the target model is trained in the following manner:

[0117] Image enhancement processing is performed on the acquired sample fault image data to obtain enhanced data;

[0118] Training data is constructed based on the sample fault image data and the augmented data;

[0119] The improved RT-DETR model is trained based on the training data, with the goal of minimizing the total training loss, to obtain the target model;

[0120] The total training loss is constructed based on classification loss, regression loss, sampling point offset loss, and Rep-AIFI transition loss.

[0121] In some embodiments of the present invention, the image enhancement process includes:

[0122] Brightness adjustment, blurring, image flipping, and image panning.

[0123] Typical and easily confused negative samples of railway freight car floor damage failures include two core failure types: wooden floor damage and steel floor damage, as well as easily interfering samples such as water stains, oil stains, mud, and train parts. This data can intuitively present the visual feature distribution of samples in the dataset, providing a reference for understanding the composition of the dataset and the design of sample balance for subsequent model training.

[0124] A random combination enhancement strategy is adopted to improve the model's adaptability to complex scenes. First, a fault sample image is selected as the basis, and pixel-level transformation is performed through random brightness adjustment (including histogram equalization, gamma correction, and random brightness adjustment), filtering (3×3 or 5×5 Gaussian filtering, random noise addition), or no processing.

[0125] The process performs random flipping or translation spatial geometric transformations on the image, ultimately outputting enhanced samples. This workflow expands the data distribution through multi-step random combinations, effectively avoiding the risk of overfitting.

[0126] Negative sample selection focuses on easily confused targets in railway freight car inspection scenarios, specifically including surface contaminants such as water stains, oil stains, and mud, as well as non-destructive structural features such as train components. Their visual features have a high similarity to real damaged areas, which can improve the model's accuracy in identifying fault modes. The dataset is then divided into faults in an 8:1:1 ratio. The original data and augmented data together form the training sample pool, with negative samples participating only in the training process. The validation and test sets consist of real fault samples to ensure the objectivity of the evaluation results.

[0127] For example, in the data preparation stage, the dataset of this invention comes from the TFDS system deployed by the Wuhan Jiang'an Vehicle Maintenance Depot on the Mengluo line. This system uses high-definition line array cameras to collect dynamic images of moving railway freight cars.

[0128] The data preparation phase includes the following steps:

[0129] This experiment utilizes the PyCharm development platform and the PyTorch deep learning framework, employing an Intel Core i7-12700K CPU as the central processing unit, paired with an NVIDIA RTX 3090 GPU (24GB VRAM) for parallel computing support. Built on the Ubuntu 18.04 operating system, the core software development stack includes: Python 3.8, PyTorch 1.8, OpenCV 4.1.2, CUDA 11.1, and Ultralytics. This configuration ensures framework compatibility and computational efficiency during model training.

[0130] The core parameters are configured as follows: 1) Image preprocessing: uniformly adjusted to 640×640 pixels to balance detection accuracy and computational efficiency. 2) Optimizer: SGD (Stochastic Gradient Descent) is used to adapt to large-scale data training scenarios. 3) Learning rate: initially set to 0.01, forming a classic parameter combination with the SGD optimizer. 4) Training period: 300 epochs to ensure sufficient model convergence. 5) Batch size: 32, the optimal choice to match the memory capacity of the RTX 3090.

[0131] The acquired images are in grayscale mode with a uniform resolution of 1400×1024 pixels, which can clearly present the detailed features of the floor area. The original dataset contains 10,007 fault images, labeled according to material differences as damaged wooden floors and damaged steel floors, providing accurate label information for model training.

[0132] To improve the model's generalization ability, a multi-strategy random enhancement combination is implemented for grayscale fault images. The specific process is as follows: Figure 4 As shown. Figure 4 This is a flowchart illustrating the image enhancement processing method provided by the present invention. Figure 4 The system presents a four-step execution flow for randomized data augmentation, specifically including sample selection → brightness / filtering → geometric transformation → standardized operation sequence of output. The brightness / filtering stage supports optional methods such as contrast adjustment and Gaussian filtering, while the geometric transformation stage covers spatial transformation operations such as rotation, flipping, and scaling. By clearly defining the execution order and technical options of each step, the system provides visual guidance for the reproduction and parameter optimization of data augmentation strategies.

[0133] The specific implementation of image enhancement processing includes the following steps:

[0134] Select a fault sample image and perform random brightness adjustment, filtering, or no processing. In brightness adjustment, randomly perform histogram equalization, Gammma correction, and random brightness adjustment. In filtering, randomly select a Gaussian filter with a kernel of 3 or 5, or add random noise.

[0135] The enhanced image is then output after random flipping or translation of spatial geometry. These enhancement methods effectively simulate changes in the real environment, not only increasing the number of samples but also improving data diversity, thereby enhancing the model's ability to generalize to different scenes, angles, and scales.

[0136] Negative sample augmentation involves constructing a dedicated negative sample set to address non-faulty targets that are easily confused in actual detection. This set includes images of interfering objects such as water stains, oil stains, mud, and train parts. These samples are added to the training process as unlabeled background images to help the model learn its ability to distinguish "non-destructive" features, thereby improving its robustness to complex scenes.

[0137] Data augmentation was performed on all original data, doubling the data volume. Faulty data were randomly split in an 8:1:1 ratio, with the augmented and original data in the same dataset. Furthermore, negative samples were only added to the training set. The final dataset contained 16,569 training images, 2,002 validation images, and 2,002 test images.

[0138] In some embodiments of the present invention, the DMA module is used for:

[0139] The input features of the frequency domain enhancement module are partially split into two channels to obtain the first channel feature map and the second channel feature map.

[0140] Perform depthwise convolution on the first channel feature map to obtain a hybrid feature map;

[0141] Based on a gating mechanism, the first channel feature map and the mixed feature map are filtered to obtain gated features;

[0142] The gated feature, the first channel feature map, and the second channel feature map are merged to obtain the merged feature;

[0143] Based on the merged features, deformable sampling is performed to obtain a target feature map with consistent output dimensions.

[0144] In some embodiments of the present invention, the step of performing deformable sampling based on the merged features to obtain a target feature map with consistent output dimensions includes:

[0145] Based on the aforementioned merging features, the sampling point offset of the biaxial strip convolution is predicted;

[0146] Linear interpolation is performed based on the sampling point offset to determine the sampling features;

[0147] Based on spatial attention-weighted fusion, the sampled features are multiplied by the attention weights to obtain the target feature map.

[0148] In some embodiments of the present invention, the expression of the merging feature is as follows:

[0149]

[0150] in, Indicates the merged feature, Indicates gating features, Represents the residual weight kernel. This represents the feature map of the first channel. Represents convolution. This represents the feature map of the second channel.

[0151] This invention optimizes the backbone network by proposing a DMA module to replace the traditional downsampling convolution. While maintaining the backbone network hierarchy and downsampling rhythm, it improves the adaptability to target shape, enhances feature representation, controls computational complexity, and adapts to the needs of lightweight detection tasks. The improved backbone network can more efficiently preserve low-level detailed features, providing high-quality feature input for subsequent detection tasks.

[0152] Figure 5 This is a schematic diagram of the DMA module provided by the present invention, as shown below. Figure 5 As shown, the DMA module reduces computation by improving upon the traditional C2f ordinary convolution, which is a 7×7 depthwise convolution (Token Minxer), by performing effective convolution only on a subset of channels.

[0153] First, select only a portion of the channels from the input X. (Corresponding to the first channel feature map) ) participate in depthwise convolution (corresponding to mixed feature maps) The remaining channels are directly retained as shortcut branches (corresponding to the second channel feature map). Secondly, the traditional C2f ordinary convolution is improved to a 7×7 depthwise convolution, which expands the receptive field while reducing computational complexity:

[0154]

[0155]

[0156] in, , And SplitPartical ( ) is a "partial channel splitting function". (r is the channel reduction factor, the default r=2, suitable for lightweight requirements), where This is a key channel feature map specifically used for subsequent 7×7 depthwise convolution (Token Mixer) operations. Key parameters for controlling the lightweight characteristics of the model, These represent the batch size (BatchSize), vertical pixel dimensions (height), and horizontal pixel dimensions (width), respectively. This represents the total number of channels in the feature map.

[0157] Then, a gating mechanism is added, and feature selection is achieved through element-wise multiplication of "feature branch + gating branch" to obtain gated features. Meanwhile, the SSM module was removed to reduce time complexity and adapt to lightweight detection tasks.

[0158]

[0159] in It uses a 1×1 convolution kernel to achieve linear transformation of the channel dimension.

[0160] Then, residual connections are added to prevent gradient vanishing, and 1×1 convolutions are used to restore some channel features to the number of input channels. These features are then merged with the shortcut branch to obtain the merged features. :

[0161]

[0162]

[0163] in Conv(1,1,1) is used as the residual weight kernel to unify the weights. The channel dimension.

[0164] Furthermore, the DMA module incorporates strip deformable convolution (SDC), introducing a biaxial strip convolution kernel to achieve deformable sampling, replacing the traditional fixed convolution kernel.

[0165] First, based on the output of the above steps Predicting the sampling point offset of a biaxial strip convolution using 1×1 convolution. and To achieve deformable sampling:

[0166]

[0167] in, , , respectively corresponding axis The offset of each sampling point.

[0168] Then, strip convolution kernels along the x and y axes are used to replace the traditional fixed kernels, and linear interpolation is combined to achieve adaptive sampling, thus obtaining the sampled features. The sampling position is the sum of the original position and the offset:

[0169]

[0170] ,

[0171] This replaces bilinear interpolation, reducing the computational cost per sampling point. , These are the original spatial coordinates of the feature map.

[0172] Finally, spatial attention-weighted fusion is used to multiply the sampled features element-wise with the attention weights, thereby enhancing the feature response of key regions and improving shape adaptability.

[0173]

[0174] in .

[0175] Then, residual fusion is performed to output a target feature map with consistent dimensions.

[0176] In some embodiments of the present invention, the Rep-AIFI module is used for:

[0177] The multi-scale features extracted from the backbone network are aligned and stitched together to obtain the first fused feature map.

[0178] The first fused feature map and the batch normalized features are fused to obtain the second fused feature map;

[0179] The second fused feature and the layer normalized feature are progressively transitioned to obtain the third fused feature map after training.

[0180] Based on the third fused feature map, the first fused feature map is inferred to obtain the final output feature map.

[0181] Figure 6 This is a schematic diagram of the Rep-AIFI module provided by the present invention, as shown below. Figure 6 As shown, this invention optimizes feature interaction by proposing the Rep-AIFI module to replace the traditional AIFI module. Through progressive replacement during training and reparameterized fusion during inference, it reduces inference time and improves lightweight deployment adaptability while maintaining the feature aggregation capability.

[0182] To improve the system's lightweight deployment adaptability, this invention uses progressive reparameterization batch normalization to reduce model inference time.

[0183] First, the first fused feature map is obtained by multi-scale feature alignment and concatenation. We maintain the feature alignment logic and input dimension unchanged to ensure compatibility of multi-scale feature flows.

[0184]

[0185] in, This is an upsampling operation, designed to scale up operations.

[0186] Secondly, progressive reparameterization normalization is performed using learnable parameters. Batch normalization features of BN output With original features The second fusion feature map is obtained. Balancing normalization stability and feature representation:

[0187]

[0188]

[0189] in, These represent the batch mean and batch standard deviation, respectively, to address the issue of feature distribution shift. For scale-learnable parameters and offset-learnable parameters, This is a smoothing term used to ensure computational stability.

[0190] Then, dynamic coefficients were introduced. A gradual transition approach was adopted to obtain the third fusion feature map. :

[0191]

[0192] in, LN represents the output feature after layer normalization. This represents the current number of training steps. This represents the total number of decay steps.

[0193] Furthermore, to enhance feature aggregation capabilities and inference efficiency, reparameterized convolution (RepConv) is introduced. A multi-branch convolutional structure is employed, with each branch incorporating batch normalization (BN) and a non-linear activation function for multi-scale feature extraction and contextual information fusion. Its output can be represented as:

[0194]

[0195] in, For the input feature map, For the i-th convolutional branch, This indicates the corresponding batch normalization operation. Residual connections can effectively preserve the original feature distribution and gradient stability.

[0196] Then, an algebraic fusion method is used to merge the multi-branch convolutional kernel and BN parameters into a single convolutional kernel and bias, achieving parameterization simplification:

[0197]

[0198] in, , These represent the weights and biases of each convolutional branch. , , , These are the batch normalization parameters.

[0199] Fusion of single convolutional kernels With bias It can be directly used for standard convolution calculations during the inference stage, thereby reducing computational redundancy and improving execution efficiency.

[0200] Finally, RepBN reparameterization is used in the inference phase to fuse with the linear layer.

[0201] right Perform algebraic transformations to reparameterize to the standard BN format, and then reparameterize the parameterized form. and , The layers are merged into a single linear layer, as follows:

[0202]

[0203] in, The original feature map is directly input into the "fusion linear layer". For the final weight parameters, To and The final bias parameters obtained by synchronous fusion This is the final output feature map of the "reparameterized fusion linear layer" in the inference stage.

[0204] In some embodiments of the present invention, the expression for the total training loss is as follows:

[0205]

[0206] in, Indicates the total training loss. Represents classification loss. This represents the regression loss weight coefficient. Indicates regression loss, This represents the sampling point offset loss weighting coefficient. This represents the sampling point offset loss. This represents the Rep-AIFI transition loss weighting coefficient. This represents the Rep-AIFI transition loss.

[0207] This invention utilizes basic matching loss, classification loss, regression loss, DMA module auxiliary loss, and Rep-AIFI training scheduling loss to construct the overall loss. .

[0208] (1) The matching logic of the DETR-type model is adopted to ensure the optimal pairing of the predicted box and the ground truth box, while adapting to the fine-grained features extracted by the DMA module to optimize the matching accuracy:

[0209]

[0210] in, Let be the matching cost function between the predicted bounding box and the ground truth bounding box. These are the i-th predicted bounding box and the j-th ground truth bounding box, respectively. For classification loss function, These are the weighting coefficients for the regression loss. For cross-entropy loss, To predict the probability of category i, For IoU regression loss, Let be the coordinate parameters of the i-th prediction box. Let be the coordinate parameters of the j-th ground truth bounding box.

[0211] (2) Since the DMA module enhances the feature representation of small and irregular targets through deformable attention, this method addresses the class imbalance problem in the classification loss stage:

[0212]

[0213] in, The loss function is used for classification, where M is the total number of successfully matched positive bounding boxes, and N is the total number of bounding boxes output by the model. ) is an indicator function. Assign a function to match the predicted bounding box with the ground truth bounding box. For positive sample focusing parameters, The negative sample loss balance coefficient. Predict the probability for the negative sample background class. This is the focusing parameter for negative samples.

[0214] (3) Combining the shape adaptability of the DMA module, regression loss is used to optimize the target box localization, and scale-aware weights are introduced to adapt to the regression requirements of multi-scale features:

[0215]

[0216] in, For multi-scale adapted shape-aware regression loss, For multi-scale objective regression weights, For complete intersection-union comparison.

[0217] (4) To ensure that the bar deformable convolution sampling points of DMA are close to the target contour, offset pseudo-labels are generated based on the real bounding box, and the sampling point offset learning is constrained:

[0218]

[0219] in, For sampling point offset loss, This represents the total number of sampling points at a single location. For the sampling point index of a single spatial coordinate, This is the predicted sampling point offset. This is a pseudo-label for the offset.

[0220] Rep-AIFI uses RepConv and RepBN to progressively replace LN, and designs a loss scheduling coefficient. Compared to RepBN and RepConv Coordination is key to ensuring a smooth transition in training:

[0221]

[0222] in, For the Rep-AIFI module's dedicated classification loss, The progressive loss weight scheduling coefficients are used. The classification loss corresponding to layer normalization, This is a classification loss based on the collaboration of RepConv and RepBN.

[0223] (5) Assign weights to the sub-losses and combine them into the total loss. :

[0224]

[0225] in, For total training loss, For classifying losses, , These are the regression loss weight coefficients and the regression loss, respectively. , These are the sampling point offset loss weighting coefficient and the sampling point offset loss, respectively. , These are the Rep-AIFI transition loss weighting coefficient and the Rep-AIFI transition loss, respectively.

[0226] This invention uses precision (P), recall (R), and mean precision (mAP50) as evaluation metrics to assess model performance. Precision (P) focuses on the accuracy of the model's detection results, calculating the proportion of truly real targets among the detected targets. Recall (R) emphasizes the completeness of the model's detection capability, statistically analyzing the proportion of successfully identified real targets. mAP50 is the core evaluation metric for target detection tasks; it is calculated by averaging the average precision of each target category when the intersection-union (IOU) threshold is 0.5, comprehensively reflecting the model's overall detection performance across different target categories.

[0227] This invention discloses a freight car floor damage detection method based on an improved RT-DETR, proposing a novel and efficient computer vision-based defect detection method. This method combines image enhancement and model module improvement strategies to improve the detection quality and efficiency at both the data and algorithm levels. Specifically, in the backbone network, a frequency domain enhancement module is proposed, replacing the traditional downsampling convolution module with a DMA module. In the feature interaction part, the traditional AIFI module is replaced with a Rep-AIFI module. While maintaining the backbone network hierarchy and downsampling rhythm, this improves the adaptability of target shape, enhances feature representation, controls computational complexity, and adapts to the requirements of lightweight detection tasks. Subsequently, a random combination enhancement method is used to expand data diversity, while adding negative sample data control, thereby improving accuracy and robustness in practical applications. This method is of great significance for intelligent detection of freight car floor damage and improving railway operation and maintenance efficiency.

[0228] Compared with existing methods and systems for detecting floor damage, the advantages of this invention also include:

[0229] In terms of technical performance, this method achieves a detection accuracy of 91.7% (MAP@0.5) on the TFDS real dataset, which is about 12.1% higher than existing mainstream methods. This accuracy improvement is attributed to the optimized design of the model architecture and the enhanced feature extraction capabilities. Meanwhile, its inference speed reaches 32.1ms, meeting the real-time requirements of dynamic detection scenarios for railway freight cars, achieving a dual breakthrough in detection accuracy and processing efficiency.

[0230] In practical applications, this method, through the synergy of data augmentation and negative sampling strategies, effectively suppresses false detections in complex industrial environments, significantly reduces the number of invalid detections, and improves the reliability of detection results. For common small-target damage on railway freight car floors, the improved model exhibits stronger feature capture capabilities, further expanding the detection coverage. These technological improvements ultimately translate into a substantial increase in the efficiency of railway freight car maintenance, providing intelligent technological support for the railway transportation safety assurance system by reducing manual review costs and the risk of missed detections.

[0231] This method, through quantitative breakthroughs in technical performance and problem-solving capabilities in practical applications, has constructed a complete technical solution for detecting damage to railway freight car flooring. Its high precision, real-time performance, and robustness make it worthy of large-scale application in real-world engineering scenarios.

[0232] This invention aims to address the dual technical bottlenecks in railway freight car floor damage detection, specifically the collaborative challenges at the data and algorithm levels. Existing floor damage data suffers from insufficient sample diversity and missing negative samples, while mainstream models exhibit significant deficiencies in three key dimensions: feature extraction completeness, small target perception accuracy, and real-time inference efficiency. This invention proposes a frequency domain enhancement module in the backbone network, introducing a frequency domain modeling mechanism at the shallow feature stage to achieve synergistic enhancement of frequency domain and spatial features. Simultaneously, a DMA module is proposed, which integrates deformable spatial attention with strip deformable convolution and linear interpolation techniques to achieve adaptive spatial sampling of irregular, small targets. Furthermore, it integrates a gated CNN structure with deep convolution to efficiently filter effective features and suppress redundant information. This improves the adaptability of target shape and the representation of feature capabilities while more efficiently preserving low-level detailed features, achieving a dual optimization of target detection accuracy and inference efficiency. In the feature interaction part, the Rep-AIFI module is proposed. By introducing progressively reparameterized batch normalization and reparameterized convolution modules, multiple computation modules are merged into one during the inference stage, which improves the efficiency and performance of the model. Without sacrificing detection accuracy, it significantly improves the efficiency and compatibility of deployment on lightweight devices, so as to achieve a balance between detection performance and inference speed.

[0233] To better implement the railway freight car floor damage detection method in this embodiment of the invention, based on the railway freight car floor damage detection method, correspondingly, as follows: Figure 7 As shown, this embodiment of the invention also provides a railway freight car floor damage fault detection device 700, which includes:

[0234] The detection unit 701 is used to input the collected floor images of railway freight cars into the trained target model to obtain the floor damage detection results output by the target model; the target model is obtained by training an improved RT-DETR model based on sample fault image data;

[0235] The improved RT-DETR model is obtained by replacing the downsampling convolution of the original RT-DETR model with a DMA module, adding a frequency domain enhancement module before the DMA module, and replacing the AIFI module in the original RT-DETR model with a Rep-AIFI module; the Rep-AIFI module is obtained by introducing RepConv and RepBN into the AIFI module.

[0236] The frequency domain enhancement module is used for:

[0237] The feature map of the input image is mapped to the frequency domain space to obtain the frequency domain features;

[0238] The frequency domain features are weighted and modulated to obtain the weighted frequency domain features;

[0239] The weighted frequency domain features are divided into a high-frequency subset and a low-frequency subset according to their frequency amplitude;

[0240] Convolutional enhancement is performed on the high-frequency subset and the low-frequency subset respectively to obtain the enhanced high-frequency subset and low-frequency subset;

[0241] The enhanced high-frequency subset and low-frequency subset are fused to obtain a frequency domain enhanced feature map.

[0242] The railway freight car floor damage detection device 700 provided in the above embodiments can realize the technical solutions described in the above embodiments of the railway freight car floor damage detection method. The specific implementation principles of each module or unit can be found in the corresponding content in the above embodiments of the railway freight car floor damage detection method, which will not be repeated here.

[0243] like Figure 8 As shown, the present invention also provides an electronic device 800. The electronic device 800 includes a processor 801, a memory 802, and a display 803. Figure 8Only some components of the electronic device 800 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0244] In some embodiments, processor 801 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 802 or process data, such as the railway freight car floor damage detection method of the present invention.

[0245] In some embodiments, processor 801 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 801 may be local or remote. In some embodiments, processor 801 may be implemented on a cloud platform. In some embodiments, the cloud platform may include private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, internal cloud, multi-cloud, etc., or any combination thereof.

[0246] In some embodiments, memory 802 may be an internal storage unit of electronic device 800, such as a hard disk or memory of electronic device 800. In other embodiments, memory 802 may also be an external storage device of electronic device 800, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 800.

[0247] Furthermore, the memory 802 may include both internal storage units of the electronic device 800 and external storage devices. The memory 802 is used to store application software and various types of data installed on the electronic device 800.

[0248] In some embodiments, display 803 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an organic light-emitting diode (OLED) touchscreen, etc. Display 803 is used to display information in electronic device 800 and to display a visual user interface. Components 801-803 of electronic device 800 communicate with each other via a system bus.

[0249] In one embodiment, when the processor 801 executes the railway freight car floor damage detection program in the memory 802, the following steps can be implemented:

[0250] The collected floor images of railway freight cars are input into the trained target model to obtain the floor damage detection results output by the target model; the target model is obtained by training an improved RT-DETR model based on sample fault image data;

[0251] The improved RT-DETR model is obtained by replacing the downsampling convolution of the original RT-DETR model with a DMA module, adding a frequency domain enhancement module before the first DMA module, and replacing the AIFI module in the original RT-DETR model with a Rep-AIFI module; the Rep-AIFI module is obtained by introducing RepConv and RepBN into the AIFI module.

[0252] The frequency domain enhancement module is used for:

[0253] The feature map of the input image is mapped to the frequency domain space to obtain the frequency domain features;

[0254] The frequency domain features are weighted and modulated to obtain the weighted frequency domain features;

[0255] The weighted frequency domain features are divided into a high-frequency subset and a low-frequency subset according to their frequency amplitude;

[0256] Convolutional enhancement is performed on the high-frequency subset and the low-frequency subset respectively to obtain the enhanced high-frequency subset and low-frequency subset;

[0257] The enhanced high-frequency subset and low-frequency subset are fused to obtain a frequency domain enhanced feature map.

[0258] It should be understood that when the processor 801 executes the railway freight car floor damage fault detection program in the memory 802, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.

[0259] Furthermore, this embodiment of the invention does not specifically limit the type of electronic device 800 mentioned. Electronic device 800 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the invention, electronic device 800 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0260] Accordingly, embodiments of the present invention also provide a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions in the railway freight car floor damage fault detection methods provided in the above-described method embodiments.

[0261] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0262] The above provides a detailed description of the railway freight car floor damage detection method, device, and electronic equipment provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for detecting floor damage in railway freight cars, characterized in that, include: The collected images of the railway freight car floor are input into the trained target model to obtain the floor damage detection results output by the target model. The target model is obtained by training an improved RT-DETR model based on sample fault image data; The improved RT-DETR model is obtained by replacing the downsampling convolution of the original RT-DETR model with a DMA module, adding a frequency domain enhancement module before the first DMA module, and replacing the AIFI module in the original RT-DETR model with a Rep-AIFI module; the Rep-AIFI module is obtained by introducing RepConv and RepBN into the AIFI module. The frequency domain enhancement module is used for: The feature map of the input image is mapped to the frequency domain space to obtain the frequency domain features; The frequency domain features are weighted and modulated to obtain the weighted frequency domain features; The weighted frequency domain features are divided into a high-frequency subset and a low-frequency subset according to their frequency amplitude; Convolutional enhancement is performed on the high-frequency subset and the low-frequency subset respectively to obtain the enhanced high-frequency subset and low-frequency subset; The enhanced high-frequency subset and low-frequency subset are fused to obtain a frequency domain enhanced feature map; the DMA module integrates strip deformable convolution with deformable spatial attention and linear interpolation techniques, and also integrates a gated CNN structure and depth convolution. The DMA module is used for: The input features are partially split into two channels to obtain the first channel feature map and the second channel feature map. Perform depthwise convolution on the first channel feature map to obtain a hybrid feature map; Based on the gating mechanism, the first channel feature map and the mixed feature map are filtered to obtain gated features; The gated feature, the first channel feature map, and the second channel feature map are merged to obtain the merged feature; Based on the merged features, deformable sampling is performed to obtain a target feature map with consistent output dimensions.

2. The method for detecting damage to the floor of railway freight cars according to claim 1, characterized in that, The step of performing deformable sampling based on the merged features to obtain a target feature map with consistent output dimensions includes: Based on the aforementioned merging features, the sampling point offset of the biaxial strip convolution is predicted; Linear interpolation is performed based on the sampling point offset to determine the sampling features; Based on spatial attention-weighted fusion, the sampled features are multiplied by the attention weights to obtain the target feature map.

3. The method for detecting damage to the floor of railway freight cars according to claim 1, characterized in that, The expression for the merging feature is as follows: in, Indicates the merged feature, Indicates gating features, Represents the residual weight kernel. This represents the feature map of the first channel. Represents convolution. This represents the feature map of the second channel.

4. The method for detecting damage to the floor of railway freight cars according to claim 1, characterized in that, The Rep-AIFI module is used for: The multi-scale features extracted from the backbone network are aligned and stitched together to obtain the first fused feature map. The first fused feature map and the batch normalized features are fused to obtain the second fused feature map; The second fused feature and the layer normalized feature are progressively transitioned to obtain the third fused feature map after training. Based on the third fused feature map, the first fused feature map is inferred to obtain the final output feature map.

5. The method for detecting damage to the floor of railway freight cars according to claim 1, characterized in that, The target model is trained in the following way: Image enhancement processing is performed on the acquired sample fault image data to obtain enhanced data; Training data is constructed based on the sample fault image data and the augmented data; The improved RT-DETR model is trained based on the training data, with the goal of minimizing the total training loss, to obtain the target model; The total training loss is constructed based on classification loss, regression loss, sampling point offset loss, and Rep-AIFI transition loss.

6. The method for detecting damage to the floor of railway freight cars according to claim 5, characterized in that, The expression for the total training loss is as follows: in, Indicates the total training loss. Represents classification loss. This represents the regression loss weight coefficient. Indicates regression loss, This represents the sampling point offset loss weighting coefficient. This represents the sampling point offset loss. This represents the Rep-AIFI transition loss weighting coefficient. This represents the Rep-AIFI transition loss.

7. The method for detecting damage to the floor of railway freight cars according to claim 5, characterized in that, The image enhancement process includes: Brightness adjustment, blurring, image flipping, and image panning.

8. A fault detection device for railway freight car floor damage, characterized in that, include: The detection unit is used to input the collected floor images of railway freight cars into the trained target model to obtain the floor damage detection results output by the target model; The target model is obtained by training an improved RT-DETR model based on sample fault image data; The improved RT-DETR model is obtained by replacing the downsampling convolution of the original RT-DETR model with a DMA module, adding a frequency domain enhancement module before the first DMA module, and replacing the AIFI module in the original RT-DETR model with a Rep-AIFI module; the Rep-AIFI module is obtained by introducing RepConv and RepBN into the AIFI module. The frequency domain enhancement module is used for: The feature map of the input image is mapped to the frequency domain space to obtain the frequency domain features; The frequency domain features are weighted and modulated to obtain the weighted frequency domain features; The weighted frequency domain features are divided into a high-frequency subset and a low-frequency subset according to their frequency amplitude; Convolutional enhancement is performed on the high-frequency subset and the low-frequency subset respectively to obtain the enhanced high-frequency subset and low-frequency subset; The enhanced high-frequency subset and low-frequency subset are fused to obtain a frequency domain enhanced feature map; The DMA module integrates strip deformable convolution with deformable spatial attention and linear interpolation techniques, while also integrating a gated CNN structure and depth convolution. The DMA module is used for: The input features are partially split into two channels to obtain the first channel feature map and the second channel feature map. Perform depthwise convolution on the first channel feature map to obtain a hybrid feature map; Based on the gating mechanism, the first channel feature map and the mixed feature map are filtered to obtain gated features; The gated feature, the first channel feature map, and the second channel feature map are merged to obtain the merged feature; Based on the merged features, deformable sampling is performed to obtain a target feature map with consistent output dimensions.

9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the railway freight car floor damage fault detection method as described in any one of claims 1 to 7.