A rural building extraction method, device, medium and equipment

By calculating the normalized vegetation index and the building land index to determine village boundaries, and combining the U-Net neural network for semantic segmentation and classification post-processing, the problem of insufficient accuracy in rural building extraction is solved, and high-precision rural building extraction is achieved.

CN121438116BActive Publication Date: 2026-05-01JIANGXI AGRICULTURAL UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGXI AGRICULTURAL UNIVERSITY
Filing Date
2025-12-31
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies for extracting rural buildings lack sufficient accuracy, making it difficult to meet the requirements of village planning, especially due to severe interference from features such as roads and trees.

Method used

Village boundaries are determined by calculating the normalized vegetation index and the building land index. Building image data is cropped, and semantic segmentation is performed using the U-Net neural network. Combined with post-processing of classified images, vector regions larger than a preset area threshold are extracted to achieve refined extraction of rural buildings.

Benefits of technology

It effectively improves the accuracy of rural building extraction, reduces data volume and interference from non-construction land, solves the problem of fragmented patches or isolated areas in classified images, and meets the requirements for automated and refined extraction of rural buildings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121438116B_ABST
    Figure CN121438116B_ABST
Patent Text Reader

Abstract

The application discloses a rural building extraction method, device, medium and equipment, and relates to the technical field of land information. The method comprises the following steps: acquiring building image data, extracting multiple wave bands, calculating a normalized vegetation index and a building land index, determining a village boundary, and then cutting to obtain rural building image data. The data is input into an improved UNet neural network model for prediction, and a classification image in a raster format is output. The classification image is subjected to main filtering processing, and is replaced by more than half of the same adjacent pixels to obtain a smooth classification image. The filtered raster image is converted into vector polygon data, an area greater than a preset threshold is extracted and regularized, and rural building extraction information is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

A method, apparatus, medium and equipment for extracting rural buildings Technical Field

[0001] This application relates to the field of land information technology, and in particular to a method, apparatus, medium and equipment for extracting rural buildings. Background Technology

[0002] Villages, as a product of human development, are settlements formed by the concentrated residence of rural populations. The "hollowing out" of rural areas accompanying urbanization has become a hot topic in rural governance. Identifying and extracting village boundaries and buildings within villages is the data foundation for village planning and optimizing the allocation of rural land resources. Methods for extracting villages and buildings using remote sensing imagery include visual interpretation, semi-automatic extraction, and automatic extraction. Visual interpretation is the most widely used and mature extraction method to date, but it requires a high level of experience and knowledge from interpreters, is highly subjective, and involves a large workload, thus it is gradually being replaced. Semi-automatic extraction methods can assist visual interpretation to some extent and improve efficiency, but are limited by the low spatial resolution of the images and the scattered distribution of rural buildings, making information extraction somewhat difficult. Automatic extraction is mostly based on the low-level features of remote sensing images, such as spectral features, texture features, and geometric features, and with the development of artificial intelligence, it has become a current research hotspot.

[0003] Current research focuses primarily on the extraction of urban buildings, with very little attention paid to the extraction of rural building information. Due to the diverse types and styles of rural houses, which are easily affected by road, tree and other features, the extraction of rural buildings is more complex, resulting in insufficient extraction accuracy and making it difficult to support the requirements of village planning.

[0004] Therefore, there is an urgent need for a method to extract rural buildings in order to effectively improve the accuracy of rural building extraction. Summary of the Invention

[0005] Therefore, it is necessary to provide a method for extracting rural buildings to effectively improve the extraction accuracy of rural buildings, addressing the aforementioned technical problems.

[0006] The following technical solution is adopted in this specification:

[0007] This manual provides a method for extracting rural buildings, including:

[0008] Acquire building image data;

[0009] Thirteen bands of information are extracted from building image data; the normalized vegetation index and building land index are calculated based on the band information; village boundaries are determined based on the normalized vegetation index and building land index; and the building image data is cropped based on the village boundaries to obtain rural building image data.

[0010] Rural building image data is input into a trained UNet neural network prediction model for semantic segmentation, and the output is a rural building classification image; the rural building classification image is raster data.

