A method, device, equipment and medium for extracting residential areas based on satellite images

By constructing a deep learning model to extract the residential contours of satellite images, and perform curve downsampling and right-angling processing, the problem of low and irregular automation of extraction of large-scale residential contours in the prior art is solved, and efficient and accurate residential contours are achieved.

CN119580115BActive Publication Date: 2025-05-13自然资源部第一航测遥感院(陕西省第五测绘工程院)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411655830.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-05-13
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

The prior art is difficult to effectively extract the contours of residential areas in satellite images with large scale, irregular shapes and complex characteristics, resulting in low and irregular automation of the extraction results, with obvious errors and confusion.

Method used

A deep learning-based residential area recognition model is constructed, including an encoder and a decoder, train the model through training samples, extract multi-scale features of the target satellite image, and extract the residential area profile through feature fusion and recognition processes, followed by curve downsampling and right-angulation to optimize the profile.

Benefits of technology

The rapid and accurate extraction and regularization of the contours of residential areas in satellite images are achieved. The extracted contour features are basically consistent with the images, presenting the actual shape of the residential areas, which is conducive to measurement and planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119580115B_ABST
    Figure CN119580115B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and medium for extracting settlements based on satellite images, which belongs to the field of image recognition. The method includes: constructing a settlement recognition model; training the settlement recognition model using satellite image training samples including settlement outline labels; acquiring a target satellite image, inputting the target satellite image into the trained settlement recognition model, and extracting the settlement outline; performing curve downsampling and main direction calculation on the extracted settlement outline, and regularizing the obtained settlement by a right-angle method based on the main direction of the longest side and reconstruction of the feature side. In this way, rapid, accurate and automatic extraction and regularization of settlements are achieved, and the settlement results finally extracted have a contour that is basically consistent with the satellite image, presenting the actual form of the settlement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image recognition, and in particular relates to a method, device, equipment and medium for extracting residential areas based on satellite images. Background Art

[0002] Surface settlements are one of the important elements of geospatial data, and have important applications in land survey and monitoring, basic mapping, land space planning, etc. Extracting settlement elements is also a research hotspot in the fields of photogrammetry, remote sensing, and computer vision. With the development of my country's urbanization process, maps, as basic data, are updated more and more frequently, and the automatic extraction of settlement element boundary rules is a key technical link in map synthesis and updating. The corresponding deep learning method is increasingly becoming an important means and hot research field for extracting objects from remote sensing images.

[0003] At present, the extraction of residential areas is mainly based on visual interpretation. Although the mainstream deep learning algorithm uses deep learning semantic segmentation for individual buildings, it is limited to the extraction of small-scale, regular-shaped, and distinctively characteristic buildings. The boundary regularization extracted based on such methods is mainly based on morphological processing such as expansion and corrosion and regularization processing assisted by key feature points, so as to achieve regular processing of building boundaries. However, the extraction of residential areas is more complicated than the extraction of individual buildings. The existing methods are not suitable for the extraction of large-scale, irregular-shaped, and complex-featured residential areas, resulting in low automation and irregularity in the extraction of residential area boundaries from satellite images. The extraction of residential areas needs to take into account the requirements of comprehensive map-making elements. The texture and spectral characteristics of residential areas on images are not regular and uniform, and will be mixed with some trampled surfaces, vegetation, chickens, dogs, and houses in front of and behind houses, etc., resulting in obvious errors and confusion in the distribution and morphological characteristics of identified residential areas. Summary of the invention

[0004] In order to solve the problem that the distribution and morphological characteristics of the identified settlements have obvious errors and confusion, the present invention provides a method, device, equipment and medium for extracting settlements based on satellite images.

[0005] In order to achieve the above object, the present invention provides the following technical solutions:

[0006] Firstly, a method for extracting residential areas based on satellite images is provided, and the method comprises:

[0007] Constructing a settlement recognition model; the settlement recognition model includes an encoder and a decoder;

[0008] Training the settlement recognition model using satellite image training samples that include settlement outline labels;

