Road modeling method and device and electronic equipment

By using the Swin-Unet model and the Delaunay triangulation algorithm, the problem of cross-regional reuse of urban 3D modeling in existing technologies is solved, achieving efficient road 3D modeling, which is suitable for urban digital twins and autonomous driving simulation platforms.

CN121962490APending Publication Date: 2026-05-01ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512040324.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing urban 3D modeling technologies are difficult to reuse across regions or be automatically migrated, especially in key traffic nodes such as complex intersections and multi-way intersections, where there is a lack of effective 3D representation, resulting in poor road network continuity and incomplete topological relationships.

Method used

A pre-trained Swin-Unet model is used to classify satellite images, identify road areas and non-road areas, and construct a continuous and non-overlapping 3D model using the Sweep and Delaunay triangulation algorithms to generate 3D road modeling results.

Benefits of technology

It achieves accurate and effective road modeling, generating 3D models with continuous surfaces and high geometric fidelity, suitable for urban digital twins and autonomous driving simulation platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962490A_ABST
    Figure CN121962490A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a road modeling method and device and electronic equipment, which are used for accurately and effectively carrying out road modeling. In the embodiment of the invention, the electronic equipment identifies the road area and the non-road area in the satellite image through the pre-trained Swindow-Unet model, further determines the intersection area and the road section area, and constructs the continuous and smooth first three-dimensional model according with the actual trend by adopting the Sweep modeling method; and a Delaunay triangulation algorithm is adopted to carry out gridding processing on the surface domain to generate a group of triangular patch sets which are reasonable in topology and free of overlapping and selfing, so that a second three-dimensional model which is continuous in surface and high in geometric fidelity is constructed, and road modeling is accurately and effectively carried out.
Need to check novelty before this filing date? Find Prior Art

Description

A road modeling method, apparatus and electronic equipment Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a road modeling method, apparatus and electronic device. Background Technology

[0002] With the rapid development of computer graphics, remote sensing technology, and geographic information systems, visualization technology is increasingly being applied in fields such as urban planning, intelligent transportation, emergency command, and digital twins. Society as a whole is demanding more refined and three-dimensional representations of urban spatial information. Against this backdrop, urban 3D modeling technology, as a core means of achieving accurate mapping between virtual cities and the real world, has received widespread attention and rapid development.

[0003] Current urban 3D models typically encompass various geographic features such as buildings, road networks, water systems, green spaces, and bare land. Among these, buildings and roads are key components forming the urban framework. However, due to significant differences in geographical features, construction patterns, and data acquisition conditions among different cities, existing 3D models are difficult to reuse across regions or be automatically migrated. This results in high model reconstruction costs and long cycles, severely hindering the large-scale promotion and standardization of urban 3D technology.

[0004] Current urban 3D modeling practices generally employ a strategy of "refined modeling of key areas and simplified processing of non-key areas." Specifically, core urban areas often rely on manual modeling or high-precision reconstruction based on laser point clouds to obtain 3D buildings and roads with realistic textures and geometric details; while in non-core areas, "white models" (i.e., simple blocks with only basic outlines and height information) are mainly used to quickly generate building models. However, this method has significant shortcomings in road modeling, especially for key traffic nodes such as complex intersections and multi-branch intersections, which often lack effective 3D representation or even completely ignore their structural features, resulting in poor road network continuity and incomplete topological relationships. Summary of the Invention

[0005] This application provides a road modeling method, apparatus, and electronic device for accurately and effectively performing road modeling.

[0006] In a first aspect, embodiments of this application provide a road modeling method, the method comprising:

[0007] Acquire satellite imagery, input the satellite imagery into a pre-trained semantic segmentation (Swin-Unet) model, classify the satellite imagery using the Swin-Unet model, and output segmented images that identify road areas and non-road areas;

[0008] Based on the segmented image, identify intersection areas where multiple roads overlap and road segment areas connected to the intersection areas;

[0009] For each road segment area, a three-dimensional geometry of the road segment is constructed by scanning along the centerline (Sweep) to obtain the first three-dimensional model; and the intersection area is meshed using the Delaunay triangulation algorithm to generate a set of continuous and non-overlapping triangular facets to obtain the second three-dimensional model.

[0010] Based on the first 3D model and the second 3D model, the 3D modeling result of the road is determined.

[0011] In one possible implementation, classifying the satellite imagery using the Swin-Unet model and outputting segmented images identifying road areas and non-road areas includes:

[0012] The satellite imagery is classified using the Swin-Unet model, and segmented images that identify road areas and non-road areas, as well as road widths, are output.

[0013] The step of identifying intersection regions where multiple roads overlap based on the segmented image includes:

[0014] Based on the road regions in the segmented image, determine the centerline of each road;

[0015] The Bentley-Ottmann plane line segment intersection detection algorithm is used to identify the intersection points between each center line;

[0016] For each intersection, obtain the first centerline and the second centerline corresponding to that intersection. Based on the first centerline, the second centerline, the first width of the road corresponding to the first centerline, and the second width of the road corresponding to the second centerline, determine the intersection area where multiple roads overlap.

[0017] In one possible implementation, identifying the road segment area connected to the intersection area includes:

[0018] For each edge of the intersection area at a certain intersection point, translate the edge a preset distance away from the intersection point to obtain the target edge. Then, determine the road segment area corresponding to the edge based on the target edge, the corresponding road, and the target edge.

[0019] In one possible implementation, classifying the satellite imagery using the Swin-Unet model and outputting segmented images that identify road areas and non-road areas as well as road widths includes:

[0020] The feature map is obtained by performing self-attention calculation on the satellite image using the Swin Transformer layer in the Swin-Unet model.

[0021] The binary map corresponding to the feature map is determined by the segmentation branch decoder and sigmoid activation function in the Swin-Unet model, wherein the binary map identifies road regions and non-road regions; and the road width heatmap corresponding to the feature map is determined by the width branch decoder and linear activation function in the Swin-Unet model, wherein the road width heatmap identifies the width of the road.

[0022] The network layers in the Swin-Unet model are used to identify the segmented images corresponding to the binary image and the road width heatmap.

[0023] In one possible implementation, after classifying the satellite imagery using the Swin-Unet model and outputting segmented images identifying road areas and non-road areas, and before identifying intersection areas where multiple roads overlap and road segments connected to intersection areas based on the road areas in the segmented images, the method further includes:

[0024] Based on the road regions in the segmented image, determine the centerline of each road;

[0025] For each center line, a rectangle with a preset width and the road width corresponding to that center line is generated. The rectangle is moved sequentially along the vertical direction of the straight line corresponding to every two adjacent pixels on the center line, and the outline of the rectangle is determined as the target road area.

[0026] For the identified target road area, the following steps are performed: based on the road area in the segmented image, identify the intersection area where multiple roads overlap and the road segment area connected to the intersection area.

[0027] In one possible implementation, after identifying the intersection areas where multiple roads overlap and the road segment areas connected to the intersection areas, and before performing meshing processing on the intersection areas using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular faces to obtain the second three-dimensional model, the method further includes:

[0028] For each road segment area, determine the intersection point between the edge of that road segment area furthest from the intersection and the road.

[0029] Connect each road intersection point identified in the same intersection area to generate the outline of the corresponding intersection;

[0030] The steps involve replacing the intersection region with the identified contour, then performing a meshing process on the replaced intersection region using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular facets, thus obtaining the second three-dimensional model.

[0031] In one possible implementation, generating the outline of the corresponding intersection for each road intersection point identified corresponding to the same intersection area includes:

[0032] For each road intersection, identify the target road intersection that is not located on the same road as the road intersection and is the closest to the road intersection. Then, identify the target road intersection and the road intersection as a pair of contour points in the same group.

[0033] For each group, a quadratic Bézier curve is used to smooth the contour point pairs within the group to generate the contour of the corresponding intersection.

[0034] In one possible implementation, the method further includes:

[0035] Based on the road regions in the segmented image, determine the centerline of each road;

[0036] If the endpoints and / or connection points of multiple center lines are located within a region of a preset size, a node is generated that records the center point of that region.

[0037] For each road, identify two target nodes that record the center points of the two regions corresponding to the two endpoints of the road, connect the two target nodes, and record the road information on the edges connecting the two target nodes.

[0038] Generate the corresponding topology and display the topology.

[0039] Secondly, embodiments of this application also provide a road modeling device, the device comprising:

[0040] The acquisition and recognition module is used to acquire satellite images, input the satellite images into a pre-trained Swin-Unet model, classify the satellite images through the Swin-Unet model, and output segmented images that identify road areas and non-road areas; based on the segmented images, it identifies intersection areas where multiple roads overlap and road segment areas connected to intersection areas.

