Intelligent quantitative characterization method for wheeltrack fatigue crack based on microscopic analysis image

Image enhancement and denoising were performed using CLAHE and NLM algorithms. Combined with the improved YOLOv8-CSSTAM model and Harris corner detection, intelligent quantitative characterization of wheel-rail fatigue cracks was achieved. This solved the problems of large crack detection accuracy and measurement error in existing technologies, and improved detection efficiency and accuracy.

CN120953294AActive Publication Date: 2025-11-14SOUTHWEST JIAOTONG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511494183.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2025-11-14
Estimated Expiration
2045-10-20

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively segment images with subtle grayscale differences between microcracks and the substrate, and deep learning models do not fully consider the characteristics of wheel-rail contact fatigue cracks, resulting in high false negative and high false positive rates, making it difficult to achieve automatic measurement of crack size characteristics.

Method used

Image enhancement and noise reduction are performed using CLAHE and NLM algorithms, and target detection is performed using an improved YOLOv8-CSSTAM model. Through automatic image scale calibration and OCR recognition, combined with Harris corner detection and filtering, accurate measurement of crack size characteristics is achieved.

Benefits of technology

It significantly improves the accuracy and robustness of crack detection, and realizes the automatic measurement of dimensional features such as crack length, width, and propagation angle, solving the problems of low efficiency, strong subjectivity and large error in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953294A_ABST
    Figure CN120953294A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of wheel-rail tribology, and particularly discloses a wheel-rail fatigue crack intelligent quantitative characterization method based on microscopic analysis images, which comprises the following steps: carrying out image enhancement and noise reduction preprocessing on scanning electron microscope and optical microscope images of wheel-rail rolling contact fatigue cracks; inputting the image into a YOLOv8-CSSTAM model for target detection, and outputting an image crack prediction frame and a proportional scale prediction frame; on the basis of an automatic calibration algorithm of an image scale, calculating the widest connected region of the image in the scale prediction frame, and performing OCR character recognition to obtain the image scale; performing median filtering, threshold segmentation, edge smoothing and small area filling processing on the crack image in the crack prediction frame; carrying out Harris corner detection on the processed image to obtain candidate corners; and screening the angular points to obtain crack feature angular points, and then calculating crack size features. The method can quickly and accurately obtain crack information in the wheeltrack rolling contact fatigue crack image, wherein the crack information comprises the crack depth, the crack width and the crack propagation angle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wheel-rail tribology, specifically to an intelligent quantitative characterization method for wheel-rail fatigue cracks based on microscopic analysis images. Background Technology

[0002] Rolling contact fatigue cracks are one of the most common and dangerous forms of damage in wheel-rail systems, seriously threatening railway transportation safety and causing huge economic losses. Rolling contact fatigue cracks typically originate at the rail head tread, caused by repeated rolling contact stress, and gradually propagate with increasing train passage, eventually potentially leading to rail fracture or spalling. If not detected and addressed promptly, they can cause sudden track failure, endangering train operation safety.

[0003] Traditional manual inspection methods suffer from low efficiency, high subjectivity, and high risk, making them unsuitable for the maintenance needs of modern high-speed railways. In recent years, automated crack detection technology based on machine vision has developed rapidly. This technology primarily uses scanning electron microscopy (SEM) and optical microscopy to acquire the microscopic morphology of cracks, combined with image processing algorithms to achieve crack identification and measurement. However, existing methods generally suffer from the following technical bottlenecks: First, during the image acquisition stage, SEM images often suffer from low contrast and high noise, especially since the gray-level difference between microcracks and the matrix is ​​very weak, making effective segmentation difficult. Furthermore, optical microscopy images are susceptible to speckle noise, resulting in blurred crack edges, making it difficult for traditional thresholding and edge detection algorithms to accurately locate cracks. Second, existing deep learning detection models are typically used directly for crack identification without fully considering the characteristics of wheel-rail contact fatigue cracks, leading to high false negative rates for small cracks and high false positive rates against complex backgrounds. In addition, existing methods largely focus on crack detection itself, failing to automatically measure crack size characteristics (such as length, width, and propagation angle), making it difficult to meet the needs of assessing crack propagation trends in practical engineering applications.

