Building contour vectorization method based on CNN and MAMBA

By employing CNN and MAMBA-based building contour vectorization methods, combined with multi-scale feature fusion and boundary awareness modules, the problems of small building omission, occlusion, jagged edges, and adhesion in building extraction are solved, achieving efficient and accurate building extraction and vectorization.

CN121147752APending Publication Date: 2025-12-16TIANJIN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511280317.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Existing building extraction methods are insufficient in terms of accuracy and efficiency, especially in dealing with the omission, occlusion, jagged edges, and adhesion of small buildings, resulting in low building extraction efficiency.

Method used

A building contour vectorization method based on CNN and MAMBA is adopted. Through the collaborative work of the feature extraction module, the multi-scale feature fusion module, the boundary perception module and the contour vectorization module, the edge features of the building are enhanced and vectorized.

Benefits of technology

It effectively alleviates the problems of missing and obstructing small buildings, reduces edge jaggedness and adhesion, improves the accuracy and efficiency of building extraction, and has a fast calculation speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121147752A_ABST
    Figure CN121147752A_ABST
Patent Text Reader

Abstract

The invention discloses a CNN and MAMBA-based building contour vectorization method, which comprises a module I (a feature extraction module), a module II (a multi-scale feature fusion module), a module III (a boundary sensing module) and a module IV (a contour vectorization module), and realizes a recognition task and a contour vectorization task of a building in a remote sensing image through the modules. When an input remote sensing image is given, the input remote sensing image passes through a feature extraction module and is respectively input into a left convolution module and a right state space module, features of four scales are finally output through four stages, the four features are input into a multi-scale feature fusion module for feature fusion, the fused features are input into a boundary sensing module, and the boundary sensing module is used for sensing the remote sensing image. And strengthening the edge features of the building. And then performing up-sampling on the result of the previous step to restore the size of the original image to obtain a binary segmentation mask of the building, and finally extracting vectorization coordinates of each instance building through a contour vectorization algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology, specifically to a method for vectorizing building contours based on CNN and MAMBA. Background Technology

[0002] Building extraction plays an irreplaceable role in many fields such as mapmaking, urban planning, population estimation, disaster management, and illegal building monitoring. Traditional building extraction involves manual drawing using tools like ArcGIS, which is extremely inefficient. Therefore, to overcome these problems, automated methods have been developed, such as Support Vector Machines (SVMs) and Artificial Neural Networks (ANNs), which automatically extract contextual features using convolutional neural networks. However, existing deep learning-based methods still have significant limitations in accurately extracting building footprints, including… 1. Small buildings are omitted and buildings are obscured; 2. The jagged edges of the building are severely uneven; 3. Adhesion occurs at the edges of the building; There are three different reasons for these problems, including insufficient use of global semantics, omission of local details, and insufficient fusion of multi-scale features.

[0003] In summary, designing a new method for vectorizing building outlines to solve the above problems has become a pressing technical issue for those in the field. Summary of the Invention

[0004] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, one objective of this invention is to propose a building contour vectorization method based on CNN and MAMBA. This method inputs four features into a multi-scale feature fusion module for feature fusion, and then inputs the fused features into a boundary awareness module to enhance the edge features of the building. Then, the result of the previous step is upsampled to restore the size of the original image to obtain a binary segmentation mask for the building. Finally, the vectorized coordinates of each instance building are extracted using a contour vectorization algorithm.

[0005] To address the aforementioned problems, this invention provides a building contour vectorization method based on CNN and MAMBA, comprising the following steps: S1. Input the remote sensing image to the feature extraction module. This module includes a left convolution part and a right state space part. It generates feature maps of four scales through four stages, and adds feature maps of the same scale to output feature images of four scales, which are (96, 128, 128), (192, 64, 64), (384, 32, 32), and (768, 16, 16). S2. Input the four scale feature maps output by S1 into the multi-scale feature fusion module. This module performs feature fusion through multiple BaseBlock and ABR operations and outputs a single-scale fused feature map with scales of (96, 128, 128). S3. Input the fused feature map output from S2 into the boundary awareness module. This module includes a boundary prediction module, a spatial attention module, and a channel attention module. By generating the boundary prediction value bpv, the boundary spatial attention weight bsaw, and the boundary channel attention weight bcaw, the building edge features are enhanced, and the enhanced feature map is output. S4. Upsample the feature map output by S3 and restore it to the original image size to obtain the building binary segmentation mask; S5. Input the binary segmentation mask output from S4 into the contour vectorization module. This module obtains the building instance contour through cv2.findContour, calculates the corner confidence score using the F function, filters pre-selected corner points based on the threshold, and outputs vectorized coordinates through a clustering algorithm.

