Pavement crack accurate segmentation method based on histogram interaction attention

By using histogram interactive attention and local intensity enhancer in the UHI-Net network structure, combined with bi-branch detail enhancement feedforward and Fourier jump module, the boundary continuity and information loss problems of crack segmentation in complex road surface scenarios are solved, and high-precision crack segmentation results are achieved.

CN121564336APending Publication Date: 2026-02-24CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202511660742.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing deep learning-based road crack segmentation networks struggle to maintain the boundary continuity of thin, discontinuous cracks in real road scenarios with complex noise backgrounds, low contrast, and multi-scale morphology. Furthermore, they suffer from information loss and high-frequency noise interference during encoder-decoder cross-layer fusion.

Method used

A U-shaped network structure (UHI-Net) is adopted, and histogram interactive attention (HIA) and local intensity enhancer (LIE) are introduced to perform feature interaction in the encoder. Combined with bi-branch detail enhancement feedforward (DDEF) and fused Fourier skip module (FFSM), local-global joint modeling and frequency-spatial collaborative enhancement are achieved.

Benefits of technology

It improves the accuracy and robustness of crack segmentation, maintains the boundary continuity of thin, discontinuous cracks, reduces information loss and noise interference, and significantly improves recall, F1-score and mIoU.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564336A_ABST
    Figure CN121564336A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of deep learning and computer vision, and discloses a histogram interactive attention-based pavement crack segmentation network processing method and system, so as to enhance the edge detail fidelity and improve the crack segmentation precision. The method comprises the steps of image preprocessing, up-sampling, down-sampling, feature fusion and image reconstruction processing. Wherein global feature modeling in the intensity sub-boxes and among the sub-boxes is realized by constructing a histogram interactive attention module (HIA); a double-branch detail enhancement feedforward module (DDEF) is introduced to enhance spatial detail and high-frequency edge information expression; meanwhile, a Fourier jump enhancement module (FFSM) is adopted to jointly refine jump connection features in a spatial domain and a frequency domain. Through the synergistic effect of the modules, the network can realize continuous recovery and structural consistency modeling of a crack boundary in a complex pavement environment, so that the accuracy and the stability of a segmentation result are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision and image segmentation technology, and in particular to a method and system for accurate segmentation of road surface cracks based on histogram interactive attention. Background Technology

[0002] Road surface cracks are the most common external damage manifestation of highway infrastructure, seriously affecting the service life and safety performance of roads, and are a key indicator in highway safety monitoring and infrastructure health assessment. Therefore, road surface crack detection is an important part of highway maintenance work, with significant economic and social value. In complex real-world scenarios, cracks often exhibit low contrast, varying widths, blurred boundaries, and complex topological structures, and are accompanied by uncontrollable factors such as noise, shadows, and occlusion, leading to insufficient robustness of traditional threshold segmentation and edge detection methods. Against this backdrop, deep learning methods have become the mainstream approach in recent years, with segmentation networks based on convolutional neural networks (CNNs) and the Transformer architecture based on self-attention showing certain advantages in local texture and global dependency modeling, respectively.

[0003] However, many existing deep learning-based segmentation networks do not pay enough attention to the continuity and integrity of thin and discontinuous crack boundaries, lack the ability to characterize high-frequency edge details, and suffer from information loss in the feature recognition module, making it difficult to stably recover the fine structure during the decoding stage, resulting in problems such as inaccurate crack localization and discontinuous segmentation of long cracks. Summary of the Invention

[0004] The technical problem to be solved by this invention is to improve the accuracy and robustness of crack segmentation in real road surface scenes with complex noise backgrounds, low contrast and multi-scale morphology, maintain the boundary continuity of thin and discontinuous cracks, and reduce information loss and high-frequency noise interference in encoder-decoder cross-layer fusion.

[0005] To address the aforementioned technical problems, this invention proposes a method for accurate road crack segmentation based on histogram interactive attention, comprising image acquisition and preprocessing, feature embedding, encoder feature extraction, bottleneck aggregation, skip connection fusion, decoder reconstruction, and mask output. The following technical solution is adopted: a U-shaped network structure (UHI-Net) is designed, including an encoder, decoder, and bottleneck and skip connection fusion modules. Histogram interactive attention (HIA) and local intensity enhancer (LIE) are introduced into the Transformer block of the encoder. A bi-branch detail enhancement feedforward (DDEF) is introduced into the feedforward path, and a fused Fourier skip module (FFSM) is used at the skip connections to achieve local-global joint modeling and frequency-spatial collaborative enhancement, ultimately outputting a crack segmentation mask.

