A method for extracting large-scale urban villages based on token masking mechanism

By employing a token-masking-based method for extracting urban villages and utilizing a CNN-Transformer hybrid network architecture, the efficiency and accuracy issues of large-scale urban village identification in high-resolution remote sensing images were resolved, enabling high-precision and robust urban village mapping applications.

CN116310628BActive Publication Date: 2026-05-05SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUN YAT SEN UNIV
Filing Date
2023-02-06
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies struggle to quickly and accurately identify large-scale urban village areas from high-resolution remote sensing images, and traditional deep learning models suffer from high memory consumption and low training and prediction efficiency.

Method used

A token-masking-based method for urban village extraction is adopted. By acquiring high-resolution remote sensing image datasets for annotation and data augmentation, a CNN-Transformer hybrid network architecture urban village extraction model is constructed. The token-masking mechanism decoder extracts multi-level deep features and prevents overfitting, thereby achieving fast and accurate identification of urban villages.

Benefits of technology

It achieves high-precision and robust large-scale mapping of urban villages, improves recognition efficiency and accuracy, reduces the workload of regional annotation, prevents model overfitting, and expands the scope of application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116310628B_ABST
    Figure CN116310628B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for large-scale urban village extraction based on a token mask mechanism, relating to the technical field of remote sensing geographic information systems. The method includes: acquiring a high-resolution remote sensing image dataset; labeling urban village areas to obtain an urban village labeled dataset; performing data augmentation on the urban village labeled dataset to obtain an augmented urban village labeled dataset; iteratively training a constructed urban village extraction model; setting training parameters; updating the model parameters of the urban village extraction model to obtain a trained urban village extraction model; acquiring a high-resolution remote sensing image of the area to be detected; inputting the trained urban village extraction model; and extracting the urban village areas within the area to be detected. This invention can quickly and accurately identify urban village areas from high-resolution remote sensing images, with high accuracy and efficiency, wide application range, and realizes high-precision and robust large-scale urban village mapping applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of remote sensing geographic information systems, and more specifically, to a method and system for extracting large-scale urban villages based on a token mask mechanism. Background Technology

[0002] With my country's rapid urbanization, a unique spatial phenomenon has emerged—urban villages. On the one hand, urban villages provide affordable housing for a large influx of migrant workers, alleviating urban housing pressure; on the other hand, they suffer from low floor area ratios, poor sanitation, and inadequate infrastructure, contradicting the concept of sustainable urban development and hindering urbanization. Therefore, the renovation and redevelopment of urban villages has become a breakthrough in resolving the conflict between urban development and land use. However, early monitoring of urban village boundaries relied primarily on on-site surveys, consuming significant human and material resources. Therefore, how to automatically and in real-time obtain the coverage area of ​​urban villages has become a primary problem that urban management must solve.

[0003] Early research on urban villages primarily relied on social surveys and land use maps as data sources. This method was labor-intensive, time-consuming, and inefficient in data acquisition, and it was difficult to achieve dynamic monitoring of urban villages. In recent years, high-resolution remote sensing imagery, due to its convenient data acquisition, comprehensive information, and wide coverage, has been widely used in the extraction of urban land use information, including urban impervious surface detection, building identification, and urban green space monitoring. The recently emerging Convolutional Neural Networks (CNNs) can automatically learn multi-level feature representations from large amounts of data, thereby fully utilizing the effective information implicit in the data and achieving breakthroughs in image classification. Many scholars have applied them to the extraction and identification of urban villages. For example, Li et al. combined unsupervised deep convolutional neural networks and unsupervised deep fully connected neural networks to extract urban villages at the scene block scale under unsupervised learning; Nicholus et al. used convolutional neural networks to extract discriminative spatial features to achieve automatic identification of urban villages. These studies demonstrate that deep learning methods based on convolutional neural networks can effectively extract multi-layer semantic features from high-resolution remote sensing images, enabling rapid and accurate extraction of urban villages and providing urban structural data support for urban planning management and decision-making.

