A visual large model and graph neural network fusion road network extraction and topology optimization method based on an ascendance environment

By using a fusion method of visual large model and graph neural network based on Ascend environment, the problems of road breakage and cross-modal feature processing in high-resolution remote sensing data are solved, and the topological integrity and connectivity of road network are optimized, which meets the needs of high-precision applications such as autonomous driving.

CN121767864BActive Publication Date: 2026-05-08ZHONGKE XINGTU JINNENG (NANJING) TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHONGKE XINGTU JINNENG (NANJING) TECH CO LTD
Filing Date
2026-02-26
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies for processing high-resolution remote sensing data suffer from problems such as road breaks, insufficient cross-modal feature processing capabilities, computational overhead and efficiency bottlenecks in large model deployment, and width and geometric deviations during vectorization. These issues result in incomplete and discontinuous road network extraction, failing to meet the high-precision application requirements of autonomous driving and other applications.

Method used

A method based on Ascend environment for visual large model and graph neural network fusion is adopted. By combining distance field and maximum pixel expansion, a dual-stream encoder, cross-attention fusion module and feature decoder are used to realize road width estimation and road network optimization. By utilizing the geometric features and topology of the road, the connectivity and robustness of the road network are improved.

Benefits of technology

It achieves the optimization of road network topology integrity and connectivity in complex environments, improves the accuracy and robustness of road extraction, reduces computational overhead and annotation costs, and adapts to the needs of actual traffic and geographic applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121767864B_ABST
    Figure CN121767864B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on the visual big model and graph neural network fusion road network extraction and topological optimization method of Ascend environment, method includes: using the input optical image data and LiDAR data of the road network extraction network based on the Ascend environment after training, output pixel-level road probability graph, the road network extraction network based on the Ascend environment includes the double-flow encoder connected in turn, cross attention fusion module and feature decoder;Width estimation and road network optimization are carried out to the output pixel-level road probability graph, and the topologically correct, bandwidth attribute road vector network with width is obtained.The application realizes the intelligent optimization of road network connectivity by constructing the road network extraction network based on the Ascend environment and using a kind of road width estimation method based on distance field and maximum pixel expansion combination, fully utilizes the geometric characteristics and topological structure of road, improves overall network accessibility and robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of road network extraction technology, and in particular to a method for road network extraction and topology optimization based on a fusion of a large visual model and a graph neural network in the Ascend environment. Background Technology

[0002] Despite significant advancements in road extraction technology over the past few decades, existing solutions still face considerable limitations and bottlenecks when processing high-resolution remote sensing data and transforming it into usable vector road networks. This invention addresses these challenges by proposing a systematic solution for the Ascend environment.

[0003] 1. Analysis of the shortcomings of existing technologies:

[0004] a) Lack of topological consistency and road breakage problem

[0005] Most existing deep learning road extraction methods treat it as a purely pixel-level classification task (semantic segmentation). While these models perform well on pixel metrics (such as mIoU), they often fall short at the geometric and topological level. Because roads are long and narrow and easily obscured by trees, building shadows, or vehicles, the predicted masks generated by the models frequently exhibit minor breaks, holes, or pseudo-branches. Due to the lack of global topological constraints, this pixel-level inconsistency prevents effective path navigation and connectivity analysis of the generated road network during subsequent vectorization, significantly limiting its application in high-precision fields such as autonomous driving.

[0006] b) Insufficient cross-modal feature processing capabilities

[0007] Existing multimodal fusion methods often employ simple "early fusion" or "late fusion" approaches. "Early fusion" involves concatenating RGB and DSM at the input, while "late fusion" involves weighted averaging of the results. These two crude fusion methods fail to fully exploit the deep nonlinear interactions between spectral texture and geometric elevation. In complex urban scenes, the phenomenon of "spectrally similar but semantically different" images, such as black asphalt roofs and asphalt roads, and areas with "insignificant geometric features" in LiDAR data, such as rural roads in plains areas, still lead to serious missed and false positives. Current technologies lack a refined fusion mechanism capable of adaptively switching modal weights under different environments.

[0008] c) Computational overhead and efficiency bottlenecks in large-scale model deployment

[0009] With the rise of large-scale visual models, such as ViT-based Foundation Models, the number of model parameters has exploded. While large models bring strong generalization capabilities, they also incur huge computational and memory overhead. Traditional general-purpose software frameworks often cannot be deeply optimized for specific computing hardware (such as Ascend NPU) when handling these ultra-large-scale models, resulting in low throughput and significant latency when performing inference on large-scale urban imagery. This is unacceptable in engineering scenarios requiring near real-time processing or large-scale batch processing (such as disaster emergency response).

[0010] d) Width and geometric deviation during vectorization process

[0011] Even with high-precision segmentation masks, converting them into standardized vector road networks with width attributes remains a technical challenge. Traditional methods often employ morphological skeletonization followed by heuristic rules. This approach results in highly unstable road width estimations, is susceptible to edge spikes, and cannot guarantee the continuity and smoothness of width over long road segments. Furthermore, traditional vectorization processes lack joint optimization of the overall road network structure, leading to frequent geometric misalignments of the generated vector line segments at intersections. Summary of the Invention

[0012] Technical Objective: To address the shortcomings of existing technologies, this invention discloses a road network extraction and topology optimization method based on the fusion of a large visual model and graph neural network in the Ascend environment. By constructing a road network extraction network based on the Ascend environment and employing a road width estimation method that combines distance field and maximum pixel expansion, the method fully utilizes the geometric features and topological structure of roads to achieve intelligent optimization of road network connectivity, thereby improving the overall network accessibility and robustness.

[0013] Technical solution: To achieve the above technical objectives, the present invention adopts the following technical solution.

[0014] A method for road network extraction and topology optimization based on the fusion of large visual models and graph neural networks in the Ascend environment, the method includes:

[0015] The Ascend-based road network extraction network is trained to process the input optical image data and LiDAR data, and outputs a pixel-level road probability map. The pixel-level road probability map includes the road network extraction and segmentation result SegMask, the binarized road map, and the centerline vector and topology relationship table. The Ascend-based road network extraction network includes a dual-stream encoder, a cross-attention fusion module, and a feature decoder connected in sequence.

[0016] Width estimation and road network optimization are performed on the output pixel-level road probability map to obtain a topologically correct road vector network with width attributes.

[0017] Preferably, the dual-stream encoder includes a parallel optical encoder and a LiDAR encoder; the input of the optical encoder is preprocessed optical image data, and the output of the optical encoder is optical features; the input of the LiDAR encoder is preprocessed LiDAR data, and the output of the LiDAR encoder is LiDAR features; the dual-stream encoder and feature decoder are VIT architecture.

[0018] The input to the cross-attention fusion module is optical features and LiDAR features. The structure includes a spectral attention branch in the channel dimension and an adaptive attention branch in the spatial dimension, which are used to fuse the input features and output fused features.

[0019] The feature decoder takes fused features as input and outputs a pixel-level road probability map.