[0011] For each pixel in the classified image, if more than half of the four adjacent pixels of the pixel have the same category, and the category of the pixel is different from the category of more than half of the adjacent pixels, then the category of the pixel is replaced with the category of more than half of the adjacent pixels to obtain the filtered classified image; the filtered classified image in each raster is converted into polygon vector surface data.

[0012] The vector regions larger than a preset area threshold are extracted from the polygonal vector surface data and regularized into closed right-angled polygon regions to obtain the rural building image extraction results.

[0013] Preferably, acquiring building image data specifically includes:

[0014] Acquire initial building image data;

[0015] The initial building image data is moved and rotated to obtain the enhanced initial building image data.

[0016] The initial building image data after sample enhancement is segmented according to a specified format, size, and moving distance to obtain building image data.

[0017] Preferably, the formula for calculating the normalized vegetation index is:

[0018] ;

[0019] In the formula, The normalized vegetation index in building image data. and These are the 8th and 4th bands in the building image data, respectively.

[0020] Preferably, the formula for calculating the building land index is:

[0021] ;

[0022] In the formula, The building land index is the building image data. The building land index is the building image data. , , and These are the 3rd, 4th, 8th, and 11th bands in the building image data, respectively.

[0023] Preferably, village boundaries are determined based on the normalized vegetation index and the building land index, specifically including:

[0024] Based on the normalized vegetation index and the preset range of normalized vegetation index, the building image data is divided into vegetated areas and non-vegetated areas.

[0025] Based on the building land index, extract the building land area from the building image data;

[0026] Based on the built-up area and using the non-vegetated area as a mask, the built-up area is erased and intersected with the non-vegetated area to obtain the village boundary.

[0027] Preferably, the UNet neural network prediction model includes: an encoding layer, a decoding layer, and an output layer;

[0028] In the coding layer, multiple convolution and max pooling operations are performed on the rural building images to extract multi-scale feature maps of rural buildings.

[0029] In the decoding layer, the multi-scale feature map of the rural buildings is subjected to multiple deconvolution, cropping and stitching operations in a skip link manner to obtain the rural building feature map.

[0030] In the output layer, a convolution operation is performed on the decoded feature map to obtain the rural building classification image.

[0031] This specification provides a rural building extraction device, characterized in that it includes:

[0032] The data acquisition module is used to acquire building image data;

[0033] The data processing module is used to extract multiple bands from building image data; calculate the normalized vegetation index and building land index based on the multiple bands in the building image data; determine village boundaries based on the normalized vegetation index and building land index; and crop the building image data based on the village boundaries to obtain rural building image data.

[0034] The rural building extraction module is used to input rural building image data into a trained UNet neural network prediction model for semantic segmentation and output rural building classification images.

[0035] The post-classification processing module is used to, for each pixel in the classified image, replace the category of the pixel with the category of the more than half of its four adjacent pixels if the category of the pixel is different from that of the more than half of its adjacent pixels, thus obtaining a filtered classified image; convert the filtered classified image in each raster into polygon vector surface data; extract vector regions larger than a preset area threshold from the polygon vector surface data and regularize them into closed right-angled polygon regions to obtain the rural building image extraction result.

[0036] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method for extracting rural buildings.

[0037] This specification provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described method for extracting rural buildings.

[0038] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0039] In summary, this manual calculates the Normalized Difference Vegetation Index (NDVI) and Building Land Index (BDI), and uses these indices to determine village boundaries and crop building image data to obtain rural building image data. This effectively reduces data volume and interference from non-construction land, achieving the first extraction of building image data by removing interference from other land types, thus significantly improving data quality. Based on this, the U-Net prediction model is used to extract classified images of rural buildings. For each pixel in the classified image, half of its four adjacent pixels are identical and adjacent, transforming the filtered classified image in each raster into polygon vector surface data. Vector regions larger than a preset area threshold are extracted and regularized, achieving fragmentation processing and raster-to-vector conversion of the classified image output by the U-Net network. This solves the problem of fragmented patches or isolated areas in the classified image data, achieving the second extraction of rural building image data. This two-step extraction method further effectively improves the accuracy of rural building extraction, meeting the requirements for automated and refined extraction of rural buildings. Attached Figure Description

[0040] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0041] Figure 1 is a flowchart illustrating a method for extracting rural buildings provided in this specification;

[0042] Figure 2 is an architecture diagram of an improved U-Net network prediction model for a rural building extraction method provided in this specification;