[0041] The processing module is used to construct the three-dimensional geometry of each road segment area using the Sweep method to obtain the first three-dimensional model; and to perform meshing processing on the intersection area using the Delaunay triangulation algorithm to generate a set of continuous and non-overlapping triangular patches to obtain the second three-dimensional model; and to determine the road three-dimensional modeling result based on the first three-dimensional model and the second three-dimensional model.

[0042] In one possible implementation, the acquisition and identification module is specifically used to classify the satellite imagery using the Swin-Unet model and output segmented images that identify road areas and non-road areas as well as road widths.

[0043] The processing module is specifically used to determine the centerline of each road based on the road region in the segmented image; identify the intersection points between each centerline using the Bentley-Ottmann algorithm; for each intersection point, obtain the first centerline and the second centerline corresponding to that intersection point; and determine the intersection region where multiple roads overlap based on the first centerline, the second centerline, the first width of the road corresponding to the first centerline, and the second width of the road corresponding to the second centerline.

[0044] In one possible implementation, the processing module is specifically used to translate each edge of the intersection area of ​​a certain intersection point by a preset distance away from the intersection point to obtain a target edge, and to determine the road segment area corresponding to the edge based on the edge, the target edge and the corresponding road.

[0045] In one possible implementation, the acquisition and recognition module is specifically used to perform self-attention calculation on the satellite image through the Swin Transformer layer in the Swin-Unet model to obtain a feature map; determine the binary map corresponding to the feature map through the segmentation branch decoder and the Sigmoid activation function in the Swin-Unet model, wherein the binary map identifies road areas and non-road areas; determine the road width heatmap corresponding to the feature map through the width branch decoder and the Linear activation function in the Swin-Unet model, wherein the road width heatmap identifies the width of the road; and identify the segmented image corresponding to the binary map and the road width heatmap through the network layer in the Swin-Unet model.

[0046] In one possible implementation, the processing module is further configured to: determine the centerline of each road based on the road regions in the segmented image; generate a rectangle with a width of a preset value and a length equal to the width of the road corresponding to the centerline for each centerline; move the rectangle sequentially along the perpendicular direction of the straight line corresponding to every two adjacent pixels on the centerline; and determine the outline of the rectangle as the target road region; and for the determined target road region, perform the subsequent steps of identifying intersection regions where multiple roads overlap and road segment regions connected to the intersection regions based on the road regions in the segmented image.

[0047] In one possible implementation, the processing module is further configured to: determine the road intersection points of the edges of each road segment region that are far from the intersection and the roads for each road segment region; connect each determined road intersection point in the same intersection region to generate the outline of the corresponding intersection; replace the intersection region with the identified outline; and perform subsequent meshing processing on the replaced intersection region using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular facets to obtain the second three-dimensional model.

[0048] In one possible implementation, the processing module is specifically used to, for each road intersection, determine the target road intersection that is not located on the same road as the road intersection and is closest to the road intersection, and determine the target road intersection and the road intersection as a pair of contour points in the same group; for each group, use a quadratic Bézier curve to smooth the pair of contour points in the group to generate the contour of the corresponding intersection.

[0049] In one possible implementation, the processing module is specifically configured to: determine the centerline of each road based on the road regions in the segmented image; if the endpoints and / or connection points of multiple centerlines are located within a region of a preset size, generate a node that records the center point of that region; for each road, determine two target nodes that record the center points of the two regions corresponding to the two endpoints of the road, connect the two target nodes, and record the road information on the edges connecting the two target nodes; generate a corresponding topology structure, and display the topology structure.

[0050] Thirdly, embodiments of this application also provide an electronic device, which includes at least a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the steps of the road modeling method as described in any of the preceding claims.

[0051] In this embodiment, the electronic device identifies road and non-road areas in satellite imagery using a pre-trained Swin-Unet model, further determining intersection and road segment areas. It then employs the Sweep modeling method to construct a continuous, smooth, and realistically aligned first 3D model. The Delaunay triangulation algorithm is used to mesh this region, generating a set of topologically sound, non-overlapping, and self-intersecting triangular facets. This results in a second 3D model with continuous surfaces and high geometric fidelity, thus enabling accurate and effective road modeling. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 is a schematic diagram of a road modeling process provided in an embodiment of this application;

[0054] Figure 2 is a schematic diagram of a road modeling result provided in an embodiment of this application;

[0055] Figure 3 is a schematic diagram of an intersection area and a road segment area as defined in an embodiment of this application;

[0056] Figure 4 is a schematic diagram of a road modeling device provided in an embodiment of this application;

[0057] Figure 5 is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this application clearer, a further detailed description of this application will be provided below with reference to the accompanying drawings. Obviously, the embodiments described in this application are merely some embodiments, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0059] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0060] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.

[0061] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.

[0062] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0063] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still make changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some or all of the technical features therein. Such changes or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0064] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These embodiments should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that certain software, components, models, and other existing industry solutions may be mentioned in the embodiments of this application. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solutions of this application, and do not imply that the applicant has already used or necessarily used such solutions.

[0065] To accurately and effectively perform road modeling, embodiments of this application provide a road modeling method, apparatus, and electronic device.

[0066] The road modeling method includes: acquiring satellite imagery; inputting the satellite imagery into a pre-trained semantic segmentation Swin-Unet model; classifying the satellite imagery using the Swin-Unet model; outputting segmented images that identify road areas and non-road areas; based on the segmented images, identifying intersection areas where multiple roads overlap and road segment areas connected to the intersection areas; for each road segment area, constructing a three-dimensional geometry of the road segment using a centerline sweep method to obtain a first three-dimensional model; and using the Delaunay triangulation algorithm to mesh the intersection areas, generating a continuous and non-overlapping set of triangular facets to obtain a second three-dimensional model; and determining the road three-dimensional modeling result based on the first three-dimensional model and the second three-dimensional model.

[0067] Example 1:

[0068] Figure 1 is a schematic diagram of a road modeling process provided in an embodiment of this application. The process includes the following steps:

[0069] S101: Acquire satellite imagery, input the satellite imagery into a pre-trained semantic segmentation Swin-Unet model, classify the satellite imagery using the Swin-Unet model, and output segmented images that identify road areas and non-road areas.

[0070] The road modeling method provided in this application is applied to an electronic device, which can be a smart device such as a PC or a server.

[0071] To perform road modeling, electronic devices can first acquire satellite imagery. In one possible implementation, this satellite imagery can be a 1-meter resolution image. After acquiring the satellite imagery, radiometric correction can be performed to eliminate atmospheric scattering interference; Gaussian denoising can be performed to preserve road edges. In one possible implementation, 3×3 Gaussian denoising with a standard deviation σ = 0.8 can be performed; and pixel cropping can be performed to pad edges with zeros. In one possible implementation, the cropping is 512×512 pixels. Finally, the pixel values ​​are normalized to the [0,1] range using a formula to avoid model memory overflow. In one possible implementation, the pixel values ​​of the satellite imagery can be normalized using the following formula:

[0072]

[0073] Among them, I raw (x, y) represents the original pixel value at pixel (x, y) in the satellite image. max I represents the maximum pixel value in the satellite image. min I is the smallest pixel value in the satellite image.norm (x,y) represents the normalized pixel value at pixel (x,y) in the satellite image.

[0074] To perform road modeling, this embodiment of the application stores a pre-trained Swin-Unet model. The electronic device can input satellite imagery into this Swin-Unet model. In one possible implementation, the Swin-Unet model extracts multi-scale features through an encoder and utilizes the Swin Transformer module for long-distance dependency modeling, effectively capturing the global contextual information of the road structure. The decoding stage employs skip connections to fuse shallow details and deep semantic information, ultimately outputting a binary segmented image, where regions with a pixel value of 1 are identified as roads, and 0 represents non-road regions. The electronic device can then acquire segmented images identifying road and non-road regions.

[0075] S102: Based on the segmented image, identify intersection areas where multiple roads overlap and road segment areas connected to the intersection areas.

[0076] After acquiring the segmented image, the electronic device can identify intersection areas where multiple roads overlap, and road segment areas connected to the intersection areas. An intersection area refers to the public space formed by the convergence of two or more roads, typically manifested as a geometric area where multiple road boundaries overlap or intersect, such as crossroads, T-junctions, Y-junctions, and roundabouts. A road segment area refers to the straight or gently curving section of a road connecting two adjacent intersections, representing a continuous passage segment of a single road.