[0020] Preferably, the preprocessing of optical image data and LiDAR data includes:

[0021] Radiometric correction and geometric registration are performed on the optical image data to obtain the processed RGB image; the LiDAR data is interpolated to generate a digital surface model (DSM); the processed RGB image and DSM are aligned to the same spatial coordinate system to obtain the preprocessed optical image data and LiDAR data.

[0022] Preferably, the computation process across the attention fusion module includes:

[0023] Intramodal self-attention: Self-attention calculations are performed on optical features and LiDAR features respectively;

[0024] Intermodal cross-attention: Through the Query-Key-Value mechanism, the Query of one modality interacts with the Key-Value of another modality to achieve information complementarity. Specifically, for the Query in optical feature processing and the Key and Value in LiDAR feature processing, the optical features actively "query" the structural information in the LiDAR features, and for the Query in LiDAR feature processing and the Key and Value in optical feature processing, the LiDAR features actively "query" the texture and color information in the optical features.

[0025] Gated fusion unit: Introduces learnable gating weights to dynamically adjust the contribution of the two modalities at each feature location; concatenates the outputs of self-attention and cross-attention, and controls the information flow through the gating weight vector G.

[0026] Preferably, the calculation formula for the gating fusion unit includes:

[0027] ,

[0028] in, For optical feature gate functions For LiDAR feature gating function, For the gated bias function, For gated fusion functions, It is a linear transformation matrix. For the Sigmoid function, For element-wise multiplication, For intermodal cross-attention from LiDAR features to optical features, This refers to intermodal cross-attention from optical features to LiDAR features. Optical characteristics Self-attention LiDAR features Self-attention.

[0029] Preferably, the loss function of the road network extraction network based on the Ascend environment includes pixel segmentation loss, boundary loss, median / centerline loss, width regression loss, and topology-aware loss; the formula for calculating the total loss function is:

[0030] ,

[0031] in, To extract the total loss function of the road network based on the Ascend environment, , These are the pixel segmentation loss hyperparameter and the pixel segmentation loss, respectively. , These are the boundary loss hyperparameters and the boundary loss, respectively. , These are the hyperparameters of the centerline loss and the centerline loss, respectively. , These are the hyperparameters of the width regression loss and the width regression loss, respectively. , These are the topology-aware loss hyperparameters and the topology-aware loss, respectively; each hyperparameter is used to adjust the weights for different loss tasks.

[0032] Preferably, the formula for calculating the topology-sensing loss includes:

[0033] ,

[0034] in, This represents the centerline extracted from the prediction mask. It is the true center line, where N is the total number of pixels. This is a smoothing term.

[0035] Preferably, the output pixel-level road probability map is subjected to width estimation and road network optimization, including the following steps:

[0036] The pixel-level road probability map is preprocessed to obtain the preprocessed pixel-level road probability map.

[0037] Calculate the discrete distance value from each pixel to the nearest background boundary for the preprocessed pixel-level road probability map to obtain the pixel-level distance field;

[0038] By combining the pixel-level distance field with the binary mask in the preprocessed pixel-level road probability map, a candidate set of center lines is extracted through skeletonization, and center line confidence and edge confidence maps are generated simultaneously.

[0039] By combining the centerline candidate set, the width of each road in the pixel-level road probability map is estimated to obtain the road width sequence of all roads;

[0040] By combining the road width sequence and the preprocessed pixel-level road probability map, the pixel width level distribution is obtained through the maximum pixel expansion method. The pixel width level distribution is then mapped to the initial width estimate of the edges to construct a topology graph. Road segment-level width continuity and robust aggregation are performed in the topology graph. The topology graph is then converted into a line graph to achieve geometric semantic inconsistency correction and global connectivity enhancement. Information is propagated through a graph neural network in the line graph to obtain the road width optimization result.

[0041] Preferably, the width estimation process includes: first, obtaining the preliminary width of the road using geometric estimation; then, obtaining the semantic width prediction value through a network prediction fusion method; and finally, obtaining the final road width through an adaptive weighted fusion method based on the preliminary width and the semantic width prediction value.

[0042] Beneficial effects:

[0043] 1. The road network extraction network based on the Ascend environment of this invention does not rely solely on general features at the semantic level. Instead, it structurally incorporates three key factors specific to road segmentation—"fine linear targets, topological connectivity, and weak annotation cues"—into the core of the network and training process. The optical visual encoder encodes the "fine and connected" geometric patterns into transferable mid-to-high-level representations through hierarchical ViT and directional bias attention, enabling the model to find a stable trade-off between long-term reliance on local details. The cue encoder transforms sparse human priors into soft-constrained conditional modulation and completes information convergence at the encoder midpoint and decoding entry point, avoiding the destruction of underlying textures by hard overlay methods and allowing significant gains from minimal interactions. The lightweight decoder structurally suppresses noise in cross-scale fusion and incorporates connectivity into the optimization at the objective function level using differentiable approximations, enabling the network to "actively learn connectivity" during training rather than relying on post-hoc rules to patch up breaks. The "representation-cue-reconstruction" closed loop formed by these three components allows the model to stably produce topologically complete road network results even when facing domain shifts, weak textures, and complex backgrounds.

[0044] 2. The Prompt Encoder of this invention achieves rapid adaptation with few samples, thereby effectively reducing the demand and cost of large-scale labeled data. The prompt encoding mechanism of this invention allows for efficient optimization and rapid adaptation of the basic model by inputting a small number of points, line segments, or weak annotations, or even combining existing road topology priors. This not only significantly shortens the cycle of model migration to new regions but also avoids the tedious manual annotation process, greatly reducing the cost of data preparation and manpower investment.

[0045] 3. The multi-scale pyramid and topological prior mechanism proposed in this invention can ensure the accuracy of road segmentation results in terms of detail and connectivity. Roads, as linear targets, are characterized by high aspect ratios, local breaks, and complex intersections, often resulting in blurred edges, breaks, and topological discontinuities in traditional segmentation methods. This invention introduces hierarchical pyramid feature extraction into the ViT encoder structure and adds a structure refinement module in the decoder stage, while simultaneously optimizing it together with boundary loss functions and connectivity regularization. This design enables the model to maintain connectivity integrity when recovering narrow roads and intersections, improving the accuracy of road centerlines and the overall topological consistency of the road network. Therefore, this invention not only achieves higher segmentation accuracy at the pixel level but also realizes complete reconstruction of the road network at the geometric and topological levels, meeting the needs of practical traffic and geographical applications.

[0046] 4. This invention introduces a cross-attention fusion module, which achieves alignment and fusion of optical and LiDAR features in a unified space through a hierarchical attention mechanism, significantly improving the ability to distinguish spectrally similar ground objects. This solves the problem of cross-modal feature inconsistency.

[0047] 5. This invention proposes a road width estimation method based on the combination of distance field and maximum pixel expansion, which makes full use of the geometric features and topology of roads to achieve intelligent optimization of road network connectivity and improve the overall network accessibility and robustness. Attached Figure Description