[0043] Figure 3 is a graph showing the change in training accuracy of the U-Net semantic segmentation model for a rural building extraction method provided in this specification as a function of the training period;

[0044] Figure 4 is a schematic diagram of the optimal learning rate for a rural building extraction method provided in this specification.

[0045] Figure 5 is a partial comparison of regular dense houses in a rural building extraction method provided in this specification;

[0046] Figure 6 is a partial comparison of irregular sparse houses in a rural building extraction method provided in this specification.

[0047] Figure 7 is a schematic diagram of a rural building extraction device provided in this specification;

[0048] Figure 8 is a schematic diagram of the computer equipment used to implement a method for extracting rural buildings, as provided in this specification. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in this specification without creative effort are within the scope of protection of this application.

[0050] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0051] Figure 1 is a schematic diagram of a method for extracting rural buildings in this specification, which specifically includes the following steps:

[0052] S101: Acquire building image data.

[0053] Optionally, acquiring building image data specifically includes: acquiring initial building image data; moving and rotating the initial building image data to obtain sample-enhanced initial building image data; and segmenting the sample-enhanced initial building image data according to a specified format, specified size, and specified moving distance to obtain building image data.

[0054] Specifically, this embodiment uses a township in a certain province as the test area, with a total area of ​​171.9 km². 2 It belongs to the lakeside hilly area, with a terrain that is mostly mountainous in the east, interspersed with hills and fields in the central part, and crisscrossed by waterways in the west.

[0055] Specifically, the architectural imagery data includes: Digital Orthophoto Imagery (DOM) and Sentinel-2 satellite data. The DOM data is based on the 2000 National Geodetic Coordinate System, with a spatial resolution of 0.2 meters, and contains three RGB bands. It has undergone preprocessing including aerial triangulation, image matching, digital differential correction, and homogenization. The Sentinel-2 satellite contains 13 spectral bands with different spatial resolutions, including four 10-meter resolution visible light bands, six 20-meter resolution near-infrared bands, and three 60-meter resolution shortwave infrared bands. Based on the DOM timeline, this manual uses Sentinel-2A satellite data from October 4, 2018, selecting Level-1C multispectral data, and post-processing it to Level-2A data through atmospheric correction using the Sen2cor model plugin.

[0056] Specifically, due to the need for a large amount of sample data during the training process, this manual uses the LabelObjects of Deep Learning tool in ArcGIS Pro 2.5 to create rural building samples, constructing a database of house outline samples through manual drawing. Based on the distribution characteristics, density, and sample diversity requirements of houses in the experimental area, the samples are divided into four types: regular dense, irregular dense, regular sparse, and irregular sparse, resulting in a total of 3420 house samples distributed across nine administrative villages, including Putang Village, Paimen Village, Qingshui Village, and Qijiao Village. Building upon this, data augmentation is further employed to expand the training dataset, improving its size and quality. Jupyter Notebook is used to augment the rural building sample data by adjusting parameters such as image segmentation format, segmentation image size, and segmentation movement distance. This includes methods such as movement and rotation. During image segmentation, the vertical movement distance is set to 128, the rotation angle to 90 degrees, and the segmentation size to 256×256 for data reading and training. The Classified Tiles annotation format was selected to construct the training sample dataset, which consists of 3699 3-band image tiles with a scale of 256×256. 80% of the sample data was used for training, and 20% of the samples were used for validation.

[0057] S102: Extract 13 bands from the building image data; calculate the normalized vegetation index and building land index based on the multiple bands in the building image data; determine the village boundaries based on the normalized vegetation index and building land index; and crop the building image data according to the village boundaries to obtain rural building image data.

[0058] Optionally, village boundaries are determined based on the normalized vegetation index (NVI) and the building land index. Specifically, this includes: dividing building image data into vegetated and non-vegetated areas based on the NVI and a preset NVI range; extracting building land areas from the building image data based on the building land index; and using the building land areas as a base, and using the non-vegetated areas as a mask, removing interfering land types in the building land areas to obtain village boundaries.

[0059] Optionally, the formula for calculating the normalized vegetation index is:

[0060] ;

[0061] In the formula, The normalized vegetation index in building image data. and They are respectively and These are the 8th and 4th bands in the building image data, respectively.

