A complex building classification extraction method based on a U-Net model

By combining U-Net model with UAV imagery data and data augmentation technology, the problem of low accuracy in the classification and extraction of complex buildings is solved, achieving high-precision building identification and extraction. It has strong applicability and reduces the difficulty of obtaining high-quality samples.

CN115017968BActive Publication Date: 2026-06-05GUIZHOU NORMAL UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUIZHOU NORMAL UNIVERSITY
Filing Date
2022-04-11
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies suffer from problems such as low accuracy, over-segmentation, data loss, and high acquisition costs in the classification, identification, and extraction of complex buildings. Furthermore, deep learning models have poor spatiotemporal generalization capabilities.

Method used

By combining the U-Net model with UAV imagery data, and through dataset construction, data augmentation, and fine-tuning training, the applicability and recognition accuracy of the model are improved. The U-Net model is then used to classify and extract complex buildings.

Benefits of technology

It achieves high-precision classification and extraction of complex buildings, improves segmentation accuracy, has strong applicability, reduces the difficulty of obtaining high-quality samples, makes up for the deficiencies of satellite imagery, and enhances the model's learning ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115017968B_ABST
    Figure CN115017968B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on U-Net model's complex building classification extraction method, including with steps:Step1.Getting unmanned aerial vehicle image data;Step2.Make building classification dataset.Step3.Using classification building dataset respectively trains U-Net model, obtains building extraction model;Step4.Enhance dataset;Step5.Using enhanced dataset, U-Net model is fine-tuned training, obtains fine-tuned building extraction model;Step6.Model test: the building image of prediction dataset is input to step Step5 obtains fine-tuned building extraction model, and classification is identified to building.The application can be under the condition that building dataset is limited, to complex building type is effectively identified extraction, the building contour after segmentation is clear, building is complete, can exist in the form of single house, effectively improve the extraction accuracy of complex building.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a building classification and extraction method, and more particularly to a complex building classification and extraction method based on the U-Net model, belonging to the field of remote sensing image data information extraction technology. Background Technology

[0002] Current methods for classifying and extracting buildings mainly focus on large-scale buildings with similar colors and textures, while recognition of buildings with diverse and complex roof types is less common. Traditional building extraction methods extract the color, shape, and texture of buildings, but these methods suffer from low extraction accuracy, over-segmentation, data loss, and high acquisition costs when dealing with complex building structures.

[0003] In recent years, deep learning algorithms have been widely applied in computer vision tasks such as image classification, object detection, image denoising, and semantic segmentation. Unlike traditional image processing methods, deep learning algorithms can learn the features of different buildings from image data, thus enabling them to classify different buildings. However, training deep learning methods requires a large amount of sample data, but most of the samples obtained only come from a certain region and time period. This leads to poor spatiotemporal generalization ability of the trained deep learning classification model. If the above classification model is directly applied to other regions or time periods, the classification accuracy is often difficult to guarantee.

[0004] The U-Net model is a fully convolutional neural network with an encoder-decoder structure. The encoder module extracts features, while the decoder module recovers feature maps at the original image resolution. The U-Net model achieves good segmentation results on small-scale image datasets and, due to its encoder-decoder structure, is suitable for segmenting and extracting complex building images. The U-Net model uses skip connections to combine shallow feature maps from the encoder module with deep feature maps from the decoder module, enabling it to classify and train on complex regions, complex buildings, and buildings with diverse roof types, extracting deeper levels of building detail. Therefore, further improving the segmentation accuracy of complex buildings and the classification of detached buildings has become a pressing technical challenge. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a method for classifying and extracting complex buildings based on the U-Net model. This method can easily and quickly identify and extract complex buildings, and has high identification accuracy and strong applicability, thereby overcoming the shortcomings of the above-mentioned prior art.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for classifying and extracting complex buildings based on the U-Net model, which includes the following steps:

[0007] Step 1. Acquire drone imagery data;

[0008] Step 2. Constructing the dataset: Use annotation software to annotate the buildings in the images from Step 1 above, obtain the building label samples corresponding to the images, segment the images and labels, and finally obtain a dataset of various building samples;