[0048] Figure 1 This is a flowchart of a method according to an embodiment of the present invention;

[0049] Figure 2 This is a schematic diagram of the network structure according to an embodiment of the present invention;

[0050] Figure 3 This is a schematic diagram of the cross-attention fusion module structure according to an embodiment of the present invention;

[0051] Figure 4 The distance field of the segmentation result in this embodiment of the invention;

[0052] Figure 5 This is a schematic diagram of the maximum distance field circular neighborhood in an embodiment of the present invention;

[0053] Figure 6 This is a schematic diagram of the final road width generated in an embodiment of the present invention. Detailed Implementation

[0054] 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 are within the scope of protection of the present application.

[0055] Example

[0056] As attached Figure 1 As shown in this embodiment, a method for road network extraction and topology optimization based on the fusion of a large visual model and a graph neural network in the Ascend environment includes the following steps:

[0057] S1. The trained Ascend-based road network extraction network processes the input optical image data and LiDAR data, outputting a pixel-level road probability map. This pixel-level road probability map includes the road network extraction and segmentation results (SegMask), a binarized road map, and a table showing the relationship between the centerline vector and the topology; see attached. Figure 2 and attached Figure 3 As shown, the road network extraction network based on the Ascend environment is a large visual model based on the Ascend environment, which includes a dual-stream encoder, a cross-attention fusion module and a feature decoder connected in sequence.

[0058] As attached Figure 2 As shown, the dual-stream encoder includes a parallel optical encoder and a LiDAR encoder. The input to the optical encoder is preprocessed optical image data, and the output is optical features. In this embodiment, the optical encoder is also called an optical vision encoder, and its structure includes four ViT Block modules. The ViT Block module is the core module in the Vision Transformer, containing a multi-head attention mechanism and a multilayer perceptron, used for feature extraction and representation learning of image data. The input to the LiDAR encoder is preprocessed LiDAR data. The structure of the LiDAR encoder is a CNN network or a PointNet++ network, and the output is LiDAR features. In this embodiment, the LiDAR encoder includes four CNNBlock modules. The CNN Block module is the basic unit of the CNN network, and each block contains basic operations such as convolutional layers and pooling layers. Both the dual-stream encoder and the feature decoder include the Vision Transformer architecture, i.e., the VIT architecture.

[0059] The preprocessing of optical image data and LiDAR data includes:

[0060] 1. Perform radiometric correction and geometric registration on the optical image data, i.e., RGB image data, to obtain the processed RGB image;

[0061] 2. Generate a digital surface model (DSM) by interpolating LiDAR data, i.e., LiDAR point cloud data;

[0062] 3. Align the processed RGB image and DSM to the same spatial coordinate system to obtain preprocessed optical image data and LiDAR data.

[0063] In the dual-stream encoder, both the optical encoder and the LiDAR encoder employ a variable-size patch strategy at their inputs: small patches preserve narrow roads and texture details, while large patches acquire wide-area semantics and terrain context. Parallel projection maps patches of different scales to tokens of a unified dimension. During the mapping process, the projection layer uses cross-channel linear transformations or lightweight nonlinear projections on the multispectral channels and the DSM (Distributed Surface Mapping) to achieve early fusion of spectral and elevation information at the token level, thereby enhancing the model's sensitivity to road breaks, occlusion, and abrupt terrain changes. The optical encoder internally adopts a hierarchical Transformer structure, drawing inspiration from the pyramid VIT (Virtual Interchange) and Swing (Switch) phased approaches. High resolution is preserved at lower levels to enhance local detail representation, while higher levels gradually converge to capture global semantics. Each stage employs local window self-attention combined with cross-window interaction (e.g., shifted windows or inter-block information transfer mechanisms) to ensure local coherence while achieving effective propagation of cross-block context. This design improves computational efficiency and helps maintain road connectivity between adjacent patches.

[0064] The dual-stream encoder outputs multi-scale features at multiple stages, typically labeled C1 to C4. These multi-scale features are fed into a lightweight decoder via skip-connections to achieve progressive upsampling and deep supervision, thus balancing boundary accuracy and topological coherence. Regarding pre-training strategies, this invention supports both self-supervised tasks based on large-scale remote sensing data (e.g., masked image modeling, patch-level contrastive learning) to construct robust spectral-spatial representations and supervised semantic pre-training to accelerate convergence and improve downstream accuracy. Based on this, prompt-tuning or few-sample fine-tuning is used to complete scene specialization, enabling rapid adaptation with minimal annotations when facing new sensors or new geographic regions.

[0065] This invention addresses the limited receptive field of CNNs by utilizing a hierarchical Vision Transformer (ViT), enabling it to capture road direction across hundreds of pixels. By introducing variable-size patch embeddings and multi-scale jump connections, this invention aims to preserve high-frequency information from fine road edges while extracting broad-domain semantics. Furthermore, this invention focuses on addressing the model's adaptability to the Ascend computing platform, ensuring efficient operation of large models through operator-level optimization.

[0066] The cross-attention fusion module takes optical and LiDAR features as input and its structure includes a spectral attention branch in the channel dimension and an adaptive attention branch in the spatial dimension. These branches are used to fuse the input features and output fused features. In this embodiment, the cross-attention fusion module includes four H-CMAL modules. Each H-CMAL module receives the output of one ViT Block module and one CNN Block module from the dual-stream encoder, and is used to perform intra-modal self-attention, inter-modal cross-attention, and gating fusion operations. The computation process of the cross-attention fusion module is as follows:

[0067] 1) Intramodal self-attention: Self-attention calculation is performed on optical features and LiDAR features respectively to enhance the representation of intramodal features.

[0068] For the The layers first address the optical features. and LiDAR features Self-attention calculation is performed to enhance context awareness within each modality. The calculation formula is as follows:

[0069] ,

[0070] Where Q, K, and V are the query vector, key vector, and value vector, respectively, all obtained by projecting the F-line. The self-attention of feature F, where feature F is an optical feature. and LiDAR features , is the dimension of the key vector.

[0071] 2) Intermodal Cross-Attention: Through a Query-Key-Value mechanism, a Query from one modality interacts with a Key-Value pair from another modality to achieve information complementarity. This is crucial for realizing cross-modal reasoning. This invention designs two cross-attention paths:

[0072] For the Query in optical feature processing, and the Key and Value in LiDAR feature processing: The optical features are allowed to actively "query" structural information from the LiDAR features. The calculation formula is as follows:

[0073] ,

[0074] in, For intermodal cross-attention from LiDAR features to optical features, For queries in optical feature processing For Key and Value in LiDAR feature processing, is the dimension of the key vector.

[0075] Regarding the Query in LiDAR feature processing and the Key and Value in optical feature processing: The LiDAR feature actively "queries" the texture and color information in the optical feature; the calculation formula is as follows:

[0076] ,

[0077] in, This refers to intermodal cross-attention from optical features to LiDAR features. For LiDAR feature processing, Query These are the Key and Value in optical feature processing, respectively. is the dimension of the key vector.

