Lightweight crack segmentation method and system based on dynamic down-sampling and edge perception
Patent Information
- Application Number
- CN202611063705.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-17
- Publication Date
- 2026-08-18
AI Technical Summary
[0007]本申请的目的在于提供一种基于动态下采样与边缘感知的轻量级裂缝分割方法及系统,以解决现有公路设施裂缝分割中存在的易导致高频边缘细节的特征湮灭、掩码预测分支对微弱裂缝的物理边界响应极不敏感、多尺度特征融合的计算效率与特征表征能力难以兼顾的问题
上述的基于动态下采样与边缘感知的轻量级裂缝分割方法中,通过获取待测件的初始图像;将初始图像输入主干网络进行空间分辨率压缩与特征提取,且在主干网络的关键特征层级引入动态自适应下采样模块,基于内容感知机制获取初始图像的空间高频分布特征,得到多尺度骨干特征图;将多尺度骨干特征图输入全链路轻量化协同特征融合网络,采用GSConv卷积单元与基于一次性聚合策略的VoVGSCSP模块优化跨尺度的梯度传播路径并削减计算冗余,且将动态自适应下采样模块集成于全链路轻量化协同特征融合网络自底向上的特征下采样节点中,使动态自适应下采样模块与VoVGSCSP模块交替分布,构建免受低通滤波干扰的轻量级高速特征流,得到多尺度特征融合特征图;将多尺度特征融合特征图输入边缘引导轻量解耦头,基于并行设置的分类分支、边界框回归分支以及掩码预测分支进行多任务解耦处理,得到分割掩码特征图,实现对公路设施裂缝特征分割。本申请通过引入动态自适应下采样模块,有效缓解了传统步长卷积在下采样过程中产生的低通滤波效应,保留了裂缝的弱纹理与高频边缘信息,使得预测掩码能够更为完整、连贯地向下延伸,避免了在裂缝尾端或极细部位发生断裂甚至漏检的现象,大幅提升了对细粒度特征的捕捉能力,缓解了细长、低对比度裂缝高频边缘特征的特征湮灭;通过重构全链路轻量化协同特征融合网络,利用GSConv卷积单元与基于一次性聚合策略的VoVGSCSP模块,不仅维持了多尺度语义交互与强大的特征表达能力,还有效规避了深层梯度传播衰减与重复计算问题,解耦了多尺度特征融合下的计算开销与特征表征能力;通过边缘引导轻量解耦头将方向性边缘先验显式注入掩码分支,有效改善了网络对边缘特征的隐式学习方式,有效拟合了多分支交叉处的复杂物理拓扑结构,还大幅改善了掩码的锯齿与模糊溢出现象,进而提升了微弱裂缝的掩码物理边界对齐精度与连贯性。
Smart Images