[0004] However, compared to common urban features and regions, urban villages present significant challenges in large-scale urban village extraction due to their complex structures and substantial differences in shape, scale, and spectral texture. Specifically, urban village identification based on high-resolution remote sensing imagery faces difficulties in accurately identifying villages due to significant differences in spatial scale within classes and confusion arising from appearance similarities between classes. Furthermore, the lack of sufficient urban village sample data makes traditional deep learning models prone to overfitting. Therefore, how to achieve rapid and accurate identification of large-scale urban villages based on high-resolution remote sensing imagery remains a key research issue in the field of remote sensing.

[0005] Existing technologies disclose a deep learning-based method for identifying urban villages and estimating population, and a system-level computer-storable medium. The urban village identification stage involves: extracting an urban road network map; using the OpenCV Python package to extract road network contours from the road network map; and cutting image patches from remote sensing satellite images. Urban village labels are then applied to the cut image patches, and samples are selected to form a training sample set. A Mask-RCNN model is used for training and prediction to obtain a distribution map of urban villages on the urban remote sensing satellite image. While existing technologies use the Mask-RCNN model for urban village distribution identification, which can identify urban village distribution to a certain extent, the multi-layer convolutions in the Mask-RCNN model consume a large amount of memory, resulting in low training and prediction efficiency. Summary of the Invention

[0006] To overcome the shortcomings of existing technologies in quickly and accurately identifying urban village areas from high-resolution remote sensing images, this invention provides a large-scale urban village extraction method and system based on a token mask mechanism. This method and system can quickly and accurately identify urban village areas from high-resolution remote sensing images, is highly practical, has a wide range of applications, and achieves high-precision and robust large-scale urban village mapping applications.

[0007] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0008] This invention provides a method for extracting large-scale urban villages based on a token mask mechanism, including:

[0009] S1: Obtain a high-resolution remote sensing image dataset;

[0010] S2: Label the urban village areas in the remote sensing images in the high-resolution remote sensing image dataset to obtain the urban village labeled dataset.

[0011] S3: Perform data augmentation on the labeled urban village dataset to obtain the augmented labeled urban village dataset;

[0012] S4: Iteratively train the urban village extraction model using the augmented labeled urban village dataset, set the training parameters, update the model parameters of the urban village extraction model, and obtain the trained urban village extraction model.

[0013] S5: Acquire high-resolution remote sensing images of the area to be detected, input them into the trained urban village extraction model, and extract the urban village range in the area to be detected.

[0014] Preferably, the specific method for obtaining the high-resolution remote sensing image dataset in step S1 is as follows:

[0015] Several high-resolution remote sensing images of the same size were collected evenly from Google Earth, and cloudless and clear images were selected to form a high-resolution remote sensing image dataset.

[0016] Preferably, in step S2, the specific method for obtaining the labeled dataset of urban villages is as follows:

[0017] Using POI data, the vector boundaries of urban villages are interpreted and labeled for each remote sensing image in the high-resolution remote sensing image dataset. The vector boundaries are then rasterized using ArcGIS software to obtain pixel-level labeled images of urban villages. Here, 0 values ​​represent non-urban village pixels, and 255 values ​​represent urban village pixels.

[0018] Each remote sensing image and its corresponding urban village annotation image are cropped into sample pairs of a preset size through non-overlapping sampling to form an urban village annotation dataset.

[0019] Preferably, in step S3, the data augmentation operation includes random rotation and flipping to expand the urban village labeled dataset to N times the original data volume, thereby obtaining the augmented urban village labeled dataset.

[0020] Preferably, the constructed urban village extraction model includes a feature extractor, a decoder based on a token mask mechanism, and a classifier connected in sequence;

[0021] The feature extractor is used to extract multi-level deep features from the augmented urban village labeled dataset and input them into the decoder based on the token mask mechanism.