[0009] Acquire a target satellite image, input the target satellite image into a trained settlement recognition model, extract multi-scale features of the target satellite image through the encoder, fuse the multi-scale features through the decoder, recognize the fused features, and extract the settlement outline;

[0010] The extracted residential area outline is subjected to curve downsampling processing, and then the residential area outline after curve downsampling processing is squared to obtain the optimized residential area outline.

[0011] Optionally, the encoder is a ConvNeXt_XL model, which includes a stem downsampling layer and four stage stages, each stage includes multiple Block modules, and finally the input and output are connected through a residual structure; the input image is preliminarily downsampled and feature extracted through the stem downsampling layer to obtain initial extracted features of the image, and the initial extracted features are extracted and converted in turn through multiple Block modules to obtain a multi-channel feature map.

[0012] Optionally, the decoder is a UPerNet model, and a feature pyramid network is used as the neck network of UPerNet for multi-scale feature fusion. The feature maps extracted from each stage are respectively adjusted for the number of channels through a mean pooling layer and a 1x1 convolution layer, and the feature maps are gradually upsampled and added to form multi-scale fusion features; and the multi-scale feature maps output by the neck network are processed through a 3x3 convolution layer in the head network of UPerNet, and finally the feature maps are converted into prediction maps through a 1x1 convolution layer.

[0013] Optionally, the satellite image training samples include sample satellite images of a preset size and corresponding settlement outline labels, and the training of the settlement recognition model using the satellite image training samples including the settlement outline labels includes:

[0014] The sample satellite images are input into the settlement recognition model to obtain the predicted settlement outline, and the Lovasz Loss function is constructed to determine the loss value between the settlement outline label and the predicted settlement outline.

[0015] Calculate the gradient of model parameters based on the loss value, and use the Adam optimization algorithm to update the model parameters to minimize the loss function;

[0016] The model is evaluated using multiple indicators, and the training of the settlement recognition model is determined to be complete after each indicator reaches a preset target.

[0017] Optionally, before training the residential area recognition model, satellite image training samples including residential areas are obtained, including:

[0018] Collect satellite images of preset resolution, and select satellite images containing various geographical environments and various forms of settlements as candidate sample satellite images;

[0019] Label the sample images to obtain sample vectors of multiple features;

[0020] Convert the sample vector into a binary raster image;

[0021] The candidate sample satellite images and their corresponding raster images are cropped according to preset sizes to generate a semantic segmentation tile dataset for training the model as training samples.

[0022] Optionally, inputting the target satellite image into a trained settlement recognition model to extract the settlement outline includes:

[0023] Crop the input whole scene or large block of satellite image to a tile image of a preset size, and record the row and column position in the satellite image in the name of the tile image;

[0024] The tile image is input into the trained residential area recognition model for recognition, and the recognition result is saved as a binary image;

[0025] Join the recognition results according to the row and column positions indicated in the name;

[0026] The stitching results are converted into vectors, and the elements with vector values ​​of 0 are deleted to obtain the extracted residential area outlines.

[0027] Optionally, the performing curve downsampling processing on the extracted residential area outline and then performing square processing on the residential area outline after the curve downsampling processing comprises:

[0028] The curve composed of the edge polylines of the residential area contour is downsampled using the Larmer-Douglas-Peucker algorithm;

[0029] For the irregular polygonal outline of the residential contour, the longest side is selected as the main direction, and all the remaining sides are rotated to be parallel or perpendicular to the main direction.

[0030] Secondly, a satellite image-based residential area extraction device is provided, the device comprising:

[0031] A construction module, used to construct a residential area recognition model, wherein the residential area recognition model includes an encoder and a decoder;

[0032] A training module, used for training the settlement recognition model through satellite image training samples including settlement outline labels;

[0033] An extraction module is used to obtain a target satellite image, input the target satellite image into a residential area recognition model, extract multi-scale features of the target satellite image through the encoder, fuse the multi-scale features through the decoder, and recognize the fused features to extract the residential area outline;

[0034] The processing module is used to perform curve downsampling processing on the extracted residential area outline, and then perform square processing on the residential area outline after the curve downsampling processing to obtain an optimized residential area outline.