[0062] Alternatively, the formula for calculating the building land index is:

[0063]

[0064] In the formula, The building land index is the building image data.

[0065] Specifically, the village land use boundaries were extracted by comprehensively applying the Normalized Difference Vegetation Index (NDVI) and the Integral Building Index (IBI) based on Sentinel-2A imagery. NDVI is commonly used to detect vegetation growth and coverage, primarily enhancing and highlighting vegetated areas; IBI is used to extract built-up land. Sentinel-2A imagery contains 13 bands of information.

[0066] Specifically, based on the Sentinel-2A data calculated using wavebands, the NDVI index was divided into two categories: vegetation and non-vegetation. Areas with thresholds less than 0.042 and greater than 0.4735 were selected as vegetation areas, including various land types such as woodland, grassland, and cultivated land. Areas between 0.042 and 0.4735 were classified as non-vegetation areas, primarily consisting of construction land, but also containing a small amount of other land types. Comparing the construction land extraction results from the IBI index with those from the non-vegetation areas selected by the NDVI index, the IBI index showed better extraction, but contained some woodland, cultivated land, and other interfering land types, some of which fell within the vegetation range selected by the normalized index. Therefore, the non-vegetation areas selected by NDVI were chosen as a mask to further eliminate irrelevant land types and extract village land use areas. Cropping the DOM based on village areas significantly reduced the amount of data and interference from non-construction land, shortening the training time for deep learning models and image classification.

[0067] S103: Input the rural building image data into the trained UNet neural network prediction model for semantic segmentation, and output the rural building classification image; the rural building classification image is raster data.

[0068] Optionally, the rural building image data is input into a trained improved UNet neural network prediction model to output a classified image. Specifically, this includes: performing multiple convolution and max pooling operations on the rural building images to extract multi-scale feature maps of rural buildings; performing multiple deconvolution, cropping, and stitching operations on the multi-scale feature maps of rural buildings in a skip-connection manner to obtain rural building feature maps; and performing a convolution operation on the decoded feature maps to obtain a classified image of rural buildings.

[0069] Specifically, U-Net is a convolutional neural network model with an "encoder-decoder" structure. The encoder is responsible for multi-scale feature extraction from the image, while the decoder is the upsampling part, mainly performing multi-scale feature fusion and output. This structure overcomes the problem of significant feature loss during feature transfer in the encoder. The U-Net network architecture is shown in Figure 2, and includes:

[0070] Feature extraction: This mainly involves performing convolution and max pooling (downsampling) operations on the input image. As shown in the figure, assuming the input image is a 572×572 grayscale image, it undergoes two convolution operations with a kernel size of 3×3, padding of 0, and stride of 1. The height and width of the feature map change with each convolution, resulting in a feature map of size 568×568×64. This feature map is then further processed through multiple convolutions and pooling operations, resulting in a 28×28×1024 feature map, which is then input into the decoder, thus completing the extraction of multi-scale features from the image.

[0071] Upsampling: The decoder restores the original image resolution, mainly using upsampling and skip-connection operations to enlarge and fuse the feature maps. The decoder input feature map size is 28×28×1024, and after deconvolution, the number of channels is reduced to half its original size. Then, it is stitched with the feature maps of the corresponding layers of the encoder. Since the last encoder feature map size is 64×64×512, it needs to be cropped to 56×56×512 before being stitched with the upsampled feature map. After stitching, the feature map size is 56×56×1024. The feature map is then deconvolved with a 3×3 kernel and a stride of 1, reducing the feature map to 54×54 and halving the number of channels. This process is repeated 4 times to obtain a 388×388×64 feature map. Finally, a 1×1×2 convolution operation is performed to obtain the final result.

[0072] Furthermore, this manual incorporates a residual network (ResNet50) into the U-Net semantic model framework to identify and extract rural buildings, thereby improving upon the shortcomings of the original network model. Due to the complex background environment of buildings in high-resolution remote sensing imagery, while the U-Net network excels in binary classification, its training speed is slow. As network depth increases, the loss of some low-dimensional information leads to poor building outline extraction. The residual network overcomes the degradation problem caused by network depth, improving both the training accuracy and speed of the network model.