[0006] The method includes the following steps:

[0007] In the same processing flow, the input image is first preprocessed, and then initial features are generated by the embedding module. Within the Transformer blocks of each stage of the encoder, histogram interactive attention based on intensity binning is used to perform self-attention interaction within and between bins on the features, and a local intensity enhancer is used to compensate for the local spatial structure destruction caused by sorting. A dual-branch detail enhancement feedforward is introduced in the feedforward path. The semantic branch uses multi-scale correlated separable convolution to enhance the key perception and orientation-sensitive feature recognition of slender and irregular cracks, while the detail branch uses Laplacian edge enhancement and lightweight gating to emphasize high-frequency boundary cues. At the jump connection of features of the same scale between the encoder and decoder, a fused Fourier jump module is used to jointly enhance the amplitude and phase in the frequency domain and fuse it with the output of the spatial branch to reduce the downsampling loss and noise interference. In the decoder stage, features are upsampled and fused and refined step by step, and finally crack segmentation mask is output. In the training stage, a weighted combination of binary cross-entropy (BCE) and Dice loss is used to optimize the network parameters. Evaluation metrics include precision, recall, F1-score, and mIoU.

[0008] The algorithm idea is as follows:

[0009] For a certain stage of the encoder's feature map, spatial feature binning is first performed on some channels based on pixel intensity, and crack-related features and background features are recombined in different bins. Then, self-attention is applied within and between bins to achieve joint feature interaction that preserves local spatial structure and models long-range dependencies. Based on the global attention output, a local intensity enhancer based on the fusion of large kernel convolution and pooling is added to highlight local discriminativity. In the feedforward path, the features are divided into two paths along the channels: one path uses multi-scale correlated separable convolution (e.g., 3×3, 1×5, 5×1) to enhance orientation-sensitive features, and the other path uses Laplacian edge enhancement and light gated noise suppression to selectively inject high-frequency boundary details into the main feature stream. The two paths are fused element-wise to obtain features that are both discriminative and detailed. For skip connections, the features from the same-scale encoder and decoder are first fused into the input, then decomposed into amplitude and phase using a Fast Fourier Transform (FFT). The amplitude component undergoes channel refinement and generates residuals, guiding attention enhancement and nonlinear transformation of the phase. After reconstruction using an Inverse Fast Fourier Transform (IFT), the input is fused with the local convolutional output of the spatial branch under a 1×1 convolution, forming a frequency-spatial co-enhanced skip feature, which is then passed to the decoder for reconstruction. Finally, a slit segmentation mask is output via convolution and a Sigmoid function.

[0010] The present invention also discloses a high-morphological-diversity pavement crack precision segmentation system based on a U-shaped histogram interactive network, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-described method when executing the calculation program.

[0011] Compared with the prior art, the present invention has the following advantages:

[0012] 1. This invention proposes a joint mechanism of histogram interactive attention and local intensity enhancer to achieve self-attention interaction within and between bins, while compensating for local structural damage caused by sorting and improving the boundary continuity of thin and discontinuous cracks.

[0013] 2. This invention employs a dual-branch detail enhancement feedforward in the feedforward path, and uses multi-scale correlated separable convolution and Laplacian edge enhancement in synergy to ensure effective injection of high-frequency boundary information, significantly improving the segmentation effect in complex noise and low-contrast scenes.

[0014] 3. This invention introduces a fused Fourier jump module at the jump connection, which reduces information loss and noise interference caused by downsampling and enhances the structural recovery capability of the decoder by coordinating the enhancement of frequency domain amplitude and phase and the parallel fusion of spatial branches.

[0015] 4. This invention differs from the existing single global modeling method based on Transformer. It introduces a fusion mechanism of attention and frequency domain jump based on strength bins in road crack segmentation.

[0016] 5. This invention ensures both accuracy and efficiency. Compared with the baseline network that does not incorporate the above modules, the recall rate, F1-score and mIoU are significantly improved, making it suitable for engineering deployment and practical inspection applications. Attached Figure Description