[0078] 3) Gated Fusion Unit: Learnable gating weights are introduced to dynamically adjust the contribution of the two modalities at each feature location. The outputs of self-attention and cross-attention are concatenated, and the information flow is controlled by a learnable gating weight vector G. The calculation process is as follows:

[0079] ,

[0080] in, For optical feature gate functions For LiDAR feature gating function, For the gated bias function, For gated fusion functions, It is a linear transformation matrix. For the Sigmoid function, For element-wise multiplication, Optical characteristics Self-attention LiDAR features Self-attention.

[0081] This gating mechanism enables the model to determine, based on local context, whether to rely more on optical or elevation information.

[0082] This invention introduces a multimodal fusion module (MMF). This module goes beyond simple data stitching; instead, it achieves deep interaction between optical flow and elevation flow through a hierarchical cross-modal attention mechanism. This allows the model to learn advanced semantic logic such as "if the spectral features show asphalt and the elevation features show significant height, then it is determined to be a roof rather than a road." Simultaneously, a gated fusion unit (Gating) is introduced as a dynamic weight to automatically suppress erroneous elevation information in LiDAR blind spots or anomalous regions, ensuring the model's robustness in the face of heterogeneous data gaps.

[0083] To address the issue of "spectrally similar but semantically different" road extraction in remote sensing—for example, the easy confusion between asphalt pavement and dark rooftops—this invention natively introduces a fine-grained multi-modal fusion module (MMF), also known as a cross-attention fusion module, within the network to achieve deep interactive learning between spectral texture and geometric / elevation information. The data preprocessing workflow includes projecting Li-DAR point clouds and interpolating them into a raster DSM and echo intensity map aligned with the optical image, while simultaneously generating a modal validity mask to identify LiDAR blind spots or anomalous regions. The multispectral image, after channel alignment and local contrast enhancement, is then input into the network along with the DSM. The MMF module, centered on Cross-Attention, allows the visual channel to actively query height information to correct texture ambiguities, while simultaneously allowing the geometric channel to query visual information to suppress DSM artifacts. Both achieve non-linear and fine-grained interaction within the semantic space. The module incorporates a gating mechanism to suppress erroneous modal information in high-noise or blind zones, working in conjunction with residual connections and a feedforward network (FFN) to ensure the stability and trainability of the information flow. In regions with abrupt elevation changes (steep roads), LiDAR feature weights are enhanced to suppress the misleading influence of optical features; in flat, continuous regions (such as gentle roads), optical features dominate classification decisions; the final model possesses adaptive discrimination capabilities for situations where the "spectral-structure" inconsistencies exist.

[0084] This invention addresses the unique characteristics of multispectral features in remote sensing by introducing a spectral-spatial joint attention module, forming a cross-attention fusion module. This module consists of a spectral attention branch in the channel dimension and an adaptive attention branch in the spatial dimension, enabling the model to dynamically adjust the spatial attention weight allocation based on the spectral response. This allows for priority attention to favorable spectral cues when pixel-spectral differences are significant, while spatial structure information is used for decision-making when spectral differences are not substantial. At the engineering implementation level, the efficiency and deployment friendliness of the Ascend NPU are fully considered. Matrix multiplication, standard convolution, and fusionable linear transformations are prioritized to reduce sparse indexing and irregular memory access. A mixed-precision (FP16) friendly layer normalization and operator fusion strategy is adopted, and configurable scaling options are provided for the number of layers and heads. For example, the Small version can use 8 layers, 512 hidden dimensions, and 8 heads; the Base version uses 12 layers, 768 hidden dimensions, and 12 heads, striking a balance between different computational resources and accuracy requirements.

[0085] The feature decoder takes fused features as input and outputs pixel-level road probability maps. The overall feature decoder adopts a U-Net-like pyramid upsampling architecture, but at the feature fusion stage, it abandons high-overhead large convolutional blocks and instead uses lightweight operators such as cross-channel attention and low-rank projection to achieve adaptive weighting and information redistribution between channels, thus significantly reducing computational power and memory consumption while maintaining fusion expressiveness. Each upsampling stage includes a specially designed structured refinement module, which integrates orientation field estimation for elongated structure awareness, local morphological response, and differentiable linear enhancement filters to restore connectivity at narrow roads, broken sections, and complex intersections. The decoder employs a deep supervision strategy at multi-scale outputs, applying supervision signals to predictions at different resolutions to promote gradient propagation and improve the learnability of boundaries and details. During training, pixel-level loss and structured loss are combined to balance semantic accuracy and topological integrity. The feature decoder uses a U-Net-like symmetric decoder structure, receiving fused features from corresponding levels of the encoder layer by layer through skip connections. The feature decoder gradually restores the spatial resolution through upsampling and convolution operations, ultimately outputting a single-channel probability map with the same size as the input. This represents the probability that each pixel belongs to the road. (See attached image.) Figure 2 As shown, in this embodiment, the feature decoder includes four Unsample upsampling modules, one 1×1 Conv convolution module, and one Sigmoid activation function. The outputs of the four H-CMA modules in the cross-attention fusion module are respectively connected to the four Unsample upsampling modules. After the four Unsample upsampling modules are connected in sequence, the last Unsample upsampling module is connected to the Sigmoid activation function through the Conv convolution module. The feature decoder finally outputs the road segmentation result through the Sigmoid activation function. At the same time, the output of the cross-attention fusion module outputs the road segmentation result through the post-processing module. The post-processing module includes modules such as Decoder, Prompt Encoder, Projection, Comcat / Add / Gating, and Adapter (FFN).

[0086] To adapt to the efficient inference of the Ascend NPU environment, the feature decoder prioritizes high-throughput operators such as standard convolution, matrix multiplication, and reshape to avoid sparse or irregular memory access patterns. Simultaneously, quantization-friendly paths are reserved in the operator design, and quantization-aware training (QAT) or post-training quantization (PTQ) strategies are introduced during the training phase to ensure acceptable accuracy under FP16 / INT8. Regarding memory and concurrency scheduling, the feature decoder supports tensor reuse, block inference, and streaming upsampling to reduce peak memory usage, and can automatically adjust the batch size and parallel stream count based on the number of concurrent cores to optimize throughput. To improve engineering reliability, this invention designs a switchable post-processing strategy: simplified morphological post-processing can be enabled on edge devices to reduce computational burden, while a complete CRF-based fitting and topology repair process is enabled in the cloud to obtain higher-quality vectorized output.

[0087] This invention utilizes the Ascend environment to extract pixel-level road probability maps from the road network. These maps include the road network extraction and segmentation result (SegMask), a binarized road map, and a centerline vector and topology table. Therefore, this invention emphasizes the diversity of output formats and downstream compatibility. The feature decoder can output either a dense pixel mask to meet pixel-level analysis requirements (corresponding to the road network extraction and segmentation result SegMask), a binarized road map for rapid visualization, or a centerline vector and topology table for GIS use after vectorization. This table includes attributes such as geometry, road width estimation, connectivity indicators, and confidence scores, supporting various application scenarios such as path planning, road network updates, and maintenance decisions. To ensure long-term maintainability, the entire decoding and post-processing components are designed as modular, replaceable units, facilitating future integration of more advanced refinement operators or topology optimization algorithms while maintaining good support and scalability for the Ascend platform.