[0009] Step 3. Use the classified building dataset obtained in Step 2 above to train the U-Net model to obtain the building classification and extraction model;

[0010] Step 4. Augment the building classification dataset: A large number of building classification samples are obtained through data augmentation. Each sample includes the processed image and its corresponding building sample label, thus obtaining the augmented building classification dataset.

[0011] Step 5. Use the enhanced classified building dataset created in Step 4 above to fine-tune the U-Net model trained in Step 3 above, and obtain the adjusted building extraction model.

[0012] Step 6. Model Testing: Input the test image into the building extraction model adjusted in Step 5 above to obtain a binary image of the building. Then, compare the binary image with the building in the image and use evaluation indicators to analyze the prediction results.

[0013] In a specific embodiment of the present invention, step Step 1 above may include the following steps:

[0014] 1) Use a drone platform equipped with a visible light sensor, plan the drone flight path according to the actual environment, set reasonable flight altitude, heading and lateral overlap, and obtain high-resolution drone remote sensing images.

[0015] 2) The photos taken by the drone are processed using intelligent photogrammetry software, including initialization, feature point matching, image stitching, correction (deformation, distortion, blur and noise caused by drone shaking), image enhancement, color balancing, cropping and reconstruction, to generate high-resolution orthophotos with red, green and blue bands.

[0016] Those skilled in the art will understand that the imaging device used in step 1) above can be any applicable existing drone device, such as the DJI Mavic 2 Pro drone, the DJI Phantom 4 drone, etc.

[0017] In one specific embodiment of the present invention, step 2 above may include the following steps:

[0018] 1) Using UAV remote sensing imagery as sample data, the buildings in the imagery were classified and manually labeled using software;

[0019] 2) Segment the original images and labels of different scales into samples of the same target size. In the label, 255 represents background and 0 represents buildings. Divide all samples proportionally into training set, validation set, and test set. Among them, the sample includes a bungalow with water on the roof (Water on the Roof, B). W Bungalow-roof without water (B) N ), Color Steel House (B) S Brick and Tile House (B) T There are 4 types.

[0020] (1) It is understood that in step 1) above, any applicable existing image annotation tool can be used for manual annotation, such as deep learning image annotation tools labelme, labelmg and ArcMap.

[0021] In one specific embodiment of the present invention, step 3 above may include the following steps:

[0022] 1) The compression path consists of 4 modules. Each module uses 3 effective convolutions and 1 max pooling downsampling. After each downsampling, the number of feature maps is multiplied by 2, so the feature map size changes, and finally the feature map is obtained.

[0023] 2) The expansion path consists of 4 modules. Before each module starts, the size of the feature map is multiplied by 2 by deconvolution, and the number of features is halved. Then it is merged with the feature map of the left symmetrical compression path. Since the feature map sizes of the left compression path and the right expansion path are different, U-Net normalizes the feature map by cropping the feature map of the compression path to the same size as the feature map of the expansion path. The convolution operation of the expansion path still uses the effective convolution operation, and finally obtains a feature map of the same size as the original image.

[0024] (1) Set the convolutional layer with a kernel size of 3×3, padding of 0, and stride of 1;

[0025] (2) Set the pooling layer with a kernel size of 2×2 and a stride of 2;

[0026] (3) Set up a nearest neighbor interpolation layer of twice the size;

[0027] (4) Set the convolutional layer with a kernel size of 1×1;

[0028] (5) Input the data output generated in Step 2 above into the U-Net model and downsample each image in the training set four times.

[0029] (6) Input the training set of the dataset obtained in Step 2 above into the U-Net model, perform upsampling four times on each image in the training set of the dataset, and combine the downsampled image obtained in Step (5) above to stitch together the outputs of the same size in the corresponding layer.

[0030] (7) Perform a 1×1 convolution operation on the upsampled image processed by step (6) above, and use the activation function to obtain the final recognition image of each image in the training set of the dataset.

[0031] (8) Use the difference between the final recognition image obtained in step (7) above and the real value of its corresponding image as the loss, and further update the U-Net model based on the loss to achieve training of the U-Net model.