[0077] In one possible implementation, a skeletonization algorithm can be used to refine the road mask, obtaining the centerline of each road. The centerlines are stored as polylines containing a series of ordered coordinate points. All centerlines are treated as a set of two-dimensional line segments; the Bentley-Ottmann algorithm is used to efficiently calculate the intersections between all line segments; each intersection is a candidate intersection center. If the centerlines of main road A and side road B intersect at point P, then P is marked as the intersection point. If multiple intersection points are very close (e.g., <10 meters), they may belong to the same complex intersection; a clustering algorithm is used to spatially cluster the intersection points; the centroid of each cluster serves as the core location of the intersection, and it is expanded into an initial polygonal region with a certain buffer radius, which can be identified as the intersection region. For each intersection area, perform the following operations: find all centerlines that pass through the intersection area; each centerline that passes through the area corresponds to a connecting road; for each connecting road, take the last boundary edge E before entering the intersection, and translate E away from the intersection by a road width to obtain the target edge E'. E, E' and the lines connecting them on both sides form a parallelogram area R, which is the connecting segment of the road, that is, the road segment area connected to the intersection.

[0078] In another possible implementation, the segmented image can be input into a region recognition model, which can then identify intersection regions where multiple roads overlap and road segment regions connected to the intersection regions.

[0079] S103: For each road segment area, the three-dimensional geometry of the road segment is constructed using the Sweep method to obtain the first three-dimensional model; and the intersection area is meshed using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular facets to obtain the second three-dimensional model.

[0080] After acquiring the intersection area and road segment area, the electronic device can construct a three-dimensional geometry with attributes such as height and slope for each independent road segment area using the Sweep method, forming the first three-dimensional model; while for complex intersection areas, the Delaunay triangulation algorithm is used to generate a continuous and non-overlapping set of triangular mesh faces as the second three-dimensional model.

[0081] In one possible implementation, the electronic device can construct a road segment cross-section perpendicular to the road segment axis, with any vertex of the road segment axis as the origin. The cross-section has a rectangular structure and the following dimensional parameters:

[0082] Width: equal to the road segment width W (e.g., if the road segment width is 3.75m, the cross-sectional width is set to 3.75m);

[0083] Height: equal to 0.15m of road surface thickness (default, can be adjusted);

[0084] Lane dividing line reservation: If the road section is a two-way lane, a lane dividing line with a width of 0.15m is reserved at the center line of the cross section. The color is white and the RGB value is (255,255,255).

[0085] Using the road segment axis coordinate sequence as the scanning path, the spacing between path nodes is consistent with the spacing between axis vertices (spacing ≤ 1m to ensure smooth path); perform a Sweep operation along the scanning path [D1.1], with a scanning step size of 0.5m to ensure that the side length of the generated 3D mesh unit is ≤ 0.5m, meeting visualization and engineering requirements. During the scanning process, the cross-sectional orientation is adjusted in real time to ensure that the cross-section is always perpendicular to the tangent direction of the path, avoiding model distortion in curved road segments. The three-dimensional structure formed by the Sweep trajectory is the 3D model of the road segment.

[0086] in,

[0087] S104: Determine the road 3D modeling result based on the first 3D model and the second 3D model.

[0088] After obtaining the first and second 3D models, they can be seamlessly stitched together to form a complete and topologically consistent 3D road scene, which can be used for applications such as urban digital twins and the construction of autonomous driving simulation platforms.

[0089] Understandably, the core technical challenges of 3D intersection modeling lie in the entire process of data processing, model matching, morphological reconstruction, and model integration: First, under low-resolution satellite imagery (e.g., 1-meter resolution), existing technologies struggle to efficiently and accurately extract road network data containing main roads, secondary roads / branch roads, and width attributes. High-resolution imagery often increases costs, while manual annotation reduces efficiency, making it unsuitable for large-scale data acquisition. Second, road network data is prone to "broken lines," lacking algorithms for automatically constructing topological relationships and accurately extracting intersection data, requiring extensive manual correction to adapt to complex road networks. Third, 3D road modeling does not incorporate traffic signs such as stop lines to truncate road lines, and the conversion from 2D to 3D... The algorithm is inefficient, leading to a mismatch between the model and the actual road space boundaries. Fourth, in intersection modeling, existing solutions often use polylines to connect contours, resulting in "angularity," making it difficult to automatically generate smooth outer polygonal contours through road truncation nodes. Furthermore, the 3D structure constructed by the mesh algorithm deviates significantly from the actual shape. Fifth, the model only has basic geometric shapes, lacking refined traffic textures such as lane lines, guide lines, pedestrian lines, and vehicle turning areas, resulting in low simulation fidelity and failing to meet the engineering requirements of smart cities. Sixth, in city-level modeling, merging the 3D meshes of roads and intersections easily produces "connection gaps," and the merging efficiency is low when the data volume is large, failing to guarantee the spatial consistency and integrity of the overall model. However, the method provided in this application embodiment can accurately and effectively perform road modeling.

[0090] Figure 2 is a schematic diagram of a road modeling result provided by an embodiment of this application. As shown in Figure 2, road modeling can be achieved accurately and effectively.

[0091] In this embodiment, the electronic device identifies road and non-road areas in satellite imagery using a pre-trained Swin-Unet model, further determining intersection and road segment areas. It then employs the Sweep modeling method to construct a continuous, smooth, and realistically aligned first 3D model. The Delaunay triangulation algorithm is used to mesh this region, generating a set of topologically sound, non-overlapping, and self-intersecting triangular facets. This results in a second 3D model with continuous surfaces and high geometric fidelity, thus enabling accurate and effective road modeling.

[0092] Example 2:

[0093] To accurately and effectively identify intersection areas, based on the above embodiments, in this embodiment, the step of classifying the satellite imagery using the Swin-Unet model and outputting segmented images identifying road areas and non-road areas includes:

[0094] The satellite imagery is classified using the Swin-Unet model, and segmented images that identify road areas and non-road areas, as well as road widths, are output.

[0095] The step of identifying intersection regions where multiple roads overlap based on the segmented image includes:

[0096] Based on the road regions in the segmented image, determine the centerline of each road;

[0097] The Bentley-Ottmann algorithm was used to identify the intersections between each centerline.

[0098] For each intersection, obtain the first centerline and the second centerline corresponding to that intersection. Based on the first centerline, the second centerline, the first width of the road corresponding to the first centerline, and the second width of the road corresponding to the second centerline, determine the intersection area where multiple roads overlap.

[0099] In real-world scenarios, simply identifying whether a road is a road is insufficient for high-quality 3D modeling. Real roads have varying widths; ignoring width information makes it impossible to accurately construct boundaries and connections. Therefore, this embodiment can, based on the Swin-Unet model, simultaneously output road masks and road width heatmaps, thereby achieving a more refined spatial representation.

[0100] In this embodiment, the Swin-Unet model not only outputs binarized road / non-road segmentation images, but also, through a multi-task learning mechanism or post-processing strategy, synchronously predicts the road width information corresponding to each pixel, generating an enhanced segmentation image containing road region identifiers and local road width estimates. This width information can be directly output through a regression branch, or indirectly derived based on morphological analysis and distance transformation of the segmentation results.

[0101] Based on this, electronic devices can identify complex intersection areas where multiple roads intersect and overlap. The specific process is as follows: For connected road regions in the segmented image, a thinning algorithm (such as Zhang-Suen skeletonization) or a distance transformation combined with a centerline tracing method is used to extract the trajectory of the centerline of each road. In one possible implementation, a vectorized set of centerlines can be formed to represent the spatial orientation and topological connectivity of the roads. The Bentley-Ottmann algorithm from computational geometry is used to efficiently detect potential intersections between all road centerlines. This algorithm can complete the intersection judgment between multiple line segments in O((n+k)logn) time complexity, where n is the number of line segments and k is the number of intersections. It is suitable for large-scale road network data processing and significantly improves intersection detection efficiency. For each detected intersection, the two intersecting centerlines associated with that intersection are located. For ease of distinction, they can be called the first centerline and the second centerline. The electronic device combines the first width of the road corresponding to the first centerline, the second width of the road corresponding to the second centerline, the first centerline, and the second centerline to determine the intersection area where multiple roads overlap. In one possible implementation, a local buffer model centered on the intersection point and incorporating road direction and width features can be constructed. By extending the influence range of the centerline in the neighborhood of the intersection point, a polygonal boundary covering the overlapping area of ​​multiple roads can be generated, thereby accurately delineating the spatial extent of complex intersections.

[0102] To improve the accuracy of road determination, electronic devices can calculate the distance between the endpoints of the centerlines of two adjacent roads, such as the distance between the endpoints of road A (x...). _A ,y _A ) and the starting point (x) of road B _B ,y _B If the distance is ≤2 meters (2 pixels under 1 meter resolution image, adapting to road edge error) and the angle between the extension directions of the center lines of the two roads is ≤15°, the electronic device can automatically connect the two ends to form a continuous road segment.