[0035] Then, a computer-readable storage medium is also provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for extracting settlements based on satellite images is implemented.

[0036] Finally, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for extracting settlements based on satellite images when executing the program.

[0037] The method for extracting residential areas based on satellite images provided by the present invention has the following beneficial effects:

[0038] Firstly, a settlement recognition model is constructed, and the target satellite image is identified through the settlement recognition model, so as to realize the extraction of settlement contours in satellite images. In this way, the accurate contours of the settlements can be accurately extracted by performing pixel-level semantic segmentation on the satellite image. Then, the extracted settlement contours are processed by curve downsampling to eliminate the irregular broken lines on the edges of the extracted settlement contours. Then, the main direction is calculated and the contours are orthogonalized to make the extracted settlement contours more regular. In this way, not only can the settlement contours be automatically extracted and regularized quickly and accurately, but the extracted settlement contour features are basically consistent with the satellite image, showing the actual form of the settlement, which is conducive to the measurement and planning of the settlement. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiment of the present invention and its design scheme, the following briefly introduces the drawings required for this embodiment. The drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 A schematic flow chart of a method for extracting residential areas based on satellite images according to an exemplary embodiment of the present invention.

[0041] Figure 2 It is a schematic diagram of the structure of ConvNeXt_XL provided according to an exemplary embodiment of the present invention.

[0042] Figure 3 A block diagram of a satellite image-based settlement extraction device according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to enable those skilled in the art to better understand the technical solution of the present invention and implement it, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the scope of protection of the present invention.

[0044] In order to solve the problem of low automation and irregularity in extracting settlement boundaries from satellite images, the present invention proposes a method for extracting settlements and calculating the direction of settlement outlines based on a deep learning model, which can accurately extract settlements from satellite images and keep the regularity of settlement outlines intact. First, ConvNeXt is used as the backbone network of UPerNet (Unified Perceptual Parsing Network) to segment settlement outlines in satellite images, and then the main directions of the extracted settlement outlines are calculated and orthogonalized according to thresholds. The present invention can automatically extract and regularize settlement outlines quickly and accurately, and the settlement outline features are basically consistent with satellite images, showing the actual form of the settlement, which basically meets the requirements of comprehensive mapping.

[0045] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0046] First, the present invention provides a method for extracting residential areas based on satellite images, specifically: Figure 1 As shown, the following steps are included:

[0047] S101. Construct a settlement identification model.

[0048] The settlement identification model includes an encoder and a decoder.

[0049] For example, it can be constructed by the following steps: constructing a ConvNeXt_XL model as an encoder, and extracting multi-scale features of an input image through the encoder; constructing a UPerNet model as a decoder, and fusing the multi-scale features through the decoder, and recognizing the fused features.

[0050] Specifically, Figure 2As shown in the figure, the ConvNeXt_XL model includes a stem downsampling layer and four stages, each of which includes multiple Block modules, and finally connects the input and output through a residual structure; the input image is preliminarily downsampled and feature extracted through the stem downsampling layer to obtain the initial extracted features of the image, and the initial extracted features are extracted and converted in turn through multiple Block modules to obtain a multi-channel feature map.

[0051] Among them, the number of blocks in the stage stage of ConvNeXt_XL is 3, 3, 72, and 3 respectively. Each Block module has a 7×7 separable convolution layer, a LayerNorm normalization layer, a 1×1 convolution layer, a GELU activation layer, and a 1×1 convolution layer. The output channels are 256, 512, 1024, and 2048 respectively. A 2×2 convolution with a step size of 2 is used for downsampling between each stage, and the LayerNorm normalization layer is processed before downsampling.

[0052] The feature pyramid network is used as the neck network of UPerNet for multi-scale feature fusion. The feature maps extracted from each stage are adjusted by the mean pooling layer and the 1x1 convolution layer respectively. The feature maps are gradually upsampled and added to form multi-scale fusion features. The multi-scale feature maps output by the neck network are processed by a 3x3 convolution layer in the head network of UPerNet, and finally the feature maps are converted into prediction maps by a 1x1 convolution layer.