[0022] The decoder based on the token masking mechanism extracts high-level semantic information tokens with multi-level deep features, and randomly masks the high-level semantic information tokens according to a preset masking rate to obtain the masked high-level semantic information tokens; then, it fuses all the masked high-level semantic information tokens to obtain the final classification features, which are then input into the classifier.

[0023] The classifier obtains the identification result of the urban village based on the final classification features.

[0024] In addition to further extracting high-level semantic information and remote contextual dependencies from multi-level deep features, the decoder based on the token mask mechanism can also prevent model overfitting as much as possible.

[0025] The constructed urban village extraction model utilizes a CNN-Transformer hybrid network architecture, which not only ensures the accuracy of urban village identification but also avoids the memory consumption of multi-layer convolutions in traditional CNN models, thus improving training and recognition efficiency.

[0026] Preferably, the feature extractor includes a first convolutional layer, a first residual module, a second residual module, a third residual module, and a fourth residual module connected in sequence;

[0027] The outputs of the first residual module, the second residual module, and the fourth residual module are all connected to a decoder based on a token mask mechanism.

[0028] Each residual module has the same structure, including a first basic block and a second basic block connected in sequence;

[0029] Each first basic block has the same structure, including a second convolutional layer, a third convolutional layer, a batch normalization layer, and an activation function layer connected in sequence, with the input of the second convolutional layer connected to the input of the activation function layer.

[0030] The first convolutional layer, as a shallow convolutional layer, produces information containing rich spatial texture. Through continuous convolution and downsampling by the residual module, higher-dimensional features are obtained.

[0031] Preferably, the decoder based on the token masking mechanism includes a first mask Transformer module, a second mask Transformer module, and a third mask Transformer module connected in sequence;

[0032] The input of the first mask Transformer module is connected to the output of the fourth residual module, the input of the second mask Transformer module is also connected to the output of the second residual module, the input of the third mask Transformer module is also connected to the output of the first residual module, and the output of the third mask Transformer module is connected to the classifier.

[0033] Each mask Transformer module has the same structure, containing a Transformer encoder, a token masker, and a Transformer decoder connected in sequence; the token masker has a preset mask rate.

[0034] Preferably, setting the training parameters includes setting the number of training iterations, batch size, optimizer, initial learning rate, learning rate descent mechanism, and loss function.

[0035] Preferably, the optimizer is the Adam optimizer, and the loss function is the binary cross-entropy loss function.

[0036] This invention also provides a large-scale urban village extraction system based on a token mask mechanism, used to implement the above method, comprising:

[0037] The data acquisition module is used to acquire high-resolution remote sensing image datasets;

[0038] The data annotation module is used to annotate urban village areas in remote sensing images in high-resolution remote sensing image datasets to obtain an annotated urban village dataset.

[0039] The data augmentation module is used to perform data augmentation operations on the labeled urban village dataset to obtain the augmented labeled urban village dataset.

[0040] The model training module uses the augmented labeled urban village dataset to iteratively train the constructed urban village extraction model, sets the training parameters, updates the model parameters of the urban village extraction model, and obtains the trained urban village extraction model.

[0041] The urban village extraction module is used to acquire high-resolution remote sensing images of the area to be detected, input them into the trained urban village extraction model, and extract the range of urban villages in the area to be detected.

[0042] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0043] This invention reduces the workload of urban village area labeling by selecting a small number of remote sensing images from a high-resolution remote sensing image dataset. Then, data augmentation is performed on the urban village labeled dataset to provide a sufficient data foundation for subsequent model training. The urban village extraction model is iteratively trained using the augmented urban village labeled dataset, fully extracting multi-level deep features from the data, and further extracting high-level semantic information and long-range contextual dependencies from these features, while minimizing overfitting during training to obtain a well-trained urban village extraction model. Finally, the trained urban village extraction model is used to detect the high-resolution remote sensing image of the area to be detected, extracting the urban village boundaries within that area. This invention can quickly and accurately identify urban village areas from high-resolution remote sensing images, with high accuracy and efficiency, wide application range, and achieves high-precision, robust, large-scale urban village mapping applications. Attached Figure Description