[0004] To address these issues, recent research has attempted to combine traditional image processing algorithms with deep learning. For example, CLAHE (Contrast-Limited Adaptive Histogram Equalization) enhances the contrast of SEM images, which improves the distinction between cracks and the substrate to some extent, but it easily amplifies noise or introduces artifacts. Deep learning models such as YOLO are used for automatic crack detection, but the network structure is not optimized for crack characteristics, resulting in large errors in localization accuracy and size measurement. Some studies have introduced attention mechanisms to enhance the feature extraction capabilities of detection models, but they lack consideration for the unique fractal features and multi-scale characteristics of wheel-rail cracks, limiting the model's generalization ability.

[0005] To address the aforementioned problems, a novel method for treating and analyzing wheel-rail rolling contact fatigue cracks is urgently needed. This method should not only effectively enhance the quality of microscopic images but also accurately locate cracks using an improved deep learning model, automatically calibrate the image scale, and ultimately achieve precise measurement of crack size characteristics. This approach will be of great significance for preventing wheel-rail damage and ensuring the safety of railway transportation. Summary of the Invention

[0006] To address the problems existing in the prior art, this invention provides an intelligent quantitative characterization method for wheel-rail fatigue cracks based on microscopic analysis images. This method can automatically calibrate the image scale, automatically locate the crack, extract features, and automatically calculate quantities, thus solving the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for intelligent quantitative characterization of wheel-rail fatigue cracks based on microscopic analysis images, comprising the following steps: S1. Image enhancement and noise reduction preprocessing are performed on the scanning electron microscope and optical microscope images of wheel-rail rolling contact fatigue cracks. S2. Input the preprocessed image into the YOLOv8-CSSTAM model for target detection, and output the image crack prediction box and scale prediction box. S3. An automatic calibration algorithm based on image scale calculates the widest connected region of the image within the scale prediction box and performs OCR (Optical Character Recognition) text recognition to obtain the image scale. S4. Perform median filtering, threshold segmentation, edge smoothing, and small region filling on the crack image in the crack prediction box. S5. Perform Harris corner detection on the processed image to obtain candidate corners; S6. Filter the corner points to obtain the crack feature corner points and calculate the crack size characteristics based on the crack feature corner points.

[0008] Preferably, step S1 specifically includes the following steps: S11. To address the characteristics of high resolution but low contrast and noise sensitivity in scanning electron microscope (SEM) images, a combined fractal enhancement and NLM (Non-Local Means) denoising process is employed to improve the contrast of the crack region and suppress noise interference. This includes: calculating the fractal dimension FD of the SEM image using box-counting; dynamically adjusting the contrast-limited adaptive histogram equalization (CL) parameter based on the FD value; dividing the image into an 8×8 grid and calculating a local histogram for each grid; limiting the histogram truncation threshold according to CL to avoid noise amplification; eliminating grid boundary artifacts through bilinear interpolation; introducing a fractal Brownian motion (FBM) model to constrain the enhancement intensity, preserving high-frequency details in the crack edge region; and finally, applying the non-local means (NLM) algorithm to denoise the enhanced image. S12. To address the low noise but limited resolution characteristics of optical microscope OM images, CLAHE (Contrast Limited Adaptive Histogram Equalization) is used to enhance details and suppress speckle noise while preserving global texture information. This includes: dividing the image into a 16×16 grid, calculating a histogram for each grid, setting a fixed contrast limit parameter CL=2.5 to avoid over-enhancement leading to artifacts, using logarithmic transformation to improve dark details, and finally combining dual-channel Retinex algorithm for preprocessing and noise reduction.

