Method for generating multidimensional landform vector data based on remote sensing image semantic segmentation
Through the deep learning model combining spectral and elevation information for semantic segmentation of remote sensing images, the problem of difficulty in identifying large-scale landform features in traditional methods is solved, and efficient and accurate landform classification and multi-dimensional geographic data generation are achieved.
Patent Information
- Application Number
- CN202510540519.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-29
AI Technical Summary
Traditional remote sensing image classification methods are difficult to effectively capture complex features of large-scale landforms, resulting in difficulty in feature extraction and inconsistent resolution, and the inaccurate identification and distinction of complex landform types.
A deep learning model based on remote sensing images is adopted, and multi-dimensional geomorphological vector data is generated by adjusting the pretrained weights, combining spectral and elevation information, and semantic segmentation is used using an encoder and decoder architecture.
It improves the efficiency and accuracy of geomorphic category segmentation, can accurately identify different geomorphic types, generate high-precision multi-dimensional geographic data, ensure data spatial consistency, and is suitable for geographic information systems.
Smart Images

Figure CN120561202A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of remote sensing image object recognition and artificial intelligence technology, and specifically relates to a method for generating multi-dimensional landform vector data based on semantic segmentation of remote sensing images. Background Art
[0002] Remote sensing images provide rich geographical information, and semantic segmentation technology can be used to identify different landform types and features. However, traditional remote sensing image classification methods often have difficulties in processing large-scale landform features.
[0003] Large-scale landforms (such as mountains, rivers, and forests) often have complex textures, spectra, and spatial structures, with significant variations in features across different regions. Traditional methods rely on fixed thresholds or simple statistical models (such as support vector machines and random forests), which struggle to capture subtle variations in these complex features.
[0004] Landform features not only rely on spectral information (such as vegetation reflectance), but are also closely related to topography (such as slope, elevation) and spatial distribution patterns (such as linearity and patchiness). Traditional methods usually process spectral and spatial information separately, resulting in incomplete feature expression. Traditional classification methods (such as support vector machines and random forests) rely on manually designed features (such as texture and shape) and are difficult to automatically learn the deep semantic features of large-scale landforms. Traditional methods usually perform geometric correction and radiation correction before classification, and each step is processed independently. For example, the resolution or coordinate system is not unified before classification, resulting in spatial inconsistency in subsequent analysis. This leads to problems such as difficulty in feature extraction and inconsistent resolution. Summary of the Invention
[0005] In order to solve at least one technical problem existing in the background technology, the present application provides a method for generating multi-dimensional terrain vector data based on semantic segmentation of remote sensing images.
[0006] The technical solutions adopted in this application are:
[0007] The first embodiment of the present application provides a method for generating multi-dimensional landform vector data based on semantic segmentation of remote sensing images, comprising:
[0008] Train a deep learning model for landform recognition based on remote sensing images, adjust pre-trained weights to optimize the image encoder, and generate classification results;
[0009] The landform recognition deep learning model includes an encoder composed of a multi-layer convolutional network and a decoder with an upsampling and feature fusion architecture;
[0010] Extracting a single-band label corresponding to each landform type from the classification results, and generating a binary raster image with the single-band label;
[0011] The binary raster image with the single-band label is converted into a vector map, and the vector map is combined with the elevation information to generate multidimensional geographic data.
[0012] According to one embodiment of the present application, before training the deep learning model for landform recognition based on remote sensing images, adjusting the pre-training weights to optimize the image encoder, and generating classification results, the method further includes:
[0013] Collect remote sensing images of different resolutions and annotate them according to different landform types;
[0014] Obtaining a digital elevation model as elevation information;
[0015] The collected remote sensing images and elevation information are subjected to denoising and standardization processing.
[0016] According to one embodiment of the present application, before training the deep learning model for landform recognition based on remote sensing images, adjusting the pre-training weights to optimize the image encoder, and generating classification results, the method further includes:
[0017] combining the spectral band threshold of the remote sensing image with a preset elevation threshold to screen and assign landform labels;
[0018] Unifying the elevation information with the spatial coordinate system and resolution of the remote sensing image;
[0019] The anomalies in elevation or areas with sudden changes in terrain are eliminated to generate the labeled dataset.
[0020] According to one embodiment of the present application, the deep learning model for landform recognition is trained based on remote sensing images, pre-training weights are adjusted to optimize the image encoder, and classification results are generated, specifically:
[0021] An improved encoder-decoder architecture is adopted, starting from pre-trained weights, and the encoder is optimized through a cross-entropy loss function and back-propagation to extract the semantic features of the remote sensing image;
[0022] The encoder extracts high-level features, and the decoder restores spatial details through upsampling. The Softmax activation function outputs the category probability distribution of each pixel and converts it into a binary raster image to complete the landform classification.
[0023] By comparing the differences between the model output and the annotated labels, the gradient descent algorithm is used to dynamically adjust the convolution kernel weights of the encoder to enhance the ability to distinguish landform features while maintaining high-resolution spatial information.
[0024] According to one embodiment of the present application, extracting the single-band label corresponding to each landform type from the classification result and generating a binary raster image with the single-band label is specifically as follows:
[0025] Process the binary raster image generated by classification into blocks;
[0026] For each landform type, the classification label of each pixel is traversed. If the pixel belongs to the target type, it is set to 1 in the corresponding single-band image, otherwise it is set to 0, forming a binary value.
[0027] A single-band binary image is generated for each landform type, and multiple single-category binary raster images are finally output.
[0028] According to one embodiment of the present application, the converting of the binary raster image with the single-band label into a vector map, and combining the vector map with the elevation information to generate multidimensional geographic data, is specifically as follows:
[0029] Converting the binary raster image into a projected coordinate system consistent with the elevation information;
[0030] Converting continuous regions of the binary raster image into polygonal surface elements using a region segmentation and contour extraction algorithm;
[0031] Performing bilinear interpolation resampling on the elevation information so that the spatial resolution is completely consistent with the vector map;
[0032] Based on the resampled elevation information, the terrain slope and slope direction of each pixel are calculated by using a Sobel operator or a directional derivative;
[0033] Combined with the category labels of the vector map, the elevation information and slope data of the corresponding area are extracted to generate multidimensional geographic data.
[0034] A second embodiment of the present application provides a system for generating multi-dimensional landform vector data based on semantic segmentation of remote sensing images, comprising:
[0035] The classification module is used to train a deep learning model for landform recognition based on remote sensing images, adjust pre-trained weights to optimize the image encoder, and generate classification results;
[0036] An extraction module, configured to extract a single-band label corresponding to each landform type from the classification result, and generate a binary raster image with the single-band label;
[0037] The conversion module is used to convert the binary raster image with the single-band label into a vector map, and combine the vector map with the elevation information to generate multidimensional geographic data.
[0038] According to one embodiment of the present application, it further includes:
[0039] The preprocessing module is used to collect remote sensing images of different resolutions, annotate them according to different landform types, obtain digital elevation models as elevation information, and perform denoising and standardization on the collected remote sensing images and elevation information.
[0040] According to one embodiment of the present application, the preprocessing module further includes:
[0041] It is used to combine the spectral band threshold of the remote sensing image with the preset elevation threshold to screen and assign landform labels; unify the elevation information with the spatial coordinate system and resolution of the remote sensing image; eliminate elevation outliers or areas with sudden terrain changes to generate the labeled dataset.
[0042] An embodiment of the third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any one of the embodiments of the first aspect when executing the program.
[0043] Due to the adoption of the above technical solution, the beneficial effects achieved by this application are as follows:
[0044] This application achieves efficient landform classification by incorporating a pre-training mechanism. Leveraging pre-trained weights improves training efficiency. Furthermore, the model's fine-tuning capabilities reduce error rates, enabling the model to achieve good classification accuracy even with limited training data. This approach not only improves the efficiency of segmenting remote sensing images but also enhances the usability and reliability of landform classification predictions.
[0045] This application can accurately identify and distinguish different landform types at low resolution, especially for widely distributed similar landform types. This method effectively reduces the number of manual interventions and improves the accuracy of landform classification, making remote sensing image analysis and geographic information extraction more efficient.
[0046] This application uses a band extraction algorithm to extract single-band, single-label raster data from remote sensing images, further optimizing the performance of the landform classifier. This algorithm effectively extracts spectral signature information from different bands and improves classification accuracy through band fusion. Compared to traditional methods, this application significantly improves landform classification accuracy, demonstrating greater adaptability and precision when processing remote sensing images with complex backgrounds and high-dimensional features.
[0047] This application generates high-precision geomorphic label surface feature data as well as multidimensional geographic data such as slope and aspect. These data not only have higher spatial accuracy, but also provide richer data support for subsequent geographic information analysis and decision support. Finally, through resampling technology, the output vector data is kept consistent with the resolution of the elevation map, ensuring the spatial consistency of the data, and can be exported as a standard geographic data file (Shapefile format), which is convenient for use and display in different geographic information systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0049] Figure 1 A flowchart of a method for generating multi-dimensional landform vector data based on semantic segmentation of remote sensing images provided in an embodiment of the present application;
[0050] Figure 2 This is an overall structural diagram of a method for generating multi-dimensional landform vector data based on semantic segmentation of remote sensing images provided in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0052] Reference numerals:
[0053] 810 , processor; 820 , communication interface; 830 , memory; 840 , communication bus. DETAILED DESCRIPTION
[0054] In order to more clearly illustrate the overall concept of the present application, a detailed description is given below in an illustrative manner in conjunction with the accompanying drawings.
[0055] The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application may also be implemented in other ways than those described herein, and therefore, the scope of protection of the present application is not limited by the specific embodiments disclosed below. It should be noted that the embodiments of the present application and the features of each embodiment may be combined with each other unless there is a conflict.
[0056] In this application, unless otherwise expressly specified and limited, a first feature "above" or "below" a second feature may be that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in an appropriate manner in any one or more embodiments or examples.
[0057] Example 1
[0058] like Figure 1 As shown, the first embodiment of the present application provides a method for generating multi-dimensional landform vector data based on semantic segmentation of remote sensing images, comprising:
[0059] S100. Train a deep learning model for landform recognition based on remote sensing images, adjust pre-training weights to optimize the image encoder, and generate classification results.
[0060] As mentioned above, first, we need to collect remote sensing images of varying resolutions and annotate them according to different landform types (such as water, urban, traffic, and cultivated land). We also need to obtain corresponding elevation information raster datasets (i.e., digital elevation models (DEMs)). This data will be used for subsequent model training.
[0061] After obtaining the labeled data, the next step is to preprocess the image data and elevation information. This includes removing noise, normalizing the image size, and filtering and assigning labels using the logical "AND" operator. Furthermore, the image is divided into blocks so that it can be loaded and processed piece by piece to reduce memory consumption.
[0062] A deep learning model for terrain recognition based on an encoder-decoder architecture was constructed. This model consists of an encoder composed of a multi-layer convolutional network to extract high-level image features, and a decoder with upsampling and feature fusion architecture to restore spatial details. This model was trained using a processed, annotated dataset, adjusting pre-trained weights to optimize the image encoder and improve model accuracy.
[0063] Once the model training is stable, pre-processed remote sensing image data is fed into the network to generate preliminary landform classification results. These results are typically presented as binary raster images, where the probability of each pixel belonging to a certain landform type is calculated and converted into a specific class label.
[0064] For example, a remote sensing image dataset covering the entire Shandong Province with a resolution of 1 meter per pixel is obtained. These images contain various landform types, such as water areas, cities, cultivated land, and mountains.
[0065] At the same time, obtain the digital elevation model (DEM) data of the corresponding area and ensure that its resolution matches that of the remote sensing image or can be adjusted to the same resolution (for example, 1 meter / pixel).
[0066] Predefined landform types and their corresponding band thresholds and elevation ranges: Impervious surfaces (e.g., urban built-up areas): Band thresholds are (155, 36, 22), and the elevation range is set to 0-300 meters. Green areas (woodlands, mountains, grasslands): Band thresholds are (0, 123, 9), and the elevation range is set to >500 meters. Water areas: Band thresholds are (10, 78, 151), and the elevation range is set to <100 meters. Background (unclassified areas): Band thresholds are (0, 0, 0).
[0067] Denoise remote sensing images using Gaussian or median filtering to remove noise. Normalize the brightness and contrast of all images to the same value range. Split large images into multiple small blocks (e.g., 512×512 pixels) for ease of subsequent processing.
[0068] A deep learning model for landform recognition based on an improved DeepLabV3+ encoder-decoder architecture was constructed. This model consists of an encoder composed of a multi-layer convolutional network and a decoder with upsampling and feature fusion. Pretrained weights (e.g., those pretrained on the ImageNet dataset) were used as a starting point, and the model was fine-tuned using a processed, annotated dataset. The model parameters, particularly the encoder, were optimized using a cross-entropy loss function and backpropagation to better extract landform features from remote sensing imagery.
[0069] The preprocessed remote sensing image is fed into the model, which outputs the probability distribution of each pixel belonging to different landform categories. A Softmax activation function is used to convert these probabilities into specific category labels, generating a preliminary binary raster image.
[0070] During the training process, the model automatically adjusts the weights based on the difference between the predicted results and the true labels (i.e., the value of the loss function). In particular, in the encoder part, the convolution kernel weights are optimized through multiple iterations so that the model can more accurately extract the landform features (such as texture, spectral information) in the remote sensing images. Use an independent validation set to evaluate the model performance to ensure good generalization ability of the model. If the model performs poorly on the validation set, it may be necessary to adjust the hyperparameters or increase the amount of training data. After sufficient training, the model can infer new remote sensing images and output the landform classification results for each image. These results are usually presented as binary raster images, where different colors represent different landform types.
[0071] It should be noted that in specific implementation scenarios, after generating preliminary landform classification results based on the above scheme, you can further analyze the model's precision, recall, F1 score, and other indicators to understand the differences in the model's performance on different landform types. By comparing the predicted results with the true labels, you can identify the main areas and types of misclassifications by the model, and then collect more samples or adjust the training strategy to improve the recognition accuracy of specific landform types.
[0072] In specific implementation scenarios, building on the above solution, based on the performance of the existing model, we can identify landform types that are difficult to correctly classify and collect more samples of these types to enrich the training set and improve the model's generalization ability. Introducing remote sensing image data from different seasons and geographical locations can help the model better adapt to landform changes under various environmental conditions.
[0073] The terrain recognition deep learning model includes an encoder composed of a multi-layer convolutional network and a decoder with an upsampling and feature fusion architecture.
[0074] As mentioned above, the encoder is mainly responsible for extracting high-level semantic information from the input image. It is usually composed of a multi-layer convolutional neural network (CNN), where each layer gradually extracts features from the image through convolution operations, activation functions, and pooling operations.
[0075] Convolutional Layers: Used to detect local features in the input image, such as edges and textures. Each convolutional layer contains multiple filters (or kernels), which slide across different locations in the image, calculating the dot product within the local area to generate a feature map. The formula is as follows:
[0076] I output =f(I input *K+b)
[0077] Among them, I inputis the input image, K is the convolution kernel, b is the bias term, and f is the activation function (such as ReLU).
[0078] Activation Function: This introduces nonlinear factors to enable the model to learn more complex patterns. A commonly used activation function is ReLU (Rectified Linear Unit), which sets all negative values to zero and leaves positive values unchanged.
[0079] Pooling Layers: Used to reduce the spatial size of feature maps, reduce computational complexity, and control overfitting. The most commonly used pooling method is max pooling, which takes the maximum value of each small window as the output. The formula is as follows:
[0080] P(i,j)=max(X[i:i+s,j:j+s])
[0081] Where X is the input feature map, s is the pooling window size, and P(i, j) is the output after pooling.
[0082] Through multiple layers of convolution and pooling operations, the encoder gradually extracts high-level semantic features of the input image and compresses them into a low-resolution but information-rich feature representation.
[0083] The decoder is tasked with recovering the spatial details of the original image from the high-level features extracted by the encoder and generating the final landform classification result. It typically consists of upsampling layers and convolutional layers, and sometimes includes skip connections to help recover fine-grained spatial information.
[0084] Upsampling Layers: Used to increase the spatial resolution of feature maps. Common upsampling methods include transposed convolution and bilinear interpolation.
[0085] Transposed convolution formula: I upsampled =(I input *K T )↑s
[0086] Among them, K T is the transposed convolution kernel, and ↑s represents the upsampling factor.
[0087] Feature Fusion: To better recover spatial details, the decoder typically combines low-level features from the encoder. This can be achieved through skip connections, where the output of certain layers in the encoder is directly passed to the corresponding layers in the decoder for fusion.
[0088]
[0089] Fusion Operation:
[0090] in, It can be concatenation or element-wise addition.
[0091] Convolutional Layers: Convolutional layers are used in the decoder to further process and refine the feature maps, ensuring that the final output classification results have high accuracy and clarity.
[0092] For example, suppose there is a set of remote sensing images covering Shandong Province with a resolution of 1 meter per pixel, containing a variety of landform types (such as water areas, cities, cultivated land, and mountains). These images are input into the deep learning model of the above-mentioned encoding and decoding structure: the model extracts the typical features of each landform type (such as the blue spectrum characteristics of water areas and the gray spectrum characteristics of cities) through multi-layer convolution and pooling operations. Upsampling and feature fusion operations are used to restore the spatial details of the image and generate classification labels for each pixel. For example, in water areas, the model outputs the label "water areas"; in urban built-up areas, it outputs the label "impervious surface". Generate one or more binary raster images, each image corresponding to a landform type, which is convenient for subsequent GIS operations and geographic data analysis.
[0093] It should be noted that in specific implementation scenarios, based on the above solution and the existing codec architecture, hyperparameter tuning, such as learning rate, batch size, and weight decay coefficient, can be performed. Grid search or random search can be used to find the optimal parameter combination to improve the model's convergence speed and final performance. Various data augmentation techniques (such as rotation, flipping, cropping, and color dithering) can be used to expand the training set, increase the model's robustness and generalization ability, and prevent overfitting.
[0094] In specific implementation scenarios, building on the above solution, you can also visualize the intermediate-layer feature maps extracted by the encoder to help understand how the model captures the different terrain features in the image. This helps identify potential model issues and guides further improvements. By analyzing the importance of the features extracted by each convolutional layer to the final classification results and identifying key feature maps, you can optimize the model structure or training strategy accordingly.
[0095] In specific implementation scenarios, building on the above solution, you can also convert the floating-point weights in the model into low-precision integer representations (such as 8-bit integers) to reduce model size and speed up inference while maintaining classification accuracy. This removes redundant neurons or connections, simplifies the model structure, reduces computational complexity, and is suitable for deployment on resource-constrained devices.
[0096] S200 , extracting a single-band label corresponding to each landform type from the classification result, and generating a binary raster image with the single-band label.
[0097] As mentioned above, after a deep learning model is trained and applied to remote sensing images, it outputs a classification result that includes various landform types. This classification result is typically a multi-channel or multi-class raster image, in which each pixel is assigned a class label (e.g., water area, urban area, cultivated land, etc.). These labels are represented by different numerical values, forming a multidimensional classification map.
[0098] In order to facilitate subsequent processing and analysis, it is necessary to extract the single-band label corresponding to each landform type from this multi-category classification result. The specific operations are as follows: First, determine the landform type to be extracted (such as water, city, mountain, etc.). Check each pixel in the classification result one by one to determine whether it belongs to the selected landform type. For each selected landform type, create a new single-band raster image. In this new image: If a pixel belongs to this landform type, the value of the pixel is set to "1" (or other specific value), indicating that the pixel belongs to this landform type. If it does not belong, its value is set to "0" (or other background value), indicating that it is not an area of this landform type.
[0099] After completing the above steps, a single-band binary raster image is generated for each landform type. These images have the following characteristics: Single-band: Each image contains only one band, representing a specific landform type. Binarized: Each pixel in the image has only two possible values: "1" indicates that the pixel belongs to the corresponding landform type, and "0" indicates that it does not.
[0100] These single-band binary raster images can be used for a variety of purposes: as input data for more complex geographic information processing, such as vectorization and slope calculation. The spatial distribution of a specific landform type can be analyzed to facilitate thematic mapping or specialized research. Multiple single-band images can be overlaid for comprehensive analysis to understand the relationships between different landform types.
[0101] For example, after processing a trained deep learning model, a classification result image of a remote sensing image of an urban area with a resolution of 1 meter per pixel is obtained. This image is a multi-class raster image, and each pixel is assigned a class label:
[0102] 0 represents background or unclassified area
[0103] 1 represents water area
[0104] 2 represents urban built-up areas (impervious surfaces)
[0105] 3 represents green space
[0106] For example, in this classification result image, a specific area may contain features such as rivers, buildings, and parks.
[0107] Next, it is necessary to extract the single-band label of each landform type from this multi-category classification result and generate the corresponding binary raster image.
[0108] Traverse each pixel in the entire classification result image and check whether it belongs to the "water" category (that is, the label is 1). If it is, set the value of the pixel in the new single-band image to "1", otherwise it is set to "0". Generate a single-band binary raster image with only water areas marked as "1". All non-water areas (including urban built-up areas, green spaces, etc.) are marked as "0".
[0109] Traverse each pixel in the classification result image and check whether it belongs to the "urban built-up area" category (i.e., label 2). If so, set the value of that pixel in the new single-band image to "1", otherwise set it to "0". Generate a single-band binary raster image with only urban built-up areas labeled "1". All non-urban built-up areas (including water areas, green spaces, etc.) are labeled "0".
[0110] Traverse each pixel in the classification result image and check whether it belongs to the "Green Space" category (i.e., label 3). If so, set the value of that pixel in the new single-band image to "1", otherwise set it to "0". Generate a single-band binary raster image with only green space labeled "1". All non-green space areas (including water areas, urban built-up areas, etc.) are labeled "0".
[0111] Through the above steps, an independent single-band binary raster image is generated for each landform type (water area, urban construction area, green space). These images have the following characteristics: each image contains only one band, representing a specific landform type. Each pixel value in the image has only two possible values: "1" indicates that the pixel belongs to the corresponding landform type, and "0" indicates that it does not belong. The binary raster image with a single-band label is converted into a vector map, and the vector map is combined with the elevation information to generate multidimensional geographic data.
[0112] It should be noted that in specific implementation scenarios, based on the above scheme, if classification results are available for multiple time periods, changes in specific landform types, such as urban expansion rate and forest cover, can be monitored by comparing single-band binary raster images from different time periods. By performing difference analysis on single-band labeled images from two time periods, the specific location and scope of landform type changes can be accurately identified, providing data support for disaster warning and environmental protection.
[0113] In specific implementation scenarios, building on the above scheme, we can also estimate the ecological service value provided by various landforms within the study area, such as carbon sequestration capacity and water conservation, based on different landform types and areas, combined with existing ecosystem service value models. The distribution of landform types can be used to assess the vulnerability of a region's ecosystem and help formulate targeted conservation measures.
[0114] In specific implementation scenarios, building on the above approach, we can also determine the most common landform types surrounding a particular landform type. This helps us understand the relationships between different landform types, for example, whether green spaces are often surrounded by water or built-up areas. We can also create buffer zones for specific landform types to analyze their impact on the surrounding environment, such as the impact of rivers (water bodies) on nearby land use.
[0115] S300: Convert the binary raster image with the single-band label into a vector map, and combine the vector map with the elevation information to generate multidimensional geographic data.
[0116] As mentioned above, single-band binary raster images of each landform type have been generated (for example, water area, urban construction area, green space, etc.). Ensure that these raster images have a unified spatial reference system (such as WGS84) so that the coordinate system is consistent in subsequent operations.
[0117] First, identify the boundaries of the target landform type in the binary raster image. This is usually achieved through edge detection algorithms, such as Canny edge detection or simple contour extraction methods. For each continuous "1" value area (that is, the part belonging to a specific landform type), use an algorithm (such as Marching Squares or Sobel operator) to determine its boundary. Convert these boundaries into geometric objects (such as Polygon or polygons). Each polygon represents an independent landform area and is assigned corresponding attributes (such as the name of the landform type). Commonly used vector formats include Shapefile, GeoJSON, etc., which are convenient for further processing and analysis in GIS software.
[0118] Make sure you have a digital elevation model (DEM) with the same spatial resolution and coordinate system as the vector map. If the DEM resolution does not match the vector map, you will need to resample the DEM (e.g., using bilinear interpolation) to make it consistent with the vector map. Perform a spatial overlay analysis on each polygon in the vector map with the corresponding DEM data, and calculate and record the terrain parameters within the polygon. Common terrain parameters include:
[0119] Calculate the average elevation of all pixels within the polygon. Use the Slope algorithm to calculate the ground slope angle at each location. Determine the orientation of the terrain. Based on these calculations, add a new attribute field to each polygon in the vector map to store these terrain parameter values.
[0120] Save a vector map containing landform types and their associated terrain parameters as a multidimensional geographic dataset. This dataset contains not only surface cover information but also detailed terrain descriptions, making it suitable for more complex geographic analysis tasks.
[0121] For example, a map of urban green space distribution obtained by satellite image classification (0 represents non-green space and 1 represents green space). Make sure that the raster image has a unified spatial reference system and the resolution is suitable for subsequent analysis. Obtain a digital elevation model (DEM) of the study area, such as SRTM (Shuttle Radar Topography Mission) data. If the resolution of the DEM does not match the binary raster image, the DEM needs to be resampled to make it consistent with the vector map. Use GIS software (such as QGIS or ArcGIS) to process the binary raster image:
[0122] Identify all pixel blocks representing "green space" and convert these contiguous pixel blocks into polygon features. Each polygon represents an area of green space. Add a "type" attribute to each polygon, marking it as "green space".
[0123] Use GIS tools to spatially overlay the vectorized green space polygons with the DEM data. For each green space polygon, calculate the following terrain parameters: Calculate the average elevation of all pixels within the green space polygon's coverage area. Calculate the ground slope angle within the green space using the Slope algorithm. Determine the orientation of each component within the green space.
[0124] The terrain parameters calculated above are added as new attributes to each green space polygon. For example, a typical green space polygon may contain the following attributes: "Type = Green Space", "Average Elevation = 50 meters", "Average Slope = 5 degrees", "Main Slope = Southeast".
[0125] It should be noted that in specific implementation scenarios, in addition to the average elevation, the above scheme can also be used to further analyze the slope distribution and aspect characteristics of each landform type. For example, studying the growth of a certain type of vegetation (such as forests) on different slopes and slope aspects is very valuable for ecological research. Calculating the terrain roughness or complexity index within each landform type area can help identify potential geological disaster risk areas, such as landslides and mudslides.
[0126] In specific implementation scenarios, building on the above approach, we can also determine the most common landform types surrounding a particular landform type, helping to understand the interrelationships between different landform types. For example, are urban green spaces often surrounded by water or other green areas? We can also create buffer zones for specific landform types and analyze the presence of other landforms within these zones. For example, analyzing the density of artificial buildings within a certain range on either side of a river can be used for water resource management and environmental protection.
[0127] In specific implementation scenarios, building on the above scheme, if classification results are available for multiple time periods, vector maps and elevation information from different time periods can be compared to monitor trends in specific landform types. For example, this can be used to track changes in wetland area over time and assess the effectiveness of environmental remediation measures. By comparing vector maps from two time periods, the specific locations and extent of landform changes can be identified. This can help promptly detect illegal construction activities or changes in the natural environment, supporting the development of sustainable development strategies.
[0128] According to one embodiment of the present application, before training the deep learning model for landform recognition based on remote sensing images, adjusting the pre-training weights to optimize the image encoder, and generating classification results, the method further includes:
[0129] Collect remote sensing images of different resolutions and annotate them according to different landform types;
[0130] Obtaining a digital elevation model as elevation information;
[0131] The collected remote sensing images and elevation information are subjected to denoising and standardization processing.
[0132] As mentioned above, first, remote sensing imagery covering a wide range of landform types must be collected. These images may come from different satellite or aerial imaging platforms and therefore have varying spatial, spectral, and temporal resolutions. The collected remote sensing imagery should cover as many landform types as possible (e.g., forests, deserts, grasslands, urban areas, etc.) to ensure that the trained model has broad applicability.
[0133] Next, these remote sensing images need to be annotated manually or automatically, labeling each pixel or group of pixels as a specific landform type. This process is the foundation of supervised learning, as it is the only way for deep learning models to learn the characteristic patterns corresponding to different landform types. High-quality annotated data is crucial to improving model accuracy.
[0134] In addition to remote sensing imagery, a Digital Elevation Model (DEM) of the target area is also required. A DEM provides information on ground elevation, which is very helpful for understanding and distinguishing certain landform types. For example, topographic features such as mountains, canyons, and plains are particularly evident in elevation data. By incorporating elevation information, landform types can be more accurately classified, improving the quality of classification results.
[0135] In practical applications, the collected remote sensing images and elevation data often contain noise and other forms of interference, which may affect the performance of the model. Therefore, before using this data, it must be preprocessed, including but not limited to:
[0136] Denoising: Use filtering techniques to remove random noise from images while preserving important terrain and landform features.
[0137] Normalization: Adjust the grayscale value range of image and elevation data to meet the model input requirements. Typically, the data is scaled to a specific range (such as between 0 and 1) to facilitate neural network training.
[0138] In addition, other forms of data augmentation operations, such as rotation, flipping, and cropping, can be performed to increase the diversity of the training set and further improve the generalization ability of the model.
[0139] According to one embodiment of the present application, before training the deep learning model for landform recognition based on remote sensing images, adjusting the pre-training weights to optimize the image encoder, and generating classification results, the method further includes:
[0140] combining the spectral band threshold of the remote sensing image with a preset elevation threshold to screen and assign landform labels;
[0141] Unifying the elevation information with the spatial coordinate system and resolution of the remote sensing image;
[0142] The anomalies in elevation or areas with sudden changes in terrain are eliminated to generate the labeled dataset.
[0143] As mentioned above, first, according to the specific conditions of the study area, define the characteristics of various landform types and set corresponding spectral band thresholds for them. For example:
[0144] Water area: The band threshold is (R=10, G=78, B=151).
[0145] Green land (forest, mountain, grassland): The band threshold is (R=0, G=123, B=9).
[0146] Impervious surfaces (such as urban built-up areas): The band threshold is (R=155, G=36, B=22).
[0147] Combine elevation information to set thresholds: In addition to spectral band thresholds, elevation information also needs to be considered. Different landform types often have specific elevation ranges. For example:
[0148] Water areas: Elevation values are typically lower, perhaps set to <100 meters.
[0149] Mountainous areas: The elevation value is higher and may be set to >500 meters.
[0150] Urban built-up areas: have a wide range of elevations, but are generally located in low altitude areas, such as 0-300 meters.
[0151] Screening and assigning labels: For each pixel, the spectral band value and the corresponding elevation value are combined to determine whether it meets the landform type conditions set above. If a pixel meets both the spectral band threshold and the elevation threshold for a certain landform type, it is assigned the corresponding landform label. For example, if a pixel has a band value of (R=10, G=78, B=151) and an elevation value less than 100 meters, it is labeled as "water area."
[0152] Ensure that the digital elevation model (DEM) and remote sensing imagery use the same spatial coordinate system (e.g., WGS84 WebMercator). If the two coordinate systems differ, coordinate conversion techniques must be used to unify them. This step ensures data consistency and accuracy in subsequent processing.
[0153] Check and adjust the resolution of the DEM and remote sensing image to ensure they are consistent. If the resolutions do not match, resampling methods (such as bilinear interpolation or nearest neighbor interpolation) can be used to adjust the DEM resolution to match the remote sensing image. This ensures that the pixel and elevation values at each corresponding location are correctly aligned, facilitating joint analysis.
[0154] In practical applications, elevation data may contain some outliers (such as extremely high or low values at cliffs), which can lead to misclassification. Therefore, these outliers need to be removed during the labeling process. You can filter out unreasonable data points by setting reasonable upper and lower elevation limits.
[0155] Some areas may have sudden changes in topography (such as landslides, excavations, etc.). These areas have unstable geomorphic features and are not suitable for direct model training. By analyzing the rate of elevation change or other topographic parameters, these areas can be identified and removed to avoid interference with model training.
[0156] After completing these steps, qualified remote sensing image pixels are combined with their corresponding elevation values and assigned landform labels based on the specified criteria. This ultimately creates a high-quality annotated dataset containing precise landform type labels and corresponding elevation information, laying a solid foundation for subsequent deep learning model training.
[0157] According to one embodiment of the present application, the deep learning model for landform recognition is trained based on remote sensing images, pre-training weights are adjusted to optimize the image encoder, and classification results are generated, specifically:
[0158] An improved encoder-decoder architecture is adopted, starting from pre-trained weights, and the encoder is optimized through a cross-entropy loss function and back-propagation to extract the semantic features of the remote sensing image;
[0159] The encoder extracts high-level features, and the decoder restores spatial details through upsampling. The Softmax activation function outputs the category probability distribution of each pixel and converts it into a binary raster image to complete the landform classification.
[0160] By comparing the differences between the model output and the annotated labels, the gradient descent algorithm is used to dynamically adjust the convolution kernel weights of the encoder to enhance the ability to distinguish landform features while maintaining high-resolution spatial information.
[0161] As mentioned above, a multi-layer convolutional neural network (CNN) is used to construct an encoder to extract high-level semantic features from the input remote sensing image. The encoder typically consists of multiple convolutional layers, pooling layers, and nonlinear activation functions. Each convolutional layer scans the image through filters to extract local features, and then gradually reduces the spatial size but increases the feature depth through downsampling (such as max pooling).
[0162] The decoder's task is to recover the spatial details of the original image from the high-level features extracted by the encoder. It usually contains upsampling layers (such as transposed convolution or bilinear interpolation) and convolution layers to gradually enlarge the feature map and refine the prediction results.
[0163] To speed up the training process and improve the initial performance of the model, weights pre-trained on large-scale datasets (such as ImageNet) can be used as initialization parameters for the model. These weights have learned how to effectively extract common image features, providing a good starting point for specific tasks (such as landform classification).
[0164] After introducing the pre-trained weights, the model is fine-tuned for a specific application scenario (i.e., landform recognition) using the backpropagation algorithm and the cross-entropy loss function. This is done to enable the model to better adapt to new datasets and learn more specific landform features.
[0165] The encoder extracts semantic information from remote sensing images through a series of convolution operations. Each convolution operation captures different levels of features, from edges and textures to more complex structures and patterns. During training, the model calculates the difference between its output and the true label (i.e., the loss) and adjusts the convolution kernel weights in the encoder using a gradient descent algorithm. This process aims to minimize the loss function, thereby optimizing the model parameters and enabling it to more accurately extract landform features.
[0166] The decoder receives the high-level feature representation from the encoder and gradually restores the spatial resolution of the image through upsampling. This step is crucial for maintaining the precision of the classification results. The final layer of the decoder typically applies a Softmax activation function to convert the probability distribution of each pixel into a specific class label. For example, in a multi-class landform classification task, Softmax assigns a probability value to each pixel belonging to each class, ultimately selecting the class with the highest probability as the prediction for that pixel.
[0167] After Softmax activation, the model outputs a probability distribution for each pixel belonging to different landform types. Based on a set threshold (usually 0.5), the probability values are converted to binary labels (0 or 1). For example, if the probability of a pixel belonging to water is greater than 0.5, it is labeled as water; otherwise, it is labeled as background or another type.
[0168] By comparing the model's output with the labeled labels, an error is calculated. This error signal is used to guide the update of the model parameters. The gradient descent algorithm is used to dynamically adjust the weights of the convolution kernels in the encoder based on the error backpropagation. The goal is to reduce the error and enhance the model's ability to distinguish different landform types. Throughout the training process, special attention is paid to maintaining high-resolution spatial information, which is crucial for accurate landform classification. Through reasonable network design (such as skip connections) and training strategies (such as appropriate learning rate scheduling), the model is ensured to capture macroscopic terrain features while retaining microscopic details.
[0169] According to one embodiment of the present application, extracting the single-band label corresponding to each landform type from the classification result and generating a binary raster image with the single-band label is specifically as follows:
[0170] Process the binary raster image generated by classification into blocks;
[0171] For each landform type, the classification label of each pixel is traversed. If the pixel belongs to the target type, it is set to 1 in the corresponding single-band image, otherwise it is set to 0, forming a binary value.
[0172] A single-band binary image is generated for each landform type, and multiple single-category binary raster images are finally output.
[0173] As mentioned above, large binary raster images are split into smaller blocks (e.g., 512×512 pixels) so that they can be loaded and processed block by block, reducing memory usage. Block processing can parallelize operations and speed up processing. Choose an appropriate block size based on your computing resources and needs. Common block sizes are 512×512 or 1024×1024 pixels. Chop the original binary raster image into the selected blocks, ensuring that there is no overlap or that there is an appropriate amount of overlap to avoid boundary effects.
[0174] Extract the distribution of each landform type from the multi-category classification results to form an independent single-band binary image. First, determine the landform type to be extracted (such as water area, urban built-up area, green space, etc.). For each pixel in the block, check whether its classification label belongs to the target landform type. If so, set the value of the pixel in the corresponding single-band image to 1; if not, set its value to 0.
[0175] In this context, binarization means creating an image with only two possible values (usually 0 and 1). 1 indicates that the pixel belongs to the target landform type, while 0 indicates that it does not. A new single-band raster image is created for each landform type and all its pixels are initialized to 0. For each pixel, if it is classified as the landform type being processed, the pixel value is set to 1 in the corresponding single-band image. Otherwise, the pixel value remains 0.
[0176] Each single-band binary image represents a specific landform type, facilitating subsequent thematic mapping, spatial analysis, or integration with other datasets. Repeat the above process to generate a separate single-band binary image for each landform type (e.g., water area, urban built-up area, green space, etc.). Save each generated single-band binary image as a separate file in GeoTIFF or other raster format that supports geographic information.
[0177] After processing, you'll get a set of single-band binary raster images, each corresponding to a specific landform type. For example, one image only marks the locations of water (1 for water, 0 for non-water). Another image only marks the locations of urban built-up areas (1 for urban built-up areas, 0 for other areas). And yet another image marks the locations of green spaces (1 for green spaces, 0 for other areas).
[0178] According to one embodiment of the present application, the converting of the binary raster image with the single-band label into a vector map, and combining the vector map with the elevation information to generate multidimensional geographic data, is specifically as follows:
[0179] Converting the binary raster image into a projected coordinate system consistent with the elevation information;
[0180] Converting continuous regions of the binary raster image into polygonal surface elements using a region segmentation and contour extraction algorithm;
[0181] Performing bilinear interpolation resampling on the elevation information so that the spatial resolution is completely consistent with the vector map;
[0182] Based on the resampled elevation information, the terrain slope and slope direction of each pixel are calculated by using a Sobel operator or a directional derivative;
[0183] Combined with the category labels of the vector map, the elevation information and slope data of the corresponding area are extracted to generate multidimensional geographic data.
[0184] As mentioned above, ensure that the raster image and elevation data are in the same spatial reference system so that subsequent operations can correctly perform spatial matching and analysis. First, confirm the coordinate system currently used by the binary raster image and elevation data (such as digital elevation model DEM). If the coordinate systems of the two are different, you need to use GIS software or related tools (such as GDAL) to convert the coordinate system of the binary raster image to the coordinate system that matches the elevation data. This usually involves recalculating the position of each pixel to adapt to the new coordinate system.
[0185] Convert similar features (consisting of continuous pixels) in a binary raster image into a vector format (polygons) that is easy to process and analyze. Identify and separate contiguous regions within the raster image representing the same landform type. Trace and record paths along the boundaries of these contiguous regions, forming closed loops known as polygon outlines. Convert these outlines into vector polygonal features, each representing a specific landform type.
[0186] Ensure that the spatial resolution of the elevation data matches that of the vectorized relief type map to accurately combine the two data. Determine the target resolution based on the resolution of the vectorized relief type map. Resample the original elevation data to the target resolution using bilinear interpolation. This process estimates the elevation at the new location by taking a weighted average of the four nearest neighboring points.
[0187] Calculates the basic physical properties of terrain—slope (the slope of the terrain) and aspect (the direction it faces)—for further geographic analysis. Use the Sobel operator or other suitable methods (such as those based on directional derivatives) on the resampled elevation data to calculate the local slope and aspect at each pixel. Two new raster layers are generated: one representing slope and the other representing aspect.
[0188] Integrate multi-dimensional information such as landform type, elevation, slope, etc. to create a dataset containing rich geographic features. Use GIS software to spatially connect the vectorized landform type map with the corresponding elevation information and slope data. This means that for each polygon in the vector map, find and record the statistical values of the elevation and slope within its coverage area (such as average, maximum, minimum, etc.). Integrate the above information into a multidimensional geographic database, which may include but is not limited to multiple attribute fields such as landform type, elevation, slope, etc., to support complex geographic analysis and visualization.
[0189] A second embodiment of the present application provides a system for generating multi-dimensional landform vector data based on semantic segmentation of remote sensing images, comprising:
[0190] The classification module is used to train a deep learning model for landform recognition based on remote sensing images, adjust pre-trained weights to optimize the image encoder, and generate classification results;
[0191] An extraction module, configured to extract a single-band label corresponding to each landform type from the classification result, and generate a binary raster image with the single-band label;
[0192] The conversion module is used to convert the binary raster image with the single-band label into a vector map, and combine the vector map with the elevation information to generate multidimensional geographic data.
[0193] According to one embodiment of the present application, it further includes:
[0194] The preprocessing module is used to collect remote sensing images of different resolutions, annotate them according to different landform types, obtain digital elevation models as elevation information, and perform denoising and standardization on the collected remote sensing images and elevation information.
[0195] According to one embodiment of the present application, the preprocessing module further includes:
[0196] It is used to combine the spectral band threshold of the remote sensing image with the preset elevation threshold to screen and assign landform labels; unify the elevation information with the spatial coordinate system and resolution of the remote sensing image; eliminate elevation outliers or areas with sudden terrain changes to generate the labeled dataset.
[0197] Figure 3An example of a physical structure diagram of an electronic device is shown below. Figure 3 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute a method for generating multi-dimensional landform vector data based on semantic segmentation of remote sensing images in any embodiment of the first aspect above, the method comprising:
[0198] Train a deep learning model for landform recognition based on remote sensing images, adjust pre-trained weights to optimize the image encoder, and generate classification results;
[0199] The landform recognition deep learning model includes an encoder composed of a multi-layer convolutional network and a decoder with an upsampling and feature fusion architecture;
[0200] Extracting a single-band label corresponding to each landform type from the classification results, and generating a binary raster image with the single-band label;
[0201] The binary raster image with the single-band label is converted into a vector map, and the vector map is combined with the elevation information to generate multidimensional geographic data.
[0202] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0203] Example 2
[0204] Public multi-resolution remote sensing landform category raster datasets were collected and preprocessed, combined with corresponding elevation value information, and then labels were assigned to each landform category according to predetermined annotation rules to form a labeled dataset. In the data preprocessing stage, a filter was first used to remove noise from the image and the remote sensing image was normalized. The normalization formula is as follows:
[0205]
[0206] Where X is the pixel value of the original image, μ is the mean of the image, and σ is the standard deviation of the image.
[0207] Next, we perform image segmentation. Since high-resolution remote sensing images are usually large, directly loading the entire image may cause memory overflow or low computational efficiency. Therefore, we use the image segmentation method to divide the image into multiple smaller blocks and process them one by one. Assuming the image size is m×n, we will split the image into small blocks of size w×h. The specific operation is as follows:
[0208] First, the image is divided into blocks. The image block formula is as follows:
[0209] X block =X[i·w:(i+1)·w,j·h:(j+1)·h]
[0210] Where X is the original image, w and h are the width and height of the block, i and j are the row and column indices of the block. In this way, the entire image is divided into multiple small blocks, which are loaded and processed block by block, significantly reducing memory consumption.
[0211] Next, use the logical operator "AND" to filter data and assign labels. The specific operations are as follows:
[0212] When the band information and elevation information of the landform category meet specific conditions at the same time, the corresponding landform label is assigned to the pixel.
[0213] if(X band ≥a)AND(X elevation ≤b)
[0214] label=category1
[0215] Among them, a and b are thresholds set according to the landform characteristics.
[0216] Then a label is assigned to each landform category to form a labeled dataset.
[0217] A landform classifier network based on image encoder and decoder structure is constructed, and the preprocessed raster dataset is input into the network for training.
[0218] In the classifier, the image encoder is responsible for extracting high-level features from the image. The encoder typically consists of a multi-layer convolutional network, with each layer extracting higher-level semantic features through convolution operations. After each convolution operation, pooling is used to reduce the spatial dimensionality. The encoder outputs a compressed feature map containing the high-level semantic information of the image. The convolution and pooling operations are formulated as follows:
[0219] X encoded =Conv(X input ,W conv ,b conv )and X encoded =Pooling(X encoded )
[0220] Among them, X input is the input image, W conv and b conv They are the convolution kernel and bias term respectively, and the pooling operation is used to reduce the image size.
[0221] In the decoder part, the decoder is used to restore the spatial details of the image. Through upsampling and convolution operations, the decoder gradually restores the low-resolution feature map to the size of the original image, and finally obtains the classification result.
[0222] Upsampling and convolution operation formula:
[0223] X encoded =Upsample(X encoded )and X output =Conv(X encoded ,W decoded ,b deconv )
[0224] Among them, Upsample(X encoded ) is the upsampling operation, W decoded and b deconv is the convolution kernel and bias term of the decoder, X output is the classification result.
[0225] During the training process, optimization techniques are used to improve training efficiency, ultimately enabling the model to learn the geomorphological features in remote sensing images.
[0226] Then, the decoder in the classifier outputs the probability distribution of each pixel belonging to different landform categories. This process uses the network model to infer the features of the image to obtain the relative probability of each pixel belonging to each category. The formula is as follows:
[0227]
[0228] Among them, f(z j ) is the result of the network model processing the input feature map. Through the normalization process, the probability of each pixel belonging to each category is obtained. Each pixel is then assigned to a landform category, generating a classification probability map, which is then converted into a binary raster image that clearly indicates the landform category to which each pixel belongs.
[0229] In order to further optimize the classification results, the present invention constructs a band extraction algorithm module.
[0230] Step 1: Extract basic information from the input binary raster image
[0231] Assume that the input binary raster image image I has W width and H height, and contains Band bands.
[0232] I={I[x,y,z]},x=1,2,...,W,y=1,2,...,H,z=1,2,...,Band
[0233] Where I[x,y,z] represents the pixel value of the zth band of the binary raster image I at the coordinate (x,y).
[0234] Then, the channel information of each band is extracted from the input binary raster image. Each band Bi corresponds to a band of the binary raster image, and the output is a two-dimensional binary raster image data of each band:
[0235] B i =I[:,:,i],i=1,2,...,Band
[0236] For example, B1 corresponds to the first band of the input image, B2 corresponds to the second band, and so on.
[0237] The output image O has the same spatial resolution (width W, height H) as the input image and the same metadata configuration, but the output image contains only one band (i.e., O = 1), which means that each pixel in the output image will be labeled with the corresponding landform category (binarized label).
[0238] To optimize memory usage, the image is processed in blocks of size block_size. The image is divided into several blocks and a block_size area is processed each time.
[0239] For each block (i,j):
[0240] i is the row coordinate of the current block, j is the column coordinate of the current block, and the window range of each block is:
[0241] block_sizei =[i×block_size,(i+1)×block_size-1]
[0242] block_size j =[j×block_size,(j+1)×block_size-1]
[0243] Each time a part of the image is processed, the band information of that part is calculated and extracted.
[0244] Processing single-band labeled binary raster image data in GIS algorithms, particularly operations such as raster projection coordinate conversion, raster-to-surface conversion, and resampling, involves the following steps and algorithms. The following are Python-based GIS operations and related formulas.
[0245] The goal of raster projection coordinate system conversion is to convert the spatial position of a raster image from one coordinate system or no coordinate system to another coordinate system. The projection transformation formula used is:
[0246] x′=a·x+b
[0247] y′=c·y+d
[0248] Where (x′, y′) is the transformed coordinate, (x, y) is the original coordinate, and a, b, c, d are the coefficients of the transformation matrix.
[0249] In order to facilitate further spatial analysis, the single-band label raster image should be converted into surface feature class data. Through the region segmentation and contour extraction algorithm, the raster data can be converted into polygonal surface feature class.
[0250] The algorithm formula is as follows:
[0251] Based on Python operations, you can use boundary extraction methods to generate surface features.
[0252] Polygon[x,y]={(x1,y1),(x2,y2),...,(x n ,y n )}
[0253] Among them, (x1,y1),(x2,y2),...,(x n ,y n ) are the boundary coordinate points of the polygon, and Polygon[x,y] represents the outline of the area.
[0254] In order to make the resolution of the obtained relief vector data consistent with that of the elevation map data, this application uses a bilinear interpolation algorithm, the formula is as follows:
[0255]
[0256] Among them, I orig is the value of the terrain vector image, (x1, y1), (x2, y2) are the four pixel points in the neighborhood of the target point.
[0257] The DEM image after bilinear interpolation is used to calculate the multidimensional geographic information maps such as slope and aspect according to the calculation formula of multidimensional geographic data such as slope and aspect.
[0258] Take slope as an example:
[0259] Slope can be calculated from the gradient of an elevation image. Assuming the elevation image is a DEM (x, y), where x and y are the spatial coordinates of the image, the slope S(x, y) is the rate of change of elevation, expressed as the maximum slope of each pixel.
[0260] Then, the slope is calculated based on the Sobel operator or directional derivative. The gradient in the horizontal and vertical directions is calculated as follows:
[0261]
[0262] The formula for calculating slope is:
[0263]
[0264] Among them, S x and S y are the gradients of the elevation image in the x and y directions, respectively.
[0265] Example 3
[0266] like Figure 2 As shown, in the specific implementation scenario of the present invention, a remote sensing raster image with a resolution of 1 meter / pixel, covering Shandong Province and containing a variety of landform types is processed, and a method for generating multidimensional landform vector data based on remote sensing image semantic segmentation is used to generate multidimensional geographic vector data.
[0267] The method of this invention first annotates and preprocesses a remote sensing raster image dataset collected from remote sensing equipment with a resolution of 1 meter per pixel, covering Shandong Province and containing a variety of landform types. The specific steps are as follows: First, the remote sensing image dataset is cropped and divided into multiple 512-pixel x 512-pixel blocks (with a horizontal and vertical resolution of 96 dpi and a bit depth of 24 bits) using an image segmentation method. Each block is processed individually to facilitate subsequent analysis. On this basis, according to the predetermined labeling requirements, each small piece of remote sensing image data is labeled. The classification types include green space (covering woodland, mountain, and grassland), impervious surface, water area, and background. The specific band thresholds are: the band threshold Bandcon of impervious surface is (155, 36, 22), the band threshold Bandlv of green space is (0, 123, 9), the band threshold Bandwater of water area is (10, 78, 151), and the band threshold Bandbac of background area is (0, 0, 0).
[0268] After labeling, filters were used to remove noise from the images, and the remote sensing images were normalized to improve image quality and eliminate potential interference. Subsequently, publicly available elevation information (DEM) for Shandong Province was obtained from remote sensing equipment. The cropped multi-geomorphic remote sensing raster dataset, the corresponding labeled dataset, and the corresponding elevation information DEM were combined to form the raster image dataset required for training.
[0269] The labeled and preprocessed raster image dataset is then used to construct and train a landform classifier. This specific embodiment uses an improved DeepLabV3+ codec model for semantic segmentation. This model, based on the original DeepLabV3+ architecture, incorporates a multi-head attention mechanism to enhance the image encoder's feature extraction capabilities and effectively handle complex backgrounds and multidimensional features in the image. The image input data is a labeled and preprocessed remote sensing raster image of size W×H×C, where W and H are the width and height of the image, and C is the number of channels in the image.
[0270] Feature extraction and multi-scale information fusion are performed in the codec. In the image encoder, a deep convolutional neural network (CNN) is used to extract features from the input image and obtain a multi-scale feature map of the image. in (W×H×C), after convolution operation, the feature map F is generated enc (W′×H′×D), where W′ and H′ are the spatial resolutions after downsampling, and D is the depth dimension of the feature map. In order to enhance the context perception ability of the model, a multi-head attention mechanism is added, and its calculation formula is:
[0271]
[0272] Among them, Q, K, and V are query, key, and value matrices respectively, and d k The dimension of the key is the feature map obtained after the attention mechanism, which can more accurately extract the landform features in the remote sensing image.
[0273] In the image decoder, image decoding and label reconstruction are performed, and the deconvolution layer is used to gradually restore the feature map extracted by the encoder to reconstruct the label prediction map with the same size as the original image. The feature map extracted by the encoder is F enc (W′×H′×D), the label prediction map recovered after decoder processing is F dec (W×H×B), where B is the number of classification labels.
[0274] In the decoding stage, the Softmax activation function is used to classify each pixel and generate a landform category prediction for each pixel. For each pixel, the calculation formula of the Softmax function is:
[0275]
[0276] in, represents the score of the i-th pixel belonging to category c, c′ is all categories, P(y i =c|x) is the probability that the pixel belongs to category c. After Softmax classification, the output preliminary classification result is a binary raster image, in which each pixel is labeled as green space, impervious surface or water.
[0277] During model training, the model is trained using a cross-entropy loss function using preprocessed remote sensing image data and corresponding labeled data. Pretrained weights for landform recognition are constructed, effectively improving the performance of the image encoder. These pretrained weights are then used to identify a dataset of remote sensing raster images covering Shandong Province. The model then infers the input remote sensing imagery, outputting a landform classification label for each pixel and obtaining preliminary classification results.
[0278] Each 252x252 binary raster image is merged according to the separately cropped range. In this process, the output image is a binary raster classification result map of size W×H×L, where L is the 3 binary band classes and the value of each pixel corresponds to a landform category label.
[0279] In order to further optimize the classification results, the binarized raster classification result map obtained by model recognition is input into the band extraction algorithm module. The input binary raster image image I has the same range of W width and H height as Shandong Province and contains 3 bands. Then, the channel information of each band is extracted from the input binary raster image. The output of Bandcon for impervious surface, Bandlv for green land and Bandwate for water area are respectively obtained to contain only B con =I[:,:,(155,36,22)], B lv =I[:,:,(0,123,9)] and B water =I[:,:,(10,78,151)] is a binary raster image O with a single label band.
[0280] The output image O has the same spatial resolution (width W, height H) as the input image and the same metadata configuration. The image is processed block by block and written to the output. The entire binary raster image O is divided into several blocks of size block_size = 512x512 to speed up the output of the image.
[0281] The band extraction algorithm is completed to obtain a binary raster image O of a single label band, which is then input into the GIS operation algorithm for GIS operation and combined with geographic information to convert it into a surface feature class:
[0282] The first step is to perform raster projection coordinate system operations on the binary raster image O, project it onto the WGS1984 Web Mercator (auxiliary sphere) coordinate system, and give it geographic calibration so that it can correctly display geographic information.
[0283] The second step is to obtain a single-band label binary raster map of the WGS1984 Web Mercator (auxiliary sphere) coordinate system, and use the boundary extraction method to generate the surface features. con For example):
[0284] Step 1: First, perform threshold judgment on the single-band label binary grid pixel (i, j)
[0285] if(R i,j =155,G i,j =36,B i,j =22), then Z i,j =1
[0286] When this condition is met, the Z i,j The pixel point belongs to the impervious surface type pixel point.
[0287] Step 2: Use the boundary extraction method based on scanning neighborhood, first scan each Z i,j Pixel, find the boundary, and then determine whether the pixel and the surrounding pixels are boundaries. i,j is a boundary pixel if and only if:
[0288]
[0289] The meaning is that when position Z i,j The pixel value on is 1, and its adjacent position Z i′,j′ The pixel value on is 0, then Z i,j This condition allows us to extract boundary pixels and thus form polygon boundaries in raster data.
[0290] Step 3: Extract the boundary Z i,j The coordinate points can be connected to form a closed polygon. If the extracted boundary coordinates are These points can be connected in sequence to form a closed surface, and then the label surface feature map of the impervious surface can be obtained.
[0291] In the third step, the obtained high-resolution label surface feature map of impervious surfaces, water areas, and green areas is inconsistent with the resolution of the elevation map. The resolution of the elevation map needs to be resampled using bilinear interpolation technology to obtain a 1 meter / pixel resolution for the label surface feature map. The process is as follows:
[0292] First calculate the target image size. The resolution of the original elevation map is 50 meters / pixel and the size is (W orig ,H orig ), the resolution of the label feature map is 1 meter / pixel and the size is (W target ,H target ), first calculate the size of the target image. The resolution of the elevation map is r orig = 50 meters / pixel, the resolution of the label face feature map is r orig = 1 meter / pixel, and then calculate the size of the target image as:
[0293]
[0294] Define the bilinear interpolation process, the target label face feature image has a pixel position (x target ,y target ), then corresponding to the source image coordinates (x orig ,y orig ), mapped by the following formula;
[0295]
[0296] Then perform the target ,y target ) to perform bilinear interpolation to determine the four adjacent source image pixels (x1, y1), (x2, y1), (x1, y2) and (x2, y2), whose coordinates should satisfy:
[0297] x1 <x orig <x2
[0298] y1 <y orig <y2
[0299] Then calculate the two interpolation results in the horizontal direction:
[0300]
[0301] Calculate the interpolation result in the vertical direction:
[0302]
[0303] Where f(x1,y1), f(x2,y1), f(x1,y2) and f(x2,y2) are the pixel values of the source image;
[0304] f(x orig ,y target ) is the target pixel (x target ,y target )
[0305] Finally, the interpolation process is applied to the entire elevation map and the surface feature map, and finally the resolution is resampled to 1 meter / resolution using the bilinear interpolation method.
[0306] The relief label raster data in each raster image is converted into a polygon feature class for subsequent spatial analysis and vectorization processing.
[0307] In the fourth step, the corresponding geographic data of slope S(i,j) and aspect G(i,j) are calculated by mapping the resampled elevation map Z(i,j) with a resolution of 1 meter / pixel.
[0308] First use the Sobel operator convolution to calculate the gradient G of the elevation image in the x and y directions x (i,j) and G y (i, j), then for each pixel (i, j), the slope is calculated using the gradient magnitude formula:
[0309]
[0310] For each pixel (i, j), the slope direction is calculated using the gradient direction formula:
[0311]
[0312] After the above steps, the final landform vector data of Shandong Province is generated, which includes green space, impervious surface, water area label data, and slope and aspect map data corresponding to the corresponding landform types.
[0313] Anything not described in this application can be achieved by adopting or drawing on existing technologies.
[0314] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0315] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included in the protection scope of the present application.
Claims
1. A method for generating multi-dimensional landform vector data based on semantic segmentation of remote sensing images, characterized in that: include: Train a deep learning model for landform recognition based on remote sensing images, adjust pre-trained weights to optimize the image encoder, and generate classification results; The landform recognition deep learning model includes an encoder composed of a multi-layer convolutional network and a decoder with an upsampling and feature fusion architecture; Extracting a single-band label corresponding to each landform type from the classification results, and generating a binary raster image with the single-band label; The binary raster image with the single-band label is converted into a vector map, and the vector map is combined with the elevation information to generate multidimensional geographic data.
2. The method according to claim 1, characterized in that Before training the deep learning model for landform recognition based on remote sensing images, adjusting pre-training weights to optimize the image encoder, and generating classification results, the method further includes: Collect remote sensing images of different resolutions and annotate them according to different landform types; Obtaining a digital elevation model as elevation information; The collected remote sensing images and elevation information are subjected to denoising and standardization processing.
3. The method according to claim 2, characterized in that Before training the deep learning model for landform recognition based on remote sensing images, adjusting pre-training weights to optimize the image encoder, and generating classification results, the method further includes: combining the spectral band threshold of the remote sensing image with a preset elevation threshold to screen and assign landform labels; Unifying the elevation information with the spatial coordinate system and resolution of the remote sensing image; The anomalies in elevation or areas with sudden changes in terrain are eliminated to generate the labeled dataset.
4. The method according to claim 1, wherein The method of training a deep learning model for landform recognition based on remote sensing images, adjusting pre-training weights to optimize the image encoder, and generating classification results is as follows: An improved encoder-decoder architecture is adopted, starting from pre-trained weights, and the encoder is optimized through a cross-entropy loss function and back-propagation to extract the semantic features of the remote sensing image; The encoder extracts high-level features, and the decoder restores spatial details through upsampling. The Softmax activation function outputs the category probability distribution of each pixel and converts it into a binary raster image to complete the landform classification. By comparing the differences between the model output and the annotated labels, the gradient descent algorithm is used to dynamically adjust the convolution kernel weights of the encoder to enhance the ability to distinguish landform features while maintaining high-resolution spatial information.
5. The method according to claim 1, wherein The single-band label corresponding to each landform type is extracted from the classification result to generate a binary raster image with the single-band label, specifically: Process the binary raster image generated by classification into blocks; For each landform type, the classification label of each pixel is traversed. If the pixel belongs to the target type, it is set to 1 in the corresponding single-band image, otherwise it is set to 0, forming a binary value. A single-band binary image is generated for each landform type, and multiple single-category binary raster images are finally output.
6. The method according to claim 1, wherein The step of converting the binary raster image with the single-band label into a vector map and combining the vector map with the elevation information to generate multidimensional geographic data is as follows: Converting the binary raster image into a projected coordinate system consistent with the elevation information; Converting continuous regions of the binary raster image into polygonal surface elements using a region segmentation and contour extraction algorithm; Performing bilinear interpolation resampling on the elevation information so that the spatial resolution is completely consistent with the vector map; Based on the resampled elevation information, the terrain slope and slope direction of each pixel are calculated by using a Sobel operator or a directional derivative; Combined with the category labels of the vector map, the elevation information and slope data of the corresponding area are extracted to generate multidimensional geographic data.
7. A system for generating multi-dimensional landform vector data based on semantic segmentation of remote sensing images, characterized in that: include: The classification module is used to train a deep learning model for landform recognition based on remote sensing images, adjust pre-trained weights to optimize the image encoder, and generate classification results; An extraction module, configured to extract a single-band label corresponding to each landform type from the classification result, and generate a binary raster image with the single-band label; The conversion module is used to convert the binary raster image with the single-band label into a vector map, and combine the vector map with the elevation information to generate multidimensional geographic data.
8. The system according to claim 7, characterized in that Also includes: The preprocessing module is used to collect remote sensing images of different resolutions, annotate them according to different landform types, obtain digital elevation models as elevation information, and perform denoising and standardization on the collected remote sensing images and elevation information.
9. The system according to claim 8, characterized in that The pre-processing module further includes: It is used to combine the spectral band threshold of the remote sensing image with the preset elevation threshold to screen and assign landform labels; unify the elevation information with the spatial coordinate system and resolution of the remote sensing image; eliminate elevation outliers or areas with sudden terrain changes to generate the labeled dataset.
10. An electronic device comprising 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 according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Reservoir landform data acquisition method and system based on multi-source data fusion
CN121236614A
A reservoir geomorphology data acquisition method and system based on multi-source data fusion
CN121236614B
Seafloor terrain processing method based on terrain break zone and object-level geomorphic attribute
CN122492968A
Seafloor terrain processing method based on terrain abruptness belt and object-level geomorphic attribute
CN122492968B