Method, device and medium for identifying image of surface layer crack of synthetic material sports ground
By combining the improved Canny edge detection algorithm and the deformable two-level routing attention mechanism with the U-net network, the problems of accuracy and mobile deployment in crack detection on the surface layer of synthetic material sports fields are solved, and efficient and accurate identification of microcracks and automatic extraction of geometric parameters are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN SPORTS UNIV
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-29
AI Technical Summary
Existing crack detection technologies for synthetic material sports field surfaces suffer from insufficient identification accuracy, insensitivity to micro-cracks, and difficulty in mobile deployment, thus failing to meet the needs for early identification and timely repair.
The Canny edge detection algorithm is improved by adopting adaptive thresholding, multi-scale Gaussian filtering fusion and directional gradient continuity constraints. A deep learning model is constructed by combining a deformable two-level routing attention mechanism and a U-net network. Feature fusion is enhanced by spatial-channel cross-selection attention module to achieve automatic identification of crack regions.
It significantly improves the sensitivity and accuracy of early microcrack identification. The model's lightweight nature makes it suitable for mobile deployment and enables efficient and accurate crack segmentation and geometric parameter extraction in complex environments.
Smart Images

Figure CN121639678B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sports field surface crack recognition technology, specifically to a method for recognizing cracks in synthetic material sports field surface layers based on a U-Net network architecture. Background Technology
[0002] In recent years, with the in-depth implementation of the national fitness strategy, fitness trails have been widely constructed across the country. Synthetic material sports field surfaces, due to their excellent elasticity, anti-slip properties, weather resistance, and long service life, have been extensively used in the construction of these trails. With the construction of millions of kilometers of fitness trails and the increasing intensity of use, the need for maintenance and repair of synthetic material sports field surfaces has become increasingly prominent. During long-term service, synthetic material sports field surfaces are affected by a combination of factors, including repeated pedestrian loads, temperature changes, rainwater erosion, and the growth of surrounding vegetation roots, making them prone to micro-cracks and localized fissures. The appearance of cracks not only affects the smoothness and aesthetics of the fitness trail but may also further expand, causing structural damage such as bulging and peeling, reducing user comfort and safety, and posing potential adverse effects on the biomechanics of the lower limbs. Therefore, early identification of cracks in synthetic material sports field surfaces is a crucial step in improving the safety and service life of fitness trails.
[0003] Existing crack detection technologies largely originate from road and bridge engineering, primarily including manual inspection, crack width gauges, crack depth gauges, or image recognition-based automated detection methods. Traditional manual methods are inefficient, labor-intensive, and rely heavily on experience, making them unsuitable for large-scale public fitness trail inspections. In recent years, with the development of machine vision and deep learning technologies, automated crack identification methods have achieved some success in cement concrete and asphalt concrete pavements. However, existing automated crack identification methods face the following challenges when applied to synthetic material sports field surface layers:
[0004] (1) Low accuracy: Traditional recognition algorithms based on roads and bridges rely on surface features with obvious gray-scale contrast and uniform texture. However, the surface layer of synthetic material sports field has features such as granular distribution, diverse colors, high reflectivity, and blurred crack edges. Cracks often exhibit low contrast or irregular shapes, making traditional algorithms susceptible to noise interference, resulting in false detections and missed detections, and insufficient recognition accuracy.
[0005] (2) Insensitive to microcracks: early cracks at the millimeter level and below have low contrast, and traditional image processing methods are difficult to effectively extract their features.
[0006] (3) Difficult to deploy on mobile devices: Existing deep learning models have a large computational load and rely on cloud or high-performance computing platforms, making it difficult to achieve real-time detection on mobile terminals, which does not meet the "lightweight and immediacy" requirements of outdoor inspection of fitness trails.
[0007] In summary, existing crack detection technologies have limitations when applied to synthetic material sports field flooring, such as insufficient identification accuracy, insensitivity to early millimeter-level cracks, and lack of mobile device compatibility. They cannot yet meet the technical requirements of "early detection and early repair" in the maintenance of synthetic material sports field flooring. Summary of the Invention
[0008] This application provides a method for recognizing cracks in synthetic material sports field surfaces, addressing the problems of low accuracy, insensitivity to micro-cracks, and difficulty in mobile deployment in existing technologies for crack recognition of synthetic material sports field surfaces.
[0009] To address the aforementioned problems, in a first aspect, embodiments of this application provide a method for recognizing cracks in the surface layer of a synthetic material sports field, the method comprising the following steps:
[0010] A dataset of images of the synthetic material sports field surface layer was obtained, and the image dataset was pre-annotated with crack areas.
[0011] The image dataset of the synthetic material sports field surface layer is preprocessed, and the resulting image is used as the main input source. The Canny edge detection algorithm is improved by adopting adaptive thresholding, multi-scale Gaussian filtering fusion and directional gradient continuity constraint mechanism. The improved Canny edge detection algorithm is used to process the preprocessed image dataset, and the generated edge enhancement map is used as an auxiliary input source.
[0012] A deep learning model is constructed that integrates a deformable two-level routing attention mechanism with a U-net network. The model adopts a symmetrical encoder-decoder structure, which is bridged by a neck module. Corresponding layers of the encoder and decoder are fused through cross-layer skip connections. After fusion, a spatial-channel cross-selection attention module is introduced to enhance features.
[0013] By inputting both the main input source and the auxiliary input source into the trained deep learning model, a crack segmentation mask is obtained, enabling automatic identification of crack regions.
[0014] Preferably, the adaptive threshold is dynamically set based on the image grayscale histogram distribution to adapt to images with different lighting and contrast; the calculation formula is: High threshold T h =μ+kσ low threshold T l =μ-kσ ;in, μ The average gray level of the image; σ Standard deviation; k This is an empirical coefficient;
[0015] The multi-scale Gaussian fusion uses multiple Gaussian kernels with different standard deviation σ values for filtering, and then performs weighted fusion on the filtering results to enhance the edge response of fine cracks and wide cracks, and avoid feature loss at a single scale.
[0016] The directional gradient continuity constraint is to determine the continuity of the gradient direction of edge pixels after non-maximum suppression. If the directional change of adjacent pixels is less than a set threshold, they are retained, thereby enhancing the edge connectivity of the crack.
[0017] Preferably, the encoder adopts a three-layer downsampling structure:
[0018] The first layer consists of a block embedding layer, a two-layer routing attention module, and a deformable two-level routing attention module.
[0019] The second and third layers are both composed of a block merging layer, a two-layer routing attention module, and a deformable two-level routing attention module.
[0020] The decoder adopts a three-layer upsampling structure, each layer consisting of a deformable two-level routing attention module, a two-layer routing attention module, and a block merging layer.
[0021] Preferably, the neck module is located between the encoder and the decoder and consists of two consecutive deformable two-level routing attention modules;
[0022] The input end of the neck module is connected to the encoder through a block merging layer, and the output end is connected to the decoder through a block expansion layer.
[0023] Preferably, the spatial-channel cross-selection attention module is located after each skip connection, and its input is the feature concatenation result output by the encoder and decoder. The spatial-channel cross-selection attention module adaptively fuses the spatial details brought by the encoder and the semantic information brought by the decoder. Through parallel channel and spatial attention mechanisms, it selectively enhances the features that are beneficial to crack recognition and suppresses background noise.
[0024] Preferably, the method further includes:
[0025] Morphological analysis is performed on the crack segmentation mask, and post-processing is performed based on the analysis results to extract the geometric parameters of the crack.
[0026] Furthermore, the post-processing method includes connecting crack breakpoints, skeletalizing the crack region, and using the improved Canny edge detection algorithm to detect crack edges on the processed image, providing a reference for subsequent width measurement;
[0027] The geometric parameters of the cracks include the number of cracks, average width, length, and directional distribution.
[0028] Secondly, embodiments of this application provide a device for recognizing cracks in the surface layer of a synthetic sports field, characterized in that it includes:
[0029] The data acquisition module is used to acquire a dataset of images of the synthetic material sports field surface layer, wherein the image dataset has been pre-annotated with crack areas.
[0030] The dual-source processing module is used to preprocess the image dataset of the synthetic material sports field surface layer, and the resulting image is used as the main input source. The Canny edge detection algorithm is improved by adopting adaptive threshold, multi-scale Gaussian filtering fusion and directional gradient continuity constraint mechanism. The improved Canny edge detection algorithm is used to process the preprocessed image dataset, and the generated edge enhancement map is used as an auxiliary input source.
[0031] The model building module is used to build a deep learning model that integrates a deformable two-level routing attention mechanism and a U-net network. The model adopts a symmetrical encoder-decoder structure, which is bridged by a neck module. Corresponding layers of the encoder and decoder are fused through cross-layer skip connections. After fusion, a spatial-channel cross-selection attention module is introduced to enhance features.
[0032] The crack recognition module is used to input both the main input source and the auxiliary input source into the trained deep learning model to obtain a crack segmentation mask and realize the automatic recognition of crack regions.
[0033] Thirdly, this application provides a synthetic material sports field surface crack image recognition module, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the synthetic material sports field surface crack image recognition method described above.
[0034] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described method for recognizing cracks in the surface layer of a synthetic material sports field.
[0035] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0036] 1. The Canny edge detection algorithm is improved by adopting adaptive threshold, multi-scale Gaussian filtering fusion and directional gradient continuity constraint mechanism. A dual input source is constructed, which enables the model to effectively enhance the edge continuity and saliency of low-contrast microcracks in complex particle background, improve the quality of input features from the source, and significantly improve the sensitivity of early microcrack identification.
[0037] 2. A deep learning model integrating a deformable two-level routing attention mechanism and the U-net network was constructed. This model maintains the multi-scale advantages of U-net while achieving full-process geometric perception and efficient computation from feature extraction to reconstruction. As a result, the final segmentation results maintain high accuracy while the model also has good lightweight characteristics, laying the foundation for mobile deployment.
[0038] 3. The model pioneered the use of a built-in deformable two-level routing attention mechanism module, which enables the model's attention window to dynamically and adaptively focus on irregular and curved crack geometry rather than fixed regular regions during feature extraction. This results in the model having a strong ability to model the geometric deformation of cracks, especially cracks with varied shapes, and the segmented crack edges are more accurate and natural.
[0039] 4. A spatial-channel cross-selection attention module is introduced after the skip connection, which enables the model to make adaptive weighted selection when fusing the encoder’s detailed features and the decoder’s semantic features. This results in the effective enhancement of spatial details and channel features related to cracks, while suppressing the interference of background grain textures, and significantly improving the model’s segmentation robustness in complex scenes.
[0040] 5. In the parameter extraction stage, a method combining skeletonization algorithm and edge map was adopted. The crack width was measured by calculating the average minimum distance from skeleton points to the edge. This method makes the measurement of crack width no longer dependent on manual visual inspection or simple maximum value. As a result, the extraction results of geometric parameters are more objective, accurate and stable, providing reliable data support for subsequent condition assessment.
[0041] 6. By integrating a series of open-source tools such as Labelme, OpenCV, and PyTorch into a complete automated software toolchain, the entire process from data annotation, image preprocessing, model inference to post-processing and visualization analysis has been standardized and automated, resulting in a significant improvement in the engineering efficiency of crack identification, a reduction in manual operation costs and subjective errors, and good engineering practicality and scalability. Attached Figure Description
[0042] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0043] Figure 1 This is a flowchart of the method for recognizing cracks in the surface layer of a synthetic sports field provided in Embodiment 1 of this application;
[0044] Figure 2 This is a schematic diagram of the DBRA-Unet model provided in Embodiment 1 of this application;
[0045] Figure 3 This is a comparison diagram of the identification results of the method provided in Embodiment 1 of this application and the traditional method;
[0046] Figure 4 This is a structural block diagram of the synthetic material sports field surface crack image recognition device provided in Embodiment 2 of this application;
[0047] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0048] This application provides a method for recognizing cracks in synthetic material sports field surfaces, addressing the problems of low accuracy, insensitivity to micro-cracks, and difficulty in mobile deployment in existing technologies for crack recognition of synthetic material sports field surfaces.
[0049] To address the aforementioned issues, the overall concept of this application is as follows:
[0050] To address the characteristics of synthetic sports field surfaces—complex textures, fine particles, and significant variations in lighting—a fully automated recognition system was constructed, encompassing image acquisition and annotation, preprocessing, deep learning model recognition, geometric parameter extraction, and visualization.
[0051] In the image preprocessing stage, an improved Canny edge detection algorithm is introduced, which effectively enhances the edge continuity of low-contrast microcracks through an adaptive threshold and multi-scale Gaussian filtering fusion mechanism.
[0052] In terms of model structure, a novel deep learning network architecture is designed specifically for the task of segmenting crack images in synthetic material sports field surfaces. Its core idea is to deeply integrate a deformable two-level routing attention mechanism with the U-net network, forming a dedicated model that combines geometric deformation adaptability, high computational efficiency, and multi-scale feature preservation capabilities. This enables multi-scale perception and accurate segmentation of the edge morphology and geometric details of cracks in synthetic material sports field surfaces.
[0053] Furthermore, to achieve standardization and repeatability, this application constructs an integrated, fully automated software toolchain for identifying cracks in the surface layer of synthetic material sports fields. It integrates components such as Labelme, OpenCV, NumPy, SciPy, Pandas, Matplotlib, and PyTorch to form an integrated system for data acquisition, model inference, post-processing, and visualization.
[0054] To better understand the above technical solutions, exemplary embodiments will be described in detail below, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses consistent with some aspects of this application as detailed in the appended claims.
[0055] Example 1
[0056] Figure 1 This is a flowchart of the synthetic material sports field surface crack image recognition method provided in Embodiment 1 of this application. The synthetic material sports field surface crack image recognition method includes the following steps:
[0057] Step S1: Obtain a dataset of images of the synthetic material sports field surface layer, wherein the crack areas have been pre-annotated in the image dataset.
[0058] Specifically, images of the synthetic material sports field surface can be captured using smartphones, cameras, or drones. In one optional embodiment, a smartphone (such as an iPhone 14 or a comparable Android device) is used to capture images at a height of 0.5-1.5 meters above the ground and an angle of 30°-60°, with an image resolution of at least 1920×1080 pixels.
[0059] The training samples should cover various lighting conditions, including sunny days, cloudy days, and nighttime, to ensure data diversity and robustness. Simultaneously, the training samples should include cracks of various sizes. In one optional embodiment, cracks are categorized into three types: extremely small cracks, microcracks, and obvious cracks. Specifically: extremely small cracks have a width <0.5 mm, microcracks have a width of 0.5-2 mm, and obvious cracks have a width >2 mm.
[0060] Two professionals used Labelme software to perform pixel-level semantic segmentation and annotation of the crack region, generating a standard JSON file and the corresponding binary mask image. Annotation consistency was verified using a Kappa coefficient (≥0.85). Finally, a structured database containing the original image, mask image, and attribute labels was constructed.
[0061] Step S2: Preprocess the image dataset of the synthetic material sports field surface layer, and use the resulting image as the main input source; improve the Canny edge detection algorithm by adopting adaptive threshold, multi-scale Gaussian filtering fusion and directional gradient continuity constraint mechanism, and use the improved Canny edge detection algorithm to process the preprocessed image dataset, and use the generated edge enhancement map as an auxiliary input source.
[0062] Specifically, preprocessing is used to reduce particle noise and the influence of illumination, and to enhance crack edge features. The preprocessing methods include (implemented in Python + OpenCV):
[0063] Color normalization: Convert the original image from RGB space to HSV color space, normalize the luminance channel (V channel), reduce device differences and lighting fluctuations, and highlight the contrast between cracks and grainy background;
[0064] Illumination compensation: An illumination decomposition method based on Retinex theory is adopted to perform adaptive histogram equalization (CLAHE) on strong shadow and reflective areas to enhance local contrast;
[0065] Surface texture denoising: To address the high-frequency noise caused by surface particles, wavelet transform is used to decompose the image at multiple scales and filter out high-frequency components; median filtering or guided filtering is used for crack edge regions to preserve crack edge details while reducing particle noise interference.
[0066] Data augmentation: horizontal flip, vertical flip, rotation, random occlusion.
[0067] The image after the above preprocessing is used as the main input source of the model.
[0068] Furthermore, the preprocessed image dataset is further processed using an improved Canny edge detection algorithm. Specific improvements include:
[0069] Adaptive thresholding: This method abandons the fixed threshold used in traditional Canny edge detection algorithms and dynamically sets high and low thresholds based on the image's grayscale histogram distribution. The calculation formula is: High threshold... T h =μ+kσ low threshold T l =μ-kσ ;in, μ The average gray level of the image; σ Standard deviation; k This is an empirical coefficient, ranging from 0.3 to 0.5. This allows it to adapt to images with different lighting and contrast levels.
[0070] Multi-scale Gaussian fusion: Multiple Gaussian kernels with different standard deviations (σ) are used for filtering, and the filtering results are weighted and fused. This approach can simultaneously enhance the edge response of both fine and wide cracks, avoiding feature loss at a single scale. In one optional implementation, a three-scale Gaussian filter is used, with a standard deviation... σ The values are 0.5, 1.0, and 2.0 respectively.
[0071] Directional gradient continuity constraint: After non-maximum suppression, the gradient direction of edge pixels is judged to be continuous. If the direction change of adjacent pixels is less than 30°, it is retained, thereby enhancing the edge connectivity of the continuous structure of cracks.
[0072] Morphological closing operation: Morphological closing operation is performed using a 3×3 kernel to bridge tiny breaks in the edges.
[0073] The resulting edge enhancement map serves as an additional input source to the model, working in conjunction with the main input source to enhance the microcrack response.
[0074] It is worth noting that both the main input source image and the additional input source image need to be normalized. The processed images are scaled to a uniform resolution of 512×512. The pixel values are normalized to keep them within the range of [0,1] or [-1,1].
[0075] The improved Canny edge detection algorithm significantly enhances the edge continuity and integrity of low-contrast microcracks in complex synthetic material backgrounds, effectively suppresses pseudo-edges generated by surface particle noise, provides a higher quality input source for subsequent deep learning models, and improves the recognition accuracy of the model from the source.
[0076] Step S3: Construct a deep learning model that integrates a deformable two-level routing attention mechanism with a U-net network. The model adopts a symmetrical encoder-decoder structure, which is bridged by a neck module. Corresponding layers of the encoder and decoder are fused through a skip connection. After fusion, a spatial-channel cross-selection attention module (SCCSA) is introduced to enhance features.
[0077] The architecture of the deep learning model (hereinafter referred to as the DBRA-Unet model) that integrates the deformable two-level routing attention mechanism (DBRA) and the U-net network constructed in this embodiment is as follows: Figure 2 As shown, the specific structure includes:
[0078] encoder
[0079] The encoder adopts a three-layer pyramid structure.
[0080] The first layer consists of a patch embedding layer, a bi-formation routing attention module (BiFormer), and a deformable bi-formation routing attention module (DeBiFormer). The patch embedding layer uses two 3×3 convolutional layers to extract local features. The BiFormer module models the globally relevant regions; the DeBiFormer module introduces a deformable point offset mechanism to adaptively capture crack edges and irregular texture features.
[0081] The second and third layers both consist of a patch merging layer, a BiFormer module, and a DeBiFormer module. The patch merging layer uses 3×3 convolutions to achieve spatial downsampling and channel expansion.
[0082] The number of blocks in the second and third layers are 2, 2, and 8, respectively.
[0083] The BiFormer module includes deep convolutional layers, a two-level routing attention module, multi-layer perceptron layers, and a residual structure. It achieves coarse-to-fine granular feature fusion through region partitioning and the selection of the most relevant region, thereby improving crack feature extraction capabilities.
[0084] The DeBiFormer module builds upon the BiFormer module by replacing the core attention mechanism with a deformable two-level routed attention mechanism (DBRA) and replacing the standard multilayer perceptron with a convolutional feedforward network containing convolutions, thereby further enhancing the geometric modeling capability for irregular cracks. It introduces a deformable point sensing mechanism, using an offset network to generate reference point offsets based on query features, achieving adaptive region segmentation. This allows the model to dynamically focus on crack regions in complex backgrounds, improving the accuracy of micro-crack detection.
[0085] The implementations of the Patch Embedding layer, Patch Merging layer, BiFormer module, and DeBiFormer module are all mature technologies in this field. However, the encoder architecture that integrates them is original to this application.
[0086] The encoder's workflow is as follows:
[0087] Phase 1: Begins with a patch embedding layer, converting the input image into a feature map of size H / 4 × W / 4 × C. This is followed by a combination of two stacked BiFormer blocks and a DeBiFormer block.
[0088] Phase 2: Begins with a patch merging layer, which downsamples the feature map by a factor of 2, resulting in a size of H / 8 × W / 8 × 2C. This is followed by sequentially combining two stacked BiFormer blocks with a DeBiFormer block.
[0089] Phase 3: Begins with a patch merging layer, downsampled to a size of H / 16 × W / 16 × 4C. This is followed by sequentially combining 8 stacked BiFormer blocks + DeBiFormer blocks.
[0090] Where H, W, and C represent the height, width, and number of channels of the image, respectively.
[0091] Neck module
[0092] The Neck module, located between the encoder and decoder, consists of two consecutive DeBiFormer modules and serves to bridge high-level semantic features with low-level spatial features. The input of the Neck module is connected to the encoder via a patch merging layer, and the output is connected to the decoder via a patch expanding layer.
[0093] The Neck module works as follows:
[0094] Stage 4: The feature map output from Stage 3 enters the Neck module through a Patch Merging layer. After deep refinement and global context aggregation through two DeBiFormer blocks, the output high semantic density feature map (H / 32 × W / 32 × 8C) is then fed into the decoder through a Patch Expanding layer.
[0095] decoder
[0096] The decoder structure is symmetrical to the encoder and adopts a three-layer pyramid upsampling structure.
[0097] Each layer consists of a DeBiFormer module, a BiFormer module, and a Patch Expanding layer. The Patch Expanding layer is used for feature upsampling and resolution restoration, improving the spatial resolution of the feature map through deconvolution or subpixel rearrangement operations. The DeBiFormer and BiFormer modules further fuse the upsampled shallow and deep features to achieve joint reconstruction of spatial details and semantic information. Through the skip connection mechanism, the corresponding layer outputs of the encoder are fused to effectively preserve crack edge and geometric morphology information.
[0098] The decoder's workflow is as follows:
[0099] Stage 5: Features upsampled in the Patch Expanding layer are concatenated with the output of Stage 3 of the encoder via skip connections, and then feature selection is performed through a Channel-Spatial Feature Module (SCCSA). The features are then processed by combining 8 stacked DeBiFormer blocks and BiFormer blocks, and then upsampled again through the Patch Expanding layer.
[0100] Stage 6: The features upsampled in Stage 5 are concatenated with the output of Stage 2 of the encoder through skip connections, and then selected by a Spatial-Channel Cross-Selection Attention Module (SCCSA). Then, they are combined by two stacked DeBiFormer blocks + BiFormer blocks, and then upsampled by a Patch Expanding layer.
[0101] Stage 7: The features upsampled in Stage 6 are concatenated with the output of Stage 1 of the encoder through skip connections, and then feature selection is performed through an SCCSA module. Then, the feature map is upsampled to the original input resolution through two stacked DeBiFormer blocks + BiFormer blocks, and then through a patch expanding layer. Finally, a crack segmentation mask is output through a prediction head (such as a 1×1 convolution).
[0102] Spatial-Channel Cross-Selection Attention Module (SCCSA)
[0103] The Spatial-Channel Cross-Selection Attention (SCCSA) module enhances the interaction between spatial and channel information at the network's end. Located after each skip connection, this module takes as input the concatenated feature outputs from the encoder and decoder, and adaptively fuses the spatial details from the encoder with the semantic information from the decoder. Through parallel channel and spatial attention mechanisms, it selectively enhances features beneficial for crack detection while suppressing background noise.
[0104] The SCCSA module comprises a channel attention submodule and a spatial attention submodule. The channel attention submodule uses a multilayer perceptron structure to compress and expand channels, reducing the compression ratio by 1 / 4 to amplify cross-dimensional correlation. The spatial attention submodule uses two 7×7 convolutional layers to focus on and enhance spatial information with the same reduction ratio, thereby increasing the model's sensitivity to crack geometry.
[0105] The DBRA-Unet model constructed in this embodiment integrates a deformable two-level routing attention mechanism to achieve multi-scale perception and accurate segmentation of crack edge morphology and geometric details. Furthermore, the SCCSA module further enhances spatial and channel information interaction, enabling the model to exhibit high robustness and recognition accuracy in complex environments.
[0106] Step S4: Input both the main input source and the auxiliary input source into the trained deep learning model to obtain a crack segmentation mask and achieve automatic identification of crack regions.
[0107] The constructed DBRA-Unet model was trained using training samples. The model training employed the Adam optimizer, with an initial learning rate set to 5 × 10⁻⁶. -4 The learning rate scheduler, Cosine AnnealingLR, is used to gradually decay the learning rate over 200 training cycles to achieve stable convergence. The input resolution of the training images is uniformly 256×256, and the batch size is 16.
[0108] To improve the model's generalization ability and robustness, various data augmentation strategies were employed, including: geometric transformations such as horizontal flipping, vertical flipping, and rotation; random brightness and contrast adjustments; and cutout occlusion enhancement with a probability of 0.25. The loss function used was the Dice loss (…). L dice ) and cross-entropy loss ( L ce The weighted combination form of )
[0109] Loss=λL dice +(1-λ)L ce
[0110] in, Loss λ represents the total loss; λ is the weighting parameter that controls the balance between the two losses. L dice Used to measure the degree of overlap in crack regions L ce Used to measure classification accuracy.
[0111] The trained DBRA-Unet model can perform pixel-level crack segmentation on images of cracks in synthetic material sports field surfaces with extremely high accuracy. Furthermore, while maintaining high accuracy, thanks to its routing attention mechanism, the model's computational efficiency surpasses that of the standard Transformer architecture, demonstrating significant lightweight potential. It can be deployed on mobile computing terminals to achieve real-time image recognition and analysis of cracks in synthetic material sports field surfaces.
[0112] In a preferred embodiment, the method for recognizing cracks in the surface layer of a synthetic sports field further includes:
[0113] Step S5: Perform morphological analysis on the crack segmentation mask, and perform post-processing based on the analysis results to extract the geometric parameters of the crack.
[0114] Specifically, the post-processing method includes:
[0115] Crack breakpoints were connected, and the crack region was skeletonized. An improved Canny edge detection algorithm was used to detect crack edges in the processed image, providing a reference for subsequent width measurement. Details are as follows:
[0116] 1. Connectivity analysis: Calculate the number of pixels in each region based on the 8-connected component label, and remove noise regions with an area less than 20 px or an aspect ratio less than 2;
[0117] 2. Fault Connection: A nearest neighbor search strategy based on KD-Tree (k-dimensional tree) is used to connect the fracture breakpoints, thereby enhancing continuity;
[0118] 3. Skeletonization: The Zhang-Suen iterative thinning algorithm is used to refine the crack region into a single-pixel-wide centerline, preserving the crack's topological structure and facilitating the calculation of geometric parameters. The Zhang-Suen iterative thinning algorithm is a well-known classic algorithm in the field of image processing, published by TYZHANG and CYSUEN in the journal *Communications of the ACM* in 1984.
[0119] 4. Edge detection: Execute the improved Canny edge detection algorithm described above to detect the crack edges, providing a reference for subsequent width measurement.
[0120] The extraction of the geometric parameters of the crack specifically includes:
[0121] 1. Width: Calculate the average minimum distance from the skeleton point to the edge;
[0122] 2. Length: Calculated based on the skeleton pixel count and scale.
[0123] 3. Direction: The direction of linear cracks is identified by probabilistic Hough transform, and the least squares principal direction fitting method is used for nonlinear cracks.
[0124] 4. Output results: Generate vectorized crack data (CSV format), overlay visualization (PNG), and output statistical reports, including crack number, average width, length, and direction distribution.
[0125] By combining skeletonization algorithms with edge maps, a method for measuring crack width by calculating the average minimum distance from skeleton points to the edge is developed. This method eliminates the reliance on manual visual inspection or simple maximum values for crack width measurement, resulting in more objective, accurate, and stable extraction of geometric parameters. This provides reliable data support for subsequent condition assessment.
[0126] Furthermore, to automate and scale up the above methods, this embodiment constructs a software toolchain for intelligent analysis of crack image recognition. This toolchain is developed based on Python and integrates modules such as labelme, OpenCV, NumPy, SciPy, Pandas, Matplotlib, and the PyTorch framework to achieve an integrated digital workflow for data acquisition, preprocessing, model inference, post-processing, statistics, and visualization.
[0127] The software toolchain consists of seven functional modules:
[0128] Data Acquisition and Labeling Module (Labelme)
[0129] Data input module
[0130] Image preprocessing module (OpenCV library + NumPy library)
[0131] Model Inference Module (PyTorch Framework)
[0132] Post-processing module (NumPy library + SciPy library)
[0133] Parameter Statistics and Analysis Module (Pandas Library)
[0134] Visualization output module (Matplotlib library)
[0135] The system operation process is as follows:
[0136] Labelme annotation → Image input → Preprocessing → Model inference → Postprocessing → Parameter statistics → Visualization output.
[0137] The functions of each module are described below:
[0138] Data acquisition and annotation module: Import crack images and use Labelme for pixel-level annotation, generate JSON and mask files, and form a unified database structure.
[0139] Image preprocessing module: Implements normalization, illumination compensation, noise suppression and edge enhancement, and outputs a uniform-sized (512×512) NumPy array.
[0140] Model Inference Module: Loads the trained DBRA-Unet model, performs GPU-accelerated inference, and outputs the crack mask.
[0141] Post-processing module: Calls the SciPy and NumPy libraries to perform connected component analysis, skeleton extraction, and geometric parameter calculation, and outputs a structured crack feature dictionary.
[0142] Parameter statistical analysis module: Uses the Pandas library to batch statistically analyze the number, width, length and direction distribution of cracks, and generate Excel and JSON reports.
[0143] Visualization output module: Uses the Matplotlib library to draw crack distribution histograms, directional rose diagrams, and identification overlay diagrams, and can export charts in PNG / PDF format.
[0144] The following comparative experiments compare the recognition performance of the proposed DBRA-Unet model with that of the current mainstream segmentation models SegFormer and TransUNet on the same test set to verify the advancement and effectiveness of this application.
[0145] Test data: A set of representative images of synthetic sports field surfaces was selected from the standardized database constructed above as the test set. These images cover different lighting conditions, surface wear levels, and crack morphologies.
[0146] Comparison Model:
[0147] SegFormer: An efficient semantic segmentation model based on Transformer.
[0148] TransUNet: A hybrid architecture model that combines Transformer and U-Net.
[0149] The model used in this application is DBRA-Unet, as described above.
[0150] Figure 3 Four typical comparative cases are presented in tabular form, with each row representing a test sample. The original input image demonstrates the complex background texture, grain, and lighting conditions of the synthetic material sports field surface. The labels are pixel-level real-world crack areas annotated by professionals, serving as a benchmark for evaluating model performance.
[0151] Through comparative analysis, it can be seen that:
[0152] In terms of microcrack identification: SegFormer showed obvious missed detections for extremely narrow microcracks, TransUNet showed breaks, discontinuities or magnifications, while DBRA-Unet, with its improved edge preprocessing and deformable attention mechanism of DeBiFormer blocks, successfully identified continuous and complete microcrack morphologies, which were highly consistent with the labels.
[0153] Regarding complex textures and noise suppression: When faced with dense surface particles, SegFormer and TransUNet's predictions exhibit numerous false positives caused by particles, resulting in significant noise in the results. In contrast, DBRA-Unet, through the DBRA mechanism and SCCSA module, effectively focuses on the true global context of cracks, significantly suppressing the interference of particle noise, and producing cleaner and more accurate output results.
[0154] Regarding crack edge integrity: For irregularly shaped cracks, DBRA-Unet segments crack edges that are smoother and more coherent, and better preserves the natural topology of the crack. In contrast, the prediction results of the comparison model appear coarser or exhibit local distortion.
[0155] In summary, compared with existing advanced models such as SegFormer and TransUNet, the crack identification method based on DBRA-Unet proposed in this invention has significant advantages in terms of micro-crack sensitivity, robustness to complex backgrounds, and edge segmentation accuracy. This verifies the effectiveness of the improved preprocessing process and novel network architecture designed for the characteristics of synthetic material sports field surface layers, and can meet the high-precision requirements for "early detection and early repair" of cracks in engineering practice.
[0156] Example 2
[0157] Based on the same inventive concept as the synthetic material sports field surface crack image recognition method in Embodiment 1 above, this embodiment also provides a synthetic material sports field surface crack image recognition device, such as... Figure 4 As shown, the device includes:
[0158] The data acquisition module is used to acquire a dataset of images of the synthetic material sports field surface layer, wherein the image dataset has been pre-annotated with crack areas.
[0159] The dual-source processing module is used to preprocess the image dataset of the synthetic material sports field surface layer, and the resulting image is used as the main input source. Based on the Canny edge detection algorithm, an adaptive threshold, multi-scale Gaussian filter fusion and directional gradient continuity constraint mechanism are used to process the preprocessed image dataset, and the generated edge enhancement map is used as an auxiliary input source.
[0160] The model building module is used to build a deep learning model that integrates a deformable two-level routing attention mechanism and a U-net network. The model adopts a symmetrical encoder-decoder structure, which is bridged by a neck module. Corresponding layers of the encoder and decoder are fused through cross-layer skip connections. After fusion, a spatial-channel cross-selection attention module is introduced to enhance features.
[0161] The crack recognition module is used to input both the main input source and the auxiliary input source into the trained deep learning model to obtain a crack segmentation mask and realize the automatic recognition of crack regions.
[0162] The various specific processes and examples of the synthetic material sports field surface crack image recognition method in the aforementioned Embodiment 1 are also applicable to the synthetic material sports field surface crack image recognition device of this embodiment. Through the detailed description of Embodiment 1, those skilled in the art can clearly understand the implementation method of the synthetic material sports field surface crack image recognition device of this embodiment. Therefore, for the sake of brevity, it will not be described in detail here.
[0163] Example 3
[0164] Based on the same inventive concept as the synthetic material sports field surface crack image recognition method in Embodiment 1 above, this embodiment also provides a synthetic material sports field surface crack image recognition module, which stores a computer program. When the program is executed by a processor, it implements the steps of the synthetic material sports field surface crack image recognition method described in Embodiment 1.
[0165] Example 4
[0166] Based on the same inventive concept as the synthetic material sports field surface crack image recognition method in Embodiment 1 above, this embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the synthetic material sports field surface crack image recognition method described in Embodiment 1.
[0167] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0168] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0169] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0170] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0171] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0172] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for recognizing cracks in the surface layer of a synthetic material sports field, the method comprising the following steps: A dataset of images of the synthetic material sports field surface layer was obtained, and the image dataset was pre-annotated with crack areas. The image dataset of the synthetic material sports field surface layer is preprocessed, and the resulting image is used as the main input source. The Canny edge detection algorithm is improved by adopting adaptive thresholding, multi-scale Gaussian filtering fusion and directional gradient continuity constraint mechanism. The improved Canny edge detection algorithm is used to process the preprocessed image dataset, and the generated edge enhancement map is used as an auxiliary input source. A deep learning model is constructed that integrates a deformable two-level routing attention mechanism with a U-net network. The model adopts a symmetrical encoder-decoder structure, which is bridged by a neck module. Corresponding layers of the encoder and decoder are fused through cross-layer skip connections. After fusion, a spatial-channel cross-selection attention module is introduced to enhance features. By inputting both the main input source and the auxiliary input source into the trained deep learning model, a crack segmentation mask is obtained, thereby enabling automatic identification of crack regions. The adaptive threshold is dynamically set based on the image grayscale histogram distribution, with the following calculation formula: High threshold T h =μ+kσ low threshold T l =μ-kσ ;in, μ The average gray level of the image; σ Standard deviation; k This is an empirical coefficient; The directional gradient continuity constraint is to determine the continuity of the gradient direction of edge pixels after non-maximum suppression. If the directional change of adjacent pixels is less than a set threshold, they are retained.
2. The method for recognizing cracks in the surface layer of a synthetic material sports field as described in claim 1, characterized in that, The multi-scale Gaussian filtering fusion uses multiple Gaussian kernels with different standard deviation σ values for filtering, and then performs weighted fusion on the filtering results.
3. The method for recognizing cracks in the surface layer of synthetic sports fields as described in claim 1, characterized in that, The encoder adopts a three-layer downsampling structure: The first layer consists of a block embedding layer, a two-layer routing attention module, and a deformable two-level routing attention module. The second and third layers are both composed of a block merging layer, a two-layer routing attention module, and a deformable two-level routing attention module. The decoder adopts a three-layer upsampling structure, each layer consisting of a deformable two-level routing attention module, a two-layer routing attention module, and a block merging layer.
4. The method for recognizing cracks in the surface layer of a synthetic sports field as described in claim 1, characterized in that, The neck module is located between the encoder and the decoder and consists of two consecutive deformable two-level routing attention modules; The input end of the neck module is connected to the encoder through a block merging layer, and the output end is connected to the decoder through a block expansion layer.
5. The method for recognizing cracks in the surface layer of a synthetic sports field as described in claim 1, characterized in that, The spatial-channel cross-selection attention module is located after each skip connection, and its input is the feature concatenation result output by the encoder and decoder. The spatial-channel cross-selection attention module adaptively fuses the spatial details brought by the encoder and the semantic information brought by the decoder. Through parallel channel and spatial attention mechanisms, it selectively enhances the features that are beneficial to crack recognition and suppresses background noise.
6. The method for recognizing cracks in the surface layer of a synthetic material sports field as described in claim 1, characterized in that, The method further includes: Morphological analysis is performed on the crack segmentation mask, and post-processing is performed based on the analysis results to extract the geometric parameters of the crack.
7. The method for recognizing cracks in the surface layer of a synthetic sports field as described in claim 6, characterized in that, The post-processing method includes connecting crack breakpoints and skeletonizing crack regions. The improved Canny edge detection algorithm is used to detect crack edges on the processed image, providing a reference for subsequent width measurement. The geometric parameters of the cracks include the number of cracks, average width, length, and directional distribution.
8. A device for recognizing cracks in the surface layer of a synthetic sports field, characterized in that, include: The data acquisition module is used to acquire a dataset of images of the synthetic material sports field surface layer, wherein the image dataset has been pre-annotated with crack areas. The dual-source processing module is used to preprocess the image dataset of the synthetic material sports field surface layer, and the resulting image is used as the main input source. The Canny edge detection algorithm is improved by adopting adaptive threshold, multi-scale Gaussian filtering fusion and directional gradient continuity constraint mechanism. The improved Canny edge detection algorithm is used to process the preprocessed image dataset, and the generated edge enhancement map is used as an auxiliary input source. The model building module is used to build a deep learning model that integrates a deformable two-level routing attention mechanism and a U-net network. The model adopts a symmetrical encoder-decoder structure, which is bridged by a neck module. Corresponding layers of the encoder and decoder are fused through cross-layer skip connections. After fusion, a spatial-channel cross-selection attention module is introduced to enhance features. The crack recognition module is used to input both the main input source and the auxiliary input source into the trained deep learning model to obtain a crack segmentation mask and realize the automatic recognition of crack regions. The adaptive threshold is dynamically set based on the image grayscale histogram distribution, with the following calculation formula: High threshold T h =μ+kσ low threshold T l =μ-kσ ;in, μ The average gray level of the image; σ Standard deviation; k This is an empirical coefficient; The directional gradient continuity constraint is to determine the continuity of the gradient direction of edge pixels after non-maximum suppression. If the directional change of adjacent pixels is less than a set threshold, they are retained.
9. A synthetic material sports field surface crack image recognition module, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the synthetic material sports field surface crack image recognition method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the synthetic material sports field surface crack image recognition method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Crack identifying method based on deep learning convolutional neural network
CN107480611A
Beef cattle salivation behavior identification method based on inspection robot and RT-DETR-DMSE
CN120014698A