A cross-domain consistent modulation track surface defect detection method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANHUI UNIV OF SCI & TECH
- Filing Date
- 2026-03-02
- Publication Date
- 2026-07-14
Smart Images

Figure CN122391059A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of target detection and relates to a model and method for detecting defects on track surfaces. Background Technology
[0002] As a fundamental material for critical structural components such as mine shafts and rail transport systems, the identification of surface defects in steel is a crucial step in ensuring the safe operation of industrial facilities and product quality. Due to complex and diverse manufacturing processes, rail steel surfaces are prone to various types of defects, including cracks, scratches, and perforations. These defects typically exhibit visual characteristics such as significant dimensional variations, weak texture, low contrast, and random and irregular distribution. Therefore, developing high-precision surface defect detection technology for rail steel is of great significance for achieving online monitoring of equipment health and preventing safety risks.
[0003] Traditional steel surface defect detection relies on manual labor, which is inefficient and costly. To improve detection performance, some studies have attempted to use methods based on traditional machine learning, such as the mathematical morphology method based on arc-shaped structural units proposed by Tsai et al. (see "Tsai DM, Molina DE R. Morphology-based defect detection in machinedsurfaces with circular tool-mark patterns[J]. Measurement, 2019, 134: 209-217."); and the detection method combined with improved SVM by Liu et al. (see "Liu XH, He ZY, Sun Y. On study of amethod for detecting micro-deformation defects of steel plate surface[C] / / AOPC 2020: Optics Ultra Precision Manufacturing and Testing. SPIE, 2020,11568: 133-142"). However, these methods generally suffer from low accuracy, poor robustness, and weak generalization ability, making it difficult to meet the needs of complex industrial scenarios.
[0004] In recent years, deep learning-based detection methods have made significant progress. Detection frameworks based on convolutional neural networks (CNNs) have been widely used in the field of industrial defect detection due to their hierarchical feature extraction mechanism. PCT-Net improves localization accuracy by introducing a target region guidance module, enabling the network to actively focus on potential defect areas. See "MaY, Zhang Z. Position-Guided Hybrid Convolutional Neural Network and Transformer Network for steel strip surface defect detection[J]. Engineering Applications of Artificial Intelligence, 2025, 162: 112741."; CFC-CenterNet designs a center point enhancement branch to strengthen defect feature representation, making the feature map more discriminative. See "Ying H, Song M, Xue Z, et al. CFC-CenterNet: A hybrid approach for steel surface defect detection[J]. Measurement, 2025: 118891"; RAP-DETR embeds residual attention blocks in the backbone network, making feature extraction of defect areas more concentrated. See "Xie H, Zhou H, Chen R, et al. RAP-DETR: Enhancing RT-DETR for Railway Track Defect Detection[J]. Measurement, 2025:119058.” Although the above methods enhance the ability to model specific structures or regions, they neglect the compensatory effect of shallow details on deep semantics, causing key information to be gradually filtered out during propagation, resulting in semantic decay of deep features and affecting detection accuracy.
[0005] Multi-scale fusion is an important means to mitigate scale differences in detection tasks, which is especially important for the size variations that are common in surface defects of rail steel. MSAF-YOLO adopts a parallel structure of grouped convolution and channel rearrangement to maintain the diversity of feature distribution and reduce channel redundancy. See “Wang Z, Zhou W, Li Y. MSAF-YOLO: An EfficientMulti-Scale Attention Fusion Network for high-precision steel surface defect detection[J]. Measurement, 2025: 118640.” MDCA-DETR fuses multi-channel deformable convolution and coordinate attention to enhance the perception of multi-scale defects. See “Lin Y, Pan S, Yu J, et al. MDCA-DETR: DETRwith multi-channel deformable convolution and coordinate attention for mini-LED wafer surface defects detection[J]. Optics and Lasers in Engineering, 2025, 193: 109082.” However, these methods generally rely on static convolution kernels and fixed fusion strategies (splitting or weighting operations), lacking dynamic adjustments for different defect morphologies. This results in insufficient coupling between multi-branch features, making it difficult to achieve a unified expression of morphological information at different scales.
[0006] Furthermore, it is worth noting that even methods that introduce self-attention mechanisms to enhance global modeling capabilities face challenges in the specific task of steel defect detection. The inherent global smoothing effect of these self-attention mechanisms suppresses high-frequency responses reflecting defect edges and texture details, while amplifying low-frequency components representing a uniform background. This unbalanced modeling of frequency components causes the distribution of deep features to gradually deviate from the true defect structure in the original space, further limiting detection performance.
[0007] The inventors found that the existing deep learning-based methods for detecting surface defects in rail steel have poor detection performance and mainly suffer from the following shortcomings: (1) semantic transmission attenuation, the lack of shallow compensation in the deep layers of the network leads to a decrease in the discriminative power of deep features; (2) insufficient coupling between multiple scales: the static fusion strategy cannot adapt to the varied defect morphology; (3) frequency domain modeling bias: the smoothing effect of self-attention suppresses high-frequency details and causes feature domain drift. Summary of the Invention
[0008] To address the aforementioned issues, this invention proposes a cross-domain modulation track surface defect detection model. This model supports the implementation of the detection method, establishing a relative balance between detection accuracy and efficiency, thus resolving the problems existing in the prior art.
[0009] The second objective of this invention is to provide a method for detecting track surface defects using cross-domain consistency modulation.
[0010] A method for detecting track surface defects using cross-domain consistent modulation, characterized by comprising the following steps:
[0011] Step 1: Construct a dataset for detecting surface defects in rail steel;
[0012] The defects in the defect detection dataset include cracks, scratches, punch holes, and dents. The defect detection dataset is randomly divided into a training set, a validation set, and a test set in an 8:1:1 ratio. Defect images are identified, and their geometric, texture, and grayscale features are extracted and parameterized to construct the initial feature tensor for the model input. ;
[0013] Step 2: Use the training set as input to train the detection model;
[0014] The detection model includes an echo refinement-guided backbone network ERG-Net, a cross-domain modulation fusion architecture CDMF, and a prediction output network. Addressing the insufficient multi-scale representation caused by semantic attenuation of deep network features in track surface defect detection, the input feature tensor is fed into ERG-Net. Multi-level information enhancement is achieved through an adaptive joint filtering module (AJSM) and an echo accumulation mechanism. Specifically, the input features are first modeled using three cascaded 3×3 convolutional blocks, then downsampled by a max-pooling layer, and finally fed into a four-layer cascaded AJSM for depth filtering and refinement. This outputs multi-scale feature maps {S3, S4, S5} at different semantic levels, respectively encoding the edge texture details, morphological contour structure, and deep semantic category information of the defect.
[0015] To address the feature domain drift problem caused by the suppression of high-frequency details due to the self-attention smoothing effect during defect detection, the multi-scale feature map set {S3, S4, S5} is input into the cross-domain modulation fusion architecture CDMF. Using the third and fourth feature layers output from ERG-Net as input, the deep feature S5 is first processed sequentially with input projection convolution, global attention interaction (AIFI), and side-connection convolution to obtain semantically enhanced features. Then, frequency domain detail recovery upsampling is performed through the spectral resampling alignment unit (SRAU), and the result is concatenated and fused with the projection result of the mid-layer feature S4. This fusion is then processed by the multi-kernel perceptual mapping module (MKPM) to output the first fused feature. The first fused feature is processed in the frequency domain by SRAU and then concatenated with the projection result of the shallow feature S3. After processing by MKPM, the second fused feature is output. The second fused feature is downsampled and concatenated with the first fused feature. The third fused feature is output by MKPM. The third fused feature is downsampled again and concatenated with the deep side feature. The fourth fused feature is output by MKPM. Through the above multi-level feature fusion, a frequency domain feature matrix and a spatial domain feature matrix are constructed for each layer of features. SRAU is used to perform high-frequency information compensation in the frequency domain, and MKPM is used to perform multi-scale parallel filtering in the spatial domain. Multi-level cross-layer connection is used to obtain the fused feature with spatial-frequency synergistic enhancement.
[0016] The cross-domain enhanced fusion features are input into the detection head, which interactively decodes the learnable object query and encoded features to output the category probability distribution and bounding box location information of the track surface defects.
[0017] Step 3: Training effect verification; Use the validation set to verify the training effect of the recognition model;
[0018] Step 4: Test set testing; Use the test set to test the model that performs well on the validation set, output the identification results of defects in the rail steel, and analyze the test results from subjective and objective indicators.
[0019] The method for detecting track surface defects using cross-domain consistent modulation is characterized in that, in step 2, for a given t-th level AJSM module in ERG-Net, the input... By introducing pointwise convolutional cascades for cross-channel information interaction and feature compression, key information is preserved while channel redundancy is reduced.
[0020]
[0021] Next, a dual-path perceptual structure is used for feature selection. GroupConv is used to extract local details and DilatedConv to model contextual semantics. The two outputs are concatenated to form multi-scale joint features.
[0022]
[0023] The module further introduces a channel recalibration mechanism to generate channel attention weights s, adaptively calibrate the fused features, and finally output the refined features:
[0024]
[0025] in, This indicates channel-by-channel multiplication. and For different fully connected layer weights, and These represent the ReLU and Sigmoid functions, respectively.
[0026] The method for detecting track surface defects using cross-domain consistent modulation is characterized in that, in step 2, the echo accumulation mechanism constructs a multi-level feature protection path through the synergy of intra-layer echo residuals and cross-layer echo residual paths in a four-layer AJSM. The intra-layer echo is transmitted to the output end by embedding skip connections within the AJSM, allowing the input to bypass its core dual-path transformation structure.
[0027]
[0028] in, This represents a local joint feature transformation that preserves the local texture of minute defects;
[0029] Cross-layer echo constructs cross-level identity mapping, fusing the original input with the AJSM output to achieve long-range pass-through of shallow structural information to deep semantic space:
[0030]
[0031] in, The composite nonlinear transformation representing AJSM; its overall output can be expressed as:
[0032]
[0033] in, This represents the ReLU function, designed to introduce nonlinear modeling capabilities while suppressing negative perturbations.
[0034] The method for detecting track surface defects using cross-domain consistent modulation is characterized in that, in step 2, the spectral resampling alignment unit (SRAU) overcomes the suppression of high-frequency details by traditional linear upsampling by constructing the upsampling process as a frequency domain regularization reconstruction problem.
[0035] The SRAU first performs sparse upsampling on the input feature map. This generates an initial high-resolution estimate; subsequently, in the frequency domain, a learnable spectral modulation factor is used. An adaptive reconstruction is performed using a block-based energy equalization strategy to recover high-frequency components and maintain structural consistency; finally, an inverse Fourier transform is used. The modulated spectrum is reconstructed into a spatial feature map, achieving an upsampled output that combines detail preservation with structural stability.
[0036] The method for detecting track surface defects using cross-domain consistency modulation is characterized in that, in step 2, the multi-core sensing mapping module MKPM introduces parallel paths of multi-scale receptive fields to collaboratively perceive local details and global semantics in the feature flow, thereby solving the problem that traditional self-attention mechanisms lack explicit multi-scale structures in defect representation.
[0037] The MKPM employs large-kernel convolution and multiple dilated convolution branches with different dilation rates to perform parallel multi-scale morphological filtering on the input features. The main kernel size k=7, and the kernel sizes of the other three branches are [3, 3, 5], with corresponding dilation rates of [1, 2, 1]. Subsequently, a structure integration technique is introduced to retain the multi-branch structure during the training phase to learn scale priors, and to dynamically fuse the branches into a single forward path during the inference phase, thereby eliminating representational conflicts between multiple scales.
[0038] The method for detecting track surface defects using cross-domain consistent modulation is characterized in that, in step 2, after inputting the training set images, the detection model is trained according to the following formula:
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046] in, Represents the ReLU activation function; Represents shallow spatial characteristics; This represents the semantically enhanced and projected features of deep feature S5; Represents the characteristics of mid-level integration; express Downsampling operation with a convolution stride of 2; This represents a 3-layer stacked MKPM module; This represents the multi-scale features after cross-domain enhancement.
[0047] The beneficial effects of this invention are:
[0048] This invention addresses the challenges of diverse morphologies, large scale differences, and complex background interference in the detection of surface defects in railway steel. It proposes an end-to-end detection model and method based on cross-domain modulation. In the backbone, an echo refinement guidance network (ERG-Net) is designed. An adaptive joint screening module (AJSM) enhances the perception capability of defect regions and mitigates information attenuation of deep features. In the feature fusion stage, a cross-domain modulation fusion (CDMF) architecture is constructed. Frequency domain compensation is performed using a spectrum resampling alignment unit (SRAU) to enhance high-frequency response, and a multi-core perception mapping module (MKPM) is used to construct multi-scale paths in the spatial domain, strengthening the hierarchical representation capability of features. The implementation demonstrates enhanced consistency and effective fusion of cross-domain features. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.
[0050] Figure 1 This is a schematic diagram of the overall structure of the detection model in an embodiment of the present invention.
[0051] Figure 2 This is a schematic diagram of the ERG-Net backbone network structure of the detection model in an embodiment of the present invention.
[0052] Figure 3 This is a schematic diagram of the CDMF architecture of the detection model in an embodiment of the present invention.
[0053] Figure 4 This is a comparison chart of the detection performance of the detection model of this invention with other algorithms.
[0054] Figure 5 This is a heatmap comparison of the detection model of this invention with other algorithms. Detailed Implementation
[0055] 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 some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] Example 1,
[0057] A method for detecting track surface defects using cross-domain uniform modulation, the overall structure of which is as follows: Figure 1 As shown, it includes the echo refinement guidance network ERG-Net, the cross-domain modulation fusion architecture CDMF, and the prediction output network;
[0058] like Figure 2 As shown, the echo refinement guidance network consists of three 3×3 standard convolutional blocks, one max pooling layer, and four cascaded adaptive joint filtering modules (AJSM). Information transmission pathways are constructed between the multiple AJSMs through an echo accumulation mechanism, enabling multi-level information flow and feature enhancement from shallow feature extraction to deep feature refinement.
[0059] The AJSM module first preprocesses the input features through a standard convolutional layer, and then uses point-based convolutional cascades to perform cross-channel information interaction and feature compression. While retaining key information, it reduces channel redundancy to obtain compressed features. The compressed features are then fed into a dual-path perceptual structure. Local branches use GroupConv convolution to capture subtle defects, while global branches use DilatedConv convolution to model wide-area correlations. The dual-path outputs are then concatenated to form multi-scale fused features, which are further resolved through a channel recalibration mechanism to address feature ambiguity between multiple layers.
[0060] Furthermore, the echo accumulation mechanism constructs a multi-level characteristic protection path through the synergy of intra-layer echo and cross-layer echo paths in the four-layer AJSM.
[0061] like Figure 3 As shown, the cross-domain modulation fusion architecture includes a spectrum resampling alignment unit (SRAU) and a multi-core sensing mapping module (MKPM), which perform collaborative modulation and enhancement of features in the frequency domain and spatial domain, respectively.
[0062] The Spectrum Resampling Alignment Unit (SRAU) overcomes the suppression of high-frequency details by constructing the upsampling process as a frequency-domain regularized reconstruction problem.
[0063] The SRAU first performs sparse upsampling on the input feature map. This generates an initial high-resolution estimate; subsequently, in the frequency domain, a learnable spectral modulation factor is used. An adaptive reconstruction is performed using a block-based energy equalization strategy to recover high-frequency components and maintain structural consistency; finally, an inverse Fourier transform is used. The modulated spectrum is reconstructed into a spatial feature map, achieving an upsampled output that combines detail preservation and structural stability.
[0064] The Multi-Kernel Perception Mapping Module (MKPM) introduces parallel paths of multi-scale receptive fields to collaboratively perceive local details and global semantics in the feature flow, thereby solving the problem that traditional self-attention mechanisms lack explicit multi-scale structures in defect representation.
[0065] The MKPM employs large-kernel convolution and multiple dilated convolution branches with different dilation rates to perform parallel multi-scale morphological filtering on the input features. The main kernel size k=7, and the kernel sizes of the other three branches are [3, 3, 5], with corresponding dilation rates of [1, 2, 1]. Subsequently, a structure integration technique is introduced to retain the multi-branch structure during the training phase to learn scale priors, and to dynamically fuse the branches into a single forward path during the inference phase, thereby eliminating representational conflicts between multiple scales.
[0066] Example 2,
[0067] The method for detecting track surface defects using cross-domain consistent modulation is characterized in that, after inputting training set images, the detection model is trained according to the following formula:
[0068]
[0069]
[0070]
[0071]
[0072]
[0073]
[0074]
[0075] in, Represents the ReLU activation function; Represents shallow spatial characteristics; This represents the semantically enhanced and projected features of deep feature S5; Represents the characteristics of mid-level integration; express Downsampling operation with a convolution stride of 2; This represents a 3-layer stacked MKPM module; This represents the multi-scale features after cross-domain enhancement.
[0076] To verify the detection effect of the embodiments of the present invention, a comparative experiment was conducted, using the NEU-DET dataset and the GC10-DET dataset for model training and validation.
[0077] The present invention compares YOLOv8 (G. Jocher, A. Chaurasia, and J. Qiu, "Ultralyticsyolov8," 2023. [Online]. Available: https: / / github.com / ultralytics / ultralytics); YOLOv9 (Wang CY, Yeh IH, Mark Liao H Y. Yolov9: Learning what you want to learn using programmable gradient information[C] / / Europeanconference on computer vision. Cham: Springer Nature Switzerland, 2024: 1-21); YOLOv10 (Wang A, Chen H, Liu L, et al. Yolov10: Real-time end-to-endobject detection[J]. Advances in Neural Information Processing Systems, 2024,37: 107984-108011); YOLOv11(Khanam R, Hussain M. Yolov11: An overview of the keyarchitectural enhancements[J]. arXiv preprint arXiv:2410.17725, 2024);YOLOv12(Tian Y, Ye Q, Doermann D. Yolov12: Attention-centric real-time objectdetectors[J]. arXiv preprint arXiv:2502.12524, 2025);IMPACT-Net (Wu R, ZhangY, Lan R, et al. Impact-Net: An Integrated Multi-Scale and Computation-Efficient Timely Network for Surface Defect Detection in Industrial EmbeddedSystems[J]. Available at SSRN 5257434);GC-Net (Liu G, Chu M, Gong R, et al.Global attention module and cascade fusion network for steel surface defectdetection[J]. Pattern Recognition, 2025, 158: 110979);DFSDNet(Wan F, Zhang G,Li Z. DFSDNet: A dual-branch multi-scale feature fusion network for surfacedefect detection of copper strips and plates[J]. Computers in Industry, 2025,167: 104265);CBH-YOLO (Gao B, Tong J, Fu R R, et al. CBH-YOLO: A steelsurface defect detection algorithm based on cross-stage mamba enhancement andhierarchical semantic graph fusion[J].Neurocomputing, 2025: 131467);RT-DETR(Zhao Y, Lv W, Xu S, et al. Detrs beat yolos on real-time object detection[C] / / Proceedings of the IEEE / CVF conference on computer vision and patternrecognition. 2024: 16965-16974);RAP-DETR (Xie H, Zhou H, Chen R, et al. RAP-DETR: Enhancing RT-DETR for Railway Track Defect Detection[J]. Measurement,2025: 119058);. Ms-LSSD (Duan B, Wang D, Ma Y, et al. Multisource data-drivenintelligent method for detecting surface defects in cold-rolled copper strips[J]. Engineering Applications of Artificial Intelligence, 2025, 152:110730.); TSKD (Wen Z, Liu J, Zhao H, et al. A triple semantic-aware knowledgedistillation network for industrial defect detection[J]. Computers in Industry, 2025, 166: 104252); MDCA-DETR (Lin Y, Pan S, Yu J, et al. MDCA-DETR: DETR with multi-channel deformable convolution and coordinate attention for mini-LED wafer surface defects detection[J]. Optics and Lasers inEngineering, 2025, 193: The detection results of the classic mainstream object detection network (109082) were compared objectively using the average accuracy (mAP50 / mAP50:95), number of parameters (Params), and model complexity (FLOPs). The comparison results are shown in Table 1 and Table 2.
[0078] Table 1 Comparison of detection results of different models on NEU-DET
[0079] Table 1 compares the overall performance of the embodiments of the present invention with various classic and cutting-edge detection models. The mAP50 and mAP50:95 of the embodiments of the present invention reach 80.4% and 46.7% respectively, achieving higher detection accuracy compared to similar DETR series models (e.g., RT-DETR, RAP-DETR), while requiring only 12.4M parameters and 34.4G FLOPs, presenting a reasonable balance between accuracy and complexity. Compared with CNN-based detection models (such as YOLOv12, CBH-YOLO, etc.), the embodiments of the present invention also demonstrate greater robustness in overall detection accuracy and multi-class recognition consistency.
[0080] From the results of category segmentation, the embodiments of the present invention maintain a high detection level in most defect categories (such as In, Sc, and Rs), especially showing stable performance in low-contrast or complex texture scenes, indicating that its semantic enhancement and noise suppression mechanisms are effective. Although the AP in some categories (such as Cr and Ps) is slightly lower than that of some comparative models, the performance fluctuations of the embodiments of the present invention are small across categories, and the overall detection balance is more prominent.
[0081] Table 2 Comparison of detection results of different models on GC10-DET
[0082] To further verify the model's cross-scene generalization ability, generalization experiments were conducted on the GC10-DET dataset. As shown in Table 10, although some CNN models achieved high AP values in specific categories, their overall accuracy fluctuated significantly. In contrast, the Transformer-based method exhibited higher stability. Among them, the embodiment of this invention achieved excellent overall performance with 69.5% mAP50 and 36.6% mAP50:95.
[0083] From the perspective of subcategories, the embodiments of the present invention perform well in most categories (Wl, In, Cr). Although there is still room for improvement in some categories with complex morphology or sparse sample distribution (such as Rp, Wf), the overall performance fluctuation is less than that of other comparative methods. This indicates that the embodiments of the present invention can effectively balance the feature representation of different categories and have excellent robustness in complex industrial scenarios.
[0084] like Figure 4As shown, typical defect samples covering different scales, shapes, and background complexities were selected, and a qualitative comparison was made between the embodiments of the present invention and several mainstream detection models. The results show that traditional YOLO series models perform well on larger or more textured defects, but are prone to false positives and false negatives in complex backgrounds or scenes with small defects. DETR series models improve detection stability by modeling the global context through self-attention, but still have limitations in boundary localization and fine-grained recognition of weak-contrast defects. In contrast, the embodiments of the present invention demonstrate more balanced visual detection capabilities in the test samples: they can accurately identify small, low-contrast defects and maintain a low false positive rate even in complex backgrounds, while the generated detection boxes are more accurate in boundary localization than other methods. These qualitative results demonstrate that the embodiments of the present invention can maintain stable and reliable detection performance in various challenging scenarios.
[0085] To further understand the model's internal decision-making mechanism, Grad-CAM technology was used to generate feature heatmaps. In typical complex scenarios, the embodiments of this invention were visually compared with two mainstream benchmark models, YOLOv11 and RT-DETR. Figure 5 As shown, the Grad-CAM visualization results under different scenarios reveal the differences in feature focus among the various models. For complex textures and high-detail samples (a), the feature response of the present invention is highly concentrated in the real defect area, while the contrasting model exhibits response fragmentation. In samples with blurred boundaries and low contrast (b), the present invention can capture weak features and achieve accurate localization, while the attention distribution of the contrasting model is more diffuse. For small-sized, difficult-to-detect internal defects (c), the present invention can still accurately identify and locate tiny targets, with its heatmap showing clear focus and minimal interference, while other models exhibit localization bias.
[0086] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A method for detecting track surface defects using cross-domain consistent modulation, characterized in that, Includes the following steps: Step 1: Construct a dataset for detecting surface defects in rail steel; The defects in the defect detection dataset include cracks, scratches, punch holes, and dents. The defect detection dataset is randomly divided into a training set, a validation set, and a test set in an 8:1:1 ratio. Defect images are identified, and their geometric, texture, and grayscale features are extracted and parameterized to construct the initial feature tensor for the model input. ; Step 2: Use the training set as input to train the track surface defect detection model; The track surface defect detection model includes an echo refinement-guided backbone network ERG-Net, a cross-domain modulation fusion architecture CDMF, and a prediction output network. Addressing the insufficient multi-scale representation caused by semantic attenuation of deep network features in track surface defect detection, the input feature tensor is fed into ERG-Net. Multi-level information enhancement is achieved through an adaptive joint filtering module (AJSM) and an echo accumulation mechanism. First, the input features are modeled using three cascaded 3×3 convolutional blocks. Then, after downsampling by a max-pooling layer, they are fed into a four-layer cascaded AJSM for depth filtering and refinement. Finally, multi-scale feature maps {S3, S4, S5} at different semantic levels are output, encoding the edge texture details, morphological contour structure, and deep semantic category information of the defect, respectively. To address the feature domain drift problem caused by the suppression of high-frequency details due to the self-attention smoothing effect during defect detection, the multi-scale feature map set {S3, S4, S5} is input into the cross-domain modulation fusion architecture CDMF. Using the third and fourth feature layers output from ERG-Net as input, the deep feature S5 is first processed sequentially with input projection convolution, global attention interaction (AIFI), and side-connection convolution to obtain semantically enhanced features. Then, frequency domain detail recovery upsampling is performed through the spectral resampling alignment unit (SRAU), and the result is concatenated and fused with the projection result of the mid-layer feature S4. This fusion is then processed by the multi-kernel perceptual mapping module (MKPM) to output the first fused feature. The first fused feature is processed in the frequency domain by SRAU and then concatenated with the projection result of the shallow feature S3. After processing by MKPM, the second fused feature is output. The second fused feature is downsampled and concatenated with the first fused feature. The third fused feature is output by MKPM. The third fused feature is downsampled again and concatenated with the deep side feature. The fourth fused feature is output by MKPM. Through the above multi-level feature fusion, a frequency domain feature matrix and a spatial domain feature matrix are constructed for each layer of features. SRAU is used to perform high-frequency information compensation in the frequency domain, and MKPM is used to perform multi-scale parallel filtering in the spatial domain. Multi-level cross-layer connection is used to obtain the fused feature with spatial-frequency synergistic enhancement. The cross-domain enhanced fusion features are input into the detection head, which interactively decodes the learnable object query and encoded features to output the category probability distribution and bounding box location information of the track surface defects. Step 3: Training effect verification; Use the validation set to verify the training effect of the recognition model; Step 4: Test set testing; Use the test set to test the track surface defect detection model that performs well on the validation set, output the identification results of track steel defects, and analyze the test effect from subjective and objective indicators.
2. The method for detecting track surface defects using cross-domain consistent modulation according to claim 1, characterized in that, In step 2, for the t-th level AJSM module given in ERG-Net, the input... By introducing pointwise convolutional cascades for cross-channel information interaction and feature compression, key information is preserved while channel redundancy is reduced. ; Next, a dual-path perceptual structure is used for feature selection. GroupConv is used to extract local details and DilatedConv to model contextual semantics. The two outputs are concatenated to form multi-scale joint features. ; The module further introduces a channel recalibration mechanism to generate channel attention weights s, adaptively calibrate the fused features, and finally output the refined features: ; in, This indicates channel-by-channel multiplication. and For different fully connected layer weights, and These represent the ReLU and Sigmoid functions, respectively.
3. The method for detecting track surface defects using cross-domain consistent modulation according to claim 1, characterized in that, In step 2, the echo accumulation mechanism constructs a multi-level feature protection path through the synergy of intra-layer echo residuals and cross-layer echo residual paths in the four-layer AJSM. Intra-layer echoes are transmitted to the output by embedding skip connections within the AJSM, allowing the input to bypass its core dual-path transformation structure. ; in, This represents a local joint feature transformation that preserves the local texture of minute defects; Cross-layer echo constructs cross-level identity mapping, fusing the original input with the AJSM output to achieve long-range pass-through of shallow structural information to deep semantic space: ; in, The composite nonlinear transformation representing AJSM; its overall output can be expressed as: ; in, This represents the ReLU function, designed to introduce nonlinear modeling capabilities while suppressing negative perturbations.
4. The method for detecting track surface defects using cross-domain consistent modulation according to claim 1, characterized in that, In step 2, the Spectrum Resampling Alignment Unit (SRAU) overcomes the suppression of high-frequency details by constructing the upsampling process as a frequency domain regularization reconstruction problem. The SRAU first performs sparse upsampling on the input feature map. This generates an initial high-resolution estimate; subsequently, in the frequency domain, a learnable spectral modulation factor is used. An adaptive reconstruction is performed using a block-based energy equalization strategy to recover high-frequency components and maintain structural consistency; finally, an inverse Fourier transform is used. The modulated spectrum is reconstructed into a spatial feature map, achieving an upsampled output that combines detail preservation with structural stability.
5. The method for detecting track surface defects using cross-domain consistent modulation according to claim 1, characterized in that, In step 2, the multi-core perceptual mapping module MKPM introduces parallel paths of multi-scale receptive fields to collaboratively perceive local details and global semantics in the feature flow, thereby solving the problem that traditional self-attention mechanisms lack explicit multi-scale structures in defect representation. The MKPM employs large-kernel convolution and multiple dilated convolution branches with different dilation rates to perform parallel multi-scale morphological filtering on the input features. The main kernel size k=7, and the kernel sizes of the other three branches are [3, 3, 5], with corresponding dilation rates of [1, 2, 1]. Subsequently, a structure integration technique is introduced to retain the multi-branch structure during the training phase to learn scale priors, and to dynamically fuse the branches into a single forward path during the inference phase, thereby eliminating representational conflicts between multiple scales.
6. The method for detecting track surface defects using cross-domain uniform modulation according to claim 1, characterized in that, In step 2, after inputting the training set, the track surface defect detection model is trained according to the following formula: ; in, Represents the ReLU activation function; Represents shallow spatial characteristics; This represents the semantically enhanced and projected features of deep feature S5; Represents the characteristics of mid-level integration; express Downsampling operation with a convolution stride of 2; This represents a 3-layer stacked MKPM module; This represents the multi-scale features after cross-domain enhancement.