[0032] (9) It is understood that in Step 3 above, the training of the U-Net model can be iterated multiple times to make the U-Net model achieve ideal performance. The more iterations, the more ideal the performance that the U-Net model can achieve, but this will also lead to an increase in cost. The learning rate and the specific number of iterations during training can be set by those skilled in the art according to the actual situation.

[0033] a. In step (5) above, each of the four downsampling operations first undergoes two 3×3 convolutions, and after each convolution, an activation function is used for activation, followed by a 2×2 pooling operation.

[0034] b. In step (6) above, each of the four upsampling operations is performed by two 3×3 convolutions, and an activation function is used after each convolution. Each operation is performed by a 2x nearest neighbor interpolation operation.

[0035] c. It is understood that the activation function used in steps (5) and (6) above can be any applicable existing activation function, such as the ReLU activation function.

[0036] d. It is understood that the activation function used in step (7) above can be any applicable existing activation function, such as the softmax activation function.

[0037] It is understandable that Step 4 above may include the following steps:

[0038] 1) Perform color and geometric transformations on the sample images, such as rotating the sample data clockwise by 90°, 180°, and 270°, to obtain a new augmented classification building dataset.

[0039] It is understandable that in Step 5 above, after training the U-Net model with the enhanced classified building dataset to obtain the fine-tuned building extraction model, prediction is performed using the prediction images. The learning rate and number of iterations during fine-tuning training can be set by those skilled in the art according to the actual situation.

[0040] It is understandable that in Step 6 above, the processing method uses the U-Net model to segment and extract the buildings in Case Area 3. This processing method is particularly effective when processing complex building images.

[0041] In one specific embodiment of the present invention, to verify the accuracy of the recognition results, the recognition results are evaluated using F1-score, OA, IoU, and Missed Detection Rate (MDR). The formulas for the evaluation metrics are as follows:

[0042]

[0043]

[0044]

[0045]

[0046] Wherein, TP represents a correct prediction result; FP represents a prediction result of a building, but the actual result is not a building; FN represents a prediction result of not a building, but the actual result is a building; and TN represents a prediction result of not a building.

[0047] The beneficial effects of this invention: Compared with the prior art, this invention has the following characteristics:

[0048] (1) This method is based on classified building datasets in different scenarios, including building samples with uneven spatial distribution density, irregular and scattered distribution, diverse styles and roof types. The U-Net model is trained using classified building samples. The U-Net model trained by classification can accurately segment buildings with clear outline edges after segmentation, and buildings can be extracted individually, effectively improving the segmentation accuracy of complex buildings.

[0049] (2) The present invention classifies and labels buildings, uses the U-Net model to classify and train them, and extracts buildings by classifying them. When the training samples are limited, the samples are augmented to effectively identify the target buildings.

[0050] (3) This invention combines the advantages of low cost and high spatial resolution of UAV images to make up for the difficulty of acquiring satellite images and solve the problem of acquiring a large number of high-quality samples, making the extraction of complex buildings more accurate.

[0051] (4) This invention fully leverages the advantages of the U-Net model, which requires fewer samples and can learn image features more deeply. By using convolution and deconvolution and feature fusion, it avoids the difficulty of information loss and greatly improves the image recognition rate.

[0052] (5) In view of the problems of complex buildings, many types and uneven distribution density, this invention classifies and labels buildings and trains them using the U-Net model, which effectively improves the extraction effect of complex buildings in complex areas. Attached Figure Description

[0053] Figure 1 This is a flowchart illustrating the training method provided by the present invention;

[0054] Figure 2 These are different building types in different case areas of this invention;

[0055] Figure 3 These are sample images and corresponding labeled sample diagrams of the four types of building segments according to the present invention. In the diagram: B S For prefabricated steel houses, B T B is a brick and tile house. W It's a single-story house - there's water on the roof, B N It is a single-story house with no water on the roof;

[0056] Figure 4 This is a diagram of the U-Net model of the present invention;

[0057] Figure 5 The images, samples, and prediction results of different building types and scenes are shown in the figure. In the figure, black patches represent different types of buildings extracted, and white represents the proposed background values.