[0017] To more clearly illustrate the embodiments and technical solutions of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. The drawings are only schematic illustrations and are not intended to limit the scale or dimensions.

[0018] Figure 1 This is a schematic diagram of the overall architecture of UHI-Net disclosed in an embodiment of the present invention;

[0019] Figure 2 This is a schematic diagram of the Histogram Interactive Attention (HIA) and Local Intensity Enhancer (LIE) structures in an embodiment of the present invention;

[0020] Figure 3 This is a schematic diagram of the structure of interval histogram reshaping (BHR) and frequency histogram reshaping (FHR) in an embodiment of the present invention;

[0021] Figure 4 This is a schematic diagram of the dual-branch detail enhancement feedforward (DDEF) structure in an embodiment of the present invention;

[0022] Figure 5This is a schematic diagram of the fused Fourier skipping module (FFSM) structure in an embodiment of the present invention;

[0023] Figure 6 This is a flowchart of the method in an embodiment of the present invention; Specific implementation methods

[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0025] Example 1

[0026] This embodiment discloses a method for accurate segmentation of road surface cracks based on histogram interactive attention network processing.

[0027] For ease of description, this embodiment defines the functional module used to perform intensity binning and self-attention interaction as the Histogram Interactive Attention Module (HIA), the branch used for local enhancement as the Local Intensity Enhancer (LIE), the feedforward structure used for detail enhancement as the Dual-Branch Detail Enhancement Feedforward Network (DDEF), and the structure used for skip connection frequency domain collaborative fusion as the Fusion Fourier Skip Module (FFSM). The entire network is collectively referred to as the U-shaped Histogram Interactive Segmentation Network (UHI-Net).

[0028] This embodiment can be summarized as follows: By fusing an intensity-based histogram attention mechanism and a multi-scale edge enhancement strategy, a high morphological diversity crack segmentation network, UHI-Net, suitable for complex road surface scenarios, is disclosed. Specifically, it includes: introducing a HIA module into the Transformer block of the encoder to achieve dynamic self-attention interaction of features within and between bins, thereby obtaining feature representations that combine local structure and global semantics; designing a DDEF module in the feedforward path, employing a dual-branch structure of multi-scale correlated separable convolution and Laplacian edge enhancement to strengthen high-frequency details and thin crack boundaries; and constructing an FFSM module in the skip connections, achieving frequency-space joint feature fusion through synergistic enhancement of frequency domain amplitude and phase combined with spatial convolution compensation, reducing information loss and noise interference caused by downsampling.

[0029] To address the challenges of complex morphology, blurred boundaries, and low contrast in road surface cracks, this embodiment of UHI-Net employs a U-shaped encoder-decoder framework. A Transformer structure is introduced at each stage to capture long-range dependencies, and the HIA and LIE modules work together to maintain the spatial continuity of cracks. Simultaneously, the DDEF module is embedded in the feedforward path to enhance fine-grained feature representation, and combined with the frequency domain compensation mechanism of FFSM in skip connections, structural details and edge consistency are effectively restored. The overall network structure is as follows: Figure 1 As shown.

[0030] like Figure 2 As shown, the HIA module consists of two parts: the Histogram Interaction Attention Unit (HIA) based on intensity binning and the Local Intensity Enhancer (LIE). This module achieves global semantic modeling of features within and between bins with linear complexity. Through pixel intensity ranking and binning mechanisms, it can effectively separate crack features from background noise, achieving efficient feature aggregation and semantic alignment of crack regions. Simultaneously, the LIE module utilizes a local response map fused from average pooling and max pooling to enhance high-frequency edge features, thereby compensating for spatial structural perturbations caused by intensity ranking and maintaining the continuity and integrity of crack boundaries. Specifically, for a given feature map, the HIA first performs intensity-based spatial feature binning on the first half of the channel features, separating crack-related features and background features into different histogram bins. The entire process is as follows:

[0031] X1,X2=Split(X),X=Concat(Sort(X1),X2)