[0009] Preferably, in step S2, Labelimg is used to label the dataset and train the model, which is divided into 7 categories: cracks extending to the left, cracks extending to the right, cracks in the middle, scale bar, "cm", "mm", and "μm". The preprocessed SEM / OM image from step S1 is input, and the target detection is performed using the YOLOv8-CSSTAM model. Non-Maximum Suppression (NMS) is used to eliminate overlapping boxes, and the predicted box with the highest confidence is retained. The confidence threshold is set to... The NMSIoU threshold is set to The final output image includes crack prediction boxes and scale prediction boxes. The YOLOv8-CSSTAM model specifically includes: an improved YOLOv8 object detection model, and an embedded CSSTAM (Channel-Space-Scale Triple Attention Module) module composed of a channel-space-scale triple attention module; the CSSTAM module is a channel-space-scale triple attention module formed by adding scale attention SAM on the basis of CBAM.

[0010] Preferably, in step S3, an automatic calibration algorithm based on the image scale is developed for the scale prediction bounding box output in step S2. Using an 8-neighborhood pattern, a seed point diffusion method is employed to mark all pixels in the connected region, ultimately generating a labeling matrix. ,in The minimum and maximum values ​​of the x and y coordinates of each point within a connected region; the maximum connected region. choose:

[0011] in, The area of ​​the connected region. A set of connected regions; Calculate the maximum width within the largest connected region. Take the maximum width The pixel length of the scale bar:

[0012] Morphological enhancement was performed on the predicted scale bounding box, broken strokes were connected, and PyTesseract was used to perform OCR text recognition on the predicted scale bounding box to extract numbers. The image scale was calculated as follows:

[0013] in, This indicates the number recognized by OCR. Indicates the image scale; Finally, add a scale unit based on the category of the predicted bounding box. For example, if the predicted bounding box cls is 7, then the unit is μm.

[0014] Preferably, in step S4, the crack prediction box output in step S2 is subjected to median filtering and Ostu adaptive threshold segmentation to obtain a binarized image; then edge smoothing is performed to eliminate the jagged artifacts of the crack edges after binarization; finally, using the 8-neighborhood mode, all pixels in the connected region are marked by seed point diffusion, and the area of ​​each connected region is calculated. If it is less than a set threshold (i.e., the number of pixels in the connected region is less than 50), it is determined to be noise and filled.

[0015] Preferably, in step S5, Harris corner detection is performed on the crack image processed in step S4 to extract the corner points of the crack region, specifically including: Calculate the gray-level change rate of local regions in the image, identify points with significant gradient changes, i.e., corner points; for each pixel in the image... Calculate its in and gradient of direction and And construct the autocorrelation matrix The formula is expressed as follows:

[0016] in, A 5x5 local window; Define corner response functions using Harris. To measure the corner response intensity of a pixel:

[0017] in, , , and For matrix eigenvalues, Let be an empirical constant, taken as 0.05; if Greater than the set threshold If the value is not found, the point is determined to be a corner point. By using Non-Maximum Suppression (NMS) and edge filtering, corner points with the largest response values ​​are retained in the local area to eliminate redundancy and to remove pseudo-corner points located on strong edges.

[0018] Preferably, in step S6, the corner points detected by Harris in step S5 are screened, and the size characteristics of the crack are calculated, specifically including: Based on their different propagation directions, cracks are classified into left-propagating cracks and right-propagating cracks. For left-propagating cracks: Define the area in the lower left corner of the crack prediction frame, which is 1 / 4 of the width and height. The leftmost corner point is The upper right corner, 1 / 4 of the width and height area The rightmost corner point is , The first non-zero pixel value in the y-th column from top to bottom is... , and These are the width and height of the crack prediction frame, respectively; the formula for calculating the crack size feature is as follows: Crack width: ; Crack depth: ; Crack propagation angle: ; line segment slope line segment slope ; For cracks extending to the right: Define the area in the lower right corner of the crack prediction frame, which is 1 / 4 of the width and height. The rightmost corner point is The upper left corner, 1 / 4 of the width and height area The rightmost corner point is , The first non-zero pixel value in the y-th column from top to bottom is... , and These are the width and height of the crack prediction frame, respectively; the formula for calculating the crack size feature is as follows: Crack pixel width: ; Crack pixel depth: ; Crack propagation angle: ; line segment slope line segment slope ; in, It is a point coordinates It is a point coordinates It is a point The coordinates; After obtaining the pixel size features of the crack, calculate the actual size features of the crack: Actual crack width: ; Actual crack depth: .