Figure CN122597812A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of highway infrastructure crack detection technology, and more specifically, to a lightweight crack segmentation method and system based on dynamic downsampling and edge perception. Background Technology
[0002] Transportation infrastructure is constantly subjected to the coupled effects of vehicle loads and environmental factors, resulting in surface defects such as cracks that are characterized by early onset, wide distribution, and rapid evolution, directly impacting structural durability and service safety. Given the vast scale of my country's highway network, refined and routine inspections play a crucial supporting role in preventative maintenance decisions. Current highway infrastructure crack detection technologies have primarily undergone the following development stages: Manual inspection techniques: Currently, a large number of engineering inspections still rely on manual visual inspection and measurement. This technique is labor-intensive, inefficient, and highly susceptible to subjective experience and fatigue. In addition, the reliable operation assessment of critical structures such as bridges under extreme conditions such as flood damage faces severe challenges, and manual operations in confined spaces or complex environments such as tunnels are accompanied by higher safety risks.
[0003] Traditional image processing techniques rely heavily on procedural operators such as grayscale conversion, threshold segmentation, edge extraction (e.g., Sobel and Canny operators), and morphological processing. These methods are effective in scenes with simple backgrounds and high contrast. However, their stability and generalization ability are severely limited under conditions of varying lighting, noise, textures, and complex background interference.
[0004] Deep semantic segmentation methods: With the development of deep learning, pixel-level semantic segmentation frameworks such as Fully Convolutional Networks (FCN), U-Net, and SegNet have gradually become mainstream, significantly improving feature extraction and localization accuracy through encoder-decoder structures. For the unique characteristics of cracks as slender linear targets, researchers have proposed networks such as DeepCrack and CrackSegNet, effectively improving the completeness of pixel-level predictions. Although semantic segmentation can output pixel-level regions, in practical engineering scenarios, instance-level output is often required to support accurate counting, localization, and geometric measurement of defects.
[0005] Existing instance segmentation and lightweight object detection technologies: In order to meet the requirements of engineering measurement while taking into account deployment efficiency, detection models have gradually evolved towards instance segmentation and lightweighting, mainly including the following categories: (1) Two-stage instance segmentation: Methods represented by Mask R-CNN and its improved version Cascade Mask R-CNN have achieved high accuracy by relying on candidate regions and mask branches. However, their model parameters are large and the computational complexity is high, making it difficult to meet the real-time requirements of edge devices. (2) Single-stage instance segmentation: One-stage methods such as YOLACT and SOLOv2 have achieved a good balance between speed and accuracy, promoting the development of real-time instance segmentation. (3) Lightweight YOLO series: In recent years, single-stage detection frameworks have been deeply integrated with instance segmentation tasks. Represented by YOLOv5, YOLOv8 to the latest YOLO11, they provide standardized multi-task support for instance segmentation, which is highly compatible with the integration needs of edge devices and engineering systems, and has become the mainstream route for lightweight deployment. The technical bottlenecks faced by existing lightweight networks in crack detection: Cracks in real-world scenarios often have poor continuity, low contrast, and extremely large scale spans, accompanied by strong interference such as shadows and rough textures. Crack targets have highly sensitive characteristics of being "long and thin, with weak texture and high-frequency boundaries." When mainstream lightweight instance segmentation frameworks are transferred to crack detection tasks, they still face the following common bottlenecks: (1) High-frequency edge details are easily lost: In the existing network architecture, multiple downsampling operations and limited resolution feature representation during feature extraction can easily lead to the loss of high-frequency edge details, weakening the long and thin cracks in deep features and causing feature annihilation. (2) There is a contradiction between lightweighting and feature representation: Although multi-scale fusion can expand the receptive field, under the constraint of lightweighting, there is often a contradiction between fusion efficiency and insufficient feature representation ability, making it difficult to maintain the transmission of weak signals under extremely low computing power. (3) Mask boundary insensitivity: Conventional mask branches mainly rely on implicit feature learning and are insensitive to the boundary response of weak cracks. This structural defect can easily lead to jagged, broken, or even missed detections at the segmentation boundaries, becoming a bottleneck that restricts further breakthroughs in core evaluation metrics such as the Dice coefficient and the intersection-over-union ratio (IoU).
[0006] In the process of realizing this application, the inventors discovered that the prior art has at least the following problems: In the existing highway facility crack segmentation, the high-frequency edge details are easily annihilated during the downsampling stage; the mask prediction branch relies on implicit feature learning and is extremely insensitive to the physical boundary response of weak cracks; under the lightweight constraint, there is a contradiction between the computational efficiency of multi-scale feature fusion and the feature representation capability. Summary of the Invention
[0007] The purpose of this application is to provide a lightweight crack segmentation method and system based on dynamic downsampling and edge awareness, so as to solve the problems in existing highway facility crack segmentation that easily lead to feature annihilation of high-frequency edge details, mask prediction branches are extremely insensitive to the physical boundary response of weak cracks, and it is difficult to balance the computational efficiency and feature representation ability of multi-scale feature fusion.
[0008] Firstly, this application provides a lightweight crack segmentation method based on dynamic downsampling and edge awareness, including: Acquire the initial image of the part under test; The initial image is input into the backbone network for spatial resolution compression and feature extraction. A dynamic adaptive downsampling module is introduced at the key feature level of the backbone network to obtain the spatial high-frequency distribution features of the initial image based on the content-aware mechanism, thus obtaining a multi-scale backbone feature map. Multi-scale backbone feature maps are input into the end-to-end lightweight collaborative feature fusion network. GSConv convolutional units and VoVGSCSP modules based on a one-time aggregation strategy are used to optimize the gradient propagation path across scales and reduce computational redundancy. Furthermore, a dynamic adaptive downsampling module is integrated into the bottom-up feature downsampling nodes of the end-to-end lightweight collaborative feature fusion network, allowing the dynamic adaptive downsampling module and VoVGSCSP module to be distributed alternately, constructing a lightweight high-speed feature flow that is free from low-pass filtering interference, and obtaining a multi-scale feature fusion feature map. The multi-scale feature fusion feature map is input into the edge-guided lightweight decoupling head, and multi-task decoupling processing is performed based on the classification branch, bounding box regression branch and mask prediction branch set in parallel to obtain the segmentation mask feature map.
[0009] In one implementation, a multi-scale feature fusion feature map is input into an edge-guided lightweight decoupling head. Multi-task decoupling processing is performed based on a parallel classification branch, a bounding box regression branch, and a mask prediction branch to obtain a segmentation mask feature map, including: A lightweight edge-guided bypass is introduced, and explicit edge prior gradients are extracted from the multi-scale feature fusion feature map based on asymmetric convolution. The explicit edge prior gradients are then injected into the mask prediction branch for decoupling processing to obtain the segmentation mask feature map.
[0010] In one implementation, the initial image is input into the backbone network for spatial resolution compression and feature extraction. A dynamic adaptive downsampling module is introduced at the key feature layers of the backbone network to obtain the spatial high-frequency distribution features of the initial image based on a content-aware mechanism, resulting in a multi-scale backbone feature map, including: The initial image is spatially reorganized based on pixel deshuffling to obtain the first feature map; A lightweight dynamic channel gating mechanism is constructed to recalibrate the features of the first feature map, thereby obtaining the second feature map; To construct an explicit edge enhancement residual branch, the edge prior is structurally compensated for in the second feature map to obtain the third feature map; The second feature map, which has been gated and modulated, is fused with the third feature map, which has been processed by the edge-enhanced residual branch, element-wise to obtain a multi-scale backbone feature map.
[0011] In one implementation, a spatial reconstruction operation is performed on the initial image based on pixel deshuffling to obtain a first feature map, including: The spatial neighborhood pixels of the corresponding initial image are sampled and recombined at a preset period to convert the spatial dimension information to the channel dimension without loss, so as to compress the resolution and retain the complete spatial high-frequency distribution features. A lightweight dynamic channel gating mechanism is constructed to recalibrate the first feature map, resulting in a second feature map, including: Global average pooling is used to aggregate the global spatial context information of the corresponding second feature map into a one-dimensional channel descriptor. The one-dimensional channel descriptor is input into a multilayer perceptron containing two linear transformations and a channel reduction rate r=16 to extract the nonlinear dependencies between channels. The channel weight calibration vector is output through the sigmoid activation function and broadcast element-wise multiplication along the channel dimension with the main path downsampled feature map to amplify the channel weights containing high-frequency textures of cracks and suppress background noise interference. To construct an explicit edge-enhancing residual branch, the edge prior is structurally compensated for in the second feature map to obtain the third feature map, including: Basic high-frequency edge response features are extracted across channels from the second feature map using 1×1 standard convolutional blocks; spatial resolution alignment is performed using downsampling operations; the downsampling operation is explicitly instantiated as a 3×3 max pooling with a stride of 2, which ensures the topological integrity of small cracks by retaining the maximum gradient response value in the neighborhood.
[0012] In one embodiment, the step of inputting the multi-scale backbone feature map into the end-to-end lightweight collaborative feature fusion network for processing includes: The multi-scale backbone feature map is processed by standard convolution and depthwise separable convolution to obtain the first intermediate feature; At the fusion node of the key feature layer, the VoVGSCSP module based on the one-time aggregation strategy performs cross-stage local connections on the first intermediate feature to avoid the decay and repeated calculation of deep gradient propagation in the network. The dynamic adaptive downsampling module is integrated into all dimensionality reduction nodes of the end-to-end lightweight collaborative feature fusion network. The VoVGSCSP module is responsible for the efficient transformation and parallel aggregation of cross-scale and multi-level semantics. The dynamic adaptive downsampling module and the VoVGSCSP module are alternately distributed in the feature pyramid to construct a lightweight high-speed feature flow that is free from low-pass filtering interference, thus obtaining a multi-scale feature fusion feature map.
[0013] In one implementation, the multi-scale backbone feature map is processed using standard convolution and depthwise separable convolution to obtain a first intermediate feature, including: Based on standard convolutional branches, high-dimensional dense semantic features are extracted from the multi-scale backbone feature map to obtain the second intermediate feature; The second intermediate feature is input into the depthwise separable convolution branch for lightweight dense connection feature transformation to obtain the third intermediate feature. Based on the feature splicing operator, the second intermediate feature and the third intermediate feature are spliced together to obtain the spliced feature. Based on global channel shuffling, the channel order of the spliced features is shuffled and uniformly discretized to obtain the first intermediate feature.
[0014] In one implementation, a lightweight edge-guided bypass is introduced, and an explicit edge prior gradient of the multi-scale feature fusion feature map is extracted based on asymmetric convolution. This explicit edge prior gradient is then injected into the mask prediction branch for decoupling processing to obtain the segmented mask feature map. The steps include: A lightweight edge-guided bypass is constructed, and a directional operator based on asymmetric convolution is introduced to obtain directional edge features with pixel-level gradient changes in the horizontal and vertical directions, respectively, so as to introduce structural inductive bias and learn explicit edge prior gradients. A one-dimensional channel-level edge perception weight vector is generated by performing context interaction and importance space modeling of global features based on a lightweight multilayer perceptron. A residual attention fusion mechanism is introduced to perform an outer product operation between the channel-level edge-aware weight vector and the directional edge features to generate a joint attention map; The joint attention map and the mask prediction branch are modulated element-wise along the spatial and channel dimensions, and then superimposed back into the mask prediction branch as a residual structure. This guides the network to focus its attention on and highlight the physical boundary regions where pixel gradients change, thus obtaining the segmentation mask feature map.
[0015] In one implementation, the formula for calculating directional edge features is: ; in, Directional edge features For batch normalization, For the high-frequency edge components in the horizontal direction, These are the high-frequency edge components in the vertical direction. It is a non-linear activation function. This is a feature map fused from multiple scales. The formula for calculating the segmentation mask feature map is: ; in, For segmentation mask feature map, For element-wise multiplication, This is a one-dimensional channel-level edge-aware weight vector. Directional edge features For element-wise multiplication of broadcast along the channel dimension, This is for outer product operations.
[0016] In one embodiment, before the step of inputting the initial image into the backbone network for spatial resolution compression and feature extraction, the following steps are included: The initial image is resampled and preprocessed to obtain the preprocessed initial image.
[0017] Secondly, this application also provides a lightweight crack segmentation system based on dynamic downsampling and edge awareness, including a processor and an image acquisition unit, wherein the image acquisition unit is connected to the processor; the image acquisition unit is used to acquire an initial image of the test piece. The processor is used to execute the steps of a lightweight crack segmentation method based on dynamic downsampling and edge awareness, as described above.
[0018] One of the above technical solutions has the following advantages and beneficial effects: In the aforementioned lightweight crack segmentation method based on dynamic downsampling and edge awareness, an initial image of the test object is acquired. This initial image is then input into the backbone network for spatial resolution compression and feature extraction. A dynamic adaptive downsampling module is introduced at the key feature level of the backbone network to obtain the spatial high-frequency distribution features of the initial image based on a content-aware mechanism, resulting in a multi-scale backbone feature map. The multi-scale backbone feature map is then input into a full-link lightweight collaborative feature fusion network. GSConv convolutional units and a VoVGSCSP module based on a one-time aggregation strategy are used to optimize the gradient propagation path across scales and reduce computational redundancy. The dynamic adaptive downsampling module is integrated into the bottom-up feature downsampling nodes of the full-link lightweight collaborative feature fusion network, allowing the dynamic adaptive downsampling module and the VoVGSCSP module to be distributed alternately, constructing a lightweight high-speed feature flow free from low-pass filtering interference, resulting in a multi-scale feature fusion feature map. The multi-scale feature fusion feature map is then input into an edge-guided lightweight decoupling head. Based on parallel classification branches, bounding box regression branches, and mask prediction branches, multi-task decoupling processing is performed to obtain a segmentation mask feature map, thus achieving feature segmentation of cracks in highway facilities. This application effectively mitigates the low-pass filtering effect of traditional stride convolution during downsampling by introducing a dynamic adaptive downsampling module. This preserves the weak texture and high-frequency edge information of cracks, allowing the prediction mask to extend more completely and coherently downwards. It avoids breakage or even missed detection at the crack tail or in extremely fine areas, significantly improving the ability to capture fine-grained features and mitigating the feature annihilation of high-frequency edge features in long, thin, low-contrast cracks. Furthermore, by reconstructing a lightweight, end-to-end collaborative feature fusion network, it utilizes GSConv convolutional units and a one-time aggregation strategy... The VoVGSCSP module not only maintains multi-scale semantic interaction and powerful feature representation capabilities, but also effectively avoids the problems of deep gradient propagation decay and redundant computation, decoupling the computational overhead and feature representation capabilities under multi-scale feature fusion. By explicitly injecting directional edge priors into the mask branches through the edge-guided lightweight decoupling head, it effectively improves the network's implicit learning method for edge features, effectively fits the complex physical topology at the intersection of multiple branches, and significantly improves the jaggedness and blurry overflow phenomenon of the mask, thereby improving the alignment accuracy and coherence of the physical boundary of the mask for weak cracks. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. The following drawings only show some embodiments of this application and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1This is a schematic diagram of the lightweight crack segmentation system based on dynamic downsampling and edge perception in an embodiment of this application; Figure 2 This is a flowchart illustrating the lightweight crack segmentation method based on dynamic downsampling and edge perception in the embodiments of this application. Figure 3 This is a flowchart illustrating the backbone network processing steps in an embodiment of this application; Figure 4 This is a flowchart illustrating the neck network processing steps in an embodiment of this application; Figure 5 This is a flowchart illustrating the segmentation mask processing steps in an embodiment of this application; Figure 6 This is a schematic diagram of the test beam in an embodiment of this application; Figure 7 This is a comparison diagram of the crack segmentation results in the embodiments of this application; Figure 8 This is a thermal comparison diagram of crack segmentation in an embodiment of this application. Detailed Implementation
[0021] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0023] In addition, the term "multiple" should mean two or more.
[0024] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0025] In one embodiment, the lightweight crack segmentation method based on dynamic downsampling and edge awareness provided in this application can be applied to a lightweight crack segmentation system based on dynamic downsampling and edge awareness. For example... Figure 1 As shown, the lightweight crack segmentation system based on dynamic downsampling and edge awareness includes a processor 10 and an image acquisition unit 20, with the image acquisition unit 20 connected to the processor 10. The image acquisition unit 20 is used to acquire an initial image of the workpiece under test. The lightweight crack segmentation system also includes a memory and a display, which are respectively connected to the processor 10. The memory is used to store data such as the initial image, multi-scale backbone feature maps, multi-scale feature fusion feature maps, and segmentation mask feature maps. The display is used to display data such as the initial image, multi-scale backbone feature maps, multi-scale feature fusion feature maps, and segmentation mask feature maps. The processor 10 is used to acquire an initial image of the device under test. The initial image is input into the backbone network for spatial resolution compression and feature extraction. A dynamic adaptive downsampling module is introduced at the key feature level of the backbone network to acquire the spatial high-frequency distribution features of the initial image based on a content-aware mechanism, resulting in a multi-scale backbone feature map. The multi-scale backbone feature map is input into a full-link lightweight collaborative feature fusion network. GSConv convolutional units and a VoVGSCSP module based on a one-time aggregation strategy are used to optimize the gradient propagation path across scales and reduce computational redundancy. The dynamic adaptive downsampling module is integrated into the bottom-up feature downsampling nodes of the full-link lightweight collaborative feature fusion network, allowing the dynamic adaptive downsampling module and the VoVGSCSP module to be distributed alternately, constructing a lightweight high-speed feature flow free from low-pass filtering interference, resulting in a multi-scale feature fusion feature map. The multi-scale feature fusion feature map is input into an edge-guided lightweight decoupling head, which performs multi-task decoupling processing based on parallel classification branches, bounding box regression branches, and mask prediction branches, resulting in a segmentation mask feature map.
[0026] In one embodiment, such as Figure 2 As shown, a lightweight crack segmentation method based on dynamic downsampling and edge awareness is provided, including: Step S210: Obtain the initial image of the part to be tested.
[0027] The test piece can be a section of a road surface, bridge, or tunnel, etc. For example, it could be a bridge segment. An image acquisition device captures a frontal view of the crack in the test piece to obtain an initial image, which is then transmitted to a processor. The processor then acquires the initial image of the test piece. It should be noted that the image acquisition device can be a camera.
[0028] Step S220: Input the initial image into the backbone network for spatial resolution compression and feature extraction, and introduce a dynamic adaptive downsampling module at the key feature level of the backbone network to obtain the spatial high-frequency distribution features of the initial image based on the content-aware mechanism, thereby obtaining a multi-scale backbone feature map.
[0029] The Dynamic Adaptive Downsampling (DA-ADown) module adjusts the downsampling strategy (such as sampling rate, location, or aggregation method) in real time based on the local features of the initial input image, task requirements, or system load, in order to improve efficiency or accuracy while preserving key information.
[0030] To mitigate the irreversible loss of features from thin, low-contrast cracks during spatial dimension compression, a dynamic adaptive downsampling module is introduced. This module abandons static stride convolutions, which have a low-pass filtering effect, and reshapes the downsampling logic through two parallel paths: a deep integration of dynamic channel gating and an explicit edge enhancement residual branch. For example, when the initial image is input into the backbone network, the backbone network performs spatial resolution compression and feature extraction on the initial image. At key feature layers (such as P3, P4, and P5), the dynamic adaptive downsampling module replaces the traditional stride convolution or static pooling operations. Through a content-aware mechanism, it adaptively captures and preserves the high-frequency spatial features of weak cracks, outputting the corresponding multi-scale backbone feature maps.
[0031] Step S230: Input the multi-scale backbone feature map into the end-to-end lightweight collaborative feature fusion network. Use GSConv convolutional units and VoVGSCSP modules based on a one-time aggregation strategy to optimize the gradient propagation path across scales and reduce computational redundancy. In addition, integrate the dynamic adaptive downsampling module into the bottom-up feature downsampling nodes of the end-to-end lightweight collaborative feature fusion network, so that the dynamic adaptive downsampling module and VoVGSCSP module are distributed alternately to construct a lightweight high-speed feature flow that is free from low-pass filtering interference, and obtain the multi-scale feature fusion feature map.
[0032] Among them, the end-to-end lightweight collaborative feature fusion network (SlimNeck) integrates lightweight modules and cross-level collaborative mechanisms throughout the entire link from feature extraction to output, so as to achieve efficient multi-scale feature representation with extremely low computational overhead.
[0033] To reduce parameter redundancy and memory access cost (MAC) on computationally limited edge devices while maintaining multi-scale feature aggregation capabilities, this study reconstructs a full-link lightweight collaborative feature fusion network architecture in the neck network. This architecture utilizes efficient GSConv convolutional units as underlying building blocks, further combined into VoVGSCSP modules, forming a full-link collaboration with the parameter reduction design of the backbone network. For example, the multi-scale backbone feature maps output from the backbone network are input into the full-link lightweight collaborative feature fusion network (SlimNeck). In this network, GSConv convolutional units and VoVGSCSP modules based on a one-time aggregation strategy replace the original traditional convolutional blocks (such as the C3k2 structure) to optimize the gradient propagation path across scales and reduce computational redundancy. Simultaneously, a dynamic adaptive downsampling module is deeply integrated into all feature downsampling nodes from bottom to top in the neck network, alternating with the VoVGSCSP module to construct a lightweight feature stream free from low-pass filtering interference, achieving deep fusion of high-level semantic information and low-level spatial information.
[0034] Step S240: Input the multi-scale feature fusion feature map into the edge-guided lightweight decoupling head, and perform multi-task decoupling processing based on the parallel settings of classification branch, bounding box regression branch and mask prediction branch to obtain the segmentation mask feature map.
[0035] To mitigate the boundary blurring or jaggedness caused by irregular and complex topological cracks under conventional convolutional implicit feature learning, an Edge-Guided Lightweight Attention Decoupled Head (EG-LADH) is designed. This head introduces an explicit edge-guided bypass (Edge-GuideModule) that extracts gradient boundary priors through directional convolutional operators to dynamically calibrate the mask prototype. For example, the multi-scale feature fusion feature map, after multi-scale feature fusion, is input into the decoupled prediction head, which is then replaced by the Edge-Guided Lightweight Attention Decoupled Head. The head achieves multi-task decoupling through parallel classification, bounding box regression, and mask prediction branches, outputting a segmented mask feature map with high alignment accuracy.
[0036] In the above embodiments, by introducing a dynamic adaptive downsampling module, the low-pass filtering effect generated during the downsampling process of traditional stride convolution is effectively alleviated, preserving the weak texture and high-frequency edge information of the crack. This allows the prediction mask to extend downwards more completely and coherently, avoiding breakage or even missed detection at the tail end of the crack or in extremely fine parts. This significantly improves the ability to capture fine-grained features and alleviates the feature annihilation of high-frequency edge features of slender, low-contrast cracks. By reconstructing the end-to-end lightweight collaborative feature fusion network, GSConv convolutional units and a one-time aggregation strategy are used. The simplified VoVGSCSP module not only maintains multi-scale semantic interaction and powerful feature representation capabilities, but also effectively avoids the problems of deep gradient propagation decay and redundant computation, decoupling the computational overhead and feature representation capabilities under multi-scale feature fusion. By explicitly injecting directional edge priors into the mask branches through the edge-guided lightweight decoupling head, it effectively improves the network's implicit learning method for edge features, effectively fits the complex physical topology at the intersection of multiple branches, and significantly improves the jaggedness and blurry overflow phenomenon of the mask, thereby improving the alignment accuracy and coherence of the physical boundary of the mask for weak cracks.
[0037] In one embodiment, a multi-scale feature fusion feature map is input into an edge-guided lightweight decoupling head. Multi-task decoupling processing is performed based on a parallel classification branch, a bounding box regression branch, and a mask prediction branch to obtain a segmentation mask feature map, including: A lightweight edge-guided bypass is introduced, and explicit edge prior gradients are extracted from the multi-scale feature fusion feature map based on asymmetric convolution. The explicit edge prior gradients are then injected into the mask prediction branch for decoupling processing to obtain the segmentation mask feature map.
[0038] For example, the decoupling prediction head adopts an edge-guided lightweight decoupling head. By introducing a lightweight edge-guided bypass, it uses asymmetric convolution to extract explicit edge prior gradients and dynamically injects these explicit edge prior gradients into the mask prototype branch to enhance the network's sensitivity to pixel-level gradient changes at the physical boundaries of irregular cracks. Finally, it outputs a segmentation mask feature map with high alignment accuracy.
[0039] In one embodiment, such as Figure 3 As shown, the initial image is input into the backbone network for spatial resolution compression and feature extraction. A dynamic adaptive downsampling module is introduced at the key feature layers of the backbone network to obtain the spatial high-frequency distribution features of the initial image based on a content-aware mechanism, resulting in a multi-scale backbone feature map, including: Step S310: Perform spatial recombination operation on the initial image based on pixel deshuffling to obtain the first feature map.
[0040] Pixel Unshuffle is the reverse of Pixel Shuffle, used to rearrange high-resolution feature maps into low-resolution feature maps with a higher number of channels.
[0041] In one example, step S310 includes: performing preset periodic sampling and recombining on the spatial neighbor pixels of the corresponding initial image, and losslessly converting the spatial dimension information to the channel dimension to compress the resolution and retain the complete spatial high-frequency distribution features.
[0042] For example, for the initial input image (Where C is the number of channels, H is the feature map height, and W is the feature map width), firstly, an efficient spatial recombination operation of pixel deshuffling is introduced. This operation, without introducing additional computing power parameters, periodically samples and recombines spatially neighboring pixels to losslessly convert information in the spatial dimension to the channel dimension, thereby compressing the feature map resolution and preserving the complete spatial high-frequency distribution features.
[0043] Step S320: Construct a lightweight dynamic channel gating mechanism to recalibrate the features of the first feature map and obtain the second feature map.
[0044] The lightweight dynamic channel gating mechanism refers to a lightweight structural design in neural networks that adaptively adjusts channel importance based on input, suppresses redundant computation, and achieves a balance between inference acceleration and accuracy. The lightweight dynamic channel gating mechanism recalibrates the first feature map to break the indiscriminate treatment of channel features by static sampling, and introduces content-aware dynamic channel gating into the main path feature flow after deshuffling.
[0045] In one example, step S320 includes: using global average pooling to aggregate the global spatial context information of the corresponding second feature map into a one-dimensional channel descriptor; inputting the one-dimensional channel descriptor into a multilayer perceptron containing two linear transformations and a channel reduction rate r=16 to extract the nonlinear dependencies between channels; outputting a channel weight calibration vector through a sigmoid activation function, and performing a broadcast element-wise multiplication along the channel dimension with the downsampled feature map of the main path to amplify the channel weights containing high-frequency textures of cracks and suppress background noise interference.
[0046] The Sigmoid activation function is a tool that can compress any number into an S-shaped curve between 0 and 1.
[0047] For example, Global Average Pooling (GAP) is used to aggregate global spatial context information into one-dimensional channel descriptors. These channel descriptors are then fed into a Multilayer Perceptron (MLP) containing two linear transformation layers to extract nonlinear dependencies between channels. To strictly control computational overhead, the hidden layers of the MLP are configured with a channel reduction ratio r=16. Channel weight calibration vectors are output via a sigmoid activation function. Its mathematical expression is .in: This represents the Sigmoid activation function. The network uses this channel weight vector. Perform element-wise broadcast multiplication along the channel dimension with the downsampled feature map of the main path. It adaptively amplifies the channel weights containing high-frequency textures of cracks and suppresses interference from background noise.
[0048] Step S330: Construct an explicit edge enhancement residual branch to explicitly compensate for the edge prior in the structure of the second feature map, and obtain the third feature map.
[0049] To explicitly compensate for fragile edge priors structurally during downsampling, a parallel parameterless or low-parameter residual branch is designed to construct an explicit edge-enhancing residual branch for explicit compensation of edge priors structurally.
[0050] In one example, step S330 includes: extracting basic high-frequency edge response features across channels from the second feature map using a 1×1 standard convolutional block; performing spatial resolution alignment using a downsampling operation; wherein the downsampling operation is explicitly instantiated as a 3×3 max pooling with a stride of 2, ensuring the topological integrity of the microcracks by preserving the maximum gradient response value in the neighborhood.
[0051] Using 1x1 standard convolutional blocks ( From the original input feature map The high-frequency edge response features of the mid-channel are extracted. A downsampling operation is used for spatial resolution alignment. To maintain the saliency of local edge signal activation while achieving maximum lightweightness, this downsampling operation is explicitly instantiated as a 3×3 max pooling (s=2) with a stride of 2, ensuring the topological integrity of small cracks by preserving the maximum gradient response value in the neighborhood. The gated modulated main path backbone features are then fused with the output of the edge enhancement residual branch element-wise. The formal definition of the final output tensor Y of the dynamic adaptive downsampling module is shown in the following formula: Wherein, in the formula: This represents a conventional spatial dimensionality reduction operation that combines pixel deshuffling with basic convolution; This indicates element-wise multiplication of broadcast along the channel dimension.
[0052] Step S340: The second feature map after gating modulation and the third feature map after edge enhancement residual branch are added and fused element by element to obtain a multi-scale backbone feature map.
[0053] By fusing the second feature map of the corresponding main path backbone features after gating modulation with the third feature map of the edge enhancement residual branch element by element-wise addition, a multi-scale backbone feature map is obtained.
[0054] In the above embodiments, by introducing a dynamic adaptive downsampling module, channel-level dynamic gating and parallel explicit edge residual branches are used to effectively alleviate the low-pass filtering effect generated by traditional stride convolution during downsampling. This endows the network with adaptive protection capabilities, successfully preserving the weak texture and high-frequency edge information of cracks. In the extremely fine and low-contrast conditions of actual engineering, this allows the prediction mask to extend downwards more completely and coherently, avoiding breakage or even missed detection at the tail end of cracks or in extremely fine parts. This significantly improves the ability to capture fine-grained features, thereby greatly alleviating the feature annihilation of high-frequency edge features of slender, low-contrast cracks.
[0055] In one embodiment, such as Figure 4 As shown, the steps for inputting multi-scale backbone feature maps into a full-link lightweight collaborative feature fusion network for processing include: Step S410: Process the multi-scale backbone feature map according to standard convolution and depthwise separable convolution to obtain the first intermediate feature.
[0056] Standard convolution (SC) fuses the spatial information of all input channels for each output channel; depthwise separable convolution (DSC) splits into depthwise convolution and pointwise convolution to reduce computation and parameters.
[0057] In one example, step S410 includes: extracting dense semantic features of a multi-scale backbone feature map based on a pre-defined high-dimensionality based on a standard convolutional branch; obtaining a second intermediate feature; inputting the second intermediate feature into a depthwise separable convolutional branch for lightweight dense connection feature transformation to obtain a third intermediate feature; concatenating the second intermediate feature and the third intermediate feature through channels based on a feature concatenation operator to obtain a concatenated feature; and shuffling and uniformly discretizing the channel order of the concatenated feature based on a global channel shuffle to obtain a first intermediate feature.
[0058] For example, while conventional depthwise separable convolution (DSC) can significantly compress parameters, its channel isolation mechanism severs the high-dimensional semantic connections of feature maps. The GSConv unit used in this application balances feature extraction capability with lightweight requirements through the following mechanism: The input multi-scale backbone feature map is first processed by a standard convolution branch for high-dimensional dense semantic feature extraction, outputting a second intermediate feature Xsc. The second intermediate feature Xsc output by the standard convolution branch is then fed into the depthwise separable convolution branch, where lightweight dense connections are used for further feature transformation, outputting a third intermediate feature Xdsc. The feature concatenation operator (Concat) is used to concatenate the second intermediate feature output by the standard convolution branch with the third intermediate feature output by the depthwise separable convolution branch. A global channel shuffling operation is introduced to shuffle and uniformly discretize the channel order of the concatenated feature, obtaining a first intermediate feature. This allows the dense semantic information generated by the standard convolution to deeply penetrate the output of the depthwise separable convolution branch, strengthening the information interaction between channels.
[0059] For example, the complete forward propagation calculation process in step S410 is shown in the following formula: ; ; ; ; Wherein: For input tensors; This is a standard convolution operation; This is a depthwise separable convolution operation; For channel splicing operations; Perform a global channel shuffle operation; This is the output feature map after fusion by the GSConv module.
[0060] Step S420: At the fusion node of the key feature layer, the VoVGSCSP module based on the one-time aggregation strategy performs cross-stage local connections on the first intermediate feature to avoid the decay and repeated calculation of deep gradient propagation in the network.
[0061] At the fusion nodes of key feature layers, the original dense residual blocks are replaced entirely with VoVGSCSP modules based on the One-Shot Aggregation (OSA) strategy. This avoids the decay and redundant computation issues of deep gradient propagation through cross-stage local connections. For example, based on the GSConv convolutional unit, the original C3k2 dense residual blocks are replaced entirely with VoVGSCSP modules based on the One-Shot Aggregation (OSA) strategy at the fusion nodes of key feature layers such as P3, P4, and P5. This VoVGSCSP module, through cross-stage local connections, further avoids the decay and redundant computation issues of deep gradient propagation.
[0062] Step S430: Integrate the dynamic adaptive downsampling module into all dimensionality reduction nodes of the full-link lightweight collaborative feature fusion network. The VoVGSCSP module is responsible for the efficient transformation and parallel aggregation of cross-scale and multi-level semantics. The dynamic adaptive downsampling module and the VoVGSCSP module are alternately distributed in the feature pyramid to construct a lightweight high-speed feature flow that is free from low-pass filtering interference, and obtain a multi-scale feature fusion feature map.
[0063] The bottom-up feature transfer path of the feature pyramid is structurally reshaped, and the dynamic adaptive downsampling module is deeply integrated into all dimensionality reduction nodes of the neck network. The VoVGSCSP module is responsible for efficient transformation and parallel aggregation of cross-scale and multi-level semantics, while the dynamic adaptive downsampling module acts as a high-frequency feature protection screen during spatial compression. The two are distributed alternately in the feature pyramid, decoupling the strong coupling between segmentation accuracy and inference computing power.
[0064] In the above embodiments, to address the contradiction of low efficiency in multi-scale fusion under lightweight constraints, a lightweight collaborative feature fusion network was reconstructed across the entire chain. Utilizing GSConv and the VoVGSCSP module based on a one-time aggregation strategy, not only were multi-scale semantic interactions and powerful feature representation capabilities maintained, but deep gradient propagation decay and redundant computation problems were also effectively avoided. While maintaining high accuracy, the computational complexity of the baseline model was successfully reduced from 9.6 GFLOPs to 7.5 GFLOPs, and the number of model parameters was compressed by 22.0% (to only 2.21M). This provides a highly advantageous lightweight solution for high-frequency real-time inference on edge devices, successfully decoupling the computational overhead and feature representation capabilities under multi-scale feature fusion.
[0065] In one implementation, such as Figure 5 As shown, the steps of introducing a lightweight edge-guided bypass, extracting explicit edge prior gradients from the multi-scale feature fusion feature map based on asymmetric convolution, and injecting the explicit edge prior gradients into the mask prediction branch for decoupling processing to obtain the segmented mask feature map include: Step S510: Construct a lightweight edge-guided bypass, introduce a directional operator based on asymmetric convolution, and obtain directional edge features with pixel-level gradient changes in the horizontal and vertical directions respectively, so as to introduce structural inductive bias and learn explicit edge prior gradients.
[0066] For example, a lightweight edge-guided bypass is constructed on the feature extraction mechanism, introducing a directional operator based on asymmetric convolution. Specifically, it is instantiated as 1×3 and 3×1 convolutions with mutually orthogonal kernel sizes, which capture boundary features with drastic pixel-level gradient changes in the horizontal and vertical directions, respectively, to introduce structural inductive bias and learn explicit edge prior gradients.
[0067] Step S520: Based on a lightweight multilayer perceptron, perform contextual interaction and importance space modeling on global features to generate a one-dimensional channel-level edge perception weight vector.
[0068] For example, after obtaining the high-frequency directional edge feature representation, a lightweight multilayer perceptron (MLP) is used to perform context interaction and importance space modeling on the global features, generating a one-dimensional channel-level edge perception weight vector.
[0069] Step S530: Introduce a residual attention fusion mechanism to perform an outer product operation on the channel-level edge perception weight vector and the directional edge features to generate a joint attention map.
[0070] In one example, the formula for calculating directional edge features is: ; in, Directional edge features For batch normalization, For the high-frequency edge components in the horizontal direction, These are the high-frequency edge components in the vertical direction. It is a non-linear activation function. This is a feature map fused from multiple scales.
[0071] For example, suppose the feature map input to the decoupling head is... In edge-guided bypass, this case introduces asymmetric convolution (whose kernel sizes are mutually orthogonal, specifically instantiated as...) and Directional operators. Asymmetric convolution introduces structural inductive biases into the network, which can efficiently capture boundary features with drastic pixel-level gradient changes in both the horizontal and vertical directions. Its physical effect is similar to that of the classic explicit first-order differential Sobel operator.
[0072] Combining batch normalization and nonlinear activation, the extraction process of the directional edge feature representation E is shown in the following formula: ; Wherein: and They are respectively responsible for capturing high-frequency edge components in the horizontal and vertical directions; This represents batch normalization. It is a non-linear activation function.
[0073] Step S540: Element-wise multiplication modulation is performed between the joint attention map and the mask prediction branch along the spatial and channel dimensions, and the residual structure is superimposed back into the mask prediction branch to guide the network to focus attention on and highlight the physical boundary region of pixel gradient changes, thereby obtaining the segmentation mask feature map.
[0074] In one example, the formula for calculating the segmentation mask feature map is: ; in, For segmentation mask feature map, For element-wise multiplication, This is a one-dimensional channel-level edge-aware weight vector. Directional edge features For element-wise multiplication of broadcast along the channel dimension, This is for outer product operations.
[0075] For example, after obtaining the high-frequency spatial edge features E, a lightweight multilayer perceptron (MLP) is used to perform contextual interaction and importance space modeling on the global features, generating a one-dimensional channel-level edge-aware weight vector. A residual attention fusion mechanism is introduced to integrate spatial edge features. With channel weight vector Perform outer product operations to generate a joint attention map.
[0076] Combine the joint attention map with the original mask feature branch Element-wise multiplication modulation is performed along the spatial and channel dimensions, and finally the residual structure is superimposed back into the mask prediction branch, thereby forcibly guiding the network to highlight the physical boundary region and output a high-fidelity segmentation mask feature map.
[0077] The final formula for mask feature fusion is shown below: ; In the formula: Represents the channel weight vector Spatial edge feature map outer product operation; This represents the joint attention map and the original mask features. Element-wise multiplication broadcast along the channel dimension; This is a high-fidelity mask feature map that has been enhanced with edge guidance and is output to the final prediction generator.
[0078] In the above embodiments, to address the edge jaggedness and breakage issues caused by the implicit feature learning of mask branches, this solution explicitly injects directional edge priors into the mask branches through an Edge-Guided Lightweight Decoupling Head (EG-LADH). Asymmetric convolution introduces a structural inductive bias into the network, effectively improving the network's implicit learning method for edge features. This technique not only effectively fits the complex physical topology at the intersection of multiple branches but also significantly improves the jaggedness and blurry overflow phenomena of the mask, increasing the model's core mask quality index, the Dice coefficient, to 73.71% and the IoU (Intersection over Union) to 58.36%, thereby improving the alignment accuracy and coherence of the physical boundaries of the mask for weak cracks.
[0079] In one embodiment, before the step of inputting the initial image into the backbone network for spatial resolution compression and feature extraction, the method includes: resampling the initial image to obtain a preprocessed initial image.
[0080] For example, the initial image containing cracks is resampled and preprocessed to unify the resolution to a preset target size, resulting in a preprocessed initial image. This preprocessed initial image is then input into the backbone network for spatial resolution compression and feature extraction. Furthermore, a dynamic adaptive downsampling module is introduced at the key feature layers of the backbone network to obtain the spatial high-frequency distribution features of the initial image based on a content-aware mechanism, resulting in a multi-scale backbone feature map. This multi-scale backbone feature map is then input into a full-link lightweight collaborative feature fusion network, where GSConv convolutional units and a VoVGSCSP module based on a one-time aggregation strategy are used to optimize the span. The gradient propagation path is optimized to reduce computational redundancy. The dynamic adaptive downsampling module is integrated into the bottom-up feature downsampling node of the end-to-end lightweight collaborative feature fusion network, allowing the dynamic adaptive downsampling module and the VoVGSCSP module to be distributed alternately. This constructs a lightweight high-speed feature flow that is free from low-pass filtering interference, resulting in a multi-scale feature fusion feature map. The multi-scale feature fusion feature map is then input into the edge-guided lightweight decoupling head, which performs multi-task decoupling processing based on parallel classification branches, bounding box regression branches, and mask prediction branches to obtain a segmentation mask feature map, thereby achieving feature segmentation of cracks in highway facilities.
[0081] In one example, the test specimen is illustrated using a test beam, such as... Figure 6 The diagram shown is an overview of the experimental concrete beam. The beam was tested using existing YOLOv11-SEG, YOLOv8-SEG, YOLOv12-SEG, SOLOv8v2 models, and the improved model (LEAD-YOLO) of this application. The results are as follows: Figure 7 Comparison of crack segmentation results and Figure 8A thermal comparison of crack segmentation is shown. Validated on publicly available concrete crack datasets, the proposed improved model (LEAD-YOLO) significantly improves the mean accuracy (mAP@50) by 4.33% (reaching 67.32%) and precision to 79.32% compared to the baseline YOLOv11-seg model. This application achieves a globally optimal balance between accuracy and efficiency through end-to-end collaborative design from the backbone network to the prediction end. Even under complex background noise interference such as pitting and dark spots, the model exhibits good feature focusing ability, accurately covering the real crack skeleton and effectively suppressing surrounding false positives (false detections), achieving extremely high comprehensive segmentation performance and strong noise robustness in complex engineering scenarios.
[0082] In one example, to evaluate the impact of the model (LEAD-YOLO) provided in this application on segmentation performance, systematic ablation experiments were conducted on the proposed backbone network, neck network, and decoupled prediction head on a publicly available experimental beam crack detection dataset. The aim was to separate and quantify the independent contribution of each module to the final performance. Table 1 lists the results for different configurations, including FPS (frames per second), precision (%), IoU overlap (%), mean average accuracy (mAP@50), model parameter count (params), and floating-point operations (GFLOPs).
[0083] Table 1 Ablation Experiment Results Continued from Table 1: Ablation Experiment Results To demonstrate the superiority of the proposed model (LEAD-YOLO) in crack segmentation, a comparative experiment is conducted with current mainstream crack segmentation models (YOLOv11-seg, YOLOv8-seg, hyper-YOLO, SOLOv2, etc.), ensuring that the dataset and training settings are identical. Table 2 presents the results for precision (P), recall (R), F1 score, mean average precision (mAP@50%), model parameter count (Params), and floating-point computation cost (GFLOPs).
[0084] Table 2. Comparison results of the LEAD-YOLO model in this application with other traditional models. As shown in Tables 1 and 2, the proposed LEAD-YOLO crack segmentation model achieves a globally optimal balance between accuracy and efficiency. Compared with the existing YOLOv11-seg model, the mean accuracy (mAP@50) is significantly improved by 4.33% (reaching 67.32%), and the precision reaches 79.32%. It also significantly improves the jagged edges and blurry overflow of the mask, increasing the Dice coefficient of the core mask quality index to 73.71% and the IoU to 58.36%. While maintaining high accuracy, it successfully reduces the computational complexity of the baseline model from 9.6 GFLOPs to 7.5 GFLOPs, and compresses the number of model parameters by 22.0% (to only 2.21M), providing a highly advantageous lightweight solution for high-frequency real-time inference on edge devices.
[0085] It should be understood that, although Figures 2 to 5 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 2 to 5 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0086] In one embodiment, a lightweight crack segmentation device based on dynamic downsampling and edge awareness is also provided, comprising: The image acquisition unit is used to acquire an initial image of the part under test.
[0087] The backbone network processing unit is used to input the initial image into the backbone network for spatial resolution compression and feature extraction. A dynamic adaptive downsampling module is introduced at the key feature level of the backbone network to obtain the spatial high-frequency distribution features of the initial image based on the content-aware mechanism, thereby obtaining a multi-scale backbone feature map.
[0088] The neck network processing unit is used to input multi-scale backbone feature maps into the end-to-end lightweight collaborative feature fusion network. It uses GSConv convolutional units and VoVGSCSP modules based on a one-time aggregation strategy to optimize the gradient propagation path across scales and reduce computational redundancy. Furthermore, the dynamic adaptive downsampling module is integrated into the bottom-up feature downsampling nodes of the end-to-end lightweight collaborative feature fusion network, so that the dynamic adaptive downsampling module and VoVGSCSP module are distributed alternately to construct a lightweight high-speed feature flow that is free from low-pass filtering interference, thereby obtaining a multi-scale feature fusion feature map.
[0089] The decoupled prediction head processing unit is used to input the multi-scale feature fusion feature map into the edge-guided lightweight decoupled head, and perform multi-task decoupling processing based on the parallel settings of classification branch, bounding box regression branch and mask prediction branch to obtain the segmentation mask feature map.
[0090] Specific limitations regarding the lightweight crack segmentation device based on dynamic downsampling and edge awareness can be found in the limitations of the lightweight crack segmentation method based on dynamic downsampling and edge awareness described above, and will not be repeated here. Each module in the aforementioned lightweight crack segmentation device based on dynamic downsampling and edge awareness can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the lightweight crack segmentation system based on dynamic downsampling and edge awareness, or stored in software in the memory of the system, so that the processor can call and execute the operations corresponding to each module.
[0091] In one embodiment, such as Figure 1 As shown, this application also provides a lightweight crack segmentation system based on dynamic downsampling and edge awareness, including a processor 10 and an image acquisition unit 20, wherein the image acquisition unit 20 is connected to the processor 10; the image acquisition unit 20 is used to acquire an initial image of the test piece; the processor 10 is used to execute the steps of the lightweight crack segmentation method based on dynamic downsampling and edge awareness as described above.
[0092] For a detailed description of the processor 10 and the image acquisition device 20, please refer to the description of the above embodiments, which will not be repeated here.
[0093] In the above embodiments, an initial image of the device under test is acquired by the image acquisition device 20 and transmitted to the processor 10. The processor 10 inputs the initial image into the backbone network for spatial resolution compression and feature extraction, and introduces a dynamic adaptive downsampling module at the key feature level of the backbone network to obtain the spatial high-frequency distribution features of the initial image based on a content-aware mechanism, thus obtaining a multi-scale backbone feature map. The multi-scale backbone feature map is input into a full-link lightweight collaborative feature fusion network, and GSConv convolutional units and a VoVGSCSP module based on a one-time aggregation strategy are used to optimize cross-scale features. The gradient propagation path is optimized to reduce computational redundancy. Furthermore, the dynamic adaptive downsampling module is integrated into the bottom-up feature downsampling nodes of the end-to-end lightweight collaborative feature fusion network. This allows the dynamic adaptive downsampling module and the VoVGSCSP module to be distributed alternately, constructing a lightweight, high-speed feature stream free from low-pass filtering interference, resulting in a multi-scale feature fusion map. This multi-scale feature fusion map is then input into an edge-guided lightweight decoupling head. Based on parallel classification branches, bounding box regression branches, and mask prediction branches, multi-task decoupling processing is performed to obtain a segmentation mask feature map, thus achieving feature segmentation of cracks in highway infrastructure. This application effectively mitigates the low-pass filtering effect of traditional stride convolution during downsampling by introducing a dynamic adaptive downsampling module. This preserves the weak texture and high-frequency edge information of cracks, allowing the prediction mask to extend more completely and coherently downwards. It avoids breakage or even missed detection at the crack tail or in extremely fine areas, significantly improving the ability to capture fine-grained features and mitigating the feature annihilation of high-frequency edge features in long, thin, low-contrast cracks. Furthermore, by reconstructing a lightweight, end-to-end collaborative feature fusion network, it utilizes GSConv convolutional units and a one-time aggregation strategy... The VoVGSCSP module not only maintains multi-scale semantic interaction and powerful feature representation capabilities, but also effectively avoids the problems of deep gradient propagation decay and redundant computation, decoupling the computational overhead and feature representation capabilities under multi-scale feature fusion. By explicitly injecting directional edge priors into the mask branches through the edge-guided lightweight decoupling head, it effectively improves the network's implicit learning method for edge features, effectively fits the complex physical topology at the intersection of multiple branches, and significantly improves the jaggedness and blurry overflow phenomenon of the mask, thereby improving the alignment accuracy and coherence of the physical boundary of the mask for weak cracks.
[0094] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0095] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A lightweight crack segmentation method based on dynamic downsampling and edge awareness, characterized in that, include: Acquire the initial image of the part under test; The initial image is input into the backbone network for spatial resolution compression and feature extraction. A dynamic adaptive downsampling module is introduced at the key feature level of the backbone network to obtain the spatial high-frequency distribution features of the initial image based on the content-aware mechanism, thereby obtaining a multi-scale backbone feature map. The multi-scale backbone feature map is input into the end-to-end lightweight collaborative feature fusion network. The GSConv convolutional unit and the VoVGSCSP module based on the one-time aggregation strategy are used to optimize the gradient propagation path across scales and reduce computational redundancy. The dynamic adaptive downsampling module is integrated into the bottom-up feature downsampling nodes of the end-to-end lightweight collaborative feature fusion network, so that the dynamic adaptive downsampling module and the VoVGSCSP module are distributed alternately to construct a lightweight high-speed feature flow that is free from low-pass filtering interference, and obtain a multi-scale feature fusion feature map. The multi-scale feature fusion feature map is input into the edge-guided lightweight decoupling head, and multi-task decoupling processing is performed based on the parallel classification branch, bounding box regression branch and mask prediction branch to obtain the segmentation mask feature map.
2. The lightweight crack segmentation method based on dynamic downsampling and edge awareness according to claim 1, characterized in that, The multi-scale feature fusion feature map is input into the edge-guided lightweight decoupling head, and multi-task decoupling processing is performed based on the parallel classification branch, bounding box regression branch, and mask prediction branch to obtain the segmentation mask feature map, including: A lightweight edge-guided bypass is introduced, and the explicit edge prior gradient of the multi-scale feature fusion feature map is extracted based on asymmetric convolution. The explicit edge prior gradient is then injected into the mask prediction branch for decoupling processing to obtain the segmentation mask feature map.
3. The lightweight crack segmentation method based on dynamic downsampling and edge awareness according to claim 1, characterized in that, The initial image is input into the backbone network for spatial resolution compression and feature extraction. A dynamic adaptive downsampling module is introduced at the key feature level of the backbone network to obtain the spatial high-frequency distribution features of the initial image based on a content-aware mechanism, resulting in a multi-scale backbone feature map, including: The initial image is spatially reorganized based on pixel deshuffling to obtain a first feature map; A lightweight dynamic channel gating mechanism is constructed to recalibrate the features of the first feature map, resulting in a second feature map; To construct an explicit edge enhancement residual branch, the edge prior is structurally compensated for in the second feature map to obtain the third feature map; The second feature map, which has undergone gate modulation, is fused with the third feature map, which has undergone edge enhancement residual branching, element by element to obtain the multi-scale backbone feature map.
4. The lightweight crack segmentation method based on dynamic downsampling and edge awareness according to claim 1, characterized in that, The step of performing spatial reconstruction on the initial image based on pixel-based deshuffling to obtain a first feature map includes: The spatial neighbor pixels of the corresponding initial image are sampled and recombined at a preset period to convert the spatial dimension information to the channel dimension without loss, so as to compress the resolution and retain the complete spatial high-frequency distribution features. The lightweight dynamic channel gating mechanism recalibrates the first feature map to obtain a second feature map, including: Global average pooling is used to aggregate the global spatial context information corresponding to the second feature map into a one-dimensional channel descriptor; the one-dimensional channel descriptor is input into a multilayer perceptron containing two linear transformations and a channel reduction rate r=16 to extract the nonlinear dependencies between channels; the channel weight calibration vector is output through the Sigmoid activation function and broadcast element-wise multiplication along the channel dimension with the main path downsampled feature map to amplify the channel weights containing high-frequency textures of cracks and suppress background noise interference; The construction of the explicit edge enhancement residual branch involves explicitly compensating for the edge prior in the structure of the second feature map to obtain the third feature map, including: Basic high-frequency edge response features are extracted across channels from the second feature map using a 1×1 standard convolutional block; spatial resolution alignment is performed using a downsampling operation; wherein the downsampling operation is explicitly instantiated as a 3×3 max pooling with a stride of 2, ensuring the topological integrity of the microcracks by retaining the maximum gradient response value in the neighborhood.
5. The lightweight crack segmentation method based on dynamic downsampling and edge awareness according to claim 1, characterized in that, The step of inputting the multi-scale backbone feature map into the end-to-end lightweight collaborative feature fusion network for processing includes: The multi-scale backbone feature map is processed using standard convolution and depthwise separable convolution to obtain the first intermediate feature; At the fusion node of the key feature layer, the VoVGSCSP module based on the one-time aggregation strategy performs cross-stage local connections on the first intermediate feature to avoid the decay and repeated calculation of deep gradient propagation in the network. The dynamic adaptive downsampling module is integrated into all dimensionality reduction nodes of the end-to-end lightweight collaborative feature fusion network. The VoVGSCSP module is responsible for efficient transformation and parallel aggregation of cross-scale and multi-level semantics. The dynamic adaptive downsampling module and the VoVGSCSP module are alternately distributed in the feature pyramid to construct a lightweight high-speed feature flow that is free from low-pass filtering interference, thereby obtaining the multi-scale feature fusion feature map.
6. The lightweight crack segmentation method based on dynamic downsampling and edge awareness according to claim 5, characterized in that, The process of processing the multi-scale backbone feature map using standard convolution and depthwise separable convolution to obtain the first intermediate feature includes: Based on standard convolutional branches, high-dimensional dense semantic features are extracted from the multi-scale backbone feature map to obtain the second intermediate feature; The second intermediate feature is input into a depthwise separable convolutional branch to perform a lightweight dense connection feature transformation, resulting in a third intermediate feature. Based on the feature splicing operator, the second intermediate feature and the third intermediate feature are spliced together to obtain the spliced feature; Based on global channel shuffling, the channel order of the spliced features is shuffled and uniformly discretized to obtain the first intermediate feature.
7. The lightweight crack segmentation method based on dynamic downsampling and edge awareness according to claim 2, characterized in that, The steps of introducing a lightweight edge-guided bypass, extracting explicit edge prior gradients from the multi-scale feature fusion feature map based on asymmetric convolution, and injecting the explicit edge prior gradients into the mask prediction branch for decoupling processing to obtain the segmented mask feature map include: A lightweight edge-guided bypass is constructed, and a directional operator based on asymmetric convolution is introduced to obtain directional edge features with pixel-level gradient changes in the horizontal and vertical directions, respectively, so as to introduce structural inductive bias and learn explicit edge prior gradients. A one-dimensional channel-level edge perception weight vector is generated by performing context interaction and importance space modeling of global features based on a lightweight multilayer perceptron. A residual attention fusion mechanism is introduced to perform an outer product operation between the channel-level edge-aware weight vector and the directional edge features to generate a joint attention map; The joint attention map and the mask prediction branch are modulated element-wise along the spatial and channel dimensions, and then superimposed back into the mask prediction branch as a residual structure. This guides the network to focus its attention on and highlight the physical boundary regions where pixel gradients change, thus obtaining the segmentation mask feature map.
8. The lightweight crack segmentation method based on dynamic downsampling and edge awareness according to claim 7, characterized in that, The formula for calculating the directional edge features is as follows: ; in, Directional edge features For batch normalization, For the high-frequency edge components in the horizontal direction, These are the high-frequency edge components in the vertical direction. It is a non-linear activation function. This is a feature map fused from multiple scales. The formula for calculating the segmentation mask feature map is: ; in, The segmentation mask feature map, For element-wise multiplication, This is a one-dimensional channel-level edge-aware weight vector. Directional edge features For element-wise multiplication of broadcast along the channel dimension, This is for outer product operations.
9. The lightweight crack segmentation method based on dynamic downsampling and edge awareness according to any one of claims 1 to 8, characterized in that, Before the step of inputting the initial image into the backbone network for spatial resolution compression and feature extraction, the following steps are included: The initial image is resampled and preprocessed to obtain a preprocessed initial image.
10. A lightweight crack segmentation system based on dynamic downsampling and edge awareness, characterized in that, It includes a processor and an image acquisition unit, the image acquisition unit being connected to the processor; the image acquisition unit is used to acquire an initial image of the device under test; The processor is configured to perform the steps of the lightweight crack segmentation method based on dynamic downsampling and edge awareness as described in any one of claims 1 to 9.