[0103] Example 3:

[0104] To identify road segment areas, based on the above embodiments, this application embodiment identifies road segment areas connected to intersection areas, including:

[0105] For each edge of the intersection area at a certain intersection point, translate the edge a preset distance away from the intersection point to obtain the target edge. Then, determine the road segment area corresponding to the edge based on the target edge, the corresponding road, and the target edge.

[0106] For each intersection area corresponding to a identified intersection point, each edge forming the boundary of that intersection area is translated a predetermined distance along its normal direction, pointing away from the center of the intersection point, using that edge as a reference. This predetermined distance is typically set based on the road's functional level or actual width, generating a corresponding parallel line segment. For ease of distinction, this parallel line segment is referred to as the target edge. This translation operation aims to extend the influence range of the intersection's core area outwards, thereby delineating a transitional road section area connecting to the main road.

[0107] After identifying the original edge and its corresponding target edge, the road segment region associated with that edge can be constructed based on the geometric and topological information of the edge, the target edge, and the road to which it belongs. In one possible implementation, the road segment region is defined by the following elements: a boundary edge of the original intersection region; the target edge generated after translation; and two perpendicular line segments (i.e., trajectory lines along the translation direction) connecting the two endpoints of the original edge and the target edge. The resulting quadrilateral (or approximately trapezoidal) region is the independent road segment region corresponding to that edge, which can be used for subsequent refined analysis.

[0108] In one possible implementation, the coordinates of the road segment centerline L, points (x1, y1), (x2, y2), ..., (x...) can be used as the basis for the road segment centerline L. n ,y n and road width W real Generate a "rectangular sweep unit". The length of the rectangle is set to the distance between two adjacent points on the centerline, such as the distance between (x1, y1) and (x2, y2). The width is set to W (i.e., the half-width of the rectangle is W / 2). The shorter side of the rectangle is perpendicular to the tangent direction of the centerline at the current point. For example, at point (x1, y1), the shorter side of the rectangle is perpendicular to the tangent directions of (x1, y1) and (x2, y2), ensuring the rectangle conforms to the road direction. Move the rectangular sweep unit along the road segment centerline L:

[0109] ①Starting from the starting point (x1, y1), fix the rectangle at the point (x1, y1) and record the initial position;