[0044] Figure 1 This is a flowchart of the large-scale urban village extraction method based on the token mask mechanism described in Example 1.

[0045] Figure 2 This is a schematic diagram of the urban village extraction model described in Example 2.

[0046] Figure 3 This is a schematic diagram of the mask Transformer module described in Example 2.

[0047] Figure 4 This is a comparison chart of the urban village extraction results extracted during the training phase of the urban village extraction model described in Example 2.

[0048] Figure 5 This is a schematic diagram comparing the results of urban villages extracted during the detection phase of the trained urban village extraction model described in Example 2.

[0049] Figure 6 This is a vector distribution map of the urban villages in the seven cities of the Pearl River Delta described in Example 2.

[0050] Figure 7 This is a schematic diagram of the large-scale urban village extraction system based on the token mask mechanism described in Example 3. Detailed Implementation

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

[0052] To better illustrate this embodiment, some parts in the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions;

[0053] It will be understood by those skilled in the art that certain well-known structures and their descriptions may be omitted in the accompanying drawings.

[0054] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0055] Example 1

[0056] This embodiment provides a method for extracting large-scale urban villages based on a token mask mechanism, such as... Figure 1 As shown, it includes:

[0057] S1: Obtain a high-resolution remote sensing image dataset;

[0058] S2: Label the urban village areas in the remote sensing images in the high-resolution remote sensing image dataset to obtain the urban village labeled dataset.

[0059] S3: Perform data augmentation on the labeled urban village dataset to obtain the augmented labeled urban village dataset;

[0060] S4: Iteratively train the urban village extraction model using the augmented labeled urban village dataset, set the training parameters, update the model parameters of the urban village extraction model, and obtain the trained urban village extraction model.

[0061] S5: Acquire high-resolution remote sensing images of the area to be detected, input them into the trained urban village extraction model, and extract the urban village range in the area to be detected.

[0062] In this implementation, this embodiment reduces the workload of labeling urban village areas by selecting a small number of remote sensing images from the acquired high-resolution remote sensing image dataset. Then, data augmentation is performed on the urban village labeled dataset to provide a sufficient data foundation for subsequent model training. The urban village extraction model is iteratively trained using the augmented urban village labeled dataset, fully extracting multi-level deep features from the data, and further extracting high-level semantic information and long-range contextual dependencies from these features. Simultaneously, overfitting during training is minimized to obtain a well-trained urban village extraction model. Finally, the trained urban village extraction model is used to detect the high-resolution remote sensing image of the area to be detected, extracting the urban village boundaries within that area. This embodiment can quickly and accurately identify urban village areas from high-resolution remote sensing images, with high accuracy and efficiency, and wide applicability, achieving high-precision and robust large-scale urban village mapping applications.

[0063] Example 2

[0064] This embodiment provides a method for extracting large-scale urban villages based on a token mask mechanism, including:

[0065] S1: Obtain a high-resolution remote sensing image dataset. The specific method is as follows:

[0066] Several high-resolution remote sensing images of the same size were collected evenly from Google Earth, and cloudless and clear images were selected to form a high-resolution remote sensing image dataset.

[0067] S2: Label urban village areas in the remote sensing images of the high-resolution remote sensing image dataset to obtain an urban village labeled dataset; the specific method is as follows:

[0068] Using POI data, the vector boundaries of urban villages are interpreted and labeled for each remote sensing image in the high-resolution remote sensing image dataset. The vector boundaries are then rasterized using ArcGIS software to obtain pixel-level labeled images of urban villages. Here, 0 values ​​represent non-urban village pixels, and 255 values ​​represent urban village pixels.