[0088] In the dual-stream encoder, both the optical encoder and the LiDAR encoder employ a Prompt Encoder, a set of learnable task prior vectors. These prompt vectors can be fused with backbone features at the encoder's end or in cross-modal fusion layers via cross-attention, or injected during the decoding stage through conditional convolution or modulation mechanisms to guide the model's sensitivity to road-specific attributes such as shape, width, and topological features. The lightweight decoder uses depthwise separable convolutions, a small number of Transformer layers, and multi-scale skip connections. During upsampling, it preserves high-frequency boundary information and outputs multiple branches: a pixel-level segmentation mask (SegMask), a boundary confidence map (EdgeProb), a centerline confidence map (CenterProb), and a width prior heatmap (WidthPrior). This multi-head design allows subsequent vectorization and width estimation to directly utilize complementary information from the network output, thereby reducing post-processing uncertainty.

[0089] The prompt encoder aims to transform heterogeneous weak annotations, structured priors, and regional statistical information into low-cost prompt representations that can efficiently interact with ViT features, enabling rapid adaptation with few samples and injecting rule constraints during inference. Prompt inputs can originate from artificially generated sparse points, line segments, or a small number of mask fragments, or can be automatically generated by prior algorithms such as edge detection, centerline candidates obtained through Hough transform, or width distributions and local thresholds derived from historical road network vectors and regional statistical information. These heterogeneous inputs are first preprocessed within the prompt encoder, including coordinate normalization, local orientation vector calculation, and necessary spatial interpolation. Then, they are projected into a set of fixed-dimensional prompt tokens through a lightweight mapping network. The mapping network can be a two-layer MLP, a 1×1 convolution, or a narrowband Transformer with a position encoder. Multi-scale prompts can be generated in parallel during the mapping process to adapt to the encoder's hierarchical features. The generated prompt token is not used directly as an independent prediction head. Instead, it interacts with the encoder output token through a cross-attention mechanism (Prompt-aware Attention) in several designated layers of the Transformer, achieving soft modulation of internal features. The prompt encoder, combined with conditional normalization mechanisms such as Conditional LayerNorm or conditional batch normalization, dynamically calculates normalization scaling and offset parameters from the prompt token to control channel responses and attention weights at the activation level. The prompt injection method in this invention is a configurable pipeline: prompts can be injected in early layers of the encoder to guide representation learning and improve awareness of local linear structures, or they can be injected on the decoder side to directly affect the decoding and reconstruction process. To avoid undesirable interference with the basic representation, the system supports freezing encoder weights and updating only the prompt parameters (prompt-tuning), or using adapter-style fine-tuning in conjunction with prompt updates to achieve better generalization.

[0090] To address the issue of high annotation costs, this invention introduces a Prompt Encoder module. This module supports the conversion of sparse points and line segments into Prompt Tokens, which are then soft-modulated with encoder features in an intermediate layer.

[0091] In terms of training and adaptation strategies, the prompt encoder supports both direct supervised learning of prompt parameters and general methods such as meta-learning or rapid fine-tuning to improve its ability to quickly adapt to new tasks or sensors. To stabilize the training process, prompt consistency loss, regularization terms, and dropout can be introduced to prevent prompts from overfitting under sparse annotations. For structural prompts, topological consistency constraints are also introduced to ensure that the predictions guided by the prompts satisfy prior rules in terms of connectivity and intersection locations. The implementation of the prompt encoder balances engineering deployment with Ascend platform efficiency, prioritizing matrix multiplication-friendly layers and fusion operators to facilitate NPU acceleration. The number and dimension of prompt tokens can be adjusted during deployment according to resource constraints (e.g., the number of tokens is typically 8–64, and the embedding dimension can be 128–512), and it supports maintaining effective modulation capability after quantization. To support human-computer interaction and continuous learning processes, the system is designed with a prompt visualization and interactive interface, allowing manual online correction of prompts, and the return of manual changes as new weak annotations to the training process to trigger incremental fine-tuning, thus forming a low-cost and efficient annotation-training-deployment closed loop. In summary, the prompt encoder, with its lightweight and efficient tokenization, conditional normalization-driven feature modulation, flexible injection strategy, and rapidly adaptable training mechanism, provides road segmentation tasks with the technical capability to maintain high accuracy, strong connectivity, and high controllability under conditions of few samples and weak annotations. It also has good deployment and inference adaptability on the Ascend environment.

[0092] In terms of loss function design, the road network extraction network based on the Ascend environment uses a weighted composite loss, which includes pixel segmentation loss, boundary loss, central axis / centerline loss, width regression loss, and topology-aware loss. Pixel segmentation loss (BCE+Dice) ensures basic accuracy for global pixel classification; boundary loss (focal on boundary) focuses on edge pixels that are difficult to classify, thereby improving boundary sharpness and clarity; central axis / centerline loss (cross-entropy or regression) strengthens connectivity learning; and width regression loss constrains width estimation. Through central axis loss and width regression loss, the model's feature learning of target skeleton connectivity and geometric width is enhanced. Simultaneously, topology-aware loss is introduced to guide the generation of better masks for post-processing, constraining prediction results from a topological perspective and guiding the model to generate masks that better match the real anatomy or geometric structure, thus providing higher-quality input data for subsequent image post-processing steps. The formula for calculating the total loss function of the road network extraction network based on the Ascend environment is:

[0093] ,

[0094] in, To extract the total loss function of the road network based on the Ascend environment, , These are the pixel segmentation loss hyperparameter and the pixel segmentation loss, respectively. , These are the boundary loss hyperparameters and the boundary loss, respectively. , These are the hyperparameters of the centerline loss and the centerline loss, respectively. , These are the hyperparameters of the width regression loss and the width regression loss, respectively. , These are the topology-aware loss hyperparameters and the topology-aware loss, respectively; each hyperparameter is used to adjust the weights for different loss tasks.

[0095] The loss definitions for each component are as follows:

[0096] (1) Pixel segmentation loss

[0097] The loss function consists of binary cross-entropy (BCE) and Dice loss, used to ensure overall pixel classification accuracy. The calculation formula for topology-aware loss includes:

[0098] ,

[0099] in, For binary cross-entropy loss, Let P be the predicted value at each point, and G be the true value at each corresponding point. The BCE loss and DICE loss are defined as follows:

[0100] ,

[0101] in, For pixels The predicted probability, For pixels The corresponding ground truth, where N is the total number of pixels. This is a smoothing term.

[0102] (2) Boundary loss

[0103] Focal Loss is used to focus on boundary pixels that are difficult to classify, thereby improving edge sharpness. The loss function is defined as follows:

[0104] ,

[0105] This assumes that only the boundary region or a weighted calculation is performed. As a balance factor, This is the focusing parameter. It is a pixel. The boundary prediction probability. This represents the number of boundary pixels.

[0106] (3) Loss of centerline

[0107] This loss function is used to enhance road connectivity. It is defined as:

[0108] ,

[0109] in, For pixels The centerline prediction probability, It is a pixel. The ground truth value of the centerline. Since the centerline has very few pixels, we introduce weights. This is to solve the problem of imbalanced samples, that is, to give higher weight to the centerline pixels.

[0110] (4) Width regression loss

[0111] This loss function is used to estimate the constraint width. It is calculated only in the foreground (road) region.

[0112] ,

[0113] in, Represents the set of foreground pixels. To predict the width, This is the actual width.

[0114] (5) Topology-sensing loss

[0115] The loss function is defined as follows:

[0116] ,

[0117] in, This represents the centerline extracted from the prediction mask. It is the true center line, where N is the total number of pixels. This is a smoothing term.

[0118] The training adopts a phased strategy: the first phase is to perform self-supervised or labeled pre-training on large-scale remote sensing data to obtain robust representations; the second phase is to jointly fine-tune the entire model on labeled multimodal datasets, where Prom-pt Encoder and MMF obtain the feature mask; the third phase is to perform closed-loop fine-tuning after introducing post-processing simulation and topological constraints, and use the vectorization error generated by post-processing as additional supervision to improve the quality of the final result.

[0119] The road network extraction network based on the Ascend environment of this invention uses the highly expressive Vision Transformer (ViT) as the backbone encoder, combined with a task-specific prompt encoder and a lightweight decoder, forming a framework that can both leverage the generalization capabilities of large-scale pre-training and highly adapt to road semantics and geometric features. The input supports multispectral optical images (such as RGB, NIR, red-edge, etc.) and other aligned data types, which are first subjected to scale normalization, multispectral channel projection, and optional local contrast enhancement before entering the network. The ViT encoder employs multi-scale patch embedding and relative position encoding to address the large scale variations and long-distance contextual dependencies of remote sensing images; to reduce computational and memory overhead, some Transformer blocks can adopt linearized self-attention or local windowing strategies to accommodate large image inputs.

[0120] In summary, the road network extraction network based on the Ascend environment of this invention forms a core module that combines fine segmentation capabilities with efficient inference performance through variable patches and hierarchical structure, spectral-spatial joint attention, and dedicated optimization for the Ascend platform. This significantly improves the overall performance of remote sensing road segmentation in terms of accuracy, connectivity, and deployment efficiency.

[0121] S2. Perform width estimation and road network optimization on the output pixel-level road probability map to obtain a topologically correct road vector network with width attributes.

[0122] S21. Preprocess the pixel-level road probability map to obtain the preprocessed pixel-level road probability map.

[0123] Adaptive threshold binarization and morphological filtering are performed on pixel-level road probability maps to remove isolated noise points and fill in small holes, facilitating the acquisition of stable distance fields and basic skeleton information. The morphological operations include opening and closing operations.

[0124] S22. Calculate the discrete distance value from each pixel to the nearest background boundary for the preprocessed pixel-level road probability map to obtain the pixel-level distance field.

[0125] As attached Figure 4 and attached Figure 5 As shown, the pixel-level road probability map, i.e. the preprocessed binary road map, is calculated by a breadth-first (BFS) layer-by-layer expansion strategy or an efficient Euclidean distance transform (EDT) to obtain the pixel-level distance field r(x) (or its integer-level representation).

[0126] The calculation process for the pixel-level distance field includes:

[0127] Step 1: First round of boundary assignment processing. For each pixel with a non-zero value, if the pixel is located on the image boundary (including the top, bottom, left, right boundaries and the four corners), further determine its value. If it is located at a corner, set its pixel value to 1. If it is located on the top boundary, check if any of its neighboring pixels have a value of 0; if so, set that pixel to 1. If it is located on the bottom, left, or right boundary, use the same neighborhood detection method; if any of its neighbors have a value of 0, set that pixel to 1. If the pixel is not on the boundary, but its top, bottom, left, and right neighbors have pixels with a value of 0, set that pixel to 1.

[0128] Step 2: Iterative propagation processing. Set the iteration counter k, with an initial value of 1. In each iteration, perform the following operations on all pixels with non-zero pixel values: If the pixel is located on the image boundary: check if there is a pixel with a value equal to k in its neighborhood. If so, assign the pixel value k+1. If the pixel is not on the boundary: check if there are pixels with a value k in its upper, lower, left, and right neighborhoods. If so, assign the pixel value k+1. Repeat this process until there are no pixels with a value of 255 in the image.

[0129] Step 3: Obtain the assignment results for all pixels, thus completing the image based on the progressively expanding distance transformation. This allows us to obtain the distance field of each pixel using the segmentation results, i.e., the pixel distance from the pixel to the edge.

[0130] S23. Combine the pixel-level distance field with the preprocessed pixel-level road probability map to create a binary road map. That is, the binary mask extracts the candidate set of center lines through skeletonization and generates center line confidence and edge confidence maps at the same time.

[0131] Based on the pixel-level distance field, the binary mask is skeletonized to extract centerline candidates, and centerline confidence maps and edge confidence maps are generated simultaneously for subsequent fusion determination. Pixels at image boundaries are given special initial values ​​and neighborhood detection to ensure correct distance propagation at the boundary pixel level, thereby ensuring boundary consistency and stitching capability during large-scale image segmentation processing. In this process, the acquisition of the centerline candidate set also includes: pruning and filtering false branches on the skeleton using the centerline confidence map and edge confidence map to obtain a filtered centerline candidate set.

[0132] S24. Combine the centerline candidate set to estimate the width of each road in the pixel-level road probability map, obtaining a road width sequence for all roads. The width estimation process for each road includes: first, obtaining the preliminary road width using geometric estimation; then, obtaining the semantic width prediction value through network prediction fusion; and finally, obtaining the final road width through an adaptive weighted fusion method based on the preliminary width and the semantic width prediction value.

[0133] Regarding width estimation, this invention employs an adaptive fusion strategy of geometric estimation and network semantic prediction. In the centerline candidate set, for each centerline point on the skeleton... First, the geometric width estimate is obtained directly from the distance field to obtain the preliminary width. The calculation formula is:

[0134] ,

[0135] in, Central axis point The distance to the nearest background, i.e., the distance at the central axis point in S22 using EDT. The distance value calculated at that location;

[0136] Simultaneously, semantic width prediction is obtained from the width prior heatmap of the pixel-level road probability map. .

[0137] The two are combined using pixel-level confidence adaptive weighting to achieve the final width. The calculation formula is:

[0138] ,