[0073] Specifically, a residual network (ResNet) is introduced into the U-Net model for model construction. ResNet is a segmentation network proposed in the ILSVRC competition. It is divided into various backbone networks such as ResNet18, ResNet34, ResNet50, and ResNet101, depending on the number of network layers. High-resolution remote sensing images often feature complex building backgrounds. While U-Net performs well in binary classification, its training speed is slow. Furthermore, as network depth increases, the loss of some low-dimensional information leads to poor building contour extraction. Residual networks, through identity mapping connections, improve the training accuracy and speed of the network model, overcoming the degradation problem caused by network depth. Therefore, a residual network module is introduced into the U-Net network for the identification and extraction of rural buildings.

[0074] Specifically, this document describes the network environment configuration for the prediction model. Deep learning includes various mainstream open-source frameworks such as TensorFlow, Keras, PyTorch, and Caffe, most of which provide Python and Matlab interfaces. ArcGISPro 2.5 software provides a Python interface, supporting the construction of deep learning frameworks and the use of deep learning tools, reducing the difficulty of applying deep learning methods in image classification, object extraction, and other fields. This manual is based on the ArcGISPro and Anaconda environment, setting up a GPU version of the PyTorch framework, cloning a read-only Python 3 environment, managing Python packages, configuring the PyTorch deep learning framework, and using Jupyter Notebook to call deep learning tools for the automatic identification and extraction of rural buildings.

[0075] Specifically, the improved UNet neural network prediction model is implemented, with each cycle representing one forward and backward pass of sample data through the neural network. This specification uses the model.accuracy function to obtain the accuracy of the trained model at 20-cycle intervals, compares the changes in training accuracy from 1 to 100 cycles, and determines the optimal number of iterations to be 80. The trend of training accuracy change is shown in Figure 3.

[0076] Specifically, the training batch size represents the number of samples trained at once during model training, and its size is determined by the size and performance of the GPU. Jupyter Notebook uses the TrainDeep Learning Model in the ArcGIS Pro deep learning environment to train the sample dataset, setting the batch size to 2 and the image size to the size of the segmented data, i.e., the segmented image is set to 256.

[0077] Specifically, this manual uses the model.lr_find function in the PyTorch framework to automatically find the optimal learning point and obtain the optimal learning rate. See Figure 4 for a schematic diagram of the optimal learning rate.

[0078] Specifically, Jupyter Notebook uses the "Classify Pixels Using DeepLearning" tool to set various parameters and define the settlement model for predicting the image data of the test area, generating categorized raster data. Each pixel is assigned a corresponding category label of either a residential or non-residential area, enabling the identification and extraction of rural buildings. This paper uses a trained U-Net semantic segmentation network model package, which includes the path to the binary model file and parameters such as padding, batch size, and background prediction. The padding size is set to 56, the batch size is set to 4, and background prediction is performed simultaneously. The model prediction result is a categorized image containing the name, category, and color of the settlement, enabling the automatic identification and extraction of rural buildings, including both building and non-building categories.

[0079] S104: For each pixel in the classified image, if more than half of the four adjacent pixels of the pixel have the same category, and the category of the pixel is different from the category of the more than half of the adjacent pixels, then the category of the pixel is replaced with the category of the more than half of the adjacent pixels to obtain the filtered classified image; the filtered classified image in each grid is converted into polygon vector surface data; the filtered classified image in each grid is converted into polygon vector surface data.

[0080] Specifically, the initial classification results may exhibit issues such as fragmented patches or isolated areas, requiring further processing to meet the needs of building extraction. This process is known as post-classification processing. Common post-classification processing methods include patch removal, raster-to-vector conversion, and changing classification colors. This manual further processes the classification results through various methods and presents a streamlined post-classification processing workflow.

[0081] Specifically, firstly, misclassified pixels are removed to reduce noise in the raster extraction. Corners of rectangular building areas are not preserved. Four adjacent pixels are used to filter the classified data, and pixels that are half identical and adjacent are replaced to achieve a smoother result. Then, the raster result is vectorized into polygons using a raster-to-polygon tool. To avoid jagged edges in the converted polygon data, a format for converting to simple polygon shapes is defined, resulting in smooth vector polygon data that retains as much of the edge information of the original classified pixels as possible. Next, filtering is performed based on the area size of the vectorized polygons to extract areas with a threshold greater than 50 square meters. Finally, the extracted vector regions are regularized by setting parameters. Here, the post-processing parameters are set to a maximum boundary offset distance of 1.5 meters, a sampling interval of 1 second, and a spatial grid precision of 0.25 to extract the building outline.