[0069] Each remote sensing image and its corresponding urban village annotation image are cropped into sample pairs of a preset size through non-overlapping sampling to form an urban village annotation dataset.

[0070] S3: Perform data augmentation on the labeled urban village dataset to obtain the augmented labeled urban village dataset;

[0071] The data augmentation operation includes random rotation and flipping, which expands the urban village labeled dataset to N times the original data volume, resulting in an augmented urban village labeled dataset.

[0072] S4: Iteratively train the urban village extraction model using the augmented labeled urban village dataset, set the training parameters, update the model parameters of the urban village extraction model, and obtain the trained urban village extraction model.

[0073] like Figure 2 As shown, the constructed urban village extraction model includes a feature extractor, a decoder based on a token mask mechanism, and a classifier connected in sequence.

[0074] The feature extractor is used to extract multi-level deep features from the augmented urban village labeled dataset and input them into the decoder based on the token mask mechanism.

[0075] The decoder based on the token masking mechanism extracts high-level semantic information tokens with multi-level deep features, and randomly masks the high-level semantic information tokens according to a preset masking rate to obtain the masked high-level semantic information tokens; then, it fuses all the masked high-level semantic information tokens to obtain the final classification features, which are then input into the classifier.

[0076] The classifier obtains the identification result of the urban village based on the final classification features.

[0077] The feature extractor includes a first convolutional layer, a first residual module, a second residual module, a third residual module, and a fourth residual module connected in sequence; in this embodiment, the first convolutional layer is a 7×7 convolutional layer;

[0078] The outputs of the first residual module, the second residual module, and the fourth residual module are all connected to a decoder based on a token mask mechanism.

[0079] Each residual module has the same structure, including a first basic block and a second basic block connected in sequence;

[0080] Each first basic block has the same structure, including a second convolutional layer, a third convolutional layer, a batch normalization layer, and an activation function layer connected in sequence, with the input of the second convolutional layer connected to the input of the activation function layer. In this embodiment, the second and third convolutional layers are 3×3 convolutional layers, and the activation function layer uses the ReLU activation function.

[0081] The decoder based on the token mask mechanism includes a first mask Transformer module, a second mask Transformer module, and a third mask Transformer module connected in sequence.

[0082] The input of the first mask Transformer module is connected to the output of the fourth residual module, the input of the second mask Transformer module is also connected to the output of the second residual module, the input of the third mask Transformer module is also connected to the output of the first residual module, and the output of the third mask Transformer module is connected to the classifier.

[0083] like Figure 3 As shown, each mask Transformer module has the same structure, which includes a Transformer encoder, a token masker, and a Transformer decoder connected in sequence. In this embodiment, experiments were conducted on four mask rates: 0, 0.25, 0.50, and 0.75. The experimental results were the best when the mask rate was 0.5. Therefore, 0.5 was used as the preset mask rate in this embodiment.

[0084] The training parameters include setting the number of training iterations, batch size, optimizer, initial learning rate, learning rate descent mechanism, and loss function.

[0085] The optimizer set is the Adam optimizer, and the loss function set is the binary cross-entropy loss function.

[0086] S5: Acquire high-resolution remote sensing images of the area to be detected, input them into the trained urban village extraction model, and extract the urban village range in the area to be detected.

[0087] In the specific implementation process, 15 high-resolution remote sensing images with a scale of 1:25,000 were uniformly collected from Google Earth. Urban village areas were labeled on these 15 images to obtain an urban village labeling dataset. Combining POI data and prior human knowledge, the vector boundaries of urban villages in the images were manually interpreted and labeled. Pixel-level urban village labeling data was obtained through rasterization. ArcGIS software was used to rasterize the vector boundaries to obtain pixel-level urban village labeled images. In this dataset, 0 values ​​represent non-urban village pixels, and 255 values ​​represent urban village pixels. Each remote sensing image and its corresponding urban village labeled image were cropped into 512×512 sample pairs through non-overlapping sampling to form the urban village labeling dataset.