[0058] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Detailed Implementation

[0059] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent.

[0060] Example: A method for classifying and extracting complex buildings based on the U-Net model, comprising the following steps:

[0061] Step 1. Acquire drone imagery data;

[0062] Step 2. Create the dataset. Use annotation software to annotate the buildings in the images from Step 1 above, obtain the corresponding building label samples, segment the images and labels, and finally form the dataset;

[0063] Step 3. Use the dataset obtained in Step 2 above to train the U-Net model and extract the building model;

[0064] Step 4. Augment the dataset. A large number of samples are obtained through data augmentation, each sample including the processed image and its corresponding building sample label, thus acquiring the augmented dataset.

[0065] Step 5. Use the augmented dataset created in Step 4 above to fine-tune the U-Net model trained in Step 3 above, and obtain the adjusted building extraction model;

[0066] Step 6. Model Testing. Input the test image into the building extraction model adjusted in Step 5 above to obtain a binary image of the building. Then, compare the binary image with the building in the image and use evaluation indicators to analyze the prediction results.

[0067] In this embodiment, Step 1 includes the following steps: 1) Using a multi-rotor visible light drone as the drone platform, equipped with a 24mm low-distortion wide-angle camera, a high-precision image stabilization gimbal, and a 1-inch CMOS image sensor. Based on the actual environment of Case Area 3, the drone's flight path is planned, with the heading and lateral overlap set to 80% and 80% respectively, to obtain high-resolution drone aerial photographs; 2) The photos taken by the drone are processed using intelligent photogrammetry software for initialization, feature point matching, image stitching, correction (deformation, distortion, blurring, and noise caused by drone shaking), image enhancement, color balancing, cropping, and reconstruction, generating a digital orthophoto map with red, green, and blue bands.

[0068] Here, the images acquired in Step 1 are drone images of buildings in rural settlements. Figure 2 This is a distribution map of different buildings in different case areas.

[0069] In this embodiment, Step 2 includes the following steps: 1) Selecting UAV remote sensing imagery as sample data and using software to manually visually label the buildings in the imagery; 2) Dividing the original images and labels of different scales into samples of the same target size (512 pixels × 512 pixels), where 255 in the label represents background and 0 represents buildings. The buildings are categorized and labeled, including prefabricated steel buildings (B...). S ), brick and tile house (B T ), bungalow - water on the roof (B) W )Singapore bungalow - roof without water (B) N Four types of buildings were identified, and labeled samples of these four types were generated. All samples of the four types of buildings were then divided into training set, validation set and test set according to the proportions. Figure 3 Sample images and corresponding labeled sample maps segmented for four types of buildings.

[0070] In this embodiment, Step 3 above includes the following steps: 1) The compression path consists of 4 modules. Each module uses 3 effective convolutions and 1 max pooling downsampling. After each downsampling, the number of feature maps is multiplied by 2, so the size of the feature map changes, and finally the feature map is obtained; 2) The expansion path consists of 4 modules. Before each module starts, the size of the feature map is multiplied by 2 by deconvolution, and its number is halved. Then it is merged with the feature map of the left symmetrical compression path. Since the feature map sizes of the left compression path and the right expansion path are different, U-Net normalizes the feature map of the compression path by cropping it to the same size as the feature map of the expansion path. The convolution operation of the expansion path still uses effective convolution operation, and finally the result map with the same size as the original image is obtained.

[0071] (1) Set the convolutional layer with a kernel size of 3×3, padding of 0, and stride of 1;

[0072] (2) Set the pooling layer with a kernel size of 2×2 and a stride of 2;

[0073] (3) Set up a nearest neighbor interpolation layer of twice the size;

[0074] (4) Set the convolutional layer with a kernel size of 1×1;

[0075] (5) Input the data output generated in Step 2 above into the U-Net model and downsample each image in the training set four times.

[0076] (6) Input the training set of the dataset obtained in Step 2 above into the U-Net model, perform upsampling four times on each image in the training set of the dataset, and combine the downsampled image obtained in Step 5 above to stitch together the outputs of the same size in the corresponding layer.