[0082] S105: Extract vector regions larger than a preset area threshold from polygon vector surface data and regularize them into closed right-angled polygon regions to obtain the rural building image extraction results.

[0083] In addition, this manual compares the extraction performance with that of a support vector machine trainer and a maximum likelihood trainer.

[0084] Specifically, Support Vector Machine (SVM) is a machine learning method based on the VC dimension theory and the principle of minimum structural risk in statistical learning theory. It requires few training samples, so SVM has high classification accuracy in small sample, nonlinear classification and high-dimensional linear classification. The Training Samples Manager tool, included in the Classification Tools section of ArcGIS Pro, was used to select training samples based on the segmented pixels of the image segmentation data. Sample types included buildings and non-buildings. Building samples primarily consisted of rural houses, while non-building samples included woodland, water areas, farmland, and other land types. A total of 500 training samples were selected, with 300 positive building samples and 200 negative non-building samples. A Support Vector Machine (SVM) classifier was then trained. The Maximum Number of Samples Per Class parameter, set based on the number of positive and negative samples, was chosen as the minimum of the two values ​​(200 in this paper) to ensure proper tool operation. The SVM classifier training results were then used to perform supervised classification of the segmented image data, resulting in two categories: buildings and non-buildings, thus completing the extraction of rural buildings.

[0085] Maximum likelihood classification is a commonly used supervised classification method based on statistical analysis. In two or more classifications, parameters for different categories in the region of interest are statistically analyzed. A discriminant function is constructed based on the Bayesian discriminant criterion to calculate the category of each pixel in the region to be classified, thus achieving the classification effect. This method has the same process as the SVM extraction method: sample selection—classifier training—classification extraction. Based on the same remote sensing image data, to compare and analyze the extraction effects of different supervised classification trainers, a unified training sample is used to train the maximum likelihood classifier. The parameter settings are consistent with the support vector machine trainer, and the DOM data is used to classify buildings and non-buildings.

[0086] Accuracy evaluation verifies the effectiveness of ground feature extraction, and its magnitude directly reflects the accuracy and error of ground feature classification. This embodiment selects the confusion matrix evaluation method, listing the classification results in a confusion matrix and comparing them with real ground feature information to obtain classification accuracy. Using manually drawn rural buildings in the experimental area as validation data, the performance of the three extraction methods is measured by calculating producer accuracy, user accuracy, overall accuracy, and the Kappa coefficient through the confusion matrix. The Kappa coefficient is commonly used to measure classification accuracy, typically with values ​​between 0 and 1, and can be divided into five different levels of consistency: 0.0–0.20, 0.21–0.40, 0.41–0.60, 0.61–0.80, and 0.81–1, representing extremely low, moderate, medium, and highly almost perfect consistency, respectively.

[0087] According to the confusion matrix calculation, U-Net has the highest overall accuracy at 97.19%, while Support Vector Machine (SVM) and Maximum Likelihood (MRL) achieve 85.05% and 87.87%, respectively. The overall classification accuracy only considers pixel values ​​correctly classified as buildings or non-buildings on the diagonal of the confusion matrix, while the Kappa coefficient comprehensively considers the cases of missed or misclassified building and non-building categories outside the diagonal. The Kappa coefficients of SVM, MRL, and U-Net, arranged in ascending order, are 0.64, 0.72, and 0.93, respectively. In terms of producer and user accuracy for rural buildings, the U-Net network achieved the highest extraction accuracy with the fewest misclassifications and omissions, with a misclassification error of 3.48% and an omission error of 6.59%. Support Vector Machines and Maximum Likelihood methods exhibited relatively more misclassifications and omissions, with Maximum Likelihood showing a clear advantage. Their misclassification errors were 28.35% and 26.25%, respectively, while their omission errors were 22.19% and 11.48%, respectively. Overall, the method based on the U-Net network model for extracting buildings significantly outperformed the other two classification methods.

[0088] Table 1. Confusion Matrix Results

[0089]