[0053] S102: training the settlement recognition model using satellite image training samples including settlement outline labels.

[0054] Specifically, before training the settlement recognition model, a satellite image training sample including settlement contour labels may be obtained first; the satellite image training sample includes a sample satellite image of a preset size and its corresponding settlement contour label.

[0055] For example, satellite image training samples can be obtained through the following steps: collect satellite images of preset resolution, select satellite images containing various geographical environments and various forms of settlements as candidate sample satellite images; annotate the sample images to obtain sample vectors of various features; convert the sample vectors into binary raster images; crop the candidate sample satellite images and their corresponding raster images according to preset sizes to generate a semantic segmentation tile dataset for training the model.

[0056] For example, the specific steps may be as follows:

[0057] ① Image preparation: Collect satellite image data with a resolution of 2 meters, and select sample images that include various geographical environments and various forms of settlements. The image storage format is remote sensing image format such as tif and img. The bands are red, green and blue bands, the bit depth is 8 bits, the coordinate system uses a projected coordinate system, and the pixel unit is meter.

[0058] ② Label collection: Label the sample images to obtain sample vector labels with multiple features. The vector format is ESRI Shapefile. The collection accuracy for residential areas with obvious features should be no less than 2 pixels, and for residential areas with unclear features, the collection accuracy should be no less than 5 pixels.

[0059] ③Format conversion: convert the sample vector into a binary raster image, and the image storage format is a lossless image format such as tif and png.

[0060] ④ Sample clipping: The sample images and raster labels are clipped according to rules to generate a semantic segmentation tile dataset for training deep learning models. The tile dataset can be clipped according to pixel sizes such as 256, 512, and 1024, and invalid samples can be screened out.

[0061] ⑤Data division: The cropped semantic segmentation dataset is randomly divided into a training dataset and a validation dataset in a ratio of 8:2.

[0062] The sample satellite image is input into the residential area recognition model to obtain the predicted residential area outline, and the Lovasz Loss loss function is constructed to determine the loss value between the residential area outline label and the predicted residential area outline; the gradient of the model parameters is calculated based on the loss value, and the Adam optimization algorithm is used to update the model parameters to minimize the loss function. Repeat the above parameter update steps until the performance of the model on the validation set reaches a satisfactory level or the loss is no longer significantly reduced.

[0063] In addition, multiple indicators can be used to evaluate the model, and the model with the best indicators is determined as the trained settlement identification model.

[0064] For example, you can use multiple indicators such as total accuracy, frequency-weighted intersection-over-unit ratio, average intersection-over-unit ratio, residential intersection-over-unit ratio, precision rate, recall rate, F1 score, etc. to evaluate the model, and save the model with the best indicator.

[0065] S103: Acquire a target satellite image, input the target satellite image into a trained settlement recognition model, and extract the settlement outline.

[0066] Specifically, the input whole scene or large block of satellite image is cropped, the satellite image is cropped into a tile image of a preset size, and the row and column position in the satellite image is recorded in the name of the tile image; the tile image is input into the trained settlement recognition model for recognition, and the recognition result is saved as a binary image; the recognition result is spliced ​​according to the row and column positions indicated in the name, the spliced ​​result is converted into a vector, and the elements with a vector value of 0 are deleted to obtain the extracted settlement outline. Among them, the GDAL library can be used to assign the coordinate information of the satellite image to the spliced ​​recognition result; and the GDAL library is used to convert the recognition result into a vector, and the vector range is saved using ESRI Shapefile.

[0067] S104, performing curve downsampling processing on the extracted residential area outline, and then performing square processing on the residential area outline after the curve downsampling processing to obtain an optimized residential area outline.

[0068] Specifically, the Larmer-Douglas-Peucker algorithm can be used to downsample the curve composed of the edge polylines of the residential contour; for the irregular polygonal contour of the residential contour, the longest side is selected as the main direction, and all other sides are rotated to be parallel or perpendicular to the main direction.