[0019] The beneficial effects of this invention are as follows: This invention provides an intelligent quantitative characterization method for wheel-rail fatigue cracks based on microscopic image analysis. For SEM and OM images, CLAHE enhancement and NLM denoising are used for image preprocessing, effectively improving the contrast of the crack area and suppressing noise interference. By embedding a CSSTAM (Channel-Space-Scale Triple Attention Module) module, which consists of channel-space-scale triple attention modules, the YOLOv8 network structure is optimized, enhancing the model's ability to identify micro-cracks and crack features in complex backgrounds, significantly improving the accuracy and robustness of crack detection. In the post-processing stage of the predicted bounding box, firstly, an automatic image calibration algorithm was developed based on the image scale to calculate the width of the largest connected region of the predicted bounding box. Combined with OCR text recognition technology, the length of the scale was identified, and then the image scale was calculated for calibration, which facilitates the subsequent characterization of crack size features. Secondly, Otsu dynamic threshold segmentation, morphological small region filling, and Harris corner detection and screening technology were innovatively combined to achieve accurate automatic measurement of crack length, crack depth, and width propagation angle, solving the problems of low efficiency, strong subjectivity, and large error in traditional manual measurement. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the steps of a smart quantitative characterization method for wheel-rail fatigue cracks based on microscopic analysis images. Figure 2 This is a schematic diagram comparing image enhancement and noise reduction in the embodiments; Figure 3 This is a schematic diagram of the YOLOv8-CSSTAM model metrics in the example; Figure 4 This is a structural diagram of the CSSTAM module in the embodiment; Figure 5 This is a diagram showing the predicted scale in the example. Figure 6 The crack prediction results are shown in the embodiment, where (a) is the original image of the crack prediction box and (b) is the post-processed crack image. Figure 7 This is a schematic diagram comparing post-processing in the embodiments; Figure 8 This is a schematic diagram of crack size measurement in the embodiment. Detailed Implementation

[0021] 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.