[0088] The urban village annotation dataset was expanded to three times its original size through random rotation and flipping operations, and then input into the constructed urban village extraction model. The training iterations were set to 150, the batch size to 8, and the initial learning rate to 0.0001. From the 100th training iteration onwards, the learning rate decreased linearly. The Adam optimizer was selected for parameter optimization, and the loss function was the binary cross-entropy loss function. The model parameters of the urban village extraction model were updated to obtain the trained urban village extraction model.

[0089] like Figure 4 The diagram shows a comparison of urban village extraction results obtained during the training phase of the urban village extraction model. The first column represents remote sensing images, the second column represents corresponding labeled urban village images, and the third column represents the urban village extraction results obtained by the model. As can be seen from the diagram, the urban village extraction model trained by the method proposed in this embodiment can accurately extract the boundaries of urban villages. Figure 5 The image shown is a comparison of the results of urban villages extracted by the trained urban village extraction model during the detection phase. Each row of images corresponds to the three cities of SZ, DG, and FS. The first column is the remote sensing image, the second column is the prior reference image, and the third column is the result of urban villages extracted by the trained urban village extraction model.

[0090] like Figure 6 The image shows a vector distribution map of urban villages in seven cities in the Pearl River Delta. The trained urban village extraction model provided in this embodiment extracts the urban village boundaries within the detection area. After raster-to-vector conversion, it obtains the vector boundaries of large-scale urban villages, enabling high-precision and robust large-scale urban village mapping applications. This provides accurate spatial data to guide the formulation of urban planning policies and the allocation of urban resources.

[0091] Example 3

[0092] This embodiment provides a large-scale urban village extraction system based on a token mask mechanism, used to implement the method described in Embodiment 1 or 2, such as... Figure 7 As shown, it includes:

[0093] The data acquisition module is used to acquire high-resolution remote sensing image datasets;

[0094] The data annotation module is used to annotate urban village areas in remote sensing images in high-resolution remote sensing image datasets to obtain an annotated urban village dataset.

[0095] The data augmentation module is used to perform data augmentation operations on the labeled urban village dataset to obtain the augmented labeled urban village dataset.

[0096] The model training module uses the augmented labeled urban village dataset to iteratively train the constructed urban village extraction model, sets the training parameters, updates the model parameters of the urban village extraction model, and obtains the trained urban village extraction model.

[0097] The urban village extraction module is used to acquire high-resolution remote sensing images of the area to be detected, input them into the trained urban village extraction model, and extract the range of urban villages in the area to be detected.

[0098] The same or similar labels correspond to the same or similar parts;

[0099] The terms used to describe positional relationships in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent.

[0100] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A method for extracting large-scale urban villages based on a token mask mechanism, characterized in that, include: S1: Obtain a high-resolution remote sensing image dataset; S2: Label the urban village areas in the remote sensing images in the high-resolution remote sensing image dataset to obtain the urban village labeled dataset. S3: Perform data augmentation on the labeled urban village dataset to obtain the augmented labeled urban village dataset; S4: Iteratively train the urban village extraction model using the augmented labeled urban village dataset, set the training parameters, update the model parameters of the urban village extraction model, and obtain the trained urban village extraction model. The constructed urban village extraction model includes a feature extractor, a decoder based on a token mask mechanism, and a classifier connected in sequence. The feature extractor is used to extract multi-level deep features from the augmented urban village labeled dataset and input them into the decoder based on the token mask mechanism. The decoder based on the token masking mechanism extracts high-level semantic information tokens with multi-level deep features, and randomly masks the high-level semantic information tokens according to a preset masking rate to obtain the masked high-level semantic information tokens. The high-level semantic information tokens behind all masks are fused to obtain the final classification features, which are then input into the classifier. The classifier obtains the identification result of the urban village based on the final classification features; S5: Acquire high-resolution remote sensing images of the area to be detected, input them into the trained urban village extraction model, and extract the urban village range in the area to be detected.