[0006] Preferably, in S1, each stage of the left convolutional part consists of multiple residual blocks connected in series: The first stage includes 6 residual blocks. The first 5 residual blocks each contain 1×1 convolutions of 64 filters, 3×3 convolutions of 64 filters, and 1×1 convolutions of 64 filters. The last residual block contains 1×1 convolutions of 96 filters, 3×3 convolutions of 96 filters, and 1×1 convolutions of 96 filters. The second stage includes four residual blocks. The first three have the same structure as the last residual block in the first stage. The last one contains a 1×1 convolution of 192 filters, a 3×3 convolution of 192 filters, and a 1×1 convolution of 192 filters. The third stage includes three residual blocks, the last of which contains a 1×1 convolution of 384 filters, a 3×3 convolution of 384 filters, and a 1×1 convolution of 384 filters. The fourth stage consists of three residual blocks, the last of which contains a 1×1 convolution with 768 filters, a 3×3 convolution with 768 filters, and a 1×1 convolution with 768 filters.

[0007] Preferably, in S1, each stage of the right-hand state space part is composed of several omnidirectional state space blocks connected in series, and the number of omnidirectional state space blocks in the four stages are 6, 5, 4 and 3 respectively.

[0008] Preferably, in S2, the BaseBlock of the multi-scale feature fusion module consists of multiple residual blocks; the ABR operation includes addition, normalization, and ReLU activation.

[0009] Preferably, in S3, the boundary prediction part consists of four cascaded residual blocks and a 1×1 convolutional layer, where the boundary prediction value bpv is constrained by the B_loss loss function, where B_loss is defined as: .

[0010] Preferably, in S3, the formula for calculating the boundary spatial attention weights bsaw in the spatial attention module is as follows: ; like Set all spatial attention weights to 0, and otherwise set them to 1. Multiply the obtained spatial attention weights by the input to get the first return value. The processing steps of the channel attention module are as follows: S3.1 Calculate the distance between the edge prediction value bpv and the feature value input for each channel, and define the distance between bpv and the i-th channel of input. for: ; S3.2 Calculate the weight of each channel based on the distance of each channel, and the weight of the i-th channel. The definition is as follows: ; The obtained channel attention weights are multiplied by the input to obtain the second output; finally, the input is added to the first and second outputs to obtain the output of this module.

[0011] Preferably, the corner points of each building instance are obtained through S5, and these corner points constitute the vectorized coordinates of the building. The specific steps of S5 are as follows: S5.1 Use cv2.findContour to obtain the outlines of multiple building instances in the image; the outline of each building instance is composed of a set of coordinates, defined as: ; S5.2 For each coordinate of each building instance, the confidence score of that coordinate as a corner point is obtained through the F function, and a threshold is set in advance. Points exceeding the threshold are retained as reserve corner points, and those below the threshold are discarded; the confidence score of the i-th coordinate is... , is defined as:

[0012] ; G function: connect P sequentially i-1 P i and P i+1 The three coordinate points will form a grid with P as the reference point. iThe angle between the endpoints The answer can be found using the cosine theorem for the dot product. Defined by the degree of closeness of a 90-degree distance. As shown in the formula below: ; In a G function, if the angle is 0 degrees or 180 degrees, the score is 0.1; if the angle is 90 degrees, the score is 1; and if the angle is 80 degrees or 100 degrees, the score is 0.9. S5.3. Cluster the preliminary corner points obtained in S5.2, and find the center of each cluster as the final corner point. The steps are as follows: First, initialize the system by classifying the first pre-selected corner point as the first type. Then, iterate through each prepared corner point and calculate its Euclidean distance to the last class and all elements in the first class. If the Euclidean distance to all elements in that class is less than a set threshold, then that corner point is assigned to that class. Otherwise, create a new class and classify it into the new class.