[0032] Here, Concat and Split are concatenation and splitting operations along the channel dimension, respectively, and Sort is a sorting operation based on pixel intensity. Then, the input feature X is subjected to 1×1 and 3×3 convolution operations, and then split into Q, K, and V along C. Finally, an attention matrix A is generated by convolving Q with a 1×1 convolution.

[0033] Q,K,V=Split(DConv 3×3 (Conv 1×1 (X)))

[0034] A = Conv 1×1 (Q)

[0035] Among them, Conv 1×1 It is a 1×1 pointwise convolution, DConv 3×3 It is a depthwise convolution with a kernel size of 3×3.

[0036] Next, the features V are flattened and sorted:

[0037]

[0038] Here, `idx` represents the index matrix generated during the sorting process, used to record the corresponding positional relationship of the original pixels before and after sorting. This step is used to rearrange the pixel order according to the feature response intensity, so that high-response regions receive higher weights in subsequent attention calculations. Subsequently, to maintain the spatial correspondence between features, index aggregation operations are performed on the attention matrix A, query matrix Q, and key matrix K respectively:

[0039]

[0040] Here, Gather represents the remapping of the spatial positions of the original features according to the index matrix idx, ensuring that A, Q, and K maintain a consistent pixel correspondence under the sorted feature arrangement. This operation ensures that the sorted feature matrices remain synchronized in the channel dimension, thereby achieving intensity-based attention alignment.

[0041] Next, the sorted features are grouped and processed, and all pixels are divided into B intensity histograms (bins) according to the distribution of pixel intensity.

[0042]

[0043] At the same time, we reshape the features into a frequency view:

[0044]

[0045] Next, a self-attention mechanism is applied within each bin to achieve bin-wise histogram reshaping (BHR). A second-stage attention operation, frequency-wise histogram reshaping (FHR), is then performed between bins.

[0046] Preferably, such as Figure 3 As shown, the specific operations of Histogram Reshaping by Interval (BHR) and Histogram Reshaping by Frequency (FHR) are as follows: First, the proxy token A is treated as a keyword, and attention calculation is performed between Q, A, and V to aggregate the proxy feature Out from all keywords. BHR :

[0047]

[0048] In the second step, A acts as the query, and Out... BHRAs a value in the second attention calculation, to broadcast the aggregated global context back to each bin:

[0049]

[0050] To mitigate the disruption of local spatial structure caused by pixel intensity sorting operations in the Histogram Interactive Attention (HIA) module, this invention introduces a Local Intensity Enhancer (LIE) as a supplementary branch in the backbone network.

[0051] First, average pooling (AP) and max pooling (MP) operations are performed on the input feature X. Average pooling is used to characterize global statistical properties, while max pooling is used to extract the significant intensity responses of edges and cracks.

[0052] Subsequently, the two are concatenated along the channel dimension and then fused using a 7×7 convolutional layer. The fused result is mapped to the [0,1] interval using a sigmoid activation function to form a local intensity response map L(X):

[0053] L(X) = Sigmoid(Conv) 7×7 (Concat(AP(X),MP(X))))

[0054] This response map is used to explicitly highlight regions with clear structures and prominent edges in the input features, thereby enhancing local discriminative ability before subsequent attention calculation.

[0055] Next, the local enhancement feature L(X) is combined with the query feature Q and the global attention output feature F. O The information from the three features is then concatenated. A 1×1 convolutional layer further fuses the information from these three features, achieving adaptive integration of local and global features to obtain the final output feature O.

[0056] O = Conv 1×1 (Concat(L(X),Q,F O ))

[0057] Through this "local enhancement-global aggregation" processing method, the present invention achieves precise preservation and enhancement of fine-grained crack boundaries without sacrificing the global receptive field.

[0058] In existing segmentation networks based on Transformer or convolutional structures, traditional feedforward networks (FFNs) typically achieve feature mapping only through linear transformations, lacking the ability to model spatial details and high-frequency edge information. When dealing with crack segmentation tasks, this structure often results in over-smoothing of features, leading to blurred boundaries of thin cracks, loss of texture details, and loss of morphological information, thus limiting the model's accuracy in recognizing minute cracks.

[0059] Preferably, such as Figure 3 As shown, in order to enhance the discriminability of features and preserve spatial details during forward propagation, this invention proposes a Dual-branch Detail Enhancement Feedforward Module (DDEF module). This module is a lightweight feature enhancement structure designed to fuse spatial structural cues and boundary detail information with minimal parameter cost, thereby improving the ability to perceive subtle structures during crack segmentation.