[0077] (7) Perform a 1×1 convolution operation on the upsampled image processed in step 6) above, and use the softmax activation function to obtain the final recognition image of each image in the training set of the dataset.

[0078] (8) Using the difference between the final recognition image obtained in step 7) above and the real value of its corresponding image as the loss, the U-Net model is further updated based on the loss to achieve training of the U-Net model.

[0079] (9) In Step 3 above, in order to make the U-Net model achieve ideal performance, the learning rate during training is set to 0.0001 and the number of iterations is 50. According to practical experience, the loss value is basically stable after 20 generations.

[0080] a. In step 5) above, each of the four downsampling operations first undergoes two 3×3 convolutions, with an activation function used after each convolution, and then a 2×2 pooling operation.

[0081] b. In step 6) above, each of the four upsampling operations undergoes two 3×3 convolutions, with activation functions used after each convolution, and each operation undergoes twice the nearest neighbor interpolation operation.

[0082] In this embodiment, Step 4 above includes the following steps: 1) Performing geometric transformations on the four types of building sample images, including rotating the sample data clockwise by 90°, 180°, and 270°, normalizing the data to obtain new sample data, and finally obtaining a new augmented dataset.

[0083] In this embodiment, Step 5 includes the following steps: after training the U-Net model with augmented data to obtain a fine-tuned building extraction model, prediction is performed using the predicted image. The learning rate and number of iterations during fine-tuning training are 0.00001 and 50, respectively, and the U-Net model undergoes fine-tuning training. Figure 4 The U-Net model diagram is shown.

[0084] In this embodiment, in step 6 above, the processing method uses the U-Net model to segment and extract the buildings in case area 3. The above processing method is particularly effective when processing images of rural settlement buildings in case area 3.

[0085] In one specific embodiment of the present invention, to verify the accuracy of the recognition results, the recognition results are evaluated and judged using F1-score, OA, IoU, and Missed Detection Rate (MDR). The formulas for the evaluation metrics are as follows:

[0086]

[0087]

[0088]

[0089]

[0090] Wherein, TP represents a correct prediction result; FP represents a prediction result of a building, but the actual result is not a building; FN represents a prediction result of not a building, but the actual result is a building; and TN represents a prediction result of not a building.

[0091] Table 1. Accuracy Analysis of Extraction Results for Different Buildings

[0092]

[0093] Table 1 shows that: (1) Analysis of recognition results for the same building in different scenes. Regardless of F1-score, MDR, OA and IoU, the recognition results of case area 2BS are the highest. The F1-score is as high as 95.45%, which is 11.32%, 5.78% and 3.39% higher than case areas 1, 3 and 4, respectively; the MDR is as low as 2.29%, which is 20.74%, 13.47% and 13.87% lower than case areas 1, 3 and 4, respectively; the OA is 99.99%, which is 0.31%, 0.06% and 1.59% higher than case areas 1, 3 and 4, respectively; the IoU is 99.55%, which is 13.43%, 15.21% and 8.50% higher than case areas 1, 3 and 4, respectively. Analysis revealed that among the four verification areas, Case Area 2 had the fewest buildings, which were more dispersed, and the buildings in the verification area were less different from the sample buildings, thus achieving the best recognition result. Although Case Area 1 used the same image as the sample, the buildings in the verification area were densely distributed and had complex building types, resulting in a relatively poor recognition result.

[0094] (2) Analysis of recognition results for different buildings in the same terrain type scene. For B in the verification area of ​​Case Area 1. S B T B W and B N Analysis of the identification results revealed that, among them, Ping B WThe highest F1-score and IoU were achieved at 85.76% and 87.16% respectively, while the lowest MDR was 17.92%; the worst recognition result was achieved by B. N The F1-score, OA, IoU, and MDR were 70.37%, 97.35%, 65.17%, and 30.12%, respectively. This indicates that higher building reflectivity does not necessarily equate to higher recognition accuracy.