[0022] This invention provides a technical solution: an intelligent quantitative characterization method for wheel-rail fatigue cracks based on microscopic analysis images, such as... Figure 1 As shown, it includes the following steps: S1. Image enhancement and noise reduction preprocessing are performed on the scanning electron microscope and optical microscope images of wheel-rail rolling contact fatigue cracks. In S1, addressing the characteristics of SEM images—high resolution but low contrast and noise sensitivity—fractal enhancement and NLM denoising are used in synergistic processing to improve contrast in crack areas and suppress noise interference. For OM images, which have low noise but limited resolution, CLAHE is used to enhance details and suppress speckle noise while preserving global texture information, such as... Figure 2 As shown, the specific steps include: S11 Scanning Electron Microscope (SEM) Image Enhancement and Noise Reduction: Fractal Enhancement (CLAHE-FBM): Fractal dimension is calculated using box-counting to determine the fractal dimension (FD) of an SEM image, as shown in the following formula: (1) N ( ϵ The required side length for covering the image is ϵ The number of boxes. This is determined by multi-scale mesh generation (e.g., ϵ=2). k , k =1,2,...,8), statistical analysis at different scales N ( ϵ The FD value was obtained by fitting the data.

[0023] Dynamic contrast enhancement adjusts the parameters of contrast-limited adaptive histogram equalization (CLAHE) dynamically based on the FD value: (2) Divide the image into an 8×8 grid and calculate a local histogram for each grid; then... CL Limit the histogram truncation threshold to avoid noise amplification; eliminate grid boundary artifacts through bilinear interpolation.

[0024] FBM constraint enhancement: The fractal Brownian motion (FBM) model is introduced to enhance the constraint intensity, preserving high-frequency details in the crack edge region. The formula is as follows: (3) in The enhancement factor (values ​​range from 0.1 to 0.3). It is a fractal adjustment factor (values ​​range from 0.5 to 1.0).

[0025] NLM noise reduction: The enhanced image is further denoised using the Non-Local Means (NLM) algorithm: (4) in , For x The pixel blocks within the centered search window h is a smoothing parameter, adaptively determined using the Otsu algorithm (h=10~15 is recommended for SEM images). The search window is set to 21×21, and the pixel block size is 7×7.

[0026] Image enhancement and noise reduction for S12 optical microscope (OM): CLAHE Enhancement: The image is divided into a 16×16 grid (more granular than SEM), a histogram is calculated for each grid, and a fixed contrast limit parameter is set. CL =2.5, to avoid over-enhancement leading to artifacts, logarithmic transformation improves shadow details: (5) NLM noise reduction: Preprocessing using the dual-channel Retinex algorithm: (6) The low-frequency illumination component is extracted using Gaussian blur.

[0027] S2. Input the preprocessed image into the YOLOv8-CBAM model for target detection, such as... Figure 3 As shown, the output image contains the crack prediction box and the scale prediction box; In S2, this step uses an improved YOLOv8 object detection model and embeds a CSSTAM (Channel-Space-Scale Triple Attention Module) module, which consists of channel-space-scale triple attention modules, as shown below. Figure 4 As shown, to enhance the model's ability to detect wheel-rail rolling contact fatigue cracks, the specific steps include: Scale Attention Module (SAM) is added to CBAM to form triple attention (channel, spatial, scale), which prioritizes the preservation of scale information containing crack features: Channel attention: A variant of the Squeeze-and-Excitation (SE) mechanism is used to generate weights for each channel: Squeeze: Global Average Pooling (GAP) compresses the spatial dimensions to obtain channel descriptors.

[0028] Excitation: Two fully connected layers (with ReLU in between) learn the relationship between channels and output attention weights.

[0029] (7) in, Here, δ is the Sigmoid function, and δ is ReLU. and These are the weights for the fully connected layer.

[0030] Spatial attention: Focusing on the spatial location of the crack, average pooling and max pooling are applied along the channel dimension to obtain two feature maps. The two feature maps are then concatenated and a spatial weight map is generated through a 7×7 convolution.

[0031] (8) Scale Attention Module (SAM): Multi-scale input: feature maps from different depths of the network (F1, F2, F3).

[0032] Weight generation: After performing global average pooling (GAP) on the feature map at each scale, weight coefficients are generated through a fully connected layer and Softmax to measure the importance of each scale.

[0033] Weighted fusion: The feature maps at each scale are multiplied by their respective weights and then summed to obtain enhanced multi-scale features.

[0034] (9) (10) Where N is the number of scales (3), and W is the learnable parameter.

[0035] The dataset was labeled using labelimg, and the model was trained. The model was divided into seven classes: cracks extending to the left, cracks extending to the right, cracks in the middle, scale bar, "cm", "mm", and "μm". The input was a preprocessed SEM / microscope image using S1. The model then performed object detection using the YOLOv8-CSSTAM model, employing non-maximum suppression (NMS) to eliminate overlapping boxes and retaining the predicted box with the highest confidence. The confidence threshold was set to... The NMS IoU threshold is set to .

[0036] S3. For the scale prediction bounding box, develop an automatic calibration algorithm based on the image scale, calculate the maximum connected width and extract the scale value, and calculate the image scale, such as... Figure 5 As shown; In step S3, an automatic calibration algorithm based on the image scale is developed for the scale prediction bounding box output in step S2. Using an 8-neighborhood model, a seed point diffusion method is employed to label all pixels in connected regions, ultimately generating a labeling matrix. ,in The maximum connected region is defined as the minimum and maximum x and y coordinates of all points within the connected region. choose: (11) in, The area of ​​the connected region. A set of connected regions; Calculate the maximum width within the largest connected region. Take the maximum width The pixel length of the scale bar: (12) Morphological enhancement was performed on the predicted scale bounding box, broken strokes were connected, and PyTesseract was used to perform OCR text recognition on the predicted scale bounding box to extract numbers. The image scale was calculated as follows: (13) in, This indicates the number recognized by OCR. Indicates the image scale.

[0037] Finally, add a scale unit based on the category of the predicted bounding box. For example, if the predicted bounding box cls is 7, then the unit is μm.

[0038] S4. Perform median filtering, threshold segmentation, edge smoothing, and small region filling on the crack image in the prediction box; In step S4, the crack prediction box output from step S2 is subjected to median filtering and Ostu adaptive threshold segmentation to obtain a binarized image. Next, edge smoothing is performed to eliminate jagged artifacts at the crack edges after binarization. Finally, using an 8-neighborhood model, all pixels in the connected regions are marked through seed point diffusion. The area of ​​each connected region is calculated; if it is less than a set threshold (i.e., the number of pixels in the connected region is less than 50), it is judged as noise and filled with inverted colors. The processing result is as follows: Figure 6 As shown in the figure, (a) is the original image of the crack prediction box, and (b) is the post-processed crack image.

[0039] S5. Perform Harris corner detection on the processed image to obtain candidate corners; In S5, Harris corner detection is performed on the crack image processed by S3 to extract geometric feature points (corners) in the crack region, providing key positioning points for subsequent crack size measurement, such as... Figure 7 As shown, the specific steps include: The core formula for calculating the gray-level change rate of local regions in an image and identifying points with significant gradient changes (i.e., corner points) is as follows: For each pixel in the image Calculate its in and gradient of direction and And construct the autocorrelation matrix .

[0040] (14) in, It is a 5x5 local window.

[0041] Define corner response functions using Harris. To measure the corner response intensity of a pixel: (15) in: , , and For matrix eigenvalues, This is an empirical constant, taken as 0.05. If... Greater than the set threshold If the point is a corner point, then the point is determined to be a corner point.

[0042] By using nonmaximum suppression (NMS) and edge filtering, corner points with the largest response values ​​are retained in local regions to eliminate redundancy, and pseudo-corner points located on strong edges are removed.

[0043] S6. Filter the corner points to obtain the crack feature corner points and calculate the crack size characteristics based on the crack feature corner points; In S6, the corner points detected by Harris in step S4 are filtered, and the size characteristics of the crack are calculated. The specific steps include: Based on their different propagation directions, cracks are classified into left-propagating cracks and right-propagating cracks. For left-propagating cracks: Define the area in the lower left corner of the crack prediction frame, which is 1 / 4 of the width and height. The leftmost corner point is The upper right corner, 1 / 4 of the width and height area The rightmost corner point is , The first non-zero pixel value at the bottom is , and These are the width and height of the crack prediction frame, respectively. Figure 8 As shown. The formula for calculating crack size characteristics is as follows: Crack width: ; Crack depth: ; Crack propagation angle: ; line segment slope line segment slope ; For cracks extending to the right: Define the area in the lower right corner of the crack prediction frame, which is 1 / 4 of the width and height. The rightmost corner point is The upper left corner, 1 / 4 of the width and height area The rightmost corner point is , The first non-zero pixel value in the y-th column from top to bottom is... , and These are the width and height of the crack prediction frame, respectively; the formula for calculating the crack size feature is as follows: Crack pixel width: ; Crack pixel depth: ; Crack propagation angle: ; line segment slope line segment slope ; in, It is a point coordinates It is a point coordinates It is a point The coordinates.

[0044] After obtaining the pixel size features of the crack, calculate the actual size features of the crack: Actual crack width: ; Actual crack depth: .

[0045] This invention enables the rapid and accurate acquisition of crack information in wheel-rail rolling contact fatigue crack images, including crack depth, crack width, and crack propagation angle.

[0046] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0047] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0048] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0049] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0050] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for intelligent quantitative characterization of wheel-rail fatigue cracks based on microscopic analysis images, characterized in that, Includes the following steps: S1. Image enhancement and noise reduction preprocessing are performed on the scanning electron microscope and optical microscope images of wheel-rail rolling contact fatigue cracks. S2. Input the preprocessed image into the YOLOv8-CSSTAM model for target detection, and output the image crack prediction box and scale prediction box. S3. An automatic calibration algorithm based on image scale calculates the widest connected region of the image within the scale prediction box and performs OCR text recognition to obtain the image scale. S4. Perform median filtering, threshold segmentation, edge smoothing, and small region filling on the crack image in the crack prediction box. S5. Perform Harris corner detection on the processed image to obtain candidate corners; S6. Filter the corner points to obtain the crack feature corner points and calculate the crack size characteristics based on the crack feature corner points.