[0090] Specifically, a comparison of extraction results based on overlay analysis was also conducted: The extraction results of rural buildings were overlaid with the images. The U-Net network performed best, correctly extracting 52,265,989 pixels of buildings, with a total extracted area of ​​209.06 hectares. The results of the three extraction methods are shown in Table 2. The U-Net network performed best in overall building recognition, segmenting into individual buildings with outlines roughly matching those in the images. While it struggled to segment buildings of the same type and with strong connections individually, it performed well in identifying small-scale building areas, excluding cultivated land, forest land, and other features. Furthermore, it was technically easier to implement, requiring no removal of irrelevant land types from the data. A comparison was made between dense and sparse recognition types. Figure 5 shows the local comparison of the regular dense type, and Figure 6 shows the local comparison of the irregular sparse type. Support Vector Machine and Maximum Likelihood correctly extracted 43,534,160 and 49,526,644 building pixels, respectively, with recognized areas of 174.14 hectares and 198.11 hectares, respectively. Support vector machines and maximum likelihood extraction processes are complex. For high-resolution remote sensing imagery, the large data volume, limited software processing capabilities, and limited band information make direct building extraction difficult. Therefore, to reduce the influence of spectral differences between ground features, multi-source data should be used to assist in the extraction process, first removing some irrelevant features. Comparing the extracted results with the image overlay reveals difficulties in distinguishing rural roads from rural buildings, and misclassification of vegetation and unused land near buildings. The extraction accuracy of rural buildings needs further improvement.

[0091] Table 2 Comparison of results from three extraction methods (unit: hectares)

[0092]

[0093] In summary, a comparison of the performance of three extraction methods—Support Vector Machine (SVM), Maximum Likelihood (MRL), and U-Net network model—shows that SVM and MRL methods generally perform poorly, failing to segment individual buildings and resulting in houses in contiguous areas, which is insufficient for the refined extraction requirements of rural buildings in high-resolution imagery. The U-Net network model, however, performs well and generally meets the requirements for automated and refined extraction of rural buildings. Through a two-step classification extraction of multi-source remote sensing data, the deep learning-based U-Net model significantly outperforms traditional classification methods (SVM and MRL). Traditional classification methods often require setting different extraction conditions, making the process complex. The U-Net network-based extraction method is suitable for high-resolution imagery data and only uses Sentinel-2A data for assistance. While the model application requires some programming knowledge, its operation is simple, the learning curve is low, and the overall extraction performance is excellent. With the updates and upgrades of remote sensing platforms, high-resolution image data has gradually become the main data source for Earth observation. The introduction and development of deep learning has made it possible to classify high-resolution image data automatically. By building deep learning frameworks in software such as ENVI, ArcGIS, and QGIS, it is convenient for users to carry out secondary development and application expansion, enriching the ways to realize deep learning in remote sensing intelligent interpretation.

[0094] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0095] The above describes a method for extracting rural buildings based on one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding device for extracting rural buildings based on multi-source remote sensing and U-Net network, as shown in Figure 7.

[0096] Figure 7 is a schematic diagram of a rural building extraction device based on multi-source remote sensing and U-Net network provided in this specification. The device includes:

[0097] Data acquisition module 701 is used to acquire building image data;

[0098] The data processing module 702 is used to extract multiple bands from building image data; calculate the normalized vegetation index and building land index based on the multiple bands in the building image data; determine the village boundary based on the normalized vegetation index and building land index; and crop the building image data based on the village boundary to obtain rural building image data.

[0099] The rural building extraction module 703 is used to input rural building image data into a trained UNet neural network prediction model for semantic segmentation and output rural building classification images.

[0100] The post-classification processing module 704 is used to, for each pixel in the classified image, replace the category of the pixel with the category of the more than half of its four adjacent pixels if the category of the pixel is the same and the category of the pixel is different from the category of the more than half of its adjacent pixels, thus obtaining a filtered classified image; convert the filtered classified image in each raster into polygon vector surface data; extract vector regions larger than a preset area threshold from the polygon vector surface data and regularize them into closed right-angled polygon regions to obtain the rural building image extraction result.

[0101] For specific limitations regarding the rural building extraction device, please refer to the limitations of the rural building extraction method described above, which will not be repeated here. The various modules in the aforementioned rural building extraction device based on multi-source remote sensing and U-Net network can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0102] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the rural building extraction method shown in Figure 1 above.