[0013] The advantages of this invention compared to the prior art are: This invention proposes a building contour vectorization method based on CNN and MAMBA, comprising: Module 1 (feature extraction module), Module 2 (multi-scale feature fusion module), Module 3 (boundary awareness module), and Module 4 (contour vectorization module). These modules enable the recognition and contour vectorization of buildings in remote sensing images. Given an input remote sensing image, the feature extraction module processes the image, inputting it to the left convolution module and the right state space module. Through four stages, it outputs features at four scales. These features are then input to the multi-scale feature fusion module for feature fusion. The fused features are then input to the boundary awareness module to enhance the edge features of the buildings. The result from the previous step is then upsampled to restore the original image size, obtaining a binary segmentation mask for the buildings. Finally, the contour vectorization algorithm extracts the vectorized coordinates of each instance building.

[0014] This invention proposes a building contour vectorization method based on CNN and MAMBA. The method is compared with state-of-the-art methods, demonstrating its superiority in building extraction. The proposed CNN-SSM feature extraction module combines the long-range dependency of the State-Space Model (SSM) with the local feature extraction capability of the Convolutional Neural Network (CNN). This effectively alleviates the problems of missed detection of small buildings and building occlusion, enhances the model's learning ability for complex buildings, and improves the robustness of the algorithm.

[0015] This invention proposes an edge-aware attention module in the algorithm, which enhances building edge features and suppresses non-edge features, effectively improving the recognition accuracy of building edges, alleviating the jagged and sticky phenomena of buildings, and thus improving the overall segmentation quality.

[0016] This invention proposes a building outline vectorization algorithm, which uses the fewest coordinates to represent a building while keeping its shape unchanged, and the algorithm is also fast. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.

[0018] Figure 1 This is a schematic diagram of the overall structure of the algorithm of this invention.

[0019] Figure 2 This is a schematic diagram of the feature extraction module of the present invention.

[0020] Figure 3 This is a schematic diagram of the omnidirectional state space block of the present invention.

[0021] Figure 4 This is a schematic diagram of the multi-scale feature fusion module of the present invention.

[0022] Figure 5 This is a schematic diagram of the boundary sensing module of the present invention.

[0023] Figure 6 This is a schematic diagram of the building outline vectorization module of the present invention. Detailed Implementation

[0024] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0025] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "joining" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0026] The present invention will now be described in further detail with reference to the accompanying drawings.

[0027] Combination Figures 1-6 The present invention provides a building outline vectorization method based on CNN and MAMBA, the first purpose of which is to alleviate the omission of small buildings and the problem of building occlusion.

[0028] I. The first objective of this invention is to propose Module 1 and Module 2.

[0029] 1. Detailed structure and steps of Module 1: Input a satellite building image with dimensions (3, 512, 512) (meaning 3 channels and 512*512 pixels). The images will then be processed by the feature extraction module, which consists of two parts, as follows: Figure 2 As shown, the left convolutional part and the right state space part are respectively. The convolutional part has four stages, and the state space module also has four stages. The left and right parts generate four feature images at different scales in the four stages. The four scales are (96, 128, 128), (192, 64, 64), (384, 32, 32), and (768, 16, 16). The feature images of the same scale generated by the left and right parts in each stage are added together to obtain the output of four scales, which are used as the input of the multi-scale feature fusion module.

[0030] The structure of each stage will be explained in detail below. The first stage of the convolution part on the left consists of 6 residual blocks connected in series. The first five residual blocks all have the same structure, each containing 1×1 convolutions, 3×3 convolutions, and 1×1 convolutions with 64 filters. The last residual block contains 1×1 convolutions, 3×3 convolutions, and 1×1 convolutions with 96 filters. The second stage has four residual blocks; the first three are the same as the last one in the first stage, and the last one contains 1×1 convolutions, 3×3 convolutions, and 1×1 convolutions with 192 filters. The third stage has three residual blocks, with the last one containing 384 filters. The fourth stage has three residual blocks, with the last one containing 762 filters. Each stage in the right-hand state space consists of several omnidirectional state space blocks concatenated, with numbers of 6, 5, 4, and 3 respectively. The structure is similar to the left side, except the last one has a different feature map size; the rest are the same. The omnidirectional state space block structure is as follows: Figure 3 As shown.