[0069] For example, the following steps are used to first perform curve downsampling on the residential area contour, specifically:

[0070] Initialization: Assume that the circular curve is C = {P1, P2, ..., P n}, set the distance threshold ε.

[0071] Select endpoints: Set the two endpoints P1 and P n Add the simplified point set S = {P1, P n}.

[0072] Maximum distance calculation: For each point P in curve C i , calculate it to the straight line P1P n The distance d i

[0073]

[0074] Iterative segmentation: find the point P with the maximum distance d max , if d>ε, P max Join the point set S and make P1P max and P max P n Recursively apply the PRD algorithm.

[0075] Termination condition: If d≤ε, the recursion is terminated.

[0076] Secondly, a square-angle method based on the main direction of the longest side is performed: for an irregular polygonal contour, the longest side is selected as the main direction θ0, and all other sides are rotated to be parallel or perpendicular to the main direction.

[0077] Assume that the direction of an edge is θ i , the rotation angle is Δθ i ,but

[0078]

[0079] This method is often used to square the outline of a building. Since buildings usually have significant geometric features and simple outer contours, this method works well in squareing the outline of a building.

[0080] Finally, the rectangularization method based on feature edge reconstruction is performed:

[0081] 1) Main direction selection

[0082] Define a candidate main direction set D, assuming it is 0 to 179 degrees with a step size of 1 degree; define the main direction contribution angle threshold as 45 degrees; take out candidate direction a from set D; take out an edge from the edge set of the contour, with a length of l and an angle θ with the candidate main direction, then the contribution value of the current edge to the main direction a is l·cosθ; when θ is less than the contribution angle threshold, use the above formula to calculate the contribution value to the candidate main direction a; when θ is greater than or equal to the contribution angle threshold, the contribution value is 0; loop through all edges in the contour set, calculate their contribution values ​​to the candidate main direction and sum them up to obtain the main direction weighted value of the candidate main direction a.

[0083] All candidate directions are cyclically taken out from the candidate main direction set D, the weighted values ​​of their respective main directions are calculated, and the direction with the largest weighted value is selected as the main direction of the residential area.

[0084] 2) Right angle

[0085] All edges of the contour are defined as tending to be perpendicular or parallel based on the angle between the edge and the main direction, if the angle is less than 45 degrees, it tends to be parallel, and if it is greater than 45 degrees, it tends to be perpendicular; the edges are rotated according to the trend, and the edges in the rotated edge set are only perpendicular or parallel to the main direction; traverse the edge set, if two adjacent edges are parallel, there are two processing methods: define the distance threshold as d, if the distance between the two edges is less than d, then translate the second edge to coincide with the first edge and merge them into one edge; if the distance is greater than d, add a vertical line to connect the two edges.

[0086] 3) Jagged edge optimization

[0087] The short edge threshold is defined as the average value of all edges divided by a simplification coefficient to obtain a simplification threshold d.

[0088] Among them l i is the length of the edge, k is the simplification factor, and n is the total number of all edges.

[0089] Traverse the edge set and delete all edges whose length is less than d.

[0090] For blocks with regular contours, all edges are usually greater than d and will not be simplified; for areas with irregular contours and jagged edges, the main edges will be greater than d, and the short edges on the jagged edges will usually be less than d, thereby achieving the effect of retaining the contour and smoothing the jagged edges.

[0091] Using the above method, a settlement recognition model is first constructed, and the target satellite image is identified through the settlement recognition model, so as to realize the extraction of the settlement outline in the satellite image. In this way, the accurate outline of the settlement can be accurately extracted by performing pixel-level semantic segmentation on the satellite image. Then, the extracted settlement outline is processed by curve downsampling to eliminate the irregular broken lines on the edge of the extracted settlement outline. Then, the main direction is calculated and orthogonalized to make the extracted settlement outline more regular. In this way, not only can the settlement outline be automatically extracted and regularized quickly and accurately, but the extracted settlement outline features are basically consistent with the satellite image, showing the actual form of the settlement, which is conducive to the measurement and planning of the settlement.

[0092] Secondly, the present invention also provides a satellite image settlement extraction device, such as Figure 3 As shown, including:

[0093] The construction module 301 is used to construct a residential area recognition model, wherein the residential area recognition model includes an encoder and a decoder.

[0094] The training module 302 is used to train the settlement recognition model using satellite image training samples including settlement outline labels.

[0095] The extraction module 303 is used to obtain the target satellite image, input the target satellite image into the settlement recognition model, extract the multi-scale features of the target satellite image through the encoder, fuse the multi-scale features through the decoder, and recognize the fused features to extract the settlement outline.

[0096] The processing module 304 is used to perform curve downsampling processing on the extracted residential area outline, and then perform square processing on the residential area outline after the curve downsampling processing to obtain an optimized residential area outline.

[0097] Using the above device, firstly, a settlement recognition model is constructed, and the target satellite image is identified through the settlement recognition model, so as to realize the extraction of the settlement outline in the satellite image. In this way, by performing pixel-level semantic segmentation on the satellite image, the accurate outline of the settlement can be accurately extracted, and then the extracted settlement outline is processed by curve downsampling to eliminate the irregular broken lines on the edge of the extracted settlement outline, and then the main direction is calculated and squared to make the extracted settlement outline more regular. In this way, not only can the settlement outline be automatically extracted and regularized quickly and accurately, but the extracted settlement outline features are basically consistent with the satellite image, showing the actual form of the settlement, which is conducive to the measurement and planning of the settlement.

[0098] The present invention also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A method for extracting residential areas based on satellite images is provided.

[0099] The present invention also provides a computer device. At the hardware level, the computer device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 A method for extracting residential areas based on satellite images is provided.

[0100] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0101] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0102] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0104] It should be noted that the above specific implementation method can enable those skilled in the art to understand the invention more comprehensively, but does not limit the invention in any way. Therefore, although the present invention has been described in detail in this specification, those skilled in the art should understand that the invention can still be modified or replaced by equivalents; and all technical solutions and improvements that do not deviate from the spirit and scope of the invention are included in the protection scope of the patent for the invention. Any figure mark in the claims should not be regarded as limiting the claims involved.

Claims

1. A method for extracting residential areas based on satellite images, characterized in that: The method comprises: Constructing a settlement recognition model; the settlement recognition model includes an encoder and a decoder; Training the settlement recognition model using satellite image training samples that include settlement outline labels; Acquire a target satellite image, input the target satellite image into a trained settlement recognition model, extract multi-scale features of the target satellite image through the encoder, fuse the multi-scale features through the decoder, recognize the fused features, and extract the settlement outline; Performing curve downsampling processing on the extracted residential area outline, and then performing square processing on the residential area outline after the curve downsampling processing to obtain an optimized residential area outline; The encoder is a ConvNeXt_XL model, which includes a stem downsampling layer and four stages, each of which includes multiple Block modules, and finally connects the input and output through a residual structure; the input image is preliminarily downsampled and feature extracted through the stem downsampling layer to obtain the initial extracted features of the image, and the initial extracted features are sequentially extracted and converted through multiple Block modules to obtain a multi-channel feature map; The decoder is a UPerNet model, which uses a feature pyramid network as the neck network of UPerNet for multi-scale feature fusion. The feature maps extracted from each stage are respectively adjusted for the number of channels through a mean pooling layer and a 1x1 convolution layer, and the feature maps are gradually upsampled and added to form multi-scale fusion features; and the multi-scale feature maps output by the neck network are processed by a 3x3 convolution layer in the head network of UPerNet, and finally the feature maps are converted into prediction maps through a 1x1 convolution layer; The satellite image training samples include sample satellite images of a preset size and corresponding residential area contour labels, and the training of the residential area recognition model using the satellite image training samples including the residential area contour labels includes: The sample satellite images are input into the settlement recognition model to obtain the predicted settlement outline, and the Lovasz Loss function is constructed to determine the loss value between the settlement outline label and the predicted settlement outline. Calculate the gradient of model parameters based on the loss value, and use the Adam optimization algorithm to update the model parameters to minimize the loss function; The model is evaluated using multiple indicators, and the training of the settlement recognition model is determined to be complete after each indicator reaches a preset target.