2. The intelligent quantitative characterization method for wheel-rail fatigue cracks based on microscopic analysis images according to claim 1, characterized in that: Step S1 specifically includes the following steps: S11. To address the characteristics of high resolution but low contrast and noise sensitivity in scanning electron microscope (SEM) images, a combined fractal enhancement and NLM denoising process is employed to improve the contrast of the crack region and suppress noise interference. This includes: calculating the fractal dimension (FD) of the SEM image using box-counting; dynamically adjusting the contrast-limited adaptive histogram equalization (CL) parameter based on the FD value; dividing the image into an 8×8 grid and calculating a local histogram for each grid; limiting the histogram truncation threshold according to CL to avoid noise amplification; eliminating grid boundary artifacts through bilinear interpolation; introducing a fractal Brownian motion (FBM) model to constrain the enhancement intensity and preserve high-frequency details in the crack edge region; and finally, using the nonlocal mean (NLM) algorithm for denoising the enhanced image. S12. To address the low noise but limited resolution characteristics of optical microscope OM images, CLAHE is used to enhance details and suppress speckle noise while preserving global texture information. This includes the following steps: dividing the image into a 16×16 grid, calculating a histogram for each grid, setting a fixed contrast limit parameter CL=2.5 to avoid over-enhancement leading to artifacts, using logarithmic transformation to improve dark details, and finally combining dual-channel Retinex algorithm for preprocessing and noise reduction.