[0031] 2. The detailed structure and steps of Module Two are as follows: Figure 4 As shown: This module has four scale feature map inputs and one scale feature map output. The BaseBlock is also composed of several residual blocks, with a structure similar to that described above, so it will not be repeated. ABR includes three operations: addition, normalization, and ReLU activation. The functional structure of the BaseBlock in each row is exactly the same, while there are differences between different rows; all ABR functional structures are identical. The four feature maps (96, 128, 128), (192, 64, 46), (384, 32, 32), and (768, 16, 16) are input to each row of BaseBlock, with each row having four outputs, corresponding to the same structure as each row. The second layer has four inputs per row, which undergo ABR operations and continue to be used as input to BaseBlock. After the final layer undergoes ABR operations, there will only be one input and one output at scale (96, 128, 128).

[0032] Second, the second objective of this invention is to alleviate the jagged and sticky phenomena at the edges of buildings, and based on this, Modules Three and Four of the second technical solution are proposed.

[0033] 1. The detailed structure and steps of Module 3 are as follows: Figure 5 As shown: The boundary awareness module consists of the following parts: Boundary Prediction, Spatial Attention Model, and Channel Attention Model. This module takes the output of the multi-scale feature fusion module as input.

[0034] The boundary prediction part consists of four cascaded residual blocks and a 1×1 convolutional layer. This invention inputs the fused features into this module to obtain the edge prediction value (denoted as bpv) for a building size of (1, 128, 128). This invention uses edge labels obtained from ground truth using the Canny edge detection operator to supervise the prediction results. Furthermore, this invention uses... B_ loss The generation of the loss function constraint bpv can be represented as follows: ; Inputting the BPV into the spatial attention module yields the boundary spatial attention weights, denoted as: bsaw The entire process can be represented as ; like Set all spatial attention weights to 0, otherwise set them to 1. Multiply the obtained spatial attention weights by the input to get the first return value.

[0035] The channel attention module consists of two steps. The first step is to calculate the distance between the edge prediction value (bpv) and the feature value of each channel of the input. The distance between bpv and the i-th channel of the input is defined. for: ; The second step is to calculate the weight of each channel based on the distance to each channel, specifically the weight of the i-th channel. The definition is as follows: ; The obtained channel attention weights are multiplied by the input to obtain the second output.

[0036] This invention adds the input to the first and second outputs to obtain the output of the module.

[0037] 2. The detailed structure and steps of Module Four are as follows: Figure 6 As shown: Through the above steps, this invention obtains a binary segmentation mask for the building. Then, the algorithm is used to obtain the corner points of each building instance, which constitute the vectorized coordinates of the building. The specific process of the algorithm is described as follows: The first step is to use `cv2.findContour` to obtain the outlines of multiple building instances in the image. The outline of each building instance is composed of a set of coordinates, defined as... .

[0038] The second step involves obtaining the confidence score for each coordinate of each building instance, using the F function. This invention pre-sets a threshold; coordinates exceeding the threshold are retained as potential corner points, while those below the threshold are discarded. The confidence score for the i-th coordinate is... , is defined as:

[0039] ; by Let's take the G function as an example: connect P sequentially i-1 P i and P i+1 The three coordinate points will form a grid with P as the reference point. i The angle between the endpoints The answer can be found using the cosine theorem of the dot product. This invention defines a proximity of 90 degrees as... As shown in the formula below: ; In a G function, if the angle is 0 degrees or 180 degrees, the score is 0.1; if it is 90 degrees, the score is 1; and if it is 80 degrees or 100 degrees, the score is 0.9.

[0040] The third step involves clustering the candidate corner points obtained in the second step, determining the center of each cluster as the final corner point. Specifically, the process is as follows: First, initialize the cluster by assigning the first candidate corner point as the first cluster. Then, iterate through each candidate corner point, performing the following operations: calculate the Euclidean distance to all elements in both the last and first clusters. If the Euclidean distance to all elements in that cluster is less than a set threshold, add the corner point to that cluster; otherwise, create a new cluster and add the corner point to it. Note: This invention only requires calculating the Euclidean distance between the candidate corner point and both the last and first clusters; the algorithm complexity is O(n). In summary, this invention obtains the vectorized coordinates of the building outline.