2. The method for extracting residential areas based on satellite images according to claim 1, characterized in that: Before training the residential area recognition model, obtain satellite image training samples that include residential areas, including: Collect satellite images of preset resolution, and select satellite images containing various geographical environments and various forms of settlements as candidate sample satellite images; Label the sample images to obtain sample vectors of multiple features; Convert the sample vector into a binary raster image; The candidate sample satellite images and their corresponding raster images are cropped according to preset sizes to generate a semantic segmentation tile dataset for training the model as training samples.

3. The method for extracting residential areas based on satellite images according to claim 2, characterized in that: Inputting the target satellite image into the trained settlement recognition model, extracting the settlement outline includes: Crop the input whole scene or large block of satellite image to a tile image of a preset size, and record the row and column position in the satellite image in the name of the tile image; The tile image is input into the trained residential area recognition model for recognition, and the recognition result is saved as a binary image; Join the recognition results according to the row and column positions indicated in the name; The stitching results are converted into vectors, and the elements with vector values ​​of 0 are deleted to obtain the extracted residential area outlines.

4. The method for extracting residential areas based on satellite images according to claim 1, characterized in that: The step of performing curve downsampling processing on the extracted residential area outline and then performing square processing on the residential area outline after the curve downsampling processing comprises: The curve composed of the edge polylines of the residential area contour is downsampled using the Larmer-Douglas-Peucker algorithm; For the irregular polygonal outline of the residential contour, the longest side is selected as the main direction, and all the remaining sides are rotated to be parallel or perpendicular to the main direction.

5. A satellite image-based settlement extraction device, characterized in that: The device comprises: A construction module is used to construct a residential area recognition model, which includes an encoder and a decoder; the encoder is a ConvNeXt_XL model, which includes a stem downsampling layer and four stages, each stage includes multiple Block modules, and finally the input and output are connected through a residual structure; the input image is preliminarily downsampled and feature extracted through the stem downsampling layer to obtain the initial extracted features of the image, and the initial extracted features are sequentially extracted and converted through multiple Block modules to obtain a multi-channel feature map; the decoder is a UPerNet model, which uses a feature pyramid network as the neck network of UPerNet for multi-scale feature fusion, and the feature maps extracted from each stage are respectively adjusted for the number of channels through a mean pooling layer and a 1x1 convolution layer, and the feature maps are gradually upsampled and added to form multi-scale fusion features; and the multi-scale feature maps output by the neck network are processed through a 3x3 convolution layer in the head network of UPerNet, and finally the feature maps are converted into prediction maps through a 1x1 convolution layer; A training module, used for training the settlement recognition model through satellite image training samples including settlement outline labels; the satellite image training samples include sample satellite images of preset sizes and their corresponding settlement outline labels, and the training of the settlement recognition model through satellite image training samples including settlement outline labels includes: inputting sample satellite images into the settlement recognition model to obtain predicted settlement outlines, constructing a Lovasz Loss loss function to determine a loss value between the settlement outline label and the predicted settlement outline; calculating the gradient of model parameters based on the loss value, and updating the model parameters using an Adam optimization algorithm to minimize the loss function; using multiple indicators to evaluate the model, and determining that the settlement recognition model training is completed after each indicator reaches a preset target; An extraction module is used to obtain a target satellite image, input the target satellite image into a residential area recognition model, extract multi-scale features of the target satellite image through the encoder, fuse the multi-scale features through the decoder, and recognize the fused features to extract the residential area outline; The processing module is used to perform curve downsampling processing on the extracted residential area outline, and then perform square processing on the residential area outline after the curve downsampling processing to obtain an optimized residential area outline.

6. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method for extracting settlements based on satellite images as described in any one of claims 1 to 4 above is implemented.

7. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for extracting settlements based on satellite images as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Residential area element contour regularization method based on image extraction result

    CN110188778A

  • Remote sensing image residential place regularization label implementation method and device, equipment and storage medium

    CN115115942A