[0095] (3) Analysis of recognition results for different buildings and scenes. For Case Area 1, Case Area 2, Case Area 3, and Case Area 4, the highest and lowest F1-scores appeared in different scenes and building types. Case Area 2B S The highest F1 score was 95.45%, Case 1B N The lowest F1-score was 70.37%; the overall recognition accuracy F1-scores ranged from 70.37% to 85.76%, 82.13% to 95.45%, 82.99% to 94.99%, and 75.41% to 91.06%, respectively. Case area 4 had the largest difference at 15.65%, while case area 3 had the smallest difference at 12.00%. From the MDR analysis, overall, case areas 1 and 4 had higher MDRs, indicating more missed detections, while case areas 2 and 3 had relatively fewer missed detections. In terms of building classification, case area 2B had the lowest MDR. T The recognition accuracy was 2.29%, with the highest being B in case area 1. W The accuracy rate was 30.12%. Overall, the recognition accuracy was high, with the highest accuracy reaching 99.99% and the lowest being 97.35%. From the IoU analysis, among different building types, B... S and B T The lowest IoU calculation result reached 84.34%, indicating that the U-Net model can be well applied to B... S and B T The extraction, and for B in case region 1 N And Case 4, B W The calculation accuracy is relatively low, at 65.17% and 67.91% respectively, and is greatly affected by the terrain.

[0096] Analysis of the recognition results for the four scenes shows that ( Figure 5The U-Net model can identify most buildings, but it misses some small buildings. Case areas 2 and 3 show good results; except for some buildings being covered by tall trees, causing inconsistencies between the identified results and actual building boundaries, most buildings are extracted relatively completely and have a high degree of agreement with actual boundaries. Case area 4 shows relatively good building extraction results, mostly consisting of detached houses, with relatively complete building extraction, but the boundary agreement is not as high as the former, with significant serrations on the boundaries. This is mainly due to the influence of the image; although the image spatial resolution is high, data acquisition issues result in an uneven white edge on the building boundaries. Case area 1 has the worst results; most buildings are extracted, but some are incomplete, with some buildings only half-extracted. Due to the dense distribution of buildings and the overly complex characteristics of building types, the U-Net model cannot learn the feature information in the buildings well, resulting in poor final identification results.

[0097] Analysis of the identification results of four types of buildings ( Figure 5 ), B N The identification results show severe spots and numerous holes. There are fewer complete buildings compared to the other three types of buildings, and the boundaries of the identification results do not match the actual objects well, with many false positives. (B) T The recognition results are the same as those of B. N In comparison, the spot-hole pattern has fewer holes, but there is still a discrepancy between the identification results and the actual building boundaries; B S and B W The recognition results are the best, with very few spots and holes appearing. The boundaries of the recognition results match the actual buildings very well, and there are very few incorrect questions.

[0098] The above description of the embodiments is merely to facilitate understanding and application of the present invention by those skilled in the art. Those skilled in the art can make various modifications to the above embodiments and apply the general principles described herein to other embodiments without creative effort. Therefore, the present invention is not limited to the above embodiments, and any improvements and modifications made to the present invention by researchers based on the description should be within the scope of protection of the present invention.

Claims

1. A method for classifying and extracting complex buildings based on the U-Net model, characterized in that, Includes the following steps: Step 1. Acquire drone imagery data; Step 2. Create a dataset: Use annotation software to classify and annotate the buildings in the images from Step 1 above, obtain building label samples corresponding to the images, and cut the images and labels to obtain various building sample datasets; Step 3. Use the dataset obtained in Step 2 above to train the U-Net model and obtain the building classification and extraction model; Step 4. Augment the dataset: A large number of classified building samples are obtained through data augmentation. Each sample includes the processed image and its corresponding building sample label, thus obtaining the augmented classified building dataset. Step 5. Use the enhanced classified building dataset created in Step 4 above to fine-tune the U-Net model trained in Step 3 above, and obtain the adjusted building extraction model. Step 6. Model Testing: Input the test image into the building extraction model adjusted in Step 5 above to obtain a binary image of the building. Then, compare the binary image with the building in the image and use evaluation indicators to analyze the prediction results.

2. The method for classifying and extracting complex buildings based on the U-Net model according to claim 1, characterized in that, Step 1 includes the following steps: 1) Use a drone platform equipped with a visible light sensor to acquire drone remote sensing images; 2) Data Prediction Processing: The acquired UAV aerial images are imported into intelligent photogrammetry software for image preprocessing, including initialization processing, feature point matching, image stitching, correction, image enhancement, color balancing, cropping, reconstruction processing and image stitching, to obtain digital orthophotos with three bands: red, green and blue.