[0041] To more clearly illustrate the specific embodiments of the present invention, an example is provided below: A. The technical problem to be solved by this invention is: Building extraction plays a crucial role in many fields, but traditional methods (such as manual drawing using ArcGIS tools) are inefficient. Existing automated methods include support vector machines and artificial neural networks, but deep learning-based methods still have significant drawbacks: 1. The omission of small buildings and the problem of buildings being obscured stem from insufficient use of global semantics.

[0042] 2. The jagged edges of the building are severe, which is due to the omission of local details.

[0043] 3. The phenomenon of building edge adhesion stems from insufficient integration of multi-scale features.

[0044] These shortcomings limit the accuracy and efficiency of building extraction, and the present invention aims to overcome these problems.

[0045] B. The technical means adopted in this invention are: This invention provides a building contour vectorization method based on CNN and MAMBA, which achieves efficient and accurate building extraction and vectorization through the collaborative work of four modules: Module 1 (Feature Extraction Module): Extracts multi-scale features to alleviate the problems of missing and occluding small buildings.

[0046] Module 2 (Multi-scale Feature Fusion Module): Fuses multi-scale features to enhance global semantics and solve occlusion problems.

[0047] Module 3 (Boundary Awareness Module): Enhances edge features and reduces jagged edges and adhesion.

[0048] Module 4 (Contour Vectorization Module): Optimizes output to vectorized coordinates, improving efficiency.

[0049] The overall logical flow is as follows: Input remote sensing image → Module 1 extracts features → Module 2 fuses features → Module 3 enhances boundaries → Upsamples to obtain a mask → Module 4 vectorizes the output. The data flow between modules is coherent: the output of Module 1 serves as the input of Module 2, the output of Module 2 serves as the input of Module 3, and the upsampled output of Module 3 serves as the input of Module 4, forming a closed-loop processing chain.

[0050] C. The technical effects achieved by this invention are: Overall superiority: In the field of building extraction, this method surpasses existing methods with high accuracy through the CNN-SSM hybrid model.

[0051] Mitigating small building omissions and occlusions: Module 1 combines CNN local features and SSM long-range dependencies to enhance model robustness.

[0052] Reduce jagged edges and adhesion: The boundary-aware attention mechanism in Module 3 improves edge accuracy and segmentation quality.

[0053] Efficient vectorization: The corner optimization algorithm in Module 4 reduces the number of coordinates while ensuring shape accuracy, and has a fast calculation speed (complexity O(n)).

[0054] Finally, any aspects not fully described in this invention utilize existing mature products and technologies.

[0055] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.

Claims

1. A method for vectorizing building outlines based on CNN and MAMBA, characterized in that: Includes the following steps: S1. Input the remote sensing image to the feature extraction module. This module includes a left convolution part and a right state space part. It generates feature maps of four scales through four stages, and adds feature maps of the same scale to output feature images of four scales, which are (96, 128, 128), (192, 64, 64), (384, 32, 32), and (768, 16, 16). S2. Input the four scale feature maps output by S1 into the multi-scale feature fusion module. This module performs feature fusion through multiple BaseBlock and ABR operations and outputs a single-scale fused feature map with scales of (96, 128, 128). S3. Input the fused feature map output from S2 into the boundary awareness module. This module includes a boundary prediction module, a spatial attention module, and a channel attention module. By generating the boundary prediction value bpv, the boundary spatial attention weight bsaw, and the boundary channel attention weight bcaw, the building edge features are enhanced, and the enhanced feature map is output. S4. Upsample the feature map output by S3 and restore it to the original image size to obtain the building binary segmentation mask; S5. Input the binary segmentation mask output from S4 into the contour vectorization module. This module obtains the building instance contour through cv2.findContour, calculates the corner confidence score using the F function, filters pre-selected corner points based on the threshold, and outputs vectorized coordinates through a clustering algorithm.