[0110] ② The rectangle extends along (x1, y1) → (x2, y2) → … → (x n ,y n The rectangle moves along the path of (x2, y2) and each time it moves to a point on the center line (e.g., (x2, y2)), the direction of the short side of the rectangle is adjusted in real time so that it is perpendicular to the tangent direction of the center line at (x2, y2) (to adapt to the curvature of the center line and avoid the rectangle deviating from the direction of the center line).

[0111] ③ During the movement of the rectangle, the trajectories of its vertices form continuous broken lines, which eventually close to form a two-dimensional outline of the road. The inner and outer sides of the outline maintain a distance of W / 2 from the center line.

[0112] For each road segment connected by intersection point P0, the direction vector of the road segment's axis is obtained by calculating the coordinate difference between two adjacent points on the axis. Furthermore, the bidirectional direction vector perpendicular to the axis is derived. and Ensure vertical accuracy; vector angle error ≤ 0.1°. Vector along the vertical direction. and Extending from intersection point P0, the extension distance is 1 / 2 of the road segment width (i.e., W / 2), and the intersection point with the road segment edge line (generated by offsetting W / 2 from the axis to both sides) is denoted as A(X). A ,Y A (near P0 side) and B(X) B ,Y B (Away from P0), each road segment corresponds to one set of points A and B;

[0113] Connect points A and B in each group to form line segment AB. Using AB as the initial line, perform a uniform scan along the road segment axis towards P0. The scan step size is set to 0.2-0.3m (0.3m when the distance between intersection points is ≥20m, and 0.2m when it is <20m, ensuring the scan trajectory covers the internal turning area of ​​the intersection). During the scan, keep line segment AB perpendicular to the road segment axis. The closed area formed by all scan trajectories is the internal contour of the intersection. The internal contour data of the intersection includes the intersection ID, the coordinate sequence of the internal contour vertices {(X1,Y1),(X2,Y2),…,(X… n ,Y n )}.

[0114] Example 4:

[0115] To accurately and effectively model roads, based on the above embodiments, in this embodiment, the step of classifying the satellite imagery using the Swin-Unet model and outputting segmented images identifying road areas and non-road areas as well as road widths includes:

[0116] The feature map is obtained by performing self-attention calculation on the satellite image using the Swin Transformer layer in the Swin-Unet model.

[0117] The binary map corresponding to the feature map is determined by the segmentation branch decoder and sigmoid activation function in the Swin-Unet model, wherein the binary map identifies road regions and non-road regions; and the road width heatmap corresponding to the feature map is determined by the width branch decoder and linear activation function in the Swin-Unet model, wherein the road width heatmap identifies the width of the road.

[0118] The network layers in the Swin-Unet model are used to identify the segmented images corresponding to the binary image and the road width heatmap.

[0119] In this embodiment, feature maps can be obtained by performing self-attention calculations on satellite imagery using the Swin Transformer layer in the Swin-Unet model. In one possible implementation, the input satellite imagery is based on a 1-meter spatial resolution, where the width of typical urban roads ranges from 2 to 30 meters, corresponding to 2 to 30 pixels in the imagery. To ensure that the Swin-Unet model can effectively capture the spatial features of narrow roads (such as side streets and alleys), this embodiment makes a key optimization to the standard Swin-Unet architecture: the default non-overlapping local window size in the original Swin Transformer layer is adjusted from 16×16 to 8×8. This adjustment is based on the following considerations: at a 1-meter resolution, narrow roads (such as 2-6 meters wide) only cover 2-6 pixels, which are easily diluted by background pixels within a large 16×16 window, making it difficult for the self-attention mechanism to focus on weak road signals; while using an 8×8 window can improve the perception ability of slender, low-contrast road structures while ensuring computational efficiency, thus enhancing the accuracy of local feature modeling.

[0120] Based on this, the segmentation branch decoder and sigmoid activation function of the Swin-Unet model determine the binary map corresponding to the feature map, which identifies road regions and non-road regions. In one possible implementation, the binary map can be determined by the following formula:

[0121]

[0122] Where M(x,y) is the pixel value at (x,y) in the defined binary image, and f1(x,y) is the pixel value at (x,y) in the feature map output by the segmentation branch decoder. In one possible implementation, M=1 represents a road region, and M=0 represents a non-road region, which can be used to locate the road area.

[0123] Furthermore, the road width heatmap corresponding to the feature map is determined using the width branch decoder and Linear activation function in the Swin-Unet model. This road width heatmap identifies the road width, achieving a pixel-level correspondence between width and road region. In one possible implementation, the corresponding width can be determined using the following formula:

[0124] W(x,y)=w scale ·f2(x,y)+w bias

[0125] Where W(x,y) is the width at (x,y), f2(x,y) is the pixel value at (x,y) in the feature map output by the width branch decoder, and w scale and w bias These are preset training-learned mapping parameters, and in one possible implementation, w scale =0.1, w bias =0, to ensure that the output width falls within the range of 2-30 meters.

[0126] The network layers in the Swin-Unet model can identify the segmented images corresponding to the binary map and the road width heatmap. In one possible implementation, the network layers can perform a 3×3 opening operation on the binary map M(x,y) of the road to remove isolated noise areas <10 pixels, such as misjudged building shadows; and generate SHP format vector data by statistically analyzing the width heatmap W(x,y) according to the road connected regions, taking the average pixel value within the region as the actual width of the road segment.

[0127] Example 5:

[0128] To accurately and effectively perform road modeling, based on the above embodiments, in this embodiment, after classifying the satellite imagery using the Swin-Unet model and outputting segmented images identifying road areas and non-road areas, and before identifying intersection areas with overlapping roads and road segments connected to intersection areas based on the road areas in the segmented images, the method further includes:

[0129] Based on the road regions in the segmented image, determine the centerline of each road;

[0130] For each center line, a rectangle with a preset width and the road width corresponding to that center line is generated. The rectangle is moved sequentially along the vertical direction of the straight line corresponding to every two adjacent pixels on the center line, and the outline of the rectangle is determined as the target road area.

[0131] For the identified target road area, the following steps are performed: based on the road area in the segmented image, identify the intersection area where multiple roads overlap and the road segment area connected to the intersection area.

[0132] To generate the target road region, the electronic device can determine the centerline of each road based on the road regions in the segmented image. In one possible implementation, the electronic device can employ skeletonization or centerline extraction algorithms, combined with morphological thinning and curve tracing strategies, to extract the centerline of each connected road region, which can represent the spatial orientation of the road in vector form. For example, the coordinates of multiple center points on the centerline can be (x1, y1), (x2, y2), ..., (x... n ,y n ).

[0133] For each extracted road centerline, a local rectangular structural unit can be constructed using the actual width of the road (estimated at the pixel level by the aforementioned road width heatmap) as the length parameter and a preset value (e.g., a fixed value of 5-10 meters) as the width parameter. This rectangle is not globally uniform but dynamically generated along the centerline. The rectangle is then directionally moved along the line segment determined by every two adjacent pixels on the centerline. Specifically: for any pair of consecutive pixels p on the centerline... i and p i+1 Calculate the direction vector of the line connecting the two sides; determine the vertical normal vector of the direction (i.e., the direction of the road cross section); align the long side of the rectangle with the road width direction (i.e., the normal direction), and extend the short side along the tangent direction of the center line; slide and rotate the rectangle along the center line segment by segment to align it with the local direction, ensuring that it is always perpendicular to the current road segment direction.

[0134] All local rectangular outlines are merged to form a continuous, smooth strip that conforms to the original road geometry—the target road area. This area not only preserves the road's central direction but also accurately reflects its local width variations and curvature characteristics, achieving a reconstruction from abstract segmentation results to the actual physical space of the road.

[0135] Example 6:

[0136] To accurately and effectively perform road modeling, based on the above embodiments, in this embodiment, after identifying the intersection areas where multiple roads overlap and the road segment areas connected to the intersection areas, and before using the Delaunay triangulation algorithm to mesh the intersection areas to generate a continuous and non-overlapping set of triangular faces to obtain the second three-dimensional model, the method further includes:

[0137] For each road segment area, determine the intersection point between the edge of that road segment area furthest from the intersection and the road.

[0138] Connect each road intersection point identified in the same intersection area to generate the outline of the corresponding intersection;

[0139] The steps involve replacing the intersection region with the identified contour, then performing a meshing process on the replaced intersection region using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular facets, thus obtaining the second three-dimensional model.

[0140] After completing the identification of intersection areas where multiple roads overlap and the division of road segments connected to them, this embodiment of the application further determines the intersection outline to improve the geometric rationality and spatial consistency of subsequent 3D modeling.

[0141] In one possible implementation, the electronic device can analyze the spatial structure characteristics of each identified road segment area, locate the boundary edge of that area away from the center of the intersection, i.e., the exit boundary facing the free-traffic section. It then determines the road intersection point between this edge and the road, connects each determined road intersection point within the same intersection area, and generates the outline of the corresponding intersection.

[0142] For example, the centerline of the corresponding road can be extended away from the intersection, based on its direction of extension, until it potentially intersects (or nearly intersects) with the centerlines of other roads. This intersection point represents the end / start position of traffic on the road in the current intersection context. If an actual intersection exists, the actual intersection point is used; otherwise, the most likely intersection position is estimated through geometric fitting (such as the minimum distance method). For all road segment areas associated with the same intersection area, their corresponding virtual road intersection points are extracted, and these intersection points are sorted by spatial angle (e.g., arranged in ascending polar angles with the centroid as the origin) to form an ordered set of points. In one possible implementation, adjacent intersection points are connected sequentially to construct a closed polygonal loop, which is the reconstructed outline of the intersection.

[0143] In one possible implementation, the contour can be smoothed according to the application scenario requirements, such as by fitting a Bézier curve or using a circular transition, to simulate the turning transition section of a real intersection and further improve the realism of the modeling.

[0144] Example 7:

[0145] To accurately and effectively model roads, based on the above embodiments, in this embodiment, the step of connecting each determined road intersection point corresponding to the same intersection area to generate the outline of the corresponding intersection includes:

[0146] For each road intersection, identify the target road intersection that is not located on the same road as the road intersection and is the closest to the road intersection. Then, identify the target road intersection and the road intersection as a pair of contour points in the same group.

[0147] For each group, a quadratic Bézier curve is used to smooth the contour point pairs within the group to generate the contour of the corresponding intersection.

[0148] For each identified road intersection, in this embodiment of the application, its spatial adjacency relationship can be further analyzed to achieve refined contour modeling of complex intersection structures.

[0149] In one possible implementation, the electronic device can, for each road intersection, search for other road intersections not located on the same road centerline within the intersection area to which the intersection belongs, and select the intersection with the closest Euclidean distance as the target road intersection. This target road intersection and the original road intersection are then identified as a pair of contour points within the same group. Road intersections within the same group reflect the transition areas most likely to be traversed by the vehicle during turning or lane changing. The closest contour point pairs that are not within the same group can be connected by a straight line.

[0150] After obtaining each pair of contour points, to further simulate the arc-shaped boundaries formed by turning lanes, traffic islands, or channelization designs in real intersections, a quadratic Bézier curve is used to smoothly connect each pair of points. Let the starting point of the contour point pair be S and the ending point be E. The curve equation is shown in the following formula:

[0151] B(t)=(1-t) 2 ·S+2t(1-t)·C+t 2 E t∈[0,1]

[0152] Where B(t) is the coordinate of any point on the curve, and t is a parameter; connect all the smoothed Bézier curves with the remaining uncurved point-to-line segments (if the distance between point-to-line segments is ≤0.3m, directly retain the line segment connection) in sequence to form a closed region, which is the complete outer contour surface of the intersection.

[0153] This method can ensure the smoothness of the curve. In one possible implementation, the curve curvature radius is ≥5m, which meets the turning radius requirements of urban road intersections.

[0154] On the internal contour of the intersection, along the axial direction of each connecting road segment, select a transverse line segment L perpendicular to the axial direction (the midpoint of line segment L is located on the road segment axial direction, and its length is consistent with the road segment width, i.e., the endpoint of L is point B of the corresponding road segment on the internal contour); along the road segment axial direction away from the intersection point P0, move the transverse line segment L outward by a preset distance D, where D is W / 2 + 0.5m, where W / 2 ensures coverage of the road segment edge, and 0.5m is a buffer distance reserved for the intersection turning area. The moving trajectory forms the intersection extension line L. ′ Extract all extension lines L. ′ The endpoints are sorted clockwise (centered on intersection point P0), and duplicate endpoints are removed (if the distance between adjacent extension line endpoints is ≤0.05m, it is considered a duplicate point, and one of them is retained). The sorted endpoint sequence constitutes the original external contour of the intersection. The original external contour data of the intersection includes the intersection ID, the coordinate sequence of the vertex of the original external contour {(X n+1 ,Y n+1 ),…,(X m ,Y m The original external outline must completely contain the internal outline and have no overlap with the edge lines of each road segment (overlapping area ≤ 0.1㎡).

[0155] Based on the road segment connections, the external original contour vertices are grouped according to the rule of "two contour points corresponding to each road direction"—that is, one contour point corresponds to each side of the entrance and exit of each road segment (ensuring that the intersection contour is seamlessly connected to the entrance and exit of the road), forming a set of contour point pairs {(P1,P2),(P3,P4),...,(P... 2k-1 ,P 2k )}.

[0156] Figure 3 is a schematic diagram of an intersection area and a road segment area as defined in an embodiment of this application.

[0157] As shown in Figure 3, b1' and c2' are contour point pairs within the same group, b2' and d2' are contour point pairs within the same group, d1' and a2' are contour point pairs within the same group, and c1' and a1' are contour point pairs within the same group. The generated outer and inner contours are shown in Figure 4. The rectangle formed by a1, b1, c2, d2, b2, a2, d1, and c1 in Figure 4 is the inner contour, which is the intersection area, and the outer contour is the road segment area.

[0158] After obtaining the outer contour surface, in this embodiment of the application, the Delaunay triangulation algorithm can be used to triangulate the complete outer contour surface of the intersection. This algorithm can avoid generating narrow triangular facets with a minimum interior angle of ≥30°, ensuring the stability of the mesh structure. The vertices of the outer contour surface are sorted clockwise to construct an initial polygon. The vertices are traversed to generate triangular facets sequentially, each facet satisfying the "empty circle property," meaning there are no other vertices within its circumcircle. Triangular facets exceeding the outer contour surface are deleted, retaining only the valid facet set. The interpolated elevation values ​​of the intersection area are assigned to the vertices of the corresponding triangular facets; that is, the elevation value of each vertex is the interpolation result of that point in the Digital Elevation Model (DEM) data, ensuring that the elevation difference between vertices within the same triangular facet is ≤0.1m to avoid significant undulations on the model surface. Small triangular facets with an area ≤0.01㎡ are deleted to avoid redundant meshes. The vertex coordinates of the triangular facets are smoothed; in one possible implementation, moving least squares with a smoothing radius of 0.3m can be used to ensure the continuity of the model surface.

[0159] Electronic devices can perform texture mapping on the 3D base surfaces of road segments and intersections separately. For the road segment base surface, lane lines and guide line textures are applied according to the lane distribution rules (texture coordinates are aligned with the direction of the road segment centerline); for the intersection base surface, traffic sign textures such as pedestrian lines and vehicle turning areas are applied (texture positions match the functional areas of the intersection); finally, the 3D structures of the road segment and intersection are merged into a mesh to ensure consistency in geometry, elevation connection, and texture transition, forming a complete integrated 3D model of the road-intersection.

[0160] Example 8:

[0161] To accurately and effectively perform road modeling, based on the above embodiments, the method in this application embodiment further includes:

[0162] Based on the road regions in the segmented image, determine the centerline of each road;

[0163] If the endpoints and / or connection points of multiple center lines are located within a region of a preset size, a node is generated that records the center point of that region.

[0164] For each road, identify two target nodes that record the center points of the two regions corresponding to the two endpoints of the road, connect the two target nodes, and record the road information on the edges connecting the two target nodes.

[0165] Generate the corresponding topology and display the topology.

[0166] To identify the connections between roads, electronic devices can further analyze the endpoints (such as the ends of dead ends) and intersections (i.e., locations where multiple centerlines intersect or are close to intersecting) of all centerlines. In one possible implementation, a spatial neighborhood window of a preset size can be defined to determine whether multiple centerline endpoints or intersections are highly clustered in space. If the endpoints or connection points of two or more centerlines fall within the same neighborhood area, then that neighborhood area is considered to belong to the same traffic node, i.e., a potential road intersection, divergence point, or merging point. The geometric center point of this neighborhood area is recorded and abstracted as a topological node in a graph structure to represent key connection locations in the road network. For each extracted road centerline, the regions to which the two endpoints belong are determined, and the two target nodes recorded for their respective regions are found. These two target nodes can be referred to as the start node and the end node. A topological edge connecting these two target nodes is created, and the road's attribute information is bound to this edge, including but not limited to: road name or ID; road type; two-way / one-way traffic signs; measured average width; and driving direction.

[0167] Organize all generated nodes and edges into a directed graph to form a complete road topology, which can then be displayed.

[0168] In this embodiment, device i counts the intersection of continuous road segments. If the endpoints / connection points of three or more road segments converge in the same spatial area, in one possible implementation, this area can be a circle with a radius ≤ 5 meters, covering the actual intersection range. Then, the center point of this area is set as the intersection node J(x). j ,y j ), and associate the IDs of all intersecting road segments (e.g., ID1, ID2, ID3). The intersection node J(x j ,y j With J as the core, a "node-road" association table is established to record the road ID associated with node J and the extension direction of each road at the node. At the same time, the upstream and downstream connection relationship of each road is marked (such as the downstream connection of road 1 to road 2, which is realized through node J1), forming a complete road network topology.

[0169] Electronic devices can transform road centerlines in road network vector data into a discrete set of line segments L = {l1, l2, ..., l...} n Each line segment l i Includes starting coordinates (x) i1 ,y i1 ), endpoint coordinates (x) i2 ,y i2The algorithm iterates through the line segment set L using the Bentley-Ottmann algorithm, tracking the endpoints and potential intersections of the lines in real time using an "event point queue." A "state structure" maintains the line segments intersecting with the current scan line, efficiently filtering out the true intersections between different road centerline segments (excluding false intersections caused by line segment overlap or short-distance interference). The true intersections output by the algorithm are used as the road intersection coordinates (x, y, y). j ,y j The data is then associated with the road IDs corresponding to the intersecting line segments to form a topological relationship data of "intersection coordinates - associated roads".

[0170] The method provided in this application embodiment only requires 1-meter resolution satellite imagery data to construct a 3D model of urban roads, without relying on complex multi-dimensional data such as road networks, intersection nodes, road geometry / elevation / lane profiles, etc., significantly reducing the data acquisition threshold. Simultaneously, satellite imagery has wide coverage, allowing for the acquisition of imagery data for the entire city at once, eliminating the need for the cumbersome "intersection-by-intersection scanning" method. This represents a leap from "single-point modeling" to "full-area modeling," significantly reducing equipment procurement costs (eliminating the need for laser point cloud scanning equipment) and manpower investment. It also shortens the modeling cycle from "per intersection / day" to "per city / week," and the generated 3D intersection models achieve high simulation standards in spatial accuracy and scene reproduction, fully meeting the engineering application requirements of smart city 3D scenarios. For scenarios involving changes in urban road data, the method provided in this application embodiment does not require remodeling the entire area model: only satellite imagery data of the changed location needs to be acquired, and the 3D model reconstruction of that area can be automatically completed through a programmed process. The reconstructed local model can be seamlessly merged with the original full-area model through meshing, achieving "local updating" of the 3D road model. This solution effectively addresses the problems of existing technologies, such as the need for full-domain data collection for updates, high costs, and delays. It reduces update costs by more than 80%, shortens the update cycle to the hour level, and ensures that the city's 3D intersection model is always synchronized with the actual road conditions, providing efficient technical support for the dynamic scene maintenance of smart cities.

[0171] This application proposes an adaptive 3D road intersection generation algorithm for urban scenarios. Based on the low data dependency characteristics of 1-meter resolution satellite imagery, this algorithm innovatively designs an adaptive 3D road intersection generation method and device. The algorithm automatically analyzes road area, width information, and intersection relationships in the imagery, achieving fully automated 3D intersection model construction without manual intervention to collect complex data such as road network nodes and road elevations, thus realizing unmanned operation. It proposes a 3D intersection construction technology based on the extension of the road network 3D model. Intersection 3D construction is not independent modeling but rather an extension and expansion based on the generated road network 3D model. The algorithm precisely aligns the geometric parameters (centerline, width) of the intersection model with the road network model, ensuring a perfect fit between the intersection and connecting roads, ultimately forming a complete and continuous 3D urban road model. The algorithm also features precise mapping and cross-platform fusion technology between the intersection 3D model and the Geographic Information System (GIS) coordinate system. During model construction, it simultaneously achieves precise binding between the intersection 3D model and the GIS coordinate system, while supporting seamless integration with cross-platform data from Building Information Modeling (BIM), City Information Modeling (CIM), and the Internet of Things (IoT), eliminating spatial positioning discrepancies between different systems.

[0172] Example 9:

[0173] Figure 4 is a schematic diagram of a road modeling device provided in an embodiment of this application. The device includes:

[0174] The acquisition and recognition module 401 is used to acquire satellite images, input the satellite images into a pre-trained Swin-Unet model, classify the satellite images through the Swin-Unet model, and output segmented images that identify road areas and non-road areas; based on the segmented images, it identifies intersection areas where multiple roads overlap and road segment areas connected to the intersection areas.

[0175] The processing module 402 is used to construct the three-dimensional geometry of each road segment area using the Sweep method to obtain a first three-dimensional model; and to perform meshing processing on the intersection area using the Delaunay triangulation algorithm to generate a set of continuous and non-overlapping triangular patches to obtain a second three-dimensional model; and to determine the three-dimensional modeling result of the road based on the first three-dimensional model and the second three-dimensional model.

[0176] In one possible implementation, the acquisition and recognition module 401 is specifically used to classify the satellite image using the Swin-Unet model and output a segmented image that identifies road areas and non-road areas as well as road widths.

[0177] The processing module 402 is specifically used to determine the centerline of each road based on the road region in the segmented image; identify the intersection points between each centerline using the Bentley-Ottmann algorithm; for each intersection point, obtain the first centerline and the second centerline corresponding to that intersection point; and determine the intersection region where multiple roads overlap based on the first centerline, the second centerline, the first width of the road corresponding to the first centerline, and the second width of the road corresponding to the second centerline.

[0178] In one possible implementation, the processing module 402 is specifically used to translate each edge of the intersection area of ​​a certain intersection point by a preset distance away from the intersection point to obtain a target edge, and to determine the road segment area corresponding to the edge by the edge, the target edge and the corresponding road.

[0179] In one possible implementation, the acquisition and recognition module 401 is specifically used to perform self-attention calculation on the satellite image through the Swin Transformer layer in the Swin-Unet model to obtain a feature map; determine the binary map corresponding to the feature map through the segmentation branch decoder and the Sigmoid activation function in the Swin-Unet model, wherein the binary map identifies road areas and non-road areas; determine the road width heatmap corresponding to the feature map through the width branch decoder and the Linear activation function in the Swin-Unet model, wherein the road width heatmap identifies the width of the road; and identify the segmented image corresponding to the binary map and the road width heatmap through the network layer in the Swin-Unet model.

[0180] In one possible implementation, the processing module 402 is further configured to: determine the centerline of each road based on the road regions in the segmented image; generate a rectangle with a preset width and the road width corresponding to the centerline as its length for each centerline; move the rectangle sequentially along the vertical direction of the straight line corresponding to every two adjacent pixels on the centerline; and determine the outline of the rectangle as the target road region. For the determined target road region, perform the following steps: based on the road regions in the segmented image, identify intersection regions where multiple roads overlap and road segment regions connected to the intersection regions.

[0181] In one possible implementation, the processing module 402 is further configured to: determine the road intersection points of the edges of the road segment region away from the intersection and the roads for each road segment region; connect each road intersection point determined for the same intersection region to generate the outline of the corresponding intersection; replace the intersection region with the identified outline; and perform subsequent meshing processing on the intersection region using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular facets to obtain the second three-dimensional model.

[0182] In one possible implementation, the processing module 402 is specifically used to determine, for each road intersection, a target road intersection that is not located on the same road as the road intersection and is closest to the road intersection, and to determine the target road intersection and the road intersection as a pair of contour points in the same group; for each group, a quadratic Bézier curve is used to smooth the pair of contour points in the group to generate the contour of the corresponding intersection.

[0183] In one possible implementation, the processing module 402 is specifically configured to: determine the centerline of each road based on the road regions in the segmented image; if the endpoints and / or connection points of multiple centerlines are located within a region of a preset size, generate a node that records the center point of that region; for each road, determine two target nodes that record the center points of the two regions corresponding to the two endpoints of the road, connect the two target nodes obtained, and record the information of the road on the edge connecting the two target nodes; generate the corresponding topology structure, and display the topology structure.

[0184] Example 10:

[0185] Figure 5 is a schematic diagram of an electronic device structure provided in an embodiment of this application. Based on the above embodiments, this application also provides an electronic device, as shown in Figure 5, including: a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 communicate with each other through the communication bus 504.

[0186] The memory 503 stores a computer program, which, when executed by the processor 501, causes the processor 501 to perform the following steps:

[0187] Acquire satellite imagery, input the satellite imagery into a pre-trained Swin-Unet model, classify the satellite imagery using the Swin-Unet model, and output segmented images that identify road areas and non-road areas;

[0188] Based on the segmented image, identify intersection areas where multiple roads overlap and road segment areas connected to the intersection areas;

[0189] For each road segment area, the three-dimensional geometry of the road segment is constructed using the Sweep method to obtain the first three-dimensional model; and the intersection area is meshed using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular facets to obtain the second three-dimensional model.

[0190] Based on the first 3D model and the second 3D model, the 3D modeling result of the road is determined.

[0191] In one possible implementation, classifying the satellite imagery using the Swin-Unet model and outputting segmented images identifying road areas and non-road areas includes:

[0192] The satellite imagery is classified using the Swin-Unet model, and segmented images that identify road areas and non-road areas, as well as road widths, are output.

[0193] The step of identifying intersection regions where multiple roads overlap based on the segmented image includes:

[0194] Based on the road regions in the segmented image, determine the centerline of each road;

[0195] The Bentley-Ottmann algorithm was used to identify the intersections between each centerline.

[0196] For each intersection, obtain the first centerline and the second centerline corresponding to that intersection. Based on the first centerline, the second centerline, the first width of the road corresponding to the first centerline, and the second width of the road corresponding to the second centerline, determine the intersection area where multiple roads overlap.

[0197] In one possible implementation, identifying the road segment area connected to the intersection area includes:

[0198] For each edge of the intersection area at a certain intersection point, translate the edge a preset distance away from the intersection point to obtain the target edge. Then, determine the road segment area corresponding to the edge based on the target edge, the corresponding road, and the target edge.

[0199] In one possible implementation, classifying the satellite imagery using the Swin-Unet model and outputting segmented images that identify road areas and non-road areas as well as road widths includes:

[0200] The feature map is obtained by performing self-attention calculation on the satellite image using the Swin Transformer layer in the Swin-Unet model.

[0201] The binary map corresponding to the feature map is determined by the segmentation branch decoder and sigmoid activation function in the Swin-Unet model, wherein the binary map identifies road regions and non-road regions; and the road width heatmap corresponding to the feature map is determined by the width branch decoder and linear activation function in the Swin-Unet model, wherein the road width heatmap identifies the width of the road.

[0202] The network layers in the Swin-Unet model are used to identify the segmented images corresponding to the binary image and the road width heatmap.

[0203] In one possible implementation, after classifying the satellite imagery using the Swin-Unet model and outputting segmented images identifying road areas and non-road areas, and before identifying intersection areas where multiple roads overlap and road segments connected to intersection areas based on the road areas in the segmented images, the method further includes:

[0204] Based on the road regions in the segmented image, determine the centerline of each road;

[0205] For each center line, a rectangle with a preset width and the road width corresponding to that center line is generated. The rectangle is moved sequentially along the vertical direction of the straight line corresponding to every two adjacent pixels on the center line, and the outline of the rectangle is determined as the target road area.

[0206] For the identified target road area, the following steps are performed: based on the road area in the segmented image, identify the intersection area where multiple roads overlap and the road segment area connected to the intersection area.

[0207] In one possible implementation, after identifying the intersection areas where multiple roads overlap and the road segment areas connected to the intersection areas, and before performing meshing processing on the intersection areas using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular faces to obtain the second three-dimensional model, the method further includes:

[0208] For each road segment area, determine the intersection point between the edge of that road segment area furthest from the intersection and the road.

[0209] Connect each road intersection point identified in the same intersection area to generate the outline of the corresponding intersection;

[0210] The steps involve replacing the intersection region with the identified contour, then performing a meshing process on the replaced intersection region using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular facets, thus obtaining the second three-dimensional model.

[0211] In one possible implementation, generating the outline of the corresponding intersection for each road intersection point identified corresponding to the same intersection area includes:

[0212] For each road intersection, identify the target road intersection that is not located on the same road as the road intersection and is the closest to the road intersection. Then, identify the target road intersection and the road intersection as a pair of contour points in the same group.

[0213] For each group, a quadratic Bézier curve is used to smooth the contour point pairs within the group to generate the contour of the corresponding intersection.

[0214] In one possible implementation, the method further includes:

[0215] Based on the road regions in the segmented image, determine the centerline of each road;

[0216] If the endpoints and / or connection points of multiple center lines are located within a region of a preset size, a node is generated that records the center point of that region.

[0217] For each road, identify two target nodes that record the center points of the two regions corresponding to the two endpoints of the road, connect the two target nodes, and record the road information on the edges connecting the two target nodes.

[0218] Generate the corresponding topology and display the topology.

[0219] The communication bus mentioned in the above server can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0220] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0221] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0222] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0223] Example 11:

[0224] Based on the above embodiments, this application also provides a computer-readable storage medium storing a computer program executable by an electronic device. When the program is run on the electronic device, the electronic device performs the following steps:

[0225] The memory stores a computer program that, when executed by the processor, causes the processor to perform the following steps:

[0226] Acquire satellite imagery, input the satellite imagery into a pre-trained Swin-Unet model, classify the satellite imagery using the Swin-Unet model, and output segmented images that identify road areas and non-road areas;

[0227] Based on the segmented image, identify intersection areas where multiple roads overlap and road segment areas connected to the intersection areas;

[0228] For each road segment area, the three-dimensional geometry of the road segment is constructed using the Sweep method to obtain the first three-dimensional model; and the intersection area is meshed using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular facets to obtain the second three-dimensional model.

[0229] Based on the first 3D model and the second 3D model, the 3D modeling result of the road is determined.

[0230] In one possible implementation, classifying the satellite imagery using the Swin-Unet model and outputting segmented images identifying road areas and non-road areas includes:

[0231] The satellite imagery is classified using the Swin-Unet model, and segmented images that identify road areas and non-road areas, as well as road widths, are output.

[0232] The step of identifying intersection regions where multiple roads overlap based on the segmented image includes:

[0233] Based on the road regions in the segmented image, determine the centerline of each road;