2. The method for extracting large-scale urban villages based on a token mask mechanism according to claim 1, characterized in that, In step S1, the specific method for obtaining the high-resolution remote sensing image dataset is as follows: Several high-resolution remote sensing images of the same size were collected evenly from Google Earth, and cloudless and clear images were selected to form a high-resolution remote sensing image dataset.

3. The method for extracting large-scale urban villages based on a token mask mechanism according to claim 1, characterized in that, In step S2, the specific method for obtaining the labeled dataset of urban villages is as follows: Using POI data, the vector boundaries of urban villages are interpreted and labeled for each remote sensing image in the high-resolution remote sensing image dataset. Pixel-level labeled images of urban villages are obtained through rasterization. Here, 0 values ​​represent non-urban village pixels, and 255 values ​​represent urban village pixels. Each remote sensing image and its corresponding urban village annotation image are cropped into sample pairs of a preset size through non-overlapping sampling to form an urban village annotation dataset.

4. The method for extracting large-scale urban villages based on a token mask mechanism according to claim 1, characterized in that, In step S3, the data augmentation operation includes random rotation and flipping to expand the urban village labeled dataset to N times the original data volume, thereby obtaining the augmented urban village labeled dataset.

5. The method for extracting large-scale urban villages based on a token mask mechanism according to claim 1, characterized in that, The feature extractor includes a first convolutional layer, a first residual module, a second residual module, a third residual module, and a fourth residual module connected in sequence. The outputs of the first residual module, the second residual module, and the fourth residual module are all connected to a decoder based on a token mask mechanism. Each residual module has the same structure, including a first basic block and a second basic block connected in sequence; Each first basic block has the same structure, including a second convolutional layer, a third convolutional layer, a batch normalization layer, and an activation function layer connected in sequence, with the input of the second convolutional layer connected to the input of the activation function layer.

6. The method for extracting large-scale urban villages based on a token mask mechanism according to claim 5, characterized in that, The decoder based on the token mask mechanism includes a first mask Transformer module, a second mask Transformer module, and a third mask Transformer module connected in sequence. The input of the first mask Transformer module is connected to the output of the fourth residual module, the input of the second mask Transformer module is also connected to the output of the second residual module, the input of the third mask Transformer module is also connected to the output of the first residual module, and the output of the third mask Transformer module is connected to the classifier. Each mask Transformer module has the same structure, containing a Transformer encoder, a token mask, and a Transformer decoder connected in sequence; the token mask has a preset mask rate.

7. The method for extracting large-scale urban villages based on a token mask mechanism according to claim 1, characterized in that, The training parameters include setting the number of training iterations, batch size, optimizer, initial learning rate, learning rate descent mechanism, and loss function.

8. The method for extracting large-scale urban villages based on a token mask mechanism according to claim 7, characterized in that, The optimizer set is the Adam optimizer, and the loss function set is the binary cross-entropy loss function.

9. A large-scale urban village extraction system based on a token mask mechanism, used to implement the method described in any one of claims 1-8, characterized in that, include: The data acquisition module is used to acquire high-resolution remote sensing image datasets; The data annotation module is used to annotate urban village areas in remote sensing images in high-resolution remote sensing image datasets to obtain an annotated urban village dataset. The data augmentation module is used to perform data augmentation operations on the labeled urban village dataset to obtain the augmented labeled urban village dataset. The model training module uses the augmented labeled urban village dataset to iteratively train the constructed urban village extraction model, sets the training parameters, updates the model parameters of the urban village extraction model, and obtains the trained urban village extraction model. The urban village extraction module is used to acquire high-resolution remote sensing images of the area to be detected, input them into the trained urban village extraction model, and extract the range of urban villages in the area to be detected.

Citation Information

Patent Citations

  • Rural homestead building identification method and system

    CN114708494A

  • Image self-supervised learning method based on TransUnet architecture

    CN115331073A