2. The method for vectorizing building outlines based on CNN and MAMBA according to claim 1, characterized in that: In S1, each stage of the left convolution part consists of multiple residual blocks connected in series: The first stage includes 6 residual blocks. The first 5 residual blocks each contain 1×1 convolutions of 64 filters, 3×3 convolutions of 64 filters, and 1×1 convolutions of 64 filters. The last residual block contains 1×1 convolutions of 96 filters, 3×3 convolutions of 96 filters, and 1×1 convolutions of 96 filters. The second stage includes four residual blocks. The first three have the same structure as the last residual block in the first stage. The last one contains a 1×1 convolution of 192 filters, a 3×3 convolution of 192 filters, and a 1×1 convolution of 192 filters. The third stage includes three residual blocks, the last of which contains a 1×1 convolution with 384 filters, a 3×3 convolution with 384 filters, and a 1×1 convolution with 384 filters. The fourth stage consists of three residual blocks, the last of which contains a 1×1 convolution of 768 filters, a 3×3 convolution of 768 filters, and a 1×1 convolution of 768 filters.

3. The method for vectorizing building outlines based on CNN and MAMBA according to claim 1, characterized in that: In S1, each stage of the right-hand state space is composed of several omnidirectional state space blocks connected in series, and the number of omnidirectional state space blocks in the four stages are 6, 5, 4 and 3 respectively.

4. The method for vectorizing building outlines based on CNN and MAMBA according to claim 1, characterized in that: In S2, the BaseBlock of the multi-scale feature fusion module consists of multiple residual blocks; the ABR operation includes addition, normalization and ReLU activation.

5. The method for vectorizing building outlines based on CNN and MAMBA according to claim 1, characterized in that: In S3, the boundary prediction part consists of four cascaded residual blocks and a 1×1 convolutional layer, where the boundary prediction value bpv is constrained by the B_loss loss function, where B_loss is defined as: 。 6. The method for vectorizing building outlines based on CNN and MAMBA according to claim 1, characterized in that: In S3, the formula for calculating the boundary spatial attention weights bsaw by the spatial attention module is as follows: ; like Set all spatial attention weights to 0, and otherwise set them to 1. Multiply the obtained spatial attention weights by the input to get the first return value. The processing steps of the channel attention module are as follows: S3.1 Calculate the distance between the edge prediction value bpv and the feature value input for each channel, and define the distance between bpv and the i-th channel of input. for: ; S3.2 Calculate the weight of each channel based on the distance of each channel, and the weight of the i-th channel. The definition is as follows: ; The obtained channel attention weights are multiplied by the input to obtain the second output; finally, the input is added to the first and second outputs to obtain the output of this module.

7. The method for vectorizing building outlines based on CNN and MAMBA according to claim 1, characterized in that: The corner points of each building instance are obtained through step S5, and these corner points constitute the vectorized coordinates of the building. The specific steps of S5 are as follows: S5.1 Use cv2.findContour to obtain the outlines of multiple building instances in the image; the outline of each building instance is composed of a set of coordinates, defined as: ; S5.2 For each coordinate of each building instance, the confidence score of that coordinate as a corner point is obtained through the F function, and a threshold is set in advance. Points exceeding the threshold are retained as reserve corner points, and those below the threshold are discarded; the confidence score of the i-th coordinate is... , is defined as: ; ; G function: connect P sequentially i-1 P i and P i+1 The three coordinate points will form a grid with P as the reference point. i The angle between the endpoints Solve using the cosine theorem of the dot product. Defined by the degree of closeness of a 90-degree distance. As shown in the formula below: ; In a G function, if the angle is 0 degrees or 180 degrees, the score is 0.1; if the angle is 90 degrees, the score is 1; and if the angle is 80 degrees or 100 degrees, the score is 0.

9. S5.

3. Cluster the preliminary corner points obtained in S5.2, and find the center of each cluster as the final corner point. The steps are as follows: First, initialize the system by classifying the first pre-selected corner point as the first type. Then, iterate through each prepared corner point and calculate its Euclidean distance to the last class and all elements in the first class. If the Euclidean distance to all elements in that class is less than a set threshold, then that corner point is assigned to that class. Otherwise, create a new class and classify it into the new class.