[0234] The Bentley-Ottmann algorithm was used to identify the intersections between each centerline.

[0235] For each intersection, obtain the first centerline and the second centerline corresponding to that intersection. Based on the first centerline, the second centerline, the first width of the road corresponding to the first centerline, and the second width of the road corresponding to the second centerline, determine the intersection area where multiple roads overlap.

[0236] In one possible implementation, identifying the road segment area connected to the intersection area includes:

[0237] For each edge of the intersection area at a certain intersection point, translate the edge a preset distance away from the intersection point to obtain the target edge. Then, determine the road segment area corresponding to the edge based on the target edge, the corresponding road, and the target edge.

[0238] In one possible implementation, classifying the satellite imagery using the Swin-Unet model and outputting segmented images that identify road areas and non-road areas as well as road widths includes:

[0239] The feature map is obtained by performing self-attention calculation on the satellite image using the Swin Transformer layer in the Swin-Unet model.

[0240] The binary map corresponding to the feature map is determined by the segmentation branch decoder and sigmoid activation function in the Swin-Unet model, wherein the binary map identifies road regions and non-road regions; and the road width heatmap corresponding to the feature map is determined by the width branch decoder and linear activation function in the Swin-Unet model, wherein the road width heatmap identifies the width of the road.

[0241] The network layers in the Swin-Unet model are used to identify the segmented images corresponding to the binary image and the road width heatmap.