[0139] Among them, weight The confidence level is jointly determined by quantitative indicators such as the centerline confidence, edge confidence, and DSM coherence confidence at that point. For example, it can be calculated using confidence normalization or temperature-based softmax methods, prioritizing geometric estimation where boundaries are clear and favoring network prediction where texture / geometric uncertainty exists. To suppress drastic width fluctuations over short distances, the confidence level along the central axis is... The sequence can be smoothed using Gaussian filtering or by solving a quadratic energy minimization problem with second-order difference regularization (a trade-off parameter between data fidelity and curvature smoothing terms can be set). Dynamic programming (DP) can be used to simplify the midpoint sequence (e.g., tolerance). This allows us to obtain a concise and continuous point chain expression.

[0140] S25. Combining the road width sequence and the preprocessed pixel-level road probability map, the pixel width level distribution is obtained through the maximum pixel expansion method. The pixel width level distribution is mapped to the initial width estimate of the edge to construct a topology graph. Road segment level width continuity and robust aggregation are performed in the topology graph. The topology graph is converted into a line graph to realize the geometric semantic inconsistency correction and global connectivity enhancement. Information is propagated through a graph neural network in the line graph to obtain the road width optimization result.

[0141] To improve the robustness of pixel width to linear features, this invention employs a local circular neighborhood filling mechanism based on "maximum pixel expansion" to derive pixel width levels, i.e., road widths, from distance levels. This mechanism uses the extreme point of a certain level m in the distance field as the expansion radius r=m. It traverses within the bounded rectangle of the extreme point and assigns the value m to pixels that satisfy the in-circle condition and whose original value is not greater than m. By successively expanding all levels, the local width level distribution of each pixel is obtained, which is then mapped to the initial width estimate of the edges. Subsequently, the planar mask, i.e., the road network extraction and segmentation result SegMask, is skeletonized and a topology graph is constructed. Where V is a node and E is an edge. The original road map is a vector graphic. In this map, the skeleton endpoints and intersections are used as nodes, and the skeleton segments are used as edges. The width level of the pixels covered by each edge is calculated to determine the initial width attribute of the edge. .

[0142] When performing width continuum and robust aggregation at the road segment level, the representative width of each branch is calculated by grouping the edges according to the minimum connected component (i.e., the basic road segment divided at intersections or endpoints). A length-weighted average is then used to obtain the branch width. To prevent the abnormally widened width at the intersection from affecting the results, a smaller contribution coefficient (e.g., a weight coefficient of 0.65) is applied to edges that are close to or equal to the maximum width of the branch. The aggregation formula can be expressed as:

[0143] ,

[0144] in, Here, n represents the maximum width of the current branch, and n is the number of edges in the current branch. The length of the current edge. is the initial width of the edge.

[0145] In the geometric uniformity and normalization stage, the method further identifies sets of parallel and intersecting edges and performs group fitting on their widths. The fitting can be done using a length- and confidence-weighted average.

[0146] ,

[0147] in, This is the index of the current parallel edge.

[0148] To correct geometric semantic inconsistencies and enhance global connectivity, this invention uses the original road map Convert to line chart (That is, treat the edges in the original graph as nodes in the line graph, and establish adjacency relationships between edges sharing endpoints in the original graph), and construct the attribute vector of each edge on this line graph. ,in, The edge formed by node i and node j geometric direction angle, and through Encoding to avoid angle discontinuities, Let x and y be the pixel coordinates of node i, respectively. Let x and y be the pixel coordinates of node j, respectively. This provides the width information for the current edge.

[0149] During the process of converting the original road network graph G(V,E) into a line graph L(G), each edge in the original graph... In the online graph, this corresponds to a node. In the original graph, two edges sharing an endpoint form connections between adjacent nodes in the line graph. Each node... The feature is defined as:

[0150] ,

[0151] in, For nodes initial characteristics, This is a structural embedding vector generated based on the node labeling algorithm.

[0152] On a line graph, information propagation between nodes is achieved through multi-layer graph convolution. The graph neural network takes the line graph as input and outputs a connectivity score for each road edge. In the (k+1)th layer of the graph neural network, the features of each node are updated in the following way:

[0153] ,

[0154] in, For nodes The feature map at layer k, nodes For nodes Adjacent nodes, For nodes The feature map at the (k+1)th layer, For the line graph and nodes The set of adjacent nodes, i.e., those adjacent to the edges in the original graph. Roadside at a shared intersection; This is a balancing coefficient used to control the fusion weights of self-features and neighbor features; Let be the learnable weight matrix for the k-th layer. The final result is embedded into the input multilayer perceptron to generate a connectivity score for each road edge, used to determine potential connections or improve strategies.

[0155] Structural embeddings (such as line-lembedding based on node degree or intersection labels) are added to the nodes of the line graph. Feature propagation and updates are performed on the line graph through multi-layer graph convolution or graph neural networks. A neighbor aggregation formula with balanced coefficients is used to fuse self-features and neighborhood features. Finally, the connectivity score of each edge is obtained through MLP. Connectivity scoring is used both to determine whether to retain or delete certain suspected pseudo-connections, and to guide local shortest energy path reconnection strategies to bridge short breaks or replace suspended pseudo-connections, thereby improving the structural consistency of the global road network. The structure of the graph neural network in this invention is prior art and will not be described in detail here.

[0156] As attached Figure 6 As shown, the final generated continuous width values ​​will be mapped to a predefined set of road specification width categories, for example... The algorithm selects the closest class value as the standardized width category using the least absolute difference method, and marks elements with connectivity scores below a threshold as "awaiting manual review." The entire process can be parallelized and accelerated on the Ascend platform using high-throughput operators (distance transformation, local circular domain expansion, skeletonization, graph convolution, etc.). Pixel-level algorithms use rectangular bounding boundaries to accelerate circular domain traversal and reduce computation, while graph-level optimization uses sparse and striped matrices to reduce memory usage and computational complexity. The final output is a vector road network file (supporting GeoJSON, Shapefile, and other formats) with attributes such as geometric shape, continuous width value, normalized width category, connectivity score, and modal contribution ratio. This file can be directly used for downstream applications such as high-precision map updates, autonomous driving positioning, or urban planning.

[0157] This invention proposes a novel technical solution for the post-processing and continuity of width estimation results. First, graph theory methods are used to transform the segmentation results into a linear graph structure, and a weighted average calculation of the width of the smallest connected branch is performed based on road geometric connectivity, reducing the interference of intersection areas on branch width. Then, a dynamic programming (DP) algorithm is used to simplify the road segment sequence, achieving road width continuity. Subsequently, a "width fitting rule for parallel and intersecting edges" is introduced into the road geometric relationships to ensure the consistency of the road width estimation results in terms of geometric topology.

[0158] This invention addresses the topology consistency problem by simultaneously addressing both model training and post-processing stages. During model training, a composite loss function is designed, with the core topology-aware loss explicitly incorporating the skeleton connectivity of the predicted mask into gradient optimization, penalizing any physical breaks that do not conform to road priors. In the post-processing stage, graph-level optimization is performed, innovatively converting the pixel road network into a line graph and utilizing a graph neural network (GNN) to score the connectivity of road edges. This step aims to intelligently repair short-distance breaks caused by tree occlusion and eliminate suspended pseudo-connections by leveraging the global topological context.

