Remote sensing image-based local climate region classification system and method
By combining the self-attention mechanism and convolutional networks in remote sensing image classification, the problem of convolutional neural networks being difficult to understand large spatial context features is solved, and more accurate local climate zone classification is achieved.
Patent Information
- Application Number
- CN202411087754.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-10-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Convolutional neural networks have difficulty in fully understanding features in larger spatial contexts in local climate zone classification of remote sensing images, resulting in insufficient classification accuracy.
The remote sensing image LCZ classification network based on the fusion of self-attention mechanism and convolutional network is used. Through the combination of data feature preprocessing, feature extraction and classification network, combined with self-attention calculation and CNN feature extraction, the final feature map is generated for classification.
It improves the accuracy of local climate zone classification of remote sensing images, enables a more comprehensive understanding of image content, captures local details and inter-regional relationships, and achieves precise classification.
Smart Images

Figure CN118864985A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of remote sensing image processing, and more particularly to a local climate zone classification system and method based on remote sensing images. Background Art
[0002] The classification of Local Climate Zones (LCZ) provides a globally applicable method for understanding and assessing the microclimate characteristics of cities and their surrounding areas, which is helpful for urban planning and environmental science research. By providing a standardized urban environmental classification, LCZ remote sensing image classification enables researchers to compare the climate characteristics of different cities, while helping planners design suitable living environments, thereby effectively managing the urban heat island effect and improving energy efficiency.
[0003] Convolutional neural networks (CNNs) are powerful tools for processing images and spatial data and have been widely used in remote sensing data analysis, including LCZ classification. However, despite the excellent performance of CNNs in the application of remote sensing image LCZ classification tasks, they also have some limitations. CNNs are good at capturing local features, but may not be sufficient to fully understand features in a larger spatial context, which is crucial for a comprehensive understanding and differentiation of urban microclimate zones. Therefore, how to improve the accuracy of LCZ remote sensing image classification is an urgent problem that technicians in this field need to solve. Summary of the invention
[0004] In view of this, the present invention provides a local climate zone classification system and method based on remote sensing images, which overcomes the above-mentioned defects.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] A local climate zone classification system based on remote sensing images, comprising: a remote sensing image LCZ classification network based on a fusion of a self-attention mechanism and a convolutional network, wherein the remote sensing image LCZ classification network based on a fusion of a self-attention mechanism and a convolutional network comprises:
[0007] Data feature preprocessing network, used to preprocess the remote sensing images to be classified to obtain preprocessed data;
[0008] A feature extraction network, used for performing self-attention calculation and CNN feature extraction on the preprocessed data to obtain a first feature map and a second feature map; and concatenating the first feature map and the second feature map to generate a final feature map;
[0009] A classification network is used to output the category of the remote sensing image to be classified according to the final feature map.
[0010] Optionally, the data feature preprocessing network includes:
[0011] An image segmentation module is used to segment the remote sensing image to be classified into blocks to obtain a plurality of image blocks;
[0012] A linear embedding module, used for mapping the plurality of image blocks into an embedded image;
[0013] A first deformation module, used for deforming the embedded image to generate an image embedding vector;
[0014] A first attention module, configured to perform preliminary self-attention calculation on the image embedding vector to obtain preliminary attention data;
[0015] The second deformation module is used to deform the preliminary attention data to generate preprocessed data.
[0016] Optionally, the feature extraction network includes multiple self-attention mechanism and CNN fusion sub-modules, and the self-attention mechanism and CNN fusion sub-module includes a self-attention calculation branch and a CNN feature extraction branch.
[0017] Optionally, the self-attention calculation branch includes:
[0018] A third deformation module, used for deforming the preprocessed data to obtain the image embedding vector;
[0019] A second attention module, configured to perform multiple consecutive feature self-attention calculations on the image embedding vector to generate self-attention data;
[0020] A fourth deformation module, used for deforming the self-attention data to obtain self-attention deformation data;
[0021] An image block fusion module is used to perform feature dimension reduction on the self-attention deformation data to generate fused data, namely the first feature map.
[0022] Optionally, the second attention module includes multiple self-attention modules, and the self-attention module includes a first layer normalization, a multi-head attention module, a splicing module, a second layer normalization and a multi-layer perceptron connected in sequence.
[0023] Optionally, the CNN feature extraction branch includes multiple CNN feature extraction modules, which are used to perform feature extraction on the preprocessed data to generate the second feature map.
[0024] Optionally, the remote sensing image LCZ classification network that integrates the self-attention mechanism and the convolutional network adopts cross entropy loss for classification training during training.
[0025] A method for a local climate zone classification system based on remote sensing images, comprising the following steps:
[0026] Acquiring a remote sensing image to be classified, and preprocessing the remote sensing image to be classified to obtain preprocessed data;
[0027] Performing self-attention calculation and CNN feature extraction on the preprocessed data respectively to obtain a first feature map and a second feature map, and splicing the first feature map and the second feature map to generate a final feature map;
[0028] The category of the remote sensing image to be classified is determined based on the final feature map.
[0029] It can be seen from the above technical solution that compared with the prior art, the present invention discloses a local climate zone classification system and method based on remote sensing images. The remote sensing image LCZ classification network based on the fusion of self-attention mechanism and convolutional network fully combines the local feature extraction capability of CNN and the global information processing capability of self-attention mechanism, which can not only capture local details, but also understand the relationship between different regions, so that the network can more comprehensively understand the image content in the LCZ classification task, thereby realizing accurate remote sensing image LCZ classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0031] Figure 1 A schematic diagram of the structure of the remote sensing image LCZ classification network based on the fusion of the self-attention mechanism and the convolutional network provided by the present invention;
[0032] Figure 2 A schematic diagram of the structure of a feature extraction network combining a self-attention mechanism and CNN provided by the present invention;
[0033] Figure 3 A schematic diagram of the structure of the self-attention module provided by the present invention;
[0034] Figure 4 A schematic diagram of the structure of the multi-head attention provided by the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] On the one hand, this embodiment discloses a local climate zone classification system based on remote sensing images, such as Figure 1 As shown, the remote sensing image LCZ classification network based on the fusion of self-attention mechanism and convolutional network includes:
[0037] Data feature preprocessing network, used to preprocess the remote sensing images to be classified to obtain preprocessed data;
[0038] A feature extraction network is used to perform self-attention calculation and CNN feature extraction on the preprocessed data to obtain a first feature map and a second feature map; and the first feature map and the second feature map are spliced to generate a final feature map;
[0039] The classification network is used to output the category of the remote sensing image to be classified according to the final feature map.
[0040] In one embodiment, the data feature preprocessing network includes:
[0041] An image segmentation module is used to segment the remote sensing image to be classified into blocks to obtain multiple image blocks;
[0042] A linear embedding module for mapping multiple image patches into embedded images;
[0043] A first deformation module, used for deforming the embedded image to generate an image embedding vector;
[0044] The first attention module is used to perform preliminary self-attention calculation on the image embedding vector to obtain preliminary attention data;
[0045] The second deformation module is used to deform the preliminary attention data to generate preprocessed data.
[0046] Furthermore, the data feature preprocessing network takes the LCZ remote sensing image (i.e., the remote sensing image to be classified) as input and first transforms the LCZ remote sensing image Perform block processing, the image block size is a hyperparameter , the separated image blocks do not contain overlapping areas, and then linear embedding is used to map these image blocks into image embedding vectors , specifically by a The convolution is completed, and the required image embedding vector is obtained by deformation. The transformation can be formally expressed as:
[0047] (1);
[0048] In the formula, express convolution.
[0049] In one embodiment, the first attention module is composed of two self-attention modules.
[0050] Furthermore, the image is embedded into the vector Input into two consecutive self-attention modules, perform preliminary self-attention calculation, and then obtain the shape of the feature map (i.e. preprocessed data) through deformation operation. The specific calculation can be formalized as:
[0051] (2);
[0052] In the formula, represents the calculation of two consecutive self-attention modules, As the initial input to the feature extraction network.
[0053] In one embodiment, the feature extraction network includes multiple self-attention mechanism and CNN fusion sub-modules, and the self-attention mechanism and CNN fusion sub-module includes a self-attention calculation branch and a CNN feature extraction branch.
[0054] In one embodiment, the self-attention calculation branch includes:
[0055] A third deformation module, used for deforming the preprocessed data to obtain an image embedding vector;
[0056] The second attention module is used to perform multiple consecutive feature self-attention calculations on the image embedding vector to generate self-attention data;
[0057] A fourth deformation module, used for deforming the self-attention data to obtain self-attention deformation data;
[0058] The image block fusion module is used to perform feature dimension reduction on the self-attention deformation data to generate fused data, namely the first feature map.
[0059] In one embodiment, the CNN feature extraction branch includes multiple CNN feature extraction modules, which are used to extract features from the preprocessed data and generate a second feature map.
[0060] Furthermore, in this embodiment, the number of the fusion submodules of the self-attention mechanism and CNN is three, and the three fusion submodules of the self-attention mechanism and CNN preprocess the data. Combine the self-attention mechanism with CNN feature extraction, and finally output the extracted feature map (i.e. the final feature map).
[0061] Furthermore, if Figure 2 As shown in the figure, the feature extraction network includes three fusion sub-modules of self-attention mechanism and CNN. Each fusion sub-module consists of two branches, one is the self-attention calculation branch and the other is the CNN feature extraction branch.
[0062] In the indivual( ) In the fusion submodule of the self-attention mechanism and CNN, the input is an image feature map obtained by the previous feature processing layer Among them, in the self-attention calculation branch, the image feature map First, it is transformed into an image embedding vector through a deformation operation , to change it into a format suitable for self-attention mechanism processing:
[0063] (3);
[0064] In the formula, Represents the three-dimensional image feature map Convert to image embedding vector Deformation operation; After multiple consecutive self-attention modules , to calculate the feature self-attention, which can be formally expressed as:
[0065] (4);
[0066] In the formula, Indicated in In the fusion submodule, the final output of multiple self-attention modules is Indicates that it has passed The calculation of the self-attention module is in the first fusion submodule by default. , in the second fusion submodule , the third fusion After the self-attention is calculated, it is deformed back to a feature map suitable for convolution operation, and the image blocks are fused through a 2×2 convolution to perform feature dimensionality reduction. The specific calculation can be formally expressed as:
[0067] (5);
[0068] In the formula, represent The inverse operation is the deformation operation of converting the image embedding vector into a three-dimensional image feature map. represents a 2×2 convolution, For the The output of the self-attention branch in the fusion submodule.
[0069] In the The CNN feature extraction branch in the fusion submodule, feature map After multiple consecutive CNN feature extraction modules, important feature information is extracted. All CNN feature extraction modules are composed of a 1×1 convolution, a 3×3 convolution, and a 1×1 convolution. The calculation in the CNN feature extraction module can be formally expressed as:
[0070] (6);
[0071] In the formula, represents a 1×1 convolution, represents a 3×3 convolution, Represents the calculation of the CNN feature extraction module. The calculation after multiple CNN feature extraction modules can be formally expressed as:
[0072] (7);
[0073] In the formula, express The calculation of the consecutive CNN feature extraction modules is performed by default in the first fusion submodule. , in the second fusion submodule , the third fusion . Indicated in The output of the CNN feature extraction branch in the fusion submodule.
[0074] Finally, the output of the self-attention branch is fused with the output of the CNN feature extraction branch, that is, concatenation in the channel dimension, and then a 1×1 convolution is performed. The specific calculation can be formally expressed as:
[0075] (8);
[0076] In the formula, Will be the first The input of the fusion submodule, in this embodiment, k=3, therefore, It is the final output of the feature extraction network and will be used as the input of the classification network.
[0077] In one embodiment, the second attention module includes multiple self-attention modules, and the self-attention module includes a first layer normalization, a multi-head attention module, a splicing module, a second layer normalization and a multi-layer perceptron connected in sequence.
[0078] Furthermore, if Figure 3As shown, the self-attention module embeds the image in two dimensions (Embedding) vector As input, the layer normalization calculation is first performed, that is, , and then input it into the multi-head attention for attention calculation. In the multi-head attention mechanism, "head" refers to an independent attention calculation process. Multi-head attention uses multiple independent attention calculation processes, which allows each head to learn the input features from different angles, and then combine this information to form a more comprehensive output. The structure of multi-head attention is as follows Figure 4 shown.
[0079] For each head , embed the input image into the vector Transformed into query (Query, )、Key(Key, ) and Value, ), the calculation process can be formally expressed as follows:
[0080] (9);
[0081] In the formula, , , is a learnable weight matrix specific to each head. In the attention mechanism, the dot product of the query and the key is calculated, which is used to calculate the attention score after scaling, and then the attention score is further calculated with the value. The complete attention calculation can be formalized as follows:
[0082] (10);
[0083] In the formula, is the dimension of the key vector. This scaling step helps avoid The value before the operation is too large. is the normalized exponential function. The function converts the attention of each row into a probability distribution, which represents the attention weight of each output element on each element in the input sequence. Based on the probability distribution calculated in the previous step, the weighted value of the value vector is calculated to generate the output result of the self-attention. This step can be figuratively understood as extracting and combining information from each input element based on the calculated attention.
[0084] The outputs of all heads are then concatenated and transformed through another linear layer to merge the information from different heads. The calculation process can be formally expressed as follows:
[0085] (11);
[0086] In the formula, is a learnable weight matrix, Represents a splicing operation.
[0087] The multi-head attention output is further processed by a multi-layer perceptron (MLP) through residual connections and layer normalization. The whole process can be formally described as follows:
[0088] (12);
[0089] (13);
[0090] Therefore, the calculation of the entire self-attention module can be summarized as:
[0091] (14);
[0092] In the formula, Represents the calculation of the entire self-attention module, represents the input image embedding vector of the self-attention module, represents the output of the self-attention module, which has the same shape as the input.
[0093] The classification network transforms the feature map As input, the final classification result is generated. In the classification network, the feature map First, it passes through the linear rectification function ReLU, and then uses a 1×1 convolution to reduce the feature depth and fuse the feature channels, converting the complex features into more advanced feature representations that are more directly related to the classification task. The function outputs the predicted probability of each LCZ category. The specific calculation can be formally expressed as follows:
[0094] (15);
[0095] In the formula, Represents the final LCZ classification result.
[0096] In one implementation, the remote sensing image LCZ classification network that integrates the self-attention mechanism and the convolutional network uses cross entropy loss for classification training during training.
[0097] Furthermore, after building a remote sensing image LCZ classification network based on the fusion of self-attention mechanism and convolutional network, the cross-entropy loss (Cross-Entropy Loss, ) The network is trained for LCZ remote sensing image classification, which is formally expressed as:
[0098] (16);
[0099] In the formula, is the total number of LCZ categories, is the true value label, It is predicted to be When the network is trained until the loss no longer decreases, it means that the network training has reached stability and the training is completed, that is, the trained remote sensing image LCZ classification network based on the fusion of self-attention mechanism and convolutional network is obtained.
[0100] Furthermore, the trained remote sensing image LCZ classification network based on the fusion of self-attention mechanism and convolutional network is used to perform remote sensing image LCZ classification test, which is formally expressed as:
[0101] (17);
[0102] In the formula, represents the trained remote sensing image LCZ classification network based on the fusion of self-attention mechanism and convolutional network. represents the LCZ remote sensing image to be tested, Indicates the LCZ classification result obtained by the test.
[0103] On the other hand, this embodiment also discloses a method for a local climate zone classification system based on remote sensing images, the specific steps of which are:
[0104] Acquire a remote sensing image to be classified, and preprocess the remote sensing image to be classified to obtain preprocessed data;
[0105] Perform self-attention calculation and CNN feature extraction on the preprocessed data to obtain the first feature map and the second feature map, and then concatenate the first feature map and the second feature map to generate the final feature map;
[0106] The category of the remote sensing image to be classified is determined based on the final feature map.
[0107] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0108] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A local climate zone classification system based on remote sensing images, characterized in that: include: A remote sensing image LCZ classification network based on the fusion of a self-attention mechanism and a convolutional network, wherein the remote sensing image LCZ classification network based on the fusion of a self-attention mechanism and a convolutional network comprises: Data feature preprocessing network, used to preprocess the remote sensing images to be classified to obtain preprocessed data; A feature extraction network, used to perform self-attention calculation and CNN feature extraction on the preprocessed data respectively to obtain a first feature map and a second feature map; and to concatenate the first feature map and the second feature map to generate a final feature map; A classification network is used to output the category of the remote sensing image to be classified according to the final feature map.
2. A local climate zone classification system based on remote sensing images according to claim 1, characterized in that: The data feature preprocessing network includes: An image segmentation module is used to segment the remote sensing image to be classified into blocks to obtain a plurality of image blocks; A linear embedding module, used for mapping the plurality of image blocks into an embedded image; A first deformation module, used for deforming the embedded image to generate an image embedding vector; A first attention module, configured to perform preliminary self-attention calculation on the image embedding vector to obtain preliminary attention data; The second deformation module is used to deform the preliminary attention data to generate preprocessed data.
3. A local climate zone classification system based on remote sensing images according to claim 2, characterized in that: The feature extraction network includes multiple self-attention mechanisms and CNN fusion submodules, and the self-attention mechanism and CNN fusion submodule includes a self-attention calculation branch and a CNN feature extraction branch.
4. A local climate zone classification system based on remote sensing images according to claim 3, characterized in that: The self-attention calculation branch includes: A third deformation module, used for deforming the preprocessed data to obtain the image embedding vector; A second attention module, configured to perform multiple consecutive feature self-attention calculations on the image embedding vector to generate self-attention data; A fourth deformation module, used for deforming the self-attention data to obtain self-attention deformation data; An image block fusion module is used to perform feature dimension reduction on the self-attention deformation data to generate fused data, namely the first feature map.
5. A local climate zone classification system based on remote sensing images according to claim 4, characterized in that: The second attention module includes multiple self-attention modules, and the self-attention module includes a first layer normalization, a multi-head attention module, a splicing module, a second layer normalization and a multi-layer perceptron connected in sequence.
6. A local climate zone classification system based on remote sensing images according to claim 3, characterized in that: The CNN feature extraction branch includes multiple CNN feature extraction modules, which are used to extract features from the preprocessed data and generate the second feature map.
7. The local climate zone classification system based on remote sensing images according to claim 1, characterized in that: The remote sensing image LCZ classification network that integrates the self-attention mechanism and the convolutional network uses cross entropy loss for classification training during training.
8. A method for a local climate zone classification system based on remote sensing images, characterized in that: The specific steps are: Acquiring a remote sensing image to be classified, and preprocessing the remote sensing image to be classified to obtain preprocessed data; Performing self-attention calculation and CNN feature extraction on the preprocessed data respectively to obtain a first feature map and a second feature map, and splicing the first feature map and the second feature map to generate a final feature map; The category of the remote sensing image to be classified is determined based on the final feature map.
Citation Information
Patent Citations
River and lake remote sensing image segmentation method and system based on convolutional neural network and Transform
CN113191285A
Remote sensing image fusion classification method based on joint attention twin network
CN113887645A
Remote sensing image classification method based on CNN-self-attention mechanism hybrid architecture
CN115641473A
Remote sensing image roof recognition method fusing attention mechanism and convolutional neural network
CN117612023A
Cited By
Multi-modal LCZ classification method based on text fusion
CN119723329A
A Multimodal LCZ Classification Method Based on Text Blending
CN119723329B
Remote sensing image semantic segmentation method based on feature interaction enhancement
CN119992099A
