Dynamic multi-scale and texture perception enhancement framework and track defect detection model thereof
By using a dynamic multi-scale and texture-aware enhancement framework (DMT) combined with DSP, TCE, and BBA modules, the problems of easy missed detection of small targets and easy false detection of fuzzy targets in track defect detection are solved, thereby improving the accuracy and efficiency of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LANZHOU JIAOTONG UNIV
- Filing Date
- 2025-12-18
- Publication Date
- 2026-05-01
AI Technical Summary
Existing track defect detection methods are prone to missing or false detection when dealing with small or fuzzy targets. Furthermore, traditional methods are inefficient, costly, and difficult to effectively identify various defects in railway tracks in complex environments.
A dynamic multi-scale and texture-aware enhancement framework (DMT) is adopted, which enhances the model's ability to perceive small and blurred targets through a dynamic scale pooling module (DSP), a texture contrast enhancement module (TCE), and a fuzzy edge perception module (BBA). The DMT-YOLOv8 track defect detection model is constructed by combining the YOLOv8 algorithm.
It significantly improves the accuracy and efficiency of track defect detection, reduces the false detection rate of small targets and the false detection rate of fuzzy targets, and improves the model's detection performance in complex backgrounds.
Smart Images

Figure CN121963164A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway track safety operation technology, and in particular to a track defect detection framework for small and fuzzy targets, specifically a dynamic multi-scale and texture perception enhancement framework and its track defect detection model. Background Technology
[0002] For a long time, the operational safety of railway tracks has been a key concern in the transportation sector. With the development of railway transportation systems, cracks inevitably appear in the rails during long-term service. [1] Various defects such as wear and corrosion seriously threaten the stability and safety of train operation. [2] Because railway lines are typically long and widely distributed, traditional manual inspection methods are not only inefficient and costly, but also highly subjective and pose safety hazards. [3] To improve detection efficiency and accuracy, researchers are gradually introducing automation and intelligent technologies into track inspection systems and are continuously exploring more precise methods for detecting track defects. [4] .
[0003] Early orbit detection technologies primarily relied on physical methods, such as composite electromagnetic methods. [5] Vibration signal [6] These methods, while effective in specific environments, are limited by fixed equipment and applicability, making large-scale deployment difficult. With the development of computer vision and image processing technologies, image-based track defect detection methods have emerged. Early image detection methods primarily employed manual feature extraction techniques such as wavelet transform, edge detection, and threshold segmentation. [7] However, these methods lack an understanding of high-level image semantics, and often perform poorly when faced with complex environmental interference or blurred targets. [8] .
[0004] In recent years, the rapid development of deep learning technology has provided new solutions for track defect detection. Object detection methods based on convolutional neural networks (CNNs) are one such approach. [9-11] This paper describes an algorithm that learns high-level semantic features from images using an end-to-end approach, achieving excellent performance in multi-object detection tasks. However, when applied to the field of track defect detection, this type of algorithm still faces some practical difficulties: on the one hand, track defects are often characterized by a wide variety of types and large size differences, and smaller defects such as cracks and corrosion are easily missed. [12-15] On the other hand, defects such as wear and tear, and extrusion often have characteristics such as blurred boundaries, indistinct texture changes, and low contrast, making them easily misjudged as background information. [8,16-17] .
[0005] To address the aforementioned issues, some studies have attempted to introduce attention mechanisms.[18-20] With multi-scale structures [21-24] To enhance the model's perception capabilities, existing research still has the following shortcomings: (1) In existing feature extraction modules, due to the small number of pixels occupied, minor defects are easily lost or weakened during the network downsampling stage.
[25] (2) The recognition effect of edge-blurred defects depends on their edge clarity, but current research often lacks methods for processing weak edges and weak textures.
[26] This can lead to false positives and false negatives. Summary of the Invention
[0006] This invention provides a Dynamic Multi-scale & Texture-aware Enhancement Framework (DMT) and its orbital defect detection model. It is an orbital defect detection framework for small and ambiguous targets, which improves the detection network's ability to perceive small and ambiguous edge targets in the orbital defect domain.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0008] A dynamic multi-scale and texture-aware enhancement framework is proposed. This framework is a dynamic scale pooling module (DSP) that introduces a channel grouping mechanism to achieve differentiated modeling of channel focus and reduce feature interference between channels. It also introduces a multi-scale dilated convolution mechanism to enhance the representation of small target features. Details are as follows:
[0009] The input feature map is represented as: Where C, H, and W are the number of channels, height, and width, respectively; then the grouping strategy is as shown in equation (1):
[0010] (1)
[0011] In the formula, N is the preset group size. For a subset of the input features, we have ;
[0012] Next, dilated convolution operations with different dilation rates are applied to the feature maps in each subset, as shown in Equation (2):
[0013] (2)
[0014] In the formula The output feature map is denoted by c, where c is the channel index. Where k is the spatial channel and k is the kernel size, These are the convolutional kernel weights corresponding to this group. The expansion rate used for this group;
[0015] After completing the grouped dynamic dilated convolution, each group outputs... The input is stitched together along the channel dimension to form a fused input. Then, channel compression and information aggregation are achieved through 1×1 convolution operations, and a fused feature map is output. The specific operations are shown in equations (3) and (4):
[0016] (3)
[0017] (4)
[0018] In subsequent stages, a lightweight channel attention mechanism, ECA, is introduced to enhance the responsiveness of critical channels;
[0019] After ECA enhancement, its output is residually concatenated with the original input. Subsequently, the residual result is processed sequentially through a BN layer and a ReLU activation function to finally generate the output feature map of the module. ECA and subsequent operations can be expressed by formula (5):
[0020] (5)
[0021] In the formula, + indicates residual connection.
[0022] A dynamic multi-scale and texture-aware enhancement framework is proposed, comprising a texture contrast enhancement module (TCE). This TCE employs a dual-branch structure, constructing local and global branches in parallel to capture subtle abrupt changes and contextual information, respectively. Subsequently, difference modeling generates texture contrast maps to extract salient texture features, guiding the backbone network to more accurately focus on potential defects in blurred regions. First, parallel local and global texture extraction branches are constructed, employing convolutional kernels of different scales: 3×3 and 5×5, to process the input feature maps. Perform convolution operations to extract local texture response features. Features corresponding to global texture Next, a texture difference map between the two is constructed. The implementation details are shown in equations (6)-(8):
[0023] (6)
[0024] (7)
[0025] (8)
[0026] Subsequently, after differential modeling, an encoding structure consisting of 1×1 convolutions, BN layers, and ReLU activation functions is introduced, as shown in equation (9).
[0027] (9)
[0028] Based on this, the ECA module is integrated to further construct a texture-guided weight map. Then, the weight map is fused with the original input features through element-wise multiplication, as shown in Equation (10):
[0029] (10)
[0030] In the formula This indicates element-wise multiplication.
[0031] A dynamic multi-scale and texture-aware enhancement framework, namely the fuzzy edge perception module BBA, is proposed. This BBA enhances the boundary features of fuzzy boundary regions in the feature map by introducing a weak edge guidance mechanism and edge attention modeling, thereby improving the model's boundary discrimination ability in complex backgrounds. The BBA module consists of two complementary branches: an edge perception branch and a spatial attention branch. The former captures the boundary information of fuzzy regions, while the latter highlights these regions through an attention mechanism. The edge perception branch responds to the input X. c Compression is performed along the channel dimension to obtain the single-channel feature mean map, as shown in Equation (11):
[0032] (11)
[0033] Next, analyze the mean plot G. Avg The Sobel operator is applied to calculate the image gradient changes, and the edge change regions are extracted to obtain candidate edge response maps, as shown in Equation (12):
[0034] (12)
[0035] This response map can be used to characterize the possible location regions of fuzzy defects as an edge-guided prior.
[0036] Secondly, there is the spatial attention branch, which focuses on the input features. Figure X c Applying average pooling and max pooling operations along the channel dimension yields two single-channel feature maps G. Avg With G Max After concatenation, the data is fed into a 7×7 convolutional layer for feature integration; then, a BN layer and a sigmoid activation function are used to generate a spatial attention map A. spatial The specific implementation is shown in equations (13)-(15):
[0037] (13)
[0038] (14)
[0039] (15)
[0040] Finally, the edge response map E sobel Spatial attention map A spatial Element-wise multiplication and fusion are performed to construct the final edge-guided weight graph A. edge This is used to weight and enhance the original feature map, thereby enhancing the saliency of the edge region; as shown in equations (16) and (17):
[0041] (16)
[0042] (17).
[0043] A dynamic multi-scale and texture-aware enhancement framework for track defect detection is proposed. YOLOv8 is selected as the baseline algorithm. The three feature enhancement modules—DSP, TCE, and BBA—are embedded individually, in pairs, or simultaneously into the YOLOv8 backbone network to construct the track defect detection model DMT-YOLOv8. The DSP, TCE, and BBA are embedded into different layers of the backbone: DSP is located between P1 and P2, TCE between P2 and P3, and BBA between P4 and P5. In the overall framework, the DSP, TCE, and BBA modules function sequentially from shallow to deep: DSP preserves fine-grained features of small targets through early enhancement, providing more complete basic information for subsequent modules; TCE models local and global texture differences based on features passed from DSP in the middle layer, providing texture cues for subsequent boundary perception; BBA, located in the mid-to-deep feature map, further enhances the expression of boundary structures after fusing texture and spatial information from previous layers.
[0044] The main contributions of this invention are as follows:
[0045] (1) To address the issues of small targets being easily missed and fuzzy targets being easily falsely detected in track defect detection, a dynamic multi-scale and texture perception enhancement framework (DMT) is proposed, providing a systematic solution for detection in complex defect scenarios.
[0046] (2) Based on the DMT framework, three lightweight modules were designed: Dynamic Scale-aware Pooling (DSP), Texture Contrast Enhancement (TCE), and Blurred Boundary Awareness (BBA). Dynamic scale modeling, texture contrast modeling, and weak edge guidance mechanisms were introduced respectively, which effectively improved the network's ability to represent small targets and blurred defects.
[0047] (3) A track defect detection model, DMT-YOLOv8, was constructed based on YOLOv8, and experiments were conducted on a real track defect dataset to verify the effectiveness of the proposed framework and modules. At the same time, cross-dataset extended experiments further demonstrated the applicability and generalization ability of the method in different domain tasks. Attached Figure Description
[0048] Figure 1 This is a schematic diagram of the network structure of the DSP module of the present invention;
[0049] Figure 2 This is a schematic diagram of the ECA network structure;
[0050] Figure 3 This is a schematic diagram of the TCE module network structure of the present invention;
[0051] Figure 4 This is a schematic diagram of the network structure of the BBA module of the present invention;
[0052] Figure 5 This is a diagram of the DMT-YOLOv8 model architecture of the present invention;
[0053] Figure 6 This is a comparison chart of the PR curves of different algorithms in this invention;
[0054] Figure 7 This invention provides a visual comparison of the detection results of different detection algorithms on a track defect dataset.
[0055] Figure 8 This is a visualization of the results of this invention on the RSDD dataset;
[0056] Figure 9 This is a visualization of the results of this invention on the GC10-DET dataset;
[0057] Figure 10 This is a visualization of the results of this invention on the Rail-1118 dataset. Detailed Implementation
[0058] The invention will be further explained below with reference to the accompanying drawings, both theoretically and experimentally.
[0059] 1. Theoretical Derivation Explanation
[0060] First, the overall design concept of the Dynamic Multi-scale & Texture-aware Enhancement Framework (DMT) is introduced. Then, the structure and function of the three modules DSP, TCE and BBA are explained in turn. Finally, the DMT-YOLOv8 track defect detection model based on YOLOv8 is constructed.
[0061] 1.1 Overview of DMT Framework
[0062] Track defect detection faces challenges such as the easy loss of small targets, indistinct weak textures, and difficulty in distinguishing blurred boundaries. To systematically alleviate these problems, this invention proposes a Dynamic Multi-Scale and Texture-Aware Enhancement (DMT) framework. This framework aims to enhance the detection network at the feature modeling level, improving the ability to recognize small and blurred targets through multi-dimensional perceptual optimization. Specifically, DMT consists of three core dimensions:
[0063] (1) Dynamic scale modeling: To address the problem of feature dilution and semantic loss that small targets are prone to during downsampling, the receptive field is adaptively adjusted to enhance their expression in deep features;
[0064] (2) Texture contrast enhancement: For areas with blurred or low contrast such as wear and corrosion, highlight the texture differences and avoid them being misjudged as background;
[0065] (3) Boundary awareness: For fuzzy edge defects, the network’s ability to model spatial structure is enhanced and complements the texture enhancement.
[0066] Through the synergistic optimization of the above three dimensions, the DMT framework provides a systematic solution for the detection of small and fuzzy targets in track defect detection.
[0067] 1.2 Dynamic Scale-aware Pooling (DSP) Module
[0068] In typical object detection networks, the feature extraction module constructs features through multi-layer downsampling and semantic abstraction. Due to the small number of pixels involved, small objects are easily lost or weakened during the network downsampling stage, leading to missed detections later. Furthermore, conventional convolutional operations share the receptive field across all channels, lacking the ability to model structural differences, further weakening the expressive power of small objects.
[0069] To enhance the model's ability to perceive defects in small targets, this invention proposes a Dynamic Scale Pooling (DSP) module based on the DMT framework: It introduces a channel grouping mechanism to achieve differentiated modeling of channel focus and reduce feature interference between channels; and it introduces a multi-scale dilated convolution mechanism to strengthen the representation of small target features. The structure of the DSP module is as follows: Figure 1 As shown.
[0070] Figure 1 In this context, the input feature map (Input) can be represented as... Where C, H, and W are the number of channels, height, and width, respectively; then the grouping strategy is as shown in equation (1):
[0071] (1)
[0072] In the formula, N is the preset group size. For a subset of the input features, we have ;
[0073] Next, dilated convolution operations with different dilation rates are applied to the feature maps in each subset, as shown in Equation (2):
[0074] (2)
[0075] In the formula The output feature map is denoted by c, where c is the channel index. For spatial passage, The kernel size is [size]. These are the convolutional kernel weights corresponding to this group. The expansion rate used for this group;
[0076] After completing the grouped dynamic dilated convolution, each group outputs... The input is stitched together along the channel dimension to form a fused input. Then, channel compression and information aggregation are achieved through 1×1 convolution operations, and a fused feature map is output. The specific operations are shown in equations (3) and (4):
[0077] (3)
[0078] (4)
[0079] In subsequent stages, a lightweight channel attention mechanism, ECA, is introduced to enhance the responsiveness of critical channels; the network structure of ECA is as follows: Figure 2 As shown.
[0080] After ECA enhancement, its output is residually concatenated with the original input. Subsequently, the residual result is processed sequentially through a BN layer and a ReLU activation function to finally generate the output feature map of the module. ECA and subsequent operations can be expressed by formula (5):
[0081] (5)
[0082] In the formula, + indicates residual connection.
[0083] By introducing channel grouping and multi-scale convolution, the DSP module effectively alleviates the problems of sparse features and competitive interference of small targets while keeping computational overhead under control, and significantly improves the quality of feature representation.
[0084] 1.3 Texture Contrast Enhancement (TCE) Module
[0085] In railway track defect detection, defects such as wear and corrosion often have blurred boundaries and subtle texture variations. Conventional detection networks struggle to accurately model local abrupt changes in these areas, easily misinterpreting them as background information and leading to missed detections.
[0086] To address this, this invention proposes a Texture Contrast Enhancement (TCE) module based on the DMT framework. It employs a dual-branch structure, constructing local and global branches in parallel to capture subtle abrupt changes and contextual information, respectively. Subsequently, it generates texture contrast maps through difference modeling, extracting significant texture features to guide the backbone network to more accurately focus on potential defects in blurred regions. The TCE module structure is as follows: Figure 3 As shown.
[0087] First, parallel local and global texture extraction branches are constructed, using convolutional kernels of different scales: 3×3 and 5×5, to extract the input feature maps. Perform convolution operations to extract local texture response features. Features corresponding to global texture Next, a texture difference map between the two is constructed. The implementation details are shown in equations (6)-(8):
[0088] (6)
[0089] (7)
[0090] (8)
[0091] It should be noted that the input feature map in the formula It is not necessarily located on the same layer as the input in the DSP module. The same notation is used here for the sake of symbol consistency and concise expression. If similar situations occur in the following text, they will not be repeated.
[0092] Subsequently, after differential modeling, an encoding structure consisting of 1×1 convolutions, BN layers, and ReLU activation functions is introduced. This structure can effectively compress channel redundancy and highlight the target edge region, as shown in Equation (9).
[0093] (9)
[0094] Based on this, the ECA module is integrated to further construct a texture-guided weight map. Then, the weight map is fused with the original input features through element-wise multiplication, as shown in Equation (10):
[0095] (10)
[0096] In the formula This indicates element-wise multiplication.
[0097] The TCE module effectively enhances the network's representation ability in blurred regions by modeling texture differences through local-global contrast; it has a simple structure, low computational overhead, and good versatility and generalization ability.
[0098] 1.4 Blurred Boundary Awareness (BBA) Module
[0099] Building upon the TCE module, a fuzzy edge perception module (BBA) is further designed. By introducing a weak edge guidance mechanism and edge attention modeling, it enhances the boundary features of fuzzy boundary regions in the feature map, thereby improving the model's boundary discrimination ability in complex backgrounds. Unlike TCE, which focuses on texture perception, BBA emphasizes boundary contour information, and the two complement each other functionally. The BBA network structure is as follows: Figure 4 As shown.
[0100] The BBA module consists of two complementary branches: an edge-aware branch and a spatial attention branch. The former captures boundary information of blurred regions, while the latter highlights these regions through an attention mechanism. We will first introduce the edge-aware branch, which focuses on the input X. c Compression is performed along the channel dimension to obtain the single-channel feature mean map, as shown in Equation (11):
[0101] (11)
[0102] Next, analyze the mean plot G. Avg The Sobel operator is applied to calculate the gradient changes in the image, extract the edge change regions, and obtain candidate edge response maps. Specifically, in the BBA module, we use Sobel operators in both horizontal and vertical directions to cover different orientations of track defects. The operator uses a fixed 3×3 convolution kernel to calculate the gradient responses in the x and y directions respectively, and obtains the final edge response map by taking the square root of the sum of squared gradients. As shown in Equation (12):
[0103] (12)
[0104] This response map can be used to characterize the possible location regions of fuzzy defects as an edge-guided prior.
[0105] Secondly, there is the spatial attention branch, which focuses on the input features. Figure X c Applying average pooling and max pooling operations along the channel dimension yields two single-channel feature maps G. Avg With G MaxAfter concatenation, the data is fed into a 7×7 convolutional layer for feature integration; then, a BN layer and a sigmoid activation function are used to generate a spatial attention map A. spatial The specific implementation is shown in equations (13)-(15):
[0106] (13)
[0107] (14)
[0108] (15)
[0109] Finally, the edge response map E sobel Spatial attention map A spatial Element-wise multiplication and fusion are performed to construct the final edge-guided weight graph A. edge This is used to weight and enhance the original feature map, thereby enhancing the saliency of the edge region; as shown in equations (16) and (17):
[0110] (16)
[0111] (17).
[0112] The BBA module integrates edge-guided priors and spatial attention to construct an edge-guided weight map with structure awareness, which can effectively improve the detection performance for fuzzy boundaries.
[0113] 1.5 DMT-YOLOv8 Track Defect Detection Model Based on YOLOv8
[0114] To verify the effectiveness of the module in this invention, YOLOv8 was selected as the benchmark algorithm. The three feature enhancement modules—DSP, TCE, and BBA—were embedded individually, in pairs, or simultaneously into the YOLOv8 backbone network to construct the track defect detection model DMT-YOLOv8. After multiple rounds of comparative experiments, the optimal integration method was finally determined as follows: Figure 5 As shown.
[0115] like Figure 5As shown, the designed modules are embedded in different layers of the backbone: DSP is located between P1 and P2, TCE between P2 and P3, and BBA between P4 and P5. In the overall framework, the DSP, TCE, and BBA modules function sequentially from shallow to deep: DSP enhances and preserves fine-grained features of small targets in the early stages, providing more complete basic information for subsequent modules; TCE models local and global texture differences based on features passed from DSP in the mid-level stage, providing texture cues for subsequent boundary perception; BBA, located in the mid-to-deep feature maps, further strengthens the expression of boundary structures after fusing texture and spatial information from previous layers. These three modules form a progressive relationship from detail to semantics in the information flow, enabling synergistic optimization of feature enhancement, texture modeling, and boundary perception processes. This layout balances the complementarity of shallow detail preservation, mid-level texture enhancement, and deep boundary reinforcement, achieving overall performance improvement without changing the detector head structure.
[0116] 2. Experimental Results and Analysis
[0117] The effectiveness of the module of this invention will be verified through comparative experiments. All experiments were implemented on the Windows 11 operating system and PyTorch framework, and were conducted in a laptop environment equipped with an Intel i9-14900HX processor and an NVIDIA RTX 4060 GPU.
[0118] 2.1 Dataset
[0119] This invention uses the Railway Dataset, an open-source dataset from the RoboFlow platform.
[27] As experimental data, the dataset contains 829 images covering 8 common track defects: crush, dent, scratch, slant, damage, dirt, gap, and unknown.
[0120] To ensure robustness of the evaluation, the dataset was divided into a training set (663 images) and a validation set (166 images) in an 8:2 ratio. During model training, the YOLO series algorithms have built-in a variety of data augmentation strategies, including random scaling, flipping, and color perturbation. This invention mainly adopts its default augmentation scheme and does not introduce additional offline data augmentation.
[0121] 2.2 Evaluation Indicators
[0122] This invention selects precision, recall, F1 score, mAP@0.5, and mAP@0.5:0.95 as the main evaluation metrics to comprehensively measure the model's detection accuracy, localization precision, and small target recognition capability in the track defect detection task. Considering that track defects are mostly small to medium-scale targets, and most defects themselves have fuzzy characteristics, no additional independent evaluation metrics for small targets or fuzzy targets are introduced.
[0123] Precision represents the proportion of samples that are actually defects among those judged as positive (defects) by the model; recall represents the proportion of all real defects that are successfully detected by the model. The formulas for calculating precision (18) and recall (19) are as follows:
[0124] (18)
[0125] (19)
[0126] In the formula, TP, FP, and FN represent true positive, false positive, and false negative, respectively.
[0127] The F1 score is the harmonic mean of precision and recall, used to comprehensively evaluate the detection accuracy and coverage of the model. The calculation formula (20) is as follows:
[0128] (20)
[0129] Mean precision (AP) is the area under the precision-recall curve. For multi-class detection tasks, mAP (mean Average Precision) represents the average AP value across all classes. The formulas for calculating AP and mAP are shown in (21) and (22):
[0130] (twenty one)
[0131] (twenty two)
[0132] In the formula, P(R) represents the precision when the recall is R, N represents the total number of categories, and AP i Let be the average precision of the i-th class.
[0133] 2.3 Ablation Experiment
[0134] To determine the impact of the number of groups N in the DSP on algorithm performance, comparative experiments were conducted with N=[2,4,8], and the results are shown in Table 1. The table shows that when the number of groups N=4, the model achieves the best performance in Precision, Recall, F1, and mAP metrics, indicating a good balance between feature grouping and inter-group information interaction. When the number of groups is N=2, the feature extraction capability is insufficient, leading to a decrease in detection accuracy and recall; while when the number of groups is N=8, inter-group feature interaction is limited, resulting in a slight decline in overall performance. Therefore, subsequent experiments will uniformly use N=4 as the default configuration.
[0135] Similarly, to determine the impact of different kernel sizes *k* on the algorithm performance in the ECA module, this invention selected *k*=[3,5,7] for comparative experiments, and the results are shown in Table 2. The experimental results show that when *k*=3, the model achieves the best performance in Precision, Recall, F1, and mAP metrics, indicating that smaller local kernels can more effectively model the correlation between channels. When *k* is further increased, the attention range becomes too wide, leading to smoothing of channel responses and a decrease in the model's sensitivity to detailed features, thus causing performance degradation. Therefore, subsequent experiments uniformly use *k*=3 as the default configuration for the ECA module.
[0136] Table 1. Effect of different group numbers N on the detection performance of DMT-YOLOv8
[0137]
[0138] Table 2. Impact of different K values in the ECA module on the detection performance of DMT-YOLOv8
[0139]
[0140] To verify the independent contributions and synergistic effects of the three proposed modules, this invention embeds the DSP, TCE, and BBA modules one by one into the YOLOv8 baseline model, and further tests the impact of different combinations on detection performance. Considering that ambiguity is widespread in the field of track defects, and that small and medium-sized defects are the main defect type, separate small target and ambiguity target indices are not established. The results are shown in Table 3.
[0141] Table 3. Impact of different module combinations on detection performance
[0142]
[0143] As shown in Table 3, the designed modules effectively improve the overall performance of the model in track defect detection tasks, both when used individually and in combination. Furthermore, except for the TCE module, the other modules have almost no impact on the number of parameters or processing speed, and the overall computational cost of the model remains stable, fully demonstrating the lightweight characteristics of the designed modules.
[0144] In Table 3, Params(M) represents the number of parameters, and FPS represents the computation speed, which is used to demonstrate the lightweight characteristics of the module.
[0145] In the single-module experiments, the DSP module effectively improved the model's ability to detect small targets, resulting in a 4.9% improvement in recall compared to the baseline model, demonstrating its effectiveness in reducing false negatives. The TCE module, through differential modeling of local and global texture information, achieved stable improvements in both precision and recall, demonstrating its strong universal enhancement capabilities. The BBA module contributed the most to the precision metric, with an improvement of 2.2%, indicating that its enhancement of boundary information effectively reduces the false detection rate of blurred targets. This result is consistent with the module's design intent: DSP focuses on enhancing the representation of small targets, TCE provides universal texture modeling, and BBA emphasizes boundary refinement; the experimental results confirm their respective targeted roles.
[0146] In the multi-module combination experiment, any combination of two modules achieved better performance than a single module, verifying the complementarity among the three modules. For example, the combinations of "DSP+TCE" and "DSP+BBA" both significantly improved mAP@0.5:0.95, indicating that the small target enhancement effect of the DSP module, the difference modeling of the TCE module, and the edge guidance of the BBA module can form a good complement. Finally, when all three modules are integrated simultaneously, the model performance reaches its optimal state: mAP@0.5 increases from 85.1% to 89.1%, and mAP@0.5:0.95 increases from 46.1% to 50.2%, representing improvements of 4% and 4.1% respectively compared to the benchmark algorithm. This fully verifies the effectiveness and practical value of the proposed multi-module collaborative enhancement strategy in improving the accuracy of track defect detection.
[0147] 2.4 Module Universality and Comparative Tests
[0148] To further verify the versatility and transferability of the module of this invention, representative models such as YOLOv8s, the two-stage detection algorithm Faster R-CNN (ResNet50+FPN), and the single-stage detection algorithm YOLOv5n were selected as benchmark models. The designed module was embedded in them for experiments to evaluate its lightweight characteristics and performance under different detection frameworks. The experimental results are shown in Table 4:
[0149] Table 4 Performance comparison of the DMT framework on different benchmark algorithms
[0150]
[0151] As shown in Table 4, the proposed module exhibits excellent lightweight characteristics and strong performance gains across different detection frameworks. For YOLOv8, YOLOv8s, and YOLOv5n, the module delivers significant accuracy improvements with only a 1-2% increase in parameters and a slight loss in computational speed. Specifically, Precision, Recall, and F1 scores all show improvements of over 3%. In YOLOv8, the Recall score improves by nearly 9%, demonstrating the effectiveness of the DMT framework in reducing missed detections of small targets. Simultaneously, the mAP metric also increases by 3-4%, confirming the good applicability of the designed module in single-stage algorithms. Furthermore, results in the higher parameter DMT-YOLOv8s model demonstrate that the proposed method possesses good structural compatibility and generalization ability.
[0152] For Faster R-CNN (ResNet50+FPN), the traditional two-stage detector's feature representation capability is insufficient in complex scenes, resulting in significantly lower accuracy compared to the YOLO series algorithms. After introducing the DMT framework, its precision, recall, and F1 score all improved by more than 10%, while mAP@0.5 increased by 16%, and mAP@0.5:0.95 increased by 28%, demonstrating a strong improvement in detection performance. However, due to the lack of lightweight design in Faster R-CNN itself, the number of parameters increased by 24% and the processing speed decreased by 23% after introducing the designed modules. Compared to the improvement in accuracy, this cost is still within an acceptable range.
[0153] In summary, the module of this invention can achieve stable and significant performance improvements in algorithms with different architectures while maintaining lightweight design, proving its good versatility and practical value.
[0154] To further verify the effectiveness of the module of this invention, four representative detection algorithms with performance superior to YOLOv8 were selected for comparison: YOLOv9, YOLOv10, YOLOv11, and RT-DETR.
[28] Among them, YOLOv9–11 represents the best results of the YOLO series at different stages, while RT-DETR is an end-to-end detection architecture proposed in recent years with strong global modeling capabilities. To ensure the fairness of the experiment, all algorithms were implemented based on the same official YOLO framework and adopted a consistent training strategy and default hyperparameter settings. The default training strategy of the YOLO series was used. The results are shown in Table 5.
[0155] Table 5. Performance comparison of various detection algorithms in track defect detection tasks.
[0156]
[0157] As shown in Table 5, the original YOLOv8 is significantly weaker than the latest algorithm in several metrics: its precision is lower than YOLOv9, YOLOv11, and RT-DETR, and only slightly higher than YOLOv10; its recall and F1 scores are generally lagging behind, being about 10% and 6% lower than YOLOv9 and RT-DETR, respectively; it is also inferior in mAP@0.5 and mAP@0.5:0.95, only better than YOLOv11. This indicates that YOLOv8 has certain performance bottlenecks in complex defect detection tasks.
[0158] However, after introducing the DMT framework, DMT-YOLOv8 achieved significant improvements in Precision (+5.5%), Recall (+9.6%), F1 (+7.5%), mAP@0.5 (+4%), and mAP@0.5:0.95 (+4.1%). It not only surpassed the baseline YOLOv8 in all aspects, but also outperformed YOLOv9, YOLOv10, YOLOv11, and RT-DETR, achieving the best results.
[0159] To further demonstrate the detection performance of each algorithm, while maintaining the neatness of the results presentation, we selected YOLOv8, DMT-YOLOv8, and the better-performing YOLOv9 and RT-DETR algorithms from the comparison, and plotted their PR curves. The results are as follows: Figure 6 As shown.
[0160] like Figure 6 As shown, the PR curves of the four algorithms all exhibit a trend of decreasing precision as recall increases. YOLOv8's curve shows significant fluctuations during the decline, and its overall precision is lower than the other methods, indicating a bottleneck in identifying small and blurry targets. In contrast, YOLOv9 and RT-DETR show more stable curves in the mid-to-high recall range, maintaining both high recall and superior detection precision, outperforming YOLOv8 overall. DMT-YOLOv8's PR curve is generally better than the other compared algorithms, with a more significant advantage in the high recall range. This result demonstrates that the proposed DMT framework can effectively improve the model's ability to identify complex defects, maintaining both high recall and high precision.
[0161] The above two experimental results show that the DMT framework of this invention can effectively make up for the shortcomings of YOLOv8 in the detection of small and fuzzy targets, improve its overall detection performance, and show strong competitiveness and stability in comparison with the latest algorithms and in the PR curve.
[0162] 2.5 Visualization and Generalization Experiments
[0163] To visually demonstrate the actual performance of each detection model in the track defect detection task, this invention selects YOLOv8, YOLOv9, and RT-DETR as comparison algorithms. All detection results are visualized on the test dataset. For ease of display and comparison, the images have been appropriately cropped. Due to space limitations, only a few representative examples are shown, such as... Figure 7 As shown.
[0164] The visualization results show that the YOLOv8 algorithm has certain limitations in handling small and blurred targets: in the first and second images, small and blurred targets were missed, while in the third and fourth images, blurred targets were falsely detected. In comparison, YOLOv9 and RT-DETR have improved feature extraction capabilities, but due to the lack of effective processing of edge information for blurred defects, they are still prone to false detections in low-contrast scenes, a phenomenon observed in all four examples. In contrast, the proposed DTB-YOLOv8 model can accurately identify small and blurred targets under complex conditions, with overall detection quality significantly better than other comparative models, and the detection results are closer to the labeled images. This result further verifies the effectiveness and practical value of the proposed DMT framework in enhancing the model's ability to perceive small targets and recognize blurred targets.
[0165] To further verify the applicability and generalization ability of the module of this invention in cross-dataset tasks, the RSDD track defect segmentation dataset and the GC10-DET steel surface defect dataset were selected for experimental verification. The RSDD dataset and the dataset used in this invention have high similarity in defect types, and are mainly used to verify the applicability and stability of the proposed algorithm in similar domains. The GC10-DET dataset also contains a large number of small target and fuzzy defect samples, but its defect category distribution and appearance characteristics are significantly different from the dataset of this invention, belonging to a typical steel surface defect dataset. Therefore, it was used to evaluate the generalization ability of the algorithm in cross-domain scenarios. In the extended experiments, the model weights used were all obtained from the main experiment training, without retraining or parameter fine-tuning, to verify the zero-shot generalization performance of the model on foreign domain data. The results are as follows: Figure 8 , Figure 9 As shown.
[0166] Depend on Figure 8 , Figure 9 As can be seen, DMT-YOLOv8 also demonstrates a certain degree of adaptability and effectiveness in cross-dataset experiments. RSDD and the Railway Dataset used in this invention are both track defect detection datasets. Although there are differences in data preprocessing and defect category definitions, DMT-YOLOv8 can still identify defect types with similar characteristics with high accuracy. In the GC10-DET dataset, because its research object is completely different from track defects, and the defect distribution and image style are also significantly different, the overall detection performance is relatively limited. However, even so, DMT-YOLOv8 can still accurately identify some defects with similar characteristics to track defects. In summary, this invention still possesses a certain degree of robustness and generalization ability in cross-dataset scenarios. For the model limitations caused by differences in data distribution, future work could consider introducing multimodal information to further improve the model's cross-scenario robustness and adaptability.
[0167] To further verify the applicability and robustness of the proposed module in real-world scenarios, the Rail-1118 dataset, a real-world track defect dataset, was selected.
[29] Experiments were conducted. Because the image type and acquisition environment of this dataset differed significantly from the dataset used for training, the model was retrained. Experimental results are shown in Table 6 and... Figure 10 As shown.
[0168] As shown in Table 6, the proposed DMT-YOLOv8 achieves stable improvements in Precision, Recall, F1, and mAP compared to the baseline YOLOv8. The Recall improvement of 6.7% indicates that the designed module effectively enhances the detection capabilities for small targets and fuzzy defects. Meanwhile, from... Figure 10 The visualization results clearly show that in real-world orbital scenarios, this module significantly improves detection performance, enhancing the model's ability to identify small targets and ambiguous defects, thereby effectively reducing false positives and false negatives. In summary, this invention demonstrates strong detection performance and good generalization ability even in complex real-world scenarios.
[0169] Table 6 Experimental Results of Rail-1118 Real Track Dataset
[0170]
[0171] Experimental results on a real-world track defect dataset demonstrate that this invention effectively improves the model's detection capabilities in scenarios with small targets and ambiguous defects, and exhibits good versatility across various benchmark algorithms. DMT-YOLOv8 outperforms mainstream detection methods in overall detection accuracy, recall, mAP, and PR curve performance. Specifically, mAP@0.5 and mAP@0.5:0.95 show improvements of 4% and 4.1% respectively compared to the benchmark algorithms, reaching 89.1% and 50.2%. Generalization experiments further validate the adaptability and robustness of the proposed method in similar domains.
[0172] References:
[0173] [1] Dong Chaoqun, Wang Zhan, Liao Ping, et al. Lightweight YOLOv5s-OCG sleeper crack detection algorithm [J]. Journal of Zhejiang University (Engineering Science), 2025, 59(09):1838-1845+1880. DOI:CNKI:SUN:ZDZC.0.2025-09-007.
[0174] DONG Chaoqun, WANG Zhan, LIAO Ping, et al. Lightweight YOLOv5s-OCGalgorithm for sleeper crack detection [J]. Journal of Zhejiang University(Engineering Science), 2025, 59(09): 1838-1845+1880. DOI: CNKI:SUN:ZDZC.0.2025-09-007.
[0175] [2] Wu Yongjun, Cui Can, He Yongfu. A method for detecting rail surface defects based on semantic augmentation and YOLOv8 [J]. Journal of Railway Science and Engineering, 2024, 21(09):3864-3875.
[0176] WU Yongjun, CUI Can, HE Yongfu. Rail surface defect detection methodbased on semantic augmentation and YOLOv8 [J]. Journal of Railway Science andEngineering, 2024, 21(09): 3864–3875.
[0177] [3]GIBERT X, PATEL VM, CHELLAPPA R. Deep multitask learning for railway track inspection[J]. IEEE Transactions on Intelligent TransportationSystems, 2016, 18(1): 153-164.
[0178] [4] Jin Xuesong, Li Xia, Li Wei, et al. Research progress on corrugated wear of railway rails [J]. Journal of Southwest Jiaotong University, 2016, 51(02):264-273.
[0179] JIN Xuesong, LI Xia, LI Wei, et al. Research progress on railcorrugation of railway tracks[J]. Journal of Southwest Jiaotong University, 2016, 51(02): 264–273.
[0180] [5] Gao Tianci, Shi Yifan, Jiang Lepeng, et al. Identification of geometric irregularities in rail welds based on tile coding network [J]. Journal of Railway Science and Engineering, 2025, 22(05):2346-2354.
[0181] GAO Tianci, SHI Yifan, JIANG Lepeng, et al. Identification of railweld geometric irregularities based on tile encoding network [J]. Journal ofRailway Science and Engineering, 2025, 22(05): 2346–2354.
[0182] [6]PHUSAKULKAJORN W, ZENG Y, LI Z, et al. Unsupervised representation learning for monitoring rail infrastructures with high-frequency moving vibration sensors[J]. IEEE Transactions on Intelligent TransportationSystems, 2025.
[0183] [7]HEN Z, WANG Q, HE Q, et al. CUFuse: Camera and ultrasound datafusion for rail defect detection[J]. IEEE Transactions on IntelligentTransportation Systems, 2022, 23(11): 21971-21983.
[0184] [8]NI
[0185] [9] Yao Zongwei, Yang Hongfei, Hu Jiyong, et al. Track surface defect detection method based on machine vision and convolutional neural network [J]. Journal of Railway Engineering, 2021, 43(04):101-107.
[0186] YAO Zongwei, YANG Hongfei, HU Jiyong, et al. Rail surface defect detection method based on machine vision and convolutional neural networks[J]. Journal of the China Railway Society, 2021, 43(04): 101–107.
[0187]
[10] Xu Xinci, Shi Xiuxia, Geng Chenge, et al. Deep learning-based railway track image recognition technology [J]. Journal of Railway Science and Engineering, 2024, 21(12): 5232-5241.
[0188] XU Xinci, SHI Xiuxia, GENG Chenge, et al. Rail track imagerecognition technology based on deep learning [J]. Journal of Railway Science and Engineering, 2024, 21(12): 5232–5241.
[0189]
[11] YE J, STEWART E, CHEN Q, et al. Deep learning and laser-based 3-Dpixel-level rail surface defect detection method[J]. IEEE Transactions onInstrumentation and Measurement, 2023, 72: 1-12.
[0190]
[12] Liu Zihao, Zhang Jiaxin, Xue Feng, et al. Surface defect detection method for precision pipe fittings based on improved YOLO-v8 [J]. Journal of Zhejiang University (Engineering Science), 2025, 59(07):1514-1522+1546.
[0191] LIU Zihao, ZHANG Jiaxin, XUE Feng, et al. Surface defect detectionmethod for precision pipe fittings based on improved YOLO-v8 [J]. Journal ofZhejiang University (Engineering Science), 2025, 59(07): 1514-1522+1546.
[0192]
[13] ZHAO Q, FANG S, LI Y, et al. Track Defect Detection Based onImproved YOLOv5s[J]. IEEE Transactions on Industrial Informatics, 2025.
[0193]
[14] WANG B, ZHOU W, YAN W, et al. PENet-KD: Progressive enhancementnetwork via knowledge distillation for rail surface defect detection[J]. IEEETransactions on Instrumentation and Measurement, 2023, 72: 1-11.
[0194]
[15] ZHANG Y, LIU C. Real-time pavement damage detection with damageshape adaptation[J]. IEEE Transactions on Intelligent Transportation Systems,2024, 25(11): 18954-18963.
[0195]
[16] KUMAR A, HARSHA S P. A systematic literature review of defectdetection in railways using machine vision-based inspection methods[J].International Journal of Transportation Science and Technology, 2024.
[0196]
[17] QIU Y, LIU H, LIU J, et al. Region and edge-aware network forrail surface defect segmentation[J]. IEEE Transactions on Instrumentation andMeasurement, 2024, 73: 1-13.
[0197]
[18] HUSSAIN M. YOLO-v1 to YOLO-v8, the rise of YOLO and itscomplementary nature toward digital manufacturing and industrial defectdetection[J]. Machines, 2023, 11(7): 677.
[0198]
[19] WANG Q, WU B, ZHU P, et al. ECA-Net: Efficient channel attentionfor deep convolutional neural networks[C] / / Proceedings of the IEEE / CVFconference on computer vision and pattern recognition. 2020: 11534-11542.
[0199]
[20] WU Y, QIANG F, ZHOU W, et al. PFCNet: Enhancing Rail SurfaceDefect Detection with Pixel-Aware Frequency Conversion Networks[J]. IEEESignal Processing Letters, 2025.
[0200]
[21] LIU Y, XIAO H, XU J, et al. A rail surface defect detectionmethod based on pyramid feature and lightweight convolutional neural network[J]. IEEE Transactions on Instrumentation and Measurement, 2022, 71: 1-10.
[0201]
[22] LIN T Y, DOLLAR P, GIRSHICK R, et al. Feature pyramid networksfor object detection[C] / / Proceedings of the IEEE conference on computervision and pattern recognition. 2017: 2117-2125.
[0202]
[23] LI X, XU X, YANG H. A road crack detection model integratingGLMANet and EFPN[J]. IEEE Transactions on Intelligent Transportation Systems,2024.
[0203]
[24] YU F, KOLTUN V. Multi-scale context aggregation by dilatedconvolutions[J]. arXiv preprint arXiv:1511.07122, 2015.
[0204]
[25] Zhang Zhenli, Hu Xinkai, Li Fan, et al. Multi-scale remote sensing image semantic segmentation algorithm based on CNN and Efficient Transformer [J]. Journal of Zhejiang University (Engineering Science), 2025, 59(04):778-786.
[0205] ZHANG Zhenli, HU Xinkai, LI Fan, et al. Multi-scale remote sensingimage semantic segmentation algorithm based on CNN and Efficient Transformer[J]. Journal of Zhejiang University (Engineering Science), 2025, 59(04): 778-786.
[0206]
[26] WANG T, ZHANG Z, TSUI K L. A hierarchical transfer-generative framework for automating multi-analytical tasks in rail surface defectinspection[J]. IEEE Internet of Things Journal, 2024.
[0207]
[27] BONO F M. railway Dataset [DB / OL]. Roboflow Universe, 2023-12[2025-06-02]. https: / / universe.roboflow.com / francesco-morgan-bono-cntpn / railway-yyihi.
[0208]
[28] 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 pattern recognition. 2024: 16965-16974.
[0209]
[29] Roboflow Universe. Rail Surface Defects Dataset [DB / OL]. RoboflowUniverse, 2024-07 [2025-11-03]。
Claims
1. A dynamic multi-scale and texture-aware enhancement framework, characterized in that, This framework is a dynamic scale pooling module (DSP). This DSP introduces a channel grouping mechanism to achieve differentiated modeling of channel focus and reduce feature interference between channels; it also introduces a multi-scale dilated convolution mechanism to enhance the representation of small target features; details are as follows: The input feature map is represented as: Where C, H, and W are the number of channels, height, and width, respectively; then the grouping strategy is as shown in equation (1): (1) In the formula, N is the preset group size. For a subset of the input features, we have ; Next, dilated convolution operations with different dilation rates are applied to the feature maps in each subset, as shown in Equation (2): (2) In the formula The output feature map is denoted by c, where c is the channel index. Where k is the spatial channel and k is the kernel size, These are the convolutional kernel weights corresponding to this group. The expansion rate used for this group; After completing the grouped dynamic dilated convolution, each group outputs... The input Y is formed by concatenating along the channel dimension. Then, a 1×1 convolution operation is used to achieve channel compression and information aggregation, and the output is a fused feature map Z. The specific operations are shown in equations (3) and (4). (3) (4) In subsequent stages, a lightweight channel attention mechanism, ECA, is introduced to enhance the responsiveness of critical channels; After ECA enhancement, its output is residually concatenated with the original input. Subsequently, the residual result is processed sequentially through a BN layer and a ReLU activation function to finally generate the output feature map of the module. ECA and subsequent operations can be expressed by formula (5): (5) In the formula, + indicates residual connection.
2. A dynamic multi-scale and texture-aware enhancement framework, characterized in that, This framework is a texture contrast enhancement module (TCE). The TCE employs a dual-branch structure, constructing local and global branches in parallel to capture subtle abrupt changes and contextual information, respectively. Subsequently, it generates texture contrast maps through difference modeling, extracting salient texture features to guide the backbone network to more accurately focus on potential defects in blurred regions. First, parallel local and global texture extraction branches are constructed, using convolutional kernels of different scales: 3×3 and 5×5, to process the input feature maps. Perform convolution operations to extract local texture response features. Features corresponding to global texture Next, a texture difference map between the two is constructed. The implementation details are shown in equations (6)-(8): (6) (7) (8) Subsequently, after differential modeling, an encoding structure consisting of 1×1 convolutions, BN layers, and ReLU activation functions is introduced, as shown in equation (9). (9) Based on this, the ECA module is integrated to further construct a texture-guided weight map. Then, the weight map is fused with the original input features through element-wise multiplication, as shown in Equation (10): (10) In the formula This indicates element-wise multiplication.
3. A dynamic multi-scale and texture-aware enhancement framework, characterized in that, The framework is a fuzzy edge awareness module (BBA). This BBA enhances the boundary features of fuzzy boundary regions in the feature map by introducing a weak edge guidance mechanism and edge attention modeling, thereby improving the model's boundary discrimination ability in complex backgrounds. The BBA module consists of two complementary branches: an edge awareness branch and a spatial attention branch. The former captures the boundary information of fuzzy regions, while the latter highlights these regions through an attention mechanism. The edge awareness branch responds to the input X... c Compression is performed along the channel dimension to obtain the single-channel feature mean map, as shown in Equation (11): (11) Next, analyze the mean plot G. Avg The Sobel operator is applied to calculate the image gradient changes, and the edge change regions are extracted to obtain candidate edge response maps, as shown in Equation (12): (12) This response map can be used to characterize the possible location regions of fuzzy defects as an edge-guided prior. Secondly, there is the spatial attention branch, which focuses on the input feature map X. c Applying average pooling and max pooling operations along the channel dimension yields two single-channel feature maps G. Avg With G Max After concatenation, the data is fed into a 7×7 convolutional layer for feature integration; then, a BN layer and a sigmoid activation function are used to generate a spatial attention map A. spatial The specific implementation is shown in equations (13)-(15): (13) (14) (15) Finally, the edge response map E sobel Spatial attention map A spatial Element-wise multiplication and fusion are performed to construct the final edge-guided weight graph A. edge This is used to weight and enhance the original feature map, thereby enhancing the saliency of the edge region; as shown in equations (16) and (17): (16) (17)。 4. A track defect detection model composed of a dynamic multi-scale and texture-aware enhancement framework as described in claim 1, 2, or 3, characterized in that, YOLOv8 was selected as the baseline algorithm. The three feature enhancement modules, DSP, TCE, and BBA, were embedded individually, in pairs, or simultaneously into the YOLOv8 backbone network to construct the track defect detection model DMT-YOLOv8. The DSP, TCE, and BBA were embedded into different layers of the backbone: DSP was located between P1 and P2, TCE between P2 and P3, and BBA between P4 and P5. In the overall framework, the DSP, TCE, and BBA modules functioned sequentially from shallow to deep: DSP preserved fine-grained features of small targets through early enhancement, providing more complete basic information for subsequent modules; TCE performed local and global texture difference modeling based on the features passed from DSP in the middle layer, providing texture clues for subsequent boundary perception; BBA was located in the mid-to-deep feature map, further enhancing the expression of boundary structures after fusing texture and spatial information from the previous layers.