[0159] Based on the above principles, this invention proposes an innovative method based on graph neural networks for improving road network connectivity. Specifically, the original road network map is converted into a line graph representation, where road edges in the original map correspond to nodes in the line graph, and road edges sharing endpoints in the original map form adjacency relationships in the line graph. The features of each node are formed by concatenating road geometric attributes (such as width and direction) with a structural embedding vector generated based on a node labeling algorithm. Information propagation between nodes is achieved through multi-layer graph convolution on the line graph. Each layer of node features retains its own attributes while incorporating neighboring road information, thereby obtaining a high-order structural embedding. The final embedding is input into a multi-layer perceptron to generate a connectivity score for each road edge, guiding potential road connections, intersection optimization, and network redundancy improvement. This method can fully utilize the geometric features and topology of roads to achieve intelligent optimization of road network connectivity, improving overall network reachability and robustness.

[0160] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for road network extraction and topology optimization based on the fusion of a large visual model and a graph neural network in the Ascend environment, characterized in that... The methods include: The Ascend-based road network extraction network is trained to process the input optical image data and LiDAR data, and outputs a pixel-level road probability map. The pixel-level road probability map includes the road network extraction and segmentation result SegMask, the binarized road map, and the centerline vector and topology relationship table. The Ascend-based road network extraction network includes a dual-stream encoder, a cross-attention fusion module, and a feature decoder connected in sequence. The output pixel-level road probability map is subjected to width estimation and road network optimization to obtain a topologically correct road vector network with width attributes; The dual-stream encoder consists of a parallel optical encoder and a LiDAR encoder; the input of the optical encoder is preprocessed optical image data, and the output of the optical encoder is optical features; the input of the LiDAR encoder is preprocessed LiDAR data, and the output of the LiDAR encoder is LiDAR features; the dual-stream encoder and feature decoder are VIT architecture. The input to the cross-attention fusion module is optical features and LiDAR features. The structure includes a spectral attention branch in the channel dimension and an adaptive attention branch in the spatial dimension, which are used to fuse the input features and output fused features. The input to the feature decoder is the fused features, and the output is a pixel-level road probability map; The computation process across the attention fusion module includes: Intramodal self-attention: Self-attention calculations are performed on optical features and LiDAR features respectively; Intermodal cross-attention: Through the Query-Key-Value mechanism, the Query of one modality interacts with the Key-Value of another modality to achieve information complementarity. Specifically, for the Query in optical feature processing and the Key and Value in LiDAR feature processing, the optical features actively "query" the structural information in the LiDAR features, and for the Query in LiDAR feature processing and the Key and Value in optical feature processing, the LiDAR features actively "query" the texture and color information in the optical features. Gated fusion unit: Introduces learnable gating weights to dynamically adjust the contribution of the two modalities at each feature location; concatenates the outputs of self-attention and cross-attention, and controls the information flow through the gating weight vector G.

2. The method for road network extraction and topology optimization based on the Ascend environment and the fusion of large visual models and graph neural networks according to claim 1, characterized in that: The preprocessing of optical image data and LiDAR data includes: Radiometric correction and geometric registration are performed on the optical image data to obtain the processed RGB image; the LiDAR data is interpolated to generate a digital surface model (DSM); the processed RGB image and DSM are aligned to the same spatial coordinate system to obtain the preprocessed optical image data and LiDAR data.

3. The method for road network extraction and topology optimization based on the Ascend environment and the fusion of large visual models and graph neural networks according to claim 1, characterized in that: Gated fusion unit calculation formula include: , in, For optical feature gate functions For LiDAR feature gating function, For the gated bias function, For gated fusion functions, It is a linear transformation matrix. For the Sigmoid function, For element-wise multiplication, For intermodal cross-attention from LiDAR features to optical features, This refers to intermodal cross-attention from optical features to LiDAR features. Optical characteristics Self-attention LiDAR features Self-attention.

4. The method for road network extraction and topology optimization based on the Ascend environment and the fusion of large visual models and graph neural networks according to claim 1, characterized in that: The loss function of the road network extraction network based on the Ascend environment includes pixel segmentation loss, boundary loss, median / centerline loss, width regression loss, and topology-aware loss; the formula for calculating the total loss function is: , in, To extract the total loss function of the road network based on the Ascend environment, , These are the pixel segmentation loss hyperparameter and the pixel segmentation loss, respectively. , These are the boundary loss hyperparameters and the boundary loss, respectively. , These are the hyperparameters of the centerline loss and the centerline loss, respectively. , These are the hyperparameters of the width regression loss and the width regression loss, respectively. , These are the topology-aware loss hyperparameters and the topology-aware loss, respectively; each hyperparameter is used to adjust the weights for different loss tasks.

5. The method for road network extraction and topology optimization based on Ascend environment and fusion of large visual model and graph neural network according to claim 4, characterized in that: The formula for calculating topology-sensing loss includes: , in, This represents the centerline extracted from the prediction mask. It is the true center line, where N is the total number of pixels. This is a smoothing term.

6. The method for road network extraction and topology optimization based on the Ascend environment and the fusion of large visual models and graph neural networks according to claim 1, characterized in that: The output pixel-level road probability map is subjected to width estimation and road network optimization, including the following steps: The pixel-level road probability map is preprocessed to obtain the preprocessed pixel-level road probability map. Calculate the discrete distance value from each pixel to the nearest background boundary for the preprocessed pixel-level road probability map to obtain the pixel-level distance field; By combining the pixel-level distance field with the binary mask in the preprocessed pixel-level road probability map, a candidate set of center lines is extracted through skeletonization, and center line confidence and edge confidence maps are generated simultaneously. By combining the centerline candidate set, the width of each road in the pixel-level road probability map is estimated to obtain the road width sequence of all roads; By combining the road width sequence and the preprocessed pixel-level road probability map, the pixel width level distribution is obtained through the maximum pixel expansion method. The pixel width level distribution is then mapped to the initial width estimate of the edges to construct a topology graph. Road segment-level width continuity and robust aggregation are performed in the topology graph. The topology graph is then converted into a line graph to achieve geometric semantic inconsistency correction and global connectivity enhancement. Information is propagated through a graph neural network in the line graph to obtain the road width optimization result.

7. The method for road network extraction and topology optimization based on Ascend environment and fusion of large visual model and graph neural network according to claim 6, characterized in that: The width estimation process includes: first, obtaining the preliminary road width using geometric estimation; then, obtaining the semantic width prediction value through network prediction fusion; and finally, obtaining the final road width through an adaptive weighted fusion method based on the preliminary width and the semantic width prediction value.

Citation Information

Patent Citations

  • Cross-modal attention-guided remote sensing image cloud removal method

    CN118552426A

  • Cross-modal multi-information fusion classification network, system, medium and equipment

    CN118941846A