[0103] This specification also provides a structural diagram of the computer device shown in Figure 8. As shown in Figure 8, at the hardware level, the computer device includes a processor, an internal bus, a network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the rural building extraction method provided in Figure 1.

[0104] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this specification can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

Claims

1. A method for extracting rural buildings, characterized in that, include: Acquire building image data; extract 13 band information from the building image data; Based on the band information, calculate the normalized vegetation index and the built-up land index; The village boundaries are determined based on the Normalized Difference Vegetation Index (NDI) and the Building Land Index (BDI), including: dividing building image data into vegetated and non-vegetated areas according to the NDI and a preset NDI range; extracting the building land area from the building image data based on the BDI; erasing the building land area using the non-vegetated area as a mask, and intersecting it with the non-vegetated area to obtain the village boundaries; cropping the building image data according to the village boundaries to obtain rural building image data; and inputting the rural building image data into a pre-trained UNet neural network for semantic segmentation. The model is tested, and the output is a rural building classification image. The rural building classification image is raster data. For each pixel in the classification image, if more than half of the four adjacent pixels of the pixel have the same category, and the category of the pixel is different from the category of the more than half of the adjacent pixels, then the category of the pixel is replaced with the category of the more than half of the adjacent pixels to obtain a filtered classification image. The filtered classification image in each raster is converted into polygon vector surface data. Vector regions larger than a preset area threshold are extracted from the polygon vector surface data and regularized into closed right-angled polygon regions to obtain the rural building image extraction result.

2. The method for extracting rural buildings as described in claim 1, characterized in that, The acquisition of building image data specifically includes: acquiring initial building image data; moving and rotating the initial building image data to obtain sample-enhanced initial building image data; and segmenting the sample-enhanced initial building image data according to a specified format, specified size, and specified moving distance to obtain building image data.

3. The method for extracting rural buildings as described in claim 1, characterized in that, The formula for calculating the normalized vegetation index is as follows: In the formula, The normalized vegetation index in building image data. and These are the 8th and 4th bands in the building image data, respectively.

4. The method for extracting rural buildings as described in claim 1, characterized in that, The formula for calculating the building land index is as follows: In the formula, The building land index is the building image data. 、 、 and These are the 3rd, 4th, 8th, and 11th bands in the building image data, respectively.

5. The method for extracting rural buildings as described in claim 1, characterized in that, The UNet neural network prediction model includes an encoding layer, a decoding layer, and an output layer. In the encoding layer, multiple convolution and max pooling operations are performed on the rural building images to extract multi-scale feature maps of rural buildings. In the decoding layer, multiple deconvolution, cropping, and stitching operations are performed on the multi-scale feature maps of rural buildings through skip connections to obtain rural building feature maps. In the output layer, a single convolution operation is performed on the decoded feature maps to obtain rural building classification images.

6. A rural building extraction device, characterized in that, include: The data acquisition module is used to acquire building image data; The data processing module is used to extract 13 band information from building image data; Based on the band information, calculate the normalized vegetation index and the built-up land index; The village boundaries are determined based on the Normalized Difference Vegetation Index (NDI) and the Building Land Index (BDI), including: dividing building image data into vegetated and non-vegetated areas based on the NDI and a preset NDI range; extracting the building land area from the building image data based on the BDI; erasing the building land area using the non-vegetated area as a mask, and intersecting it with the non-vegetated area to obtain the village boundaries; cropping the building image data according to the village boundaries to obtain rural building image data; and a rural building extraction module, used to input the rural building image data into a pre-trained semantic segmentation module. The UNet neural network prediction model outputs rural building classification images. A post-classification processing module is used to, for each pixel in the classification image, replace the category of the pixel with the category of the more than half of its four neighboring pixels if the pixel's category is different from the category of the more than half of its neighboring pixels, thus obtaining a filtered classification image. The filtered classification image in each raster is converted into polygon vector surface data. Vector regions larger than a preset area threshold are extracted from the polygon vector surface data and regularized into closed right-angled polygon regions to obtain the rural building image extraction result.

7. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 5.

8. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for quickly vectorizing grid digital image

    CN102881028A

  • Method and system for identifying buildings in natural reserve

    CN114550005A

  • Map image processing method and system

    CN118135418A