3. The intelligent quantitative characterization method for wheel-rail fatigue cracks based on microscopic analysis images according to claim 1, characterized in that: In step S2, Labelimg is used to label the dataset and train the model, which is divided into 7 categories: cracks extending to the left, cracks extending to the right, cracks in the middle, scale bar, "cm", "mm", and "μm". The preprocessed SEM / OM image from step S1 is input, and the YOLOv8-CSSTAM model is used for object detection. Non-maximum suppression (NMS) is used to eliminate overlapping boxes, and the predicted box with the highest confidence is retained. The confidence threshold is set to [value missing]. The NMS IoU threshold is set to The final output image includes crack prediction boxes and scale prediction boxes. The YOLOv8-CSSTAM model specifically includes: an improved YOLOv8 object detection model, and an embedded CSSTAM module composed of channel-space-scale triple attention modules; the CSSTAM module is a channel-space-scale triple attention module formed by adding scale attention SAM on the basis of CBAM.

4. The intelligent quantitative characterization method for wheel-rail fatigue cracks based on microscopic analysis images according to claim 1, characterized in that: In step S3, an automatic calibration algorithm based on the image scale is developed for the scale prediction bounding box output in step S2. Using an 8-neighborhood model, a seed point diffusion method is employed to label all pixels in connected regions, ultimately generating a labeling matrix. , The maximum connected region is selected by choosing the minimum and maximum x and y coordinates of all points within the connected region. ; in, The area of ​​the connected region. A set of connected regions; Calculate the maximum width within the largest connected region. Take the maximum width The pixel length of the scale bar: ; Morphological enhancement was performed on the predicted scale bounding box, broken strokes were connected, and PyTesseract was used to perform OCR text recognition on the predicted scale bounding box to extract numbers. The image scale was calculated as follows: ; in, This indicates the number recognized by the OCR. Indicates the image scale.