3. The method for classifying and extracting complex buildings based on the U-Net model according to claim 1, characterized in that, In Step 2, buildings are classified and labeled. UAV remote sensing images are used as sample data. Labeling software is used to manually visually classify and label the buildings in the images. The original images and labels of different scales are divided into samples of the same target size. In the label, 255 represents the background and 0 represents the building. All samples are divided into training set, validation set and test set according to the proportion, and finally the dataset is completed.

4. The method for classifying and extracting complex buildings based on the U-Net model according to claim 1, characterized in that, Step 3, model training, includes two parts: a compression path and an expansion path. The compression path consists of four modules, each using three effective convolutions and one max-pooling downsampling. After each downsampling, the number of feature maps is multiplied by two, thus changing the feature map size and resulting in a smaller final feature map. The expansion path also consists of four modules. Before each module begins, the feature map size is multiplied by two using deconvolution, and its number is halved. Then, it is merged with the feature map from the symmetrical compression path on the left. Since the feature maps on the left compression path and the right expansion path have different sizes, U-Net normalizes them by cropping the feature map from the compression path to the same size as the feature map from the expansion path. The convolution operations in the expansion path still use effective convolution operations, ultimately obtaining a building classification result of the same size as the input image. Because it is a binary classification task, the network has two output feature maps, including the following steps: 1) Set the convolutional layer to a kernel size of 3×3, padding of 0, and stride of 1; 2) Set a pooling layer with a kernel size of 2×2 and a stride of 2; 3) Set the nearest neighbor interpolation layer to twice its normal value; 4) Set the convolutional layer to a kernel size of 1×1; 5) Input the data output generated in Step 2 above into the U-Net model and downsample each image in the training set of the dataset four times; 6) Input the training set of the dataset obtained in Step 2 above into the U-Net model, perform upsampling four times on each image in the training set of the dataset, and combine the downsampled image obtained in Step 5 above to stitch together the outputs of the same size in the corresponding layer. 7) Perform a 1×1 convolution operation on the upsampled image processed in step 6) above, and use the activation function to obtain the final recognition image of each image in the training set of the dataset; 8) Use the difference between the final recognition image obtained in step 7) and the real value of its corresponding image as the loss, and further update the U-Net model based on the loss to achieve training of the U-Net model.

5. The method for classifying and extracting complex buildings based on the U-Net model according to claim 4, characterized in that, In step 5), each of the four downsampling operations first undergoes two 3×3 convolutions, with an activation function applied after each convolution, followed by a 2×2 pooling operation; in step 6), each of the four upsampling operations undergoes two 3×3 convolutions, with an activation function applied after each convolution, followed by a double nearest neighbor interpolation operation.

6. The method for classifying and extracting complex buildings based on the U-Net model according to claim 1, characterized in that, In Step 4, data augmentation of the samples involves performing geometric transformations (including rotation), color transformations, and normalization on the sample images to obtain new images, thereby increasing the number of training samples and acquiring an augmented dataset.

7. The method for classifying and extracting complex buildings based on the U-Net model according to claim 1, characterized in that, In Step 5, after training the U-Net model with augmented data to obtain the fine-tuned building extraction model, prediction is performed using the predicted images.

8. The method for classifying and extracting complex buildings based on the U-Net model according to claim 1, characterized in that, In Step 6, the identification results are evaluated using F1-score, OA, IoU, and false negative rate. The formulas for the evaluation metrics are as follows: in, TP This indicates a correct prediction result; FP This indicates that the predicted result is a building, but the actual building is not. FN This indicates that the predicted structure was not a building, but it actually is; TN This indicates that the prediction result is for a non-building.