[0060] First, a 1×1 convolution operation is performed on the input feature x to expand the channel dimension. Then, a 3×3 depthwise separable convolution is used to further extract local contextual relationships. Finally, the convolution output is divided into two parts, x1 and x2, in the channel dimension, which are fed into the semantic branch and the detail branch, respectively.

[0061] x=DWConv 3×3 (Conv 1×1 (x)),x1,x2=Split(x)

[0062] The input x1 of the semantic branch is further divided into three feature maps F1, F2, and F3 along the channel direction. Each group will be processed independently by convolutional kernels of different shapes to accommodate crack features of different scales and orientations.

[0063] F1, F2, F3 = Split(x1)

[0064] This grouping operation is equivalent to establishing dedicated receptive fields for different spatial directions, thereby providing the input basis for subsequent multi-scale convolutions.

[0065] Next, the three sub-features are processed by depth convolutions of different shapes. The 3×3 convolution is used to extract local spatial context information, the 1×5 convolution is used to enhance the horizontal crack extension, and the 5×1 convolution is used to model the vertical crack structure. Then, the results of the three convolutions are combined into a new semantic feature x1.

[0066] x1 = Concat(DConv) 3×3 (F1),DConv 1×5(F2),DConv 5×1 (F3))

[0067] This step is equivalent to a directional adaptive multi-scale fusion mechanism that can capture multi-directional geometric information of slender, irregular cracks, thereby improving morphological sensitivity.

[0068] In the detail branch, the input x2 is first convolved with a Laplace kernel to enhance edge and high-frequency information. The Laplace kernel highlights regions of abrupt gradient changes, making crack boundary features more prominent. Then, this enhancement result is channel-integrated using a 1×1 convolution to obtain edge feature maps. Simultaneously, the input x2 also passes through another 1×1 convolution + Sigmoid activation pathway to generate a spatial attention weight map, used to control the enhancement intensity. The two are multiplied and then added to the original features to form the residual structure.

[0069] x2=Conv 1×1 (Laplace(x2))Sigmoid(Conv 1×1 (x2))+x2

[0070] After obtaining semantic feature x1 and detail feature x2, the DDEF module fuses them through element-wise multiplication. x1 first passes through the Silu activation function (i.e., Sigmoid-Weighted Linear Unit) to suppress unimportant semantic features and enhance non-linear expressive power. Finally, it is multiplied with x2 to achieve complementary fusion.

[0071] x = Silu(x1)x2

[0072] The final output features not only have global structure perception capabilities, but also retain fine-grained crack boundary information.

[0073] In traditional U-shaped segmentation networks, while skip connections can transmit shallow features between the encoder and decoder, their fusion method typically relies solely on direct splicing or weighted summation of spatial domain features, making it difficult to fully recover high-frequency detail information weakened by the downsampling stage. This is especially problematic in crack segmentation tasks, where the crack boundaries are thin and have low contrast; simple spatial feature fusion can easily lead to incomplete structural information, blurred edges, and texture distortion, thus affecting the decoder's accurate reconstruction of the crack morphology.

[0074] Preferably, such as Figure 4As shown, in order to better preserve the fine structural details of the encoder and enhance the feature fusion between the encoder and the decoder, this invention proposes a Fused Fourie Skip Module (FFSM), which refines the skip connection features by simultaneously utilizing spatial and frequency domain cues, thereby enhancing structural integrity and edge continuity.

[0075] First, the feature X from the encoder E Compared with the upsampled decoder features X D Adding them in the spatial domain yields the input features F. in =X E +X D .

[0076] Next, F in Transforming to the frequency domain, applying the Fast Fourier Transform (FFT) yields the frequency domain complex spectrum representation, and then decomposing the complex spectrum into amplitude components. With phase component P, i.e. Among them, amplitude Reflects global intensity and frequency energy; phase component It encodes structural information and location information.

[0077] The amplitude component is then refined into channels: a 1×1 convolution is used to refine the amplitude... Mapping and enhancement are performed to obtain the enhancement magnitude map. And calculate the amplitude residual.