5. The intelligent quantitative characterization method for wheel-rail fatigue cracks based on microscopic analysis images according to claim 1, characterized in that: In step S4, the crack prediction box output in step S2 is subjected to median filtering and Ostu adaptive threshold segmentation to obtain a binarized image; then edge smoothing is performed to eliminate the jagged artifacts on the crack edges after binarization; finally, using the 8-neighborhood mode, all pixels in the connected region are marked by seed point diffusion, and the area of ​​each connected region is calculated. If it is less than a set threshold, it is determined to be noise and filled.

6. The intelligent quantitative characterization method for wheel-rail fatigue cracks based on microscopic analysis images according to claim 1, characterized in that: In step S5, Harris corner detection is performed on the crack image processed in step S4 to extract the corner points of the crack region, specifically including: Calculate the gray-level change rate of local regions in the image, identify points with significant gradient changes, i.e., corner points; for each pixel in the image... Calculate its in and gradient of direction and And construct the autocorrelation matrix The formula is expressed as follows: ; in, A 5x5 local window; Define corner response functions using Harris. To measure the corner response intensity of a pixel: ; in, , , and For matrix eigenvalues, This is an empirical constant, taken as 0.05; if Greater than the set threshold If the value is not found, the point is determined to be a corner point. By using Non-Maximum Suppression (NMS) and edge filtering, corner points with the largest response values ​​are retained in the local area to eliminate redundancy and to remove pseudo-corner points located on strong edges.

7. The intelligent quantitative characterization method for wheel-rail fatigue cracks based on microscopic analysis images according to claim 1, characterized in that: In step S6, the corner points detected by Harris in step S5 are filtered, and the size characteristics of the crack are calculated, specifically including: Based on their different propagation directions, cracks are classified into left-propagating cracks and right-propagating cracks. For left-propagating cracks: Define the area in the lower left corner of the crack prediction frame, which is 1 / 4 of the width and height. The leftmost corner point is The upper right corner, 1 / 4 of the width and height area The rightmost corner point is , The first non-zero pixel value in the y-th column from top to bottom is... , and These are the width and height of the crack prediction frame, respectively; the formula for calculating the crack size feature is as follows: Crack width: ; Crack depth: ; Crack propagation angle: ; line segment slope line segment slope ; For cracks extending to the right: Define the area in the lower right corner of the crack prediction frame, which is 1 / 4 of the width and height. The rightmost corner point is The upper left corner, 1 / 4 of the width and height area The rightmost corner point is , The first non-zero pixel value in the y-th column from top to bottom is... , and These are the width and height of the crack prediction frame, respectively; the formula for calculating the crack size feature is as follows: Crack pixel width: ; Crack pixel depth: ; Crack propagation angle: ; line segment slope line segment slope ; in, It is a point coordinates It is a point coordinates It is a point The coordinates; After obtaining the pixel size features of the crack, calculate the actual size features of the crack: Actual crack width: ; Actual crack depth: .

Citation Information

Patent Citations

  • Deep learning concrete bridge crack real-time detection method based on domain adaptation

    CN114693615A

  • Nuclear power plant concrete defect identification method based on YOLO algorithm

    CN117152073A

  • Field geological outcrop crack intelligent identification method based on fusion algorithm

    CN119784815A

  • Railway turnout defect detection method based on SCG-DETR detection model

    CN120355657A

  • Road crack detection method, medium and product

    US20250174019A1