[0242] In one possible implementation, after classifying the satellite imagery using the Swin-Unet model and outputting segmented images identifying road areas and non-road areas, and before identifying intersection areas where multiple roads overlap and road segments connected to intersection areas based on the road areas in the segmented images, the method further includes:

[0243] Based on the road regions in the segmented image, determine the centerline of each road;

[0244] For each center line, a rectangle with a preset width and the road width corresponding to that center line is generated. The rectangle is moved sequentially along the vertical direction of the straight line corresponding to every two adjacent pixels on the center line, and the outline of the rectangle is determined as the target road area.

[0245] For the identified target road area, the following steps are performed: based on the road area in the segmented image, identify the intersection area where multiple roads overlap and the road segment area connected to the intersection area.

[0246] In one possible implementation, after identifying the intersection areas where multiple roads overlap and the road segment areas connected to the intersection areas, and before performing meshing processing on the intersection areas using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular faces to obtain the second three-dimensional model, the method further includes:

[0247] For each road segment area, determine the intersection point between the edge of that road segment area furthest from the intersection and the road.

[0248] Connect each road intersection point identified in the same intersection area to generate the outline of the corresponding intersection;

[0249] The steps involve replacing the intersection region with the identified contour, then performing a meshing process on the replaced intersection region using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular facets, thus obtaining the second three-dimensional model.

[0250] In one possible implementation, generating the outline of the corresponding intersection for each road intersection point identified corresponding to the same intersection area includes:

[0251] For each road intersection, identify the target road intersection that is not located on the same road as the road intersection and is the closest to the road intersection. Then, identify the target road intersection and the road intersection as a pair of contour points in the same group.

[0252] For each group, a quadratic Bézier curve is used to smooth the contour point pairs within the group to generate the contour of the corresponding intersection.

[0253] In one possible implementation, the method further includes:

[0254] Based on the road regions in the segmented image, determine the centerline of each road;

[0255] If the endpoints and / or connection points of multiple center lines are located within a region of a preset size, a node is generated that records the center point of that region.

[0256] For each road, identify two target nodes that record the center points of the two regions corresponding to the two endpoints of the road, connect the two target nodes, and record the road information on the edges connecting the two target nodes.

[0257] Generate the corresponding topology and display the topology.

[0258] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0259] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0260] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0261] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0262] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A road modeling method, characterized in that, The method includes: acquiring satellite imagery; inputting the satellite imagery into a pre-trained semantic segmentation Swin-Unet model; classifying the satellite imagery using the Swin-Unet model; and outputting segmented images that identify road areas and non-road areas; based on the segmented images, identifying intersection areas where multiple roads overlap and road segment areas connected to the intersection areas; for each road segment area, constructing a three-dimensional geometry of the road segment using a centerline sweep method to obtain a first three-dimensional model; and using the Delaunay triangulation algorithm to mesh the intersection areas, generating a continuous and non-overlapping set of triangular facets to obtain a second three-dimensional model; and determining the road three-dimensional modeling result based on the first three-dimensional model and the second three-dimensional model.

2. The method according to claim 1, characterized in that, The step of classifying the satellite imagery using the Swin-Unet model and outputting segmented images that identify road areas and non-road areas includes: classifying the satellite imagery using the Swin-Unet model and outputting segmented images that identify road areas, non-road areas, and road widths; and identifying intersection areas where multiple roads overlap based on the segmented images, including: determining the centerline of each road according to the road areas in the segmented images; identifying the intersection points between each centerline using the Bentley-Ottmann plane line segment intersection detection algorithm; for each intersection point, obtaining the first centerline and the second centerline corresponding to that intersection point; and determining the intersection areas where multiple roads overlap based on the first centerline, the second centerline, the first width of the road corresponding to the first centerline, and the second width of the road corresponding to the second centerline.

3. The method according to claim 2, characterized in that, Identifying road segment areas connected to intersection areas includes: for each edge of an intersection area at a certain intersection point, translating the edge a preset distance away from the intersection point to obtain a target edge, and determining the road segment area corresponding to the edge based on the target edge, the target edge, and the corresponding road.

4. The method according to claim 2, characterized in that, The step of classifying the satellite imagery using the Swin-Unet model and outputting segmented images that identify road areas, non-road areas, and road widths includes: performing self-attention calculation on the satellite imagery using the Swin Transformer layer in the Swin-Unet model to obtain a feature map; determining a binary map corresponding to the feature map using the segmentation branch decoder and sigmoid activation function in the Swin-Unet model, wherein the binary map identifies road areas and non-road areas; determining a road width heatmap corresponding to the feature map using the width branch decoder and Linear activation function in the Swin-Unet model, wherein the road width heatmap identifies the road width; and identifying the segmented images corresponding to the binary map and the road width heatmap using the network layers in the Swin-Unet model.

5. The method according to claim 2, characterized in that, After classifying the satellite imagery using the Swin-Unet model and outputting segmented images identifying road areas and non-road areas, and before identifying intersection areas and road segments connected to intersection areas based on the road areas in the segmented images, the method further includes: determining the centerline of each road based on the road areas in the segmented images; for each centerline, generating a rectangle with a preset width and the road width corresponding to the centerline as its length; sequentially moving the rectangle along the perpendicular direction of the straight line corresponding to every two adjacent pixels on the centerline to determine the outline of the rectangle as the target road area; and for the determined target road area, performing the subsequent step of identifying intersection areas and road segments connected to intersection areas based on the road areas in the segmented images.

6. The method according to claim 1, characterized in that, After identifying the intersection areas where multiple roads overlap and the road segment areas connected to the intersection areas, and before the Delaunay triangulation algorithm is used to mesh the intersection areas to generate a continuous and non-overlapping set of triangular faces to obtain the second 3D model, the method further includes: for each road segment area, determining the road intersection points of the edges of the road segment area away from the intersection; connecting each determined road intersection point corresponding to the same intersection area to generate the contour of the corresponding intersection; replacing the intersection area with the identified contour; and for the replaced intersection area, performing subsequent meshing processing using the Delaunay triangulation algorithm to generate a continuous and non-overlapping set of triangular faces to obtain the second 3D model.

7. The method according to claim 6, characterized in that, The process of connecting the same intersection area to generate the outline of the corresponding intersection for each determined road intersection includes: for each road intersection, determining the target road intersection that is not located on the same road as the road intersection and is closest to the road intersection, and determining the target road intersection and the road intersection as a pair of outline points in the same group; for each group, using a quadratic Bézier curve to smooth the pair of outline points in the group to generate the outline of the corresponding intersection.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: determining the centerline of each road based on the road regions in the segmented image; if the endpoints and / or connection points of multiple centerlines are located within a region of a preset size, generating a node that records the center point of that region; for each road, determining two target nodes that record the center points of the two regions corresponding to the two endpoints of the road, connecting the two target nodes, and recording the road information on the edges connecting the two target nodes; generating a corresponding topology structure, and displaying the topology structure.

9. A road modeling device, characterized in that, The device includes: an acquisition and recognition module for acquiring satellite imagery, inputting the satellite imagery into a pre-trained semantic segmentation Swin-Unet model, classifying the satellite imagery using the Swin-Unet model, and outputting segmented images identifying road areas and non-road areas; based on the segmented images, identifying intersection areas where multiple roads overlap and road segment areas connected to the intersection areas; a processing module for constructing a three-dimensional geometry of each road segment area using a centerline sweep method to obtain a first three-dimensional model; and using the Delaunay triangulation algorithm to mesh the intersection area, generating a continuous and non-overlapping set of triangular facets to obtain a second three-dimensional model; and determining the road three-dimensional modeling result based on the first three-dimensional model and the second three-dimensional model.

10. An electronic device, characterized in that, The electronic device includes at least a processor and a memory, the processor being used to execute a computer program stored in the memory to implement the steps of the road modeling method as described in any one of claims 1-8.