[0078] Then, phase-guided attention weights are generated from the amplitude residuals using global statistical information: for Global average pooling (GAP) and global max pooling (GMP) are performed separately, concatenated, and then passed through a 1×1 convolution followed by a sigmoid mapping to obtain the phase attention map.

[0079]

[0080] This attention map is used to adaptively amplify the structure-related phase components in the spectrum, thereby enabling phase modulation based on amplitude residual information.

[0081] Next, the generated phase attention is applied to the original phase. Modulation is performed, and the phase representation is further enhanced through a learnable nonlinear transformation: first, the phase representation is modulated... As input, the phase is enhanced by passing it through a 1×1 convolution, LeakyReLU activation, and then another 1×1 convolution.

[0082]

[0083] After completing the amplitude and phase enhancement, and The components are recombined in the frequency domain and restored to the spatial domain using the inverse fast Fourier transform (IFFT), thus obtaining the frequency-enhanced spatial features; subsequently, they are combined with the original input F. in By summing the residuals, we obtain the output of the frequency domain enhancement branch:

[0084]

[0085] The residual connection is used to stabilize training and preserve the original spatial information, while superimposing the structural and edge enhancements brought by the frequency domain enhancement back into the spatial domain.

[0086] Meanwhile, to preserve and enhance the local texture consistency in the spatial domain, FFSM sets up a separate convolutional branch in the spatial domain in parallel: for the original spatial features F in Apply a 3×3 depth volume and connect it with F in Sum the residuals to generate a space-enhanced output:

[0087] F out2 =DConv 3×3 (F in )+F in

[0088] The purpose of this branch is to compensate for the minor distortions that frequency domain processing may cause to local textures, and to maintain the consistency between fine-grained textures and the background.

[0089] Finally, the frequency domain enhancement output F out1 With spatial enhancement output F out2 The data is concatenated along the channel dimension and then projected and fused using a 1×1 convolution to obtain the final output F of the module. out :

[0090] F out =Conv 1×1 (Concat(F out1 ,F out2 ))

[0091] This step allows for the synergistic fusion of global structure and phase enhancement information provided by the frequency domain with local texture information provided by the spatial branch, thereby forming jump connection features that retain both detail and global continuity for further use by the decoder.

[0092] In this embodiment, the loss function is used to measure the difference between the model's prediction and the true label, and is a key component in the training process of deep neural networks. Given the specific characteristics of the crack segmentation task, a well-designed loss function is crucial for improving the model's stability and accuracy. Crack segmentation is a typical binary classification problem, where each pixel must be classified as either "crack" or "non-crack," represented by 1 and 0 respectively. However, since crack regions occupy only a very small proportion of the entire image, and the number of background pixels far exceeds the number of crack pixels, the class distribution is severely imbalanced. If a single loss function is used, the model is prone to bias towards predicting background regions during training, resulting in problems such as missed cracks or blurred boundaries. To address this issue, this embodiment sets the loss function to Binary Cross-Entropy (BCE) loss and DICE loss, using precision (Pre), recall (Re), F1-score (F1), and mean Intersection over Union (mIoU) as metrics, defined as follows:

[0093]

[0094]

[0095] Where TP, FP, and FN represent the number of true positives, false positives, and false negatives, respectively, and n represents the number of classes. BCE loss is specifically designed for binary classification tasks, DICE loss improves the network's focus on crack information during training, precision represents the accuracy of predicting crack pixels, recall represents the coverage of true crack pixels, F1-score reflects the overall balance between accuracy and comprehensiveness, and mIoU measures the degree of overlap between predicted and ground truth regions. The method of this invention exhibits high boundary coherence and morphological integrity in scenarios with heavy noise backgrounds, low contrast, and complex topological structures. The loss function in this embodiment is specifically designed as follows:

[0096]

[0097] Where N is the total number of pixels in the image, y i p is the true value of the i-th image pixel. i Let be the predicted value of the i-th image pixel.

[0098]

[0099] Where ∈ is a constant. The final loss function is a weighted summation:

[0100]

[0101] In our experiments, α = 1 and β = 1. This hybrid formula ensures accurate pixel-level predictions while maintaining the continuity and integrity of the crack structure under class imbalance.

[0102] To verify the performance improvement effect of the key modules (HIA, DDEF, FFSM) proposed in this invention on segmentation, a comparative experiment was conducted using the traditional SegNet model as a baseline, employing the DeepCrack dataset and training strategy. The experimental results are shown in Table 1.

[0103] Table 1. Performance comparison of different methods on the test set.

[0104]

[0105] In summary, UHI-Net constructs a crack segmentation framework that balances global consistency and local accuracy through global modeling of HIA+LIE, detail enhancement of DDEF, and frequency domain compensation of FFSM. This framework enables high-fidelity segmentation and structured recognition of crack morphology in complex road environments.

[0106] Example 2

[0107] Corresponding to the above embodiments, this embodiment discloses a road surface crack segmentation network processing system based on histogram interactive attention, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor implements the above-described method when executing the computer program. The method includes steps such as image preprocessing, upsampling, downsampling, feature fusion, and image reconstruction, and performs feature enhancement and fusion processing after image preprocessing, between adjacent sampling layers, and before image reconstruction. The feature enhancement processing includes the following steps:

[0108] For the input feature map X in First, the input is fed into the Histogram Interactive Attention (HIA) module. HIA divides the feature map into several sub-distribution intervals (bins) through intensity binning. Self-attention is calculated within each bin to extract local dependent features, and interactive attention is calculated between bins to achieve global modeling.

[0109] After HIA, the output features are normalized and then fed into a two-branch detail enhancement feedforward network (DDEF). Preferably, as follows: Figure 3 As shown, the DDEF module includes a semantic branch and a detail branch. The semantic branch extracts orientation-sensitive features to enhance morphological representation through multi-scale separable convolution (MSC-Conv); the detail branch uses the Laplacian operator and a lightweight attention mechanism to enhance edge details. After the two are fused, they are processed by convolution, normalization, and activation layers to obtain a refined enhanced feature map.

[0110] Preferably, such as Figure 4As shown, to mitigate feature information loss caused by downsampling and enhance cross-layer feature fusion, this embodiment introduces a Fused Fourier Skip Module (FFSM) between the encoder and decoder. This module first performs a two-dimensional Fast Fourier Transform (FFT) on the skip connection features, separating the amplitude and phase components in the frequency domain, and then strengthens the edge frequency response through a high-frequency enhancement filter. Subsequently, an Inverse Fourier Transform (IFFT) is performed to recover the spatial domain features. The spatial and frequency domain features are linearly fused to form enhanced skip features, which improve the edge continuity and structural integrity during the reconstruction stage.

[0111] During the global feature fusion process, the system further employs a strategy combining multi-scale convolution and layer normalization to simultaneously preserve low-level spatial details and high-level semantic information. The fused features are sequentially input into the decoder for upsampling and reconstruction, ultimately outputting the crack segmentation result.

[0112] In summary, the UHI-Net system disclosed in this embodiment achieves collaborative modeling in the intensity domain and frequency domain by introducing a Histogram Interactive Attention Module (HIA), a Bi-branch Detail Enhancement Feedforward Module (DDEF), and a Fourier Jump Enhancement Module (FFSM). This enables accurate segmentation of crack regions under low contrast and complex background conditions, significantly improving the edge preservation and structural fidelity of the segmentation.

[0113] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, any modifications, equivalent substitutions, or improvements made without departing from the spirit and essence of the present invention should fall within the protection scope of the present invention.

Claims

1. A method for road surface crack segmentation based on histogram interactive attention, characterized in that, The proposed road surface crack segmentation method combines frequency domain feature enhancement and detail compensation mechanisms to achieve high-precision crack segmentation under complex road conditions. It uses a U-shaped network with an encoder-decoder structure to extract features and embeds a histogram interactive attention module in the network structure. During feature transfer and reconstruction, frequency domain feature enhancement and detail compensation strategies are combined to enhance the high-frequency detail representation of crack edges. Finally, a crack segmentation mask is output to achieve accurate identification and location of road surface cracks.

2. The method for road surface crack segmentation based on histogram interactive attention according to claim 1, characterized in that, The Histogram-based Interaction Attention (HIA) module includes: constructing a histogram representation based on intensity binning (optionally with multi-scale sliding window and normalization) on the input feature map to obtain pixel distribution features; calculating weights based on similarity metrics and generating attention weights; and adjusting the feature responses of channels and spatial dimensions through weights to achieve joint modeling of local texture and global context.

3. The method for road surface crack segmentation based on histogram interactive attention according to claim 2 specifically includes the following operations: a. Constructing HIA feature representation operations Local histogram representations are constructed in the feature map based on intensity binning, preferably using a multi-scale sliding window and normalization. b. Calculate the interaction attention weights Similarity metrics (such as inner product softmax, cosine similarity, or histogram cross-entropy) are used to measure the difference between local regions and global reference features, resulting in an interactive attention map. c. Feature fusion operation By using a weighted mechanism to fuse original features and attention-enhanced features, the robustness of the model to texture continuity and morphological differences can be improved.

4. The pavement crack segmentation method based on histogram interactive attention according to claim 3, characterized in that, The HIA module further includes a Local Intensity Enhancer (LIE), which is designed as follows: edge enhancement and nonlinear normalization are performed on the intensity statistics or histogram representation of the input features, so that the intensity variation of the crack region is amplified in the feature space, thereby improving the detectability of micro-cracks.

5. A method for road surface crack segmentation based on histogram interactive attention as described in claim 1, characterized in that, The Dual-branch Detail Enhancement Feedforward (DDEF) module includes: a main semantic branch for extracting global contextual features; and a high-frequency detail branch for extracting edge and texture details through fast Fourier transform or Laplacian filtering, and noise suppression through lightweight gating. The features of the two branches are complementary and fused to enhance the edge response capability of the main feature stream.

6. The dual-branch detail enhancement feedforward module according to claim 5, characterized in that, The fusion operation specifically includes one of the following steps: i) normalizing the features of the two branches respectively, calculating the weight coefficients through the channel attention mechanism, and linearly fusing the features of the two branches according to the weight coefficients; or ii) multiplying the outputs of the two branches element by element to achieve complementary fusion; the fusion result participates in feature reconstruction in the decoding stage, including being injected in the upsampling stage or fused with the decoder features to preserve thin and discontinuous crack boundaries.

7. The method for road surface crack segmentation based on histogram interactive attention according to claim 1, characterized in that, The Fused Fourier Skip Module (FFSM) includes: a frequency domain transformation unit, used to perform Fourier transform on the encoder and decoder fusion input or only encoder features of the same scale to extract amplitude and phase components; a spatial domain fusion unit, used to fuse with the spatial branch output under 1×1 convolution; and an inverse transform unit, used to recover the enhanced features through inverse Fourier transform and pass them to the decoder.

8. The fused Fourier skip module according to claim 7, characterized in that, The fusion operation is based on the following principles: retaining the main high-frequency structural components while suppressing noise interference through a frequency domain channel selection mechanism; preferentially guiding phase attention enhancement and nonlinear transformation based on the residual between the enhanced amplitude and the original amplitude; and achieving adaptive fusion of information between the frequency domain and the spatial domain through learnable weighting parameters.

9. The pavement crack segmentation method based on histogram interactive attention according to any one of claims 1 to 8, characterized in that, The loss function of the network includes a weighted combination of cross-entropy loss (BCE) and Dice loss, which is used to simultaneously optimize region consistency and boundary accuracy. In an optional implementation, boundary preservation loss and structural similarity loss (SSIM) can be further introduced to participate in the weighted combination.

10. A pavement crack segmentation system based on the method of any one of claims 1 to 9, characterized in that, include: The image acquisition module is used to acquire images of the road surface. The feature extraction module is used to perform feature extraction for the U-shaped network encoder; The feature fusion module integrates HIA, DDEF, and FFSM modules to achieve feature enhancement; the segmentation output module generates crack masks and outputs the results; the control and training module dynamically adjusts model parameters to adapt to different scenarios and noise environments. The modules are connected through data communication to form an overall workflow.

11. The system according to claim 10, characterized in that, The system can be deployed on embedded terminals, edge computing nodes, or cloud servers.

Citation Information

Cited By

  • Road crack segmentation method and device based on deep learning, electronic equipment and program product

    CN121937729A

  • Road crack segmentation method and device based on deep learning, electronic equipment and program product

    CN121937729B

  • Intelligent road recognition system based on deep learning

    CN122244776A