A tree species classification method and system based on Sentinel-2 data and CKAN-LSTM-MHA network for spatiotemporal and spectral integration
By using the CKAN-LSTM-MHA network in the tree species classification, combined with the spectrum, space texture and timing characteristics of the sentry No. 2 data, the problem of failing to make full use of timing changes in the existing technology, achieve higher accuracy and stability of stability and stability Tree category.
Patent Information
- Application Number
- CN202411182056.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-08-27
AI Technical Summary
Existing remote sensing imaging technology and machine learning technology fail to fully utilize timing change information in tree species classification, resulting in the classification accuracy approaching saturation and the inability to effectively utilize timing long-term field survey data.
Adopt the CKAN-LSTM-MHA network based on Pentian No. 2 data, combined with spectroscopy, space texture and timing characteristics, extract spectrum and spatial texture characteristics through the CKAN layer, LSTM layer performs time-order changes, and the multi-header attention mechanism module MHA performs characteristics weighted at the characteristics of the weighted weight Realize the accurate classification of large -scale timing of tree species.
The effective combination of spectroscopy -texture -timing features improves the accuracy and stability of tree species classification, and is suitable for complex tree species classification scenes.
Smart Images

Figure CN118710993B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of tree species classification based on artificial intelligence deep learning, and in particular to a tree species classification method and system based on Sentinel-2 data and CKAN-LSTM-MHA network for time-space spectrum combination. Background Art
[0002] Compared with conventional field surveys, remote sensing technology can monitor forestry ecosystems quickly and efficiently. Sentinel-2, as a high-resolution, multispectral remote sensing image currently available for free, provides strong support for the accurate identification of tree species. With the development of deep learning technology, convolutional networks have the characteristics of autonomous learning to extract spatial distribution features. Combining convolutional neural networks for remote sensing image forestry classification has gradually become a research hotspot and trend. The neural network structure can use millions of parameters as training parameters through back propagation, thereby solving various complex classification tasks in remote sensing images. In addition, deep learning can automatically extract features for classification without manual feature design and selection, which is a great improvement over machine learning.
[0003] Existing remote sensing imaging technology and machine learning technology often only classify tree species from the perspective of spectrum and spatial texture when identifying tree species. This method is suitable for general land objects, but for long-term tree species, the classification cannot fully utilize the temporal change information, the classification accuracy approaches saturation, and it is impossible to effectively utilize the long-term field survey data.
[0004] Therefore, it is urgent to solve the above problems. Summary of the invention
[0005] Purpose of the invention: The first purpose of the present invention is to provide a tree species classification method based on Sentinel-2 data and CKAN-LSTM-MHA network for space-time spectrum combination, which fully considers the spectral characteristics, spatial texture characteristics and time series characteristics of Sentinel-2, realizes the effective combination of spectrum-texture-time series characteristics, and combines with CKAN-LSTM-MHA network to realize large-scale time series tree species accurate classification, and has good stability for complex tree species classification scenarios.
[0006] The second object of the present invention is to provide a tree species classification system based on Sentinel-2 data and CKAN-LSTM-MHA network for spatiotemporal spectral integration.
[0007] Technical solution: To achieve the above objectives, the present invention discloses a tree species classification method based on Sentinel-2 data and CKAN-LSTM-MHA network for spatiotemporal spectrum combination, comprising the following steps:
[0008] S1. Obtain the time-series spectral image data of the Sentinel-2 target location and sample area, obtain the time-series tree species distribution in the sample area, and make tree species labels; the required Sentinel-2 time-series spectral image data is multi-temporal data within one year, and the time coverage of the data is all seasonal phases of the 12 months of the year, and the cloud mask is less than 10%;
[0009] S2. Preprocessing the time series spectral image obtained in step S1 to obtain preprocessed multispectral image data;
[0010] S3. Performing independent principal component analysis on the multispectral image data obtained in step S2 to obtain spectral characteristics of different bands, and segmenting the multispectral image into time-series image blocks;
[0011] S4. Divide the image blocks segmented in step S3 into a time series training data set and a time series verification data set, and combine the two data sets with the tree species labels;
[0012] S5. Build a CKAN-LSTM-MHA network, import the time series training data set obtained in step S4 into the CKAN-LSTM-MHA network, extract spectral features and spatial texture features at the same time in the CKAN layer, flatten the features output by the CKAN layer, and input them into the LSTM layer to extract time series change features, input the extracted time series change features into the multi-head attention mechanism module MHA, obtain the output image features with attention, and input the obtained image features with attention into the fully connected layer for classification; loop training for multiple times until the classification accuracy of the time series verification data set of the CKAN-LSTM-MHA network converges, use the accuracy ACC, precision Precision, recall rate and F1 value indicators to check the classification performance of the CKAN-LSTM-MHA network for the training samples, and save the trained CKAN-LSTM-MHA network;
[0013] S6. Obtain the Sentinel-2 target position and target area time-series spectral image data, with a cloud mask amount of less than 10%; use the method of step S2 to preprocess the Sentinel-2 image of the target area to obtain the preprocessed multispectral image data of the target area, use the CKAN-LSTM-MHA network trained in step S5 to classify the preprocessed multispectral image data of the target area, reconstruct the classified local blocks into raster images, and obtain the tree species classification result map.
[0014] Wherein, step S1 comprises the following steps:
[0015] The time-series spectral images of Sentinel-2 in the target area were downloaded from the official website of the European Space Agency, and the time-series tree species distribution in the sample area was obtained through field surveys.
[0016] Preferably, step S2 comprises the following steps:
[0017] The time series spectral images obtained in step S1 are subjected to geometric correction, radiation correction, image cropping, segmentation and mosaic preprocessing, so that the number of rows and columns of each time series remote sensing image after processing is the same, and there is no cloud-blocked area. If there is a cloud-blocked area in the time series remote sensing image when the satellite passes, it is replaced with image data of the same month in other years; the preprocessed multispectral image data is obtained.
[0018] Furthermore, step S3 includes the following steps:
[0019] The multispectral image data obtained in step S2 is subjected to independent principal component analysis to obtain spectral features of different bands, and the spectral features of the first five bands with the most spectral features are selected as the extracted spectral features. The image is segmented into time-series image blocks of size s*s for input to the network, where 10 <s<30。
[0020] Further, the method for constructing the CKAN-LSTM-MHA network in step S5 includes the following steps:
[0021] The first layer of the CKAN-LSTM-MHA network is the input layer, which adapts the input data to the input layer. Then, two three-dimensional CKAN layers are connected. The convolution kernel size of the two three-dimensional CKAN layers is k*l*t. The activation function of the two three-dimensional CKAN layers uses the relu function. The filters of the two three-dimensional CKAN layers are 32 and 16 respectively. The pixel spectral features are gradually extracted until a three-dimensional feature vector is obtained.
[0022] Then add a deformation layer to transform the 3D feature vector data of the previous layer into data that adapts to 2D input; then add a 2D CKAN layer, the convolution kernel size of the 2D CKAN layer is k*l, the activation function of the 2D CKAN layer uses the relu function, and the filters of the 2D CKAN layer is 64, until a 2D feature vector is obtained;
[0023] Then add a deformation layer to transform the two-dimensional feature vector into data suitable for the LSTM layer input, and then add three LSTM layers, with the number of units in the LSTM layers being 20, 30, and 20 respectively; then add the multi-head attention mechanism module MHA; then add 4 fully connected layers, with the number of neural networks in the fully connected layers being 64, 32, 16, and z respectively, where z is the number of tree species that need to be classified; add a batch normalization layer after each fully connected layer except the last layer; select cross entropy as the neural network loss function, and select Adam optimizer as the optimizer.
[0024] Based on the same inventive concept, the present invention discloses a tree species classification system based on Sentinel-2 data and CKAN-LSTM-MHA network for spatiotemporal spectrum combination, including:
[0025] Acquire sample data units, which are used to obtain Sentinel-2 target location and sample area time-series spectral image data, obtain time-series tree species distribution in the sample area, and make tree species labels; the required Sentinel-2 time-series spectral image data is multi-temporal data within a year, and the time coverage of the data is all seasonal phases of the 12 months of the year, with cloud mask less than 10%;
[0026] A data preprocessing unit is used to preprocess the acquired time-series spectral images to obtain preprocessed multispectral image data, perform independent principal component analysis on the acquired multispectral image data to obtain spectral characteristics of different bands, and segment the multispectral images into time-series image blocks; divide the segmented image blocks into a time-series training data set and a time-series verification data set, and combine the two data sets with tree species labels;
[0027] The model training unit is used to build a CKAN-LSTM-MHA network, import the acquired time series training data set into the CKAN-LSTM-MHA network, extract spectral features and spatial texture features at the same time in the CKAN layer, flatten the features output by the CKAN layer, and input them into the LSTM layer to extract time series change features, input the extracted time series change features into the multi-head attention mechanism module MHA, obtain the output image features with attention, and input the obtained image features with attention into the fully connected layer for classification; the training is repeated for multiple times until the classification accuracy of the time series verification data set of the CKAN-LSTM-MHA network converges, and the classification performance of the CKAN-LSTM-MHA network for training samples is checked using the accuracy rate ACC, precision rate Precision, recall rate and F1 value indicators, and the trained CKAN-LSTM-MHA network is saved;
[0028] The tree species classification unit is used to obtain the time-series spectral image data of the Sentinel-2 target position and target area, with a cloud mask of less than 10%; the Sentinel-2 images of the target area are preprocessed to obtain the preprocessed multispectral image data of the target area, and the trained CKAN-LSTM-MHA network is used to classify the preprocessed multispectral image data of the target area, and the classified local blocks are reconstructed into raster images to obtain the tree species classification result map.
[0029] Among them, in the sample data acquisition unit, the time-series spectral images of Sentinel-2 of the target area were downloaded from the official website of the European Space Agency, and the time-series tree species distribution of the sample area was obtained through field investigation.
[0030] Preferably, the acquired time series spectral images are subjected to geometric correction, radiation correction, image cropping, segmentation and mosaic preprocessing in the data preprocessing unit, so that the number of rows and columns of each time series remote sensing image after processing is the same, and there is no cloud-blocked area. If there is a cloud-blocked area in the time series remote sensing image when the satellite passes, it is replaced with image data of the same month in other years; and the preprocessed multispectral image data is obtained.
[0031] Furthermore, in the data preprocessing unit, the acquired multispectral image data is subjected to independent principal component analysis to obtain the spectral features of different bands, and the spectral features of the first five bands with the most spectral features are selected as the extracted spectral features. The image is segmented into time-series image blocks of size s*s for input to the network, where 10 <s<30。
[0032] Furthermore, the construction method of the CKAN-LSTM-MHA network in the model training unit includes the following steps:
[0033] The first layer of the CKAN-LSTM-MHA network is the input layer, which adapts the input data to the input layer. Then, two three-dimensional CKAN layers are connected. The convolution kernel size of the two three-dimensional CKAN layers is k*l*t. The activation function of the two three-dimensional CKAN layers uses the relu function. The filters of the two three-dimensional CKAN layers are 32 and 16 respectively. The pixel spectral features are gradually extracted until a three-dimensional feature vector is obtained.
[0034] Then add a deformation layer to transform the 3D feature vector data of the previous layer into data that adapts to 2D input; then add a 2D CKAN layer, the convolution kernel size of the 2D CKAN layer is k*l, the activation function of the 2D CKAN layer uses the relu function, and the filters of the 2D CKAN layer is 64, until a 2D feature vector is obtained;
[0035] Then add a deformation layer to transform the two-dimensional feature vector into data suitable for the LSTM layer input, and then add three LSTM layers, with the number of units in the LSTM layers being 20, 30, and 20 respectively; then add the multi-head attention mechanism module MHA, and then add 4 fully connected layers, with the number of neural networks in the fully connected layers being 64, 32, 16, and z respectively, where z is the number of tree species that need to be classified; add a batch normalization layer after each fully connected layer except the last layer; select cross entropy as the neural network loss function, and select Adam optimizer as the optimizer.
[0036] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: First, the present invention fully considers the spectral characteristics, spatial texture characteristics and time series characteristics of Sentinel-2, realizes the effective combination of spectral-texture-time series characteristics, and combines with the CKAN-LSTM-MHA network to realize large-scale time series tree species accurate classification, and has good stability for complex tree species classification scenarios; secondly, the present invention uses the KAN network to construct the CKAN layer, and combines the advantages of the CKAN layer and the LSTM layer to extract the target feature time, space and spectral characteristics. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a schematic diagram of the process of the present invention;
[0038] Figure 2 It is a schematic diagram of the structure of the CKAN-LSTM-MHA network in the present invention. DETAILED DESCRIPTION
[0039] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0040] In the growth of a year, trees undergo regular phenological phenomena such as budding, branching, leafing, flowering, fruiting, leafing, and dormancy with seasonal changes. Different vegetation has different phenological nodes, and its spectral characteristics show specific changing patterns over time. Therefore, the time-varying characteristics of vegetation that can be effectively reflected in multi-phase or time series remote sensing images are used to accurately classify tree species. Therefore, the present invention effectively combines the CKAN layer and the LSTM layer to achieve higher-precision classification of time-series tree species.
[0041] Example 1: Figure 1 As shown, this embodiment discloses a tree species classification method based on Sentinel-2 data and CKAN-LSTM-MHA network for spatiotemporal spectrum combination, comprising the following steps:
[0042] S1. Obtain the time-series spectral image data of the Sentinel-2 target location and sample area, obtain the time-series tree species distribution in the sample area, and make tree species labels; the required Sentinel-2 time-series spectral image data is multi-temporal data within one year, and the time coverage of the data is all seasonal phases of the 12 months of the year, and the cloud mask is less than 10%;
[0043] Specifically, the time-series spectral images of the target area were downloaded from the official website of the European Space Agency, and the time-series tree species distribution in the sample area was obtained through field surveys.
[0044] S2. Geometric correction, radiometric correction, image cropping, segmentation and mosaicking preprocessing are performed on the time-series spectral images obtained in step S1, so that the number of rows and columns of each processed time-series remote sensing image is the same and there is no cloud occlusion area. If there is a cloud occlusion area in the time-series remote sensing image during satellite transit, it is replaced with image data of the same month in other years; the preprocessed multispectral image data is obtained.
[0045] S3. Independent principal component analysis is performed on the multispectral image data obtained in step S2 to obtain spectral features of different bands. The spectral features of the top 5 bands with the most spectral features are selected as the extracted spectral features, and the image is segmented into time-series image blocks of size s*s for input into the network; where 10 < s < 30, and the size of s depends on the computer performance and the size of the remote sensing image. When the computer has better computing performance, a larger value of s can be taken, and s is preferably 15.
[0046] S4. The image blocks segmented in step S3 are randomly divided into a time-series training data set and a time-series validation data set in a ratio of 8:2, and the two data sets are combined with the tree species labels.
[0047] S5. Construct the CKAN-LSTM-MHA network, as Figure 2 shown. The construction method of the CKAN-LSTM-MHA network is as follows:
[0048] The first layer of the CKAN-LSTM-MHA network is the input layer to adapt the input data to the input layer, and then two three-dimensional CKAN layers are connected. The convolution kernel size of the two three-dimensional CKAN layers is k*l*t. The activation functions of the two three-dimensional CKAN layers use the relu function. The filters of the two three-dimensional CKAN layers are 32 and 16 respectively, and the pixel spectral features are gradually extracted until a three-dimensional feature vector is obtained.
[0049] Then a deformation layer is added to transform the three-dimensional feature vector data of the previous layer into data suitable for two-dimensional input; then a two-dimensional CKAN layer is added. The convolution kernel size of the one two-dimensional CKAN layer is k*l. The activation function of the one two-dimensional CKAN layer uses the relu function. The filter of the one two-dimensional CKAN layer is 64, until a two-dimensional feature vector is obtained.
[0050] Then a deformation layer is added to transform the two-dimensional feature vector into data suitable for the input of the LSTM layer, and then three LSTM layers are added, with the number of units in the LSTM layers being 20, 30, and 20 respectively; then a multi-head attention mechanism module MHA is added, and then four fully connected layers are added, with the number of neural networks in the fully connected layers being 64, 32, 16, and z respectively, where z is the number of tree species that need to be classified; a batch normalization layer is added after each fully connected layer except the last layer; the cross entropy is selected as the neural network loss function, and the Adam optimizer is selected as the optimizer; the KAN network architecture, the CKAN (Convolutional Kolmogorov-Arnold Network) layer constructed based on its idea applies a learnable nonlinear activation function to each element and then adds them together compared to conventional CNN, which can achieve basically the same accuracy with a smaller number of parameters.
[0051] Import the time series training data set obtained in step S4 into the CKAN-LSTM-MHA network, extract spectral features and spatial texture features simultaneously in the CKAN layer, flatten the features output by the CKAN layer, and input them into the LSTM layer to extract time series change features, input the extracted time series change features into the multi-head attention mechanism module MHA, obtain the output image features with attention, and input the obtained image features with attention into the fully connected layer for classification; loop training for multiple times until the classification accuracy of the time series verification data set of the CKAN-LSTM-MHA network converges, use the accuracy rate ACC, precision rate Precision, recall rate and F1 value indicators to check the classification performance of the CKAN-LSTM-MHA network for the training samples, and save the trained CKAN-LSTM-MHA network;
[0052] Accuracy ACC:
[0053] ,
[0054] Accuracy ACC can determine the overall accuracy;
[0055] Precision:
[0056] ,
[0057] Precision represents the accuracy of the prediction of the positive sample results. The larger the value, the less error the existing prediction results are likely to have.
[0058] Recall:
[0059] ,
[0060] The recall rate is for the original sample. The larger the recall rate, the more false positives there may be, but the algorithm will try its best to find every object that should be found.
[0061] F1 value:
[0062] ,
[0063] The F1 value is an objective evaluation of the model classification results by combining the recall rate and the precision rate;
[0064] S6. Obtain the Sentinel-2 target position and target area time-series spectral image data, with a cloud mask amount of less than 10%; use the method of step S2 to preprocess the Sentinel-2 image of the target area to obtain the preprocessed multispectral image data of the target area, use the CKAN-LSTM-MHA network trained in step S5 to classify the preprocessed multispectral image data of the target area, reconstruct the classified local blocks into raster images, and obtain the tree species classification result map.
[0065] Example 2: Figure 1 As shown, this embodiment discloses a tree species classification system based on Sentinel-2 data and CKAN-LSTM-MHA network for spatiotemporal spectrum integration, including the following steps:
[0066] Acquire sample data units, which are used to obtain Sentinel-2 target location and sample area time-series spectral image data, obtain time-series tree species distribution in the sample area, and make tree species labels; the required Sentinel-2 time-series spectral image data is multi-temporal data within a year, and the time coverage of the data is all seasonal phases of the 12 months of the year, with cloud mask less than 10%;
[0067] Specifically, the time-series spectral images of the target area were downloaded from the official website of the European Space Agency, and the time-series tree species distribution in the sample area was obtained through field surveys.
[0068] The data preprocessing unit is used to perform geometric correction, radiation correction, image cropping, segmentation and mosaic preprocessing on the acquired time series spectral images, so that the number of rows and columns of each time series remote sensing image after processing is the same, and there is no cloud obstruction area. If there is a cloud obstruction area in the time series remote sensing image when the satellite passes, it is replaced with image data of the same month in other years; and the preprocessed multispectral image data is obtained;
[0069] Perform independent component analysis on the acquired hyperspectral image data to obtain spectral features of different bands. Select the spectral features of the top 5 bands with the most spectral features as the extracted spectral features, and segment the image into temporal image blocks of size s*s for input into the network; where 10 < s < 30, and the size of s depends on the computer performance and the size of the remote sensing image. When the computer has better computing performance, a larger value of s can be taken, and s is preferably 15;
[0070] Randomly divide the segmented image blocks into a temporal training dataset and a temporal validation dataset in a ratio of 8:2, and combine the two datasets with the tree species labels;
[0071] As Figure 2 shown, the model training unit is used to construct a CKAN-LSTM-MHA network. The construction method of the CKAN-LSTM-MHA network is as follows:
[0072] The first layer of the CKAN-LSTM-MHA network is the input layer. Adapt the input data to the input layer, and then connect two three-dimensional CKAN layers. The convolutional kernel sizes of the two three-dimensional CKAN layers are k*l*t. The activation functions of the two three-dimensional CKAN layers use the relu function. The filters of the two three-dimensional CKAN layers are 32 and 16 respectively, and gradually extract the pixel spectral features until a three-dimensional feature vector is obtained;
[0073] Then add a deformation layer to transform the three-dimensional feature vector data of the previous layer into data suitable for two-dimensional input; then add a two-dimensional CKAN layer. The convolutional kernel size of the two-dimensional CKAN layer is k*l. The activation function of the two-dimensional CKAN layer uses the relu function. The filter of the two-dimensional CKAN layer is 64 until a two-dimensional feature vector is obtained;
[0074] Then add a deformation layer to transform the two-dimensional feature vector into data suitable for input into the LSTM layer. Then add three LSTM layers. The number of units in the LSTM layers are 20, 30, and 20 respectively; then add a multi-head attention mechanism module MHA, and then add 4 fully connected layers. The number of neural networks in the fully connected layers are 64, 32, 16, z respectively, where z is the number of tree species to be classified; add a batch normalization layer after each fully connected layer except the last one; select the cross-entropy as the neural network loss function and the Adam optimizer as the optimizer;
[0075] Import the acquired time series training data set into the CKAN-LSTM-MHA network. The CKAN layer extracts spectral features and spatial texture features at the same time. Flatten the features output by the CKAN layer and input them into the LSTM layer to extract time series change features. Input the extracted time series change features into the multi-head attention mechanism module MHA to obtain the output image features with attention. Input the obtained image features with attention into the fully connected layer for classification. Repeat the training cycle for multiple times until the classification accuracy of the time series verification data set of the CKAN-LSTM-MHA network converges. Use the accuracy rate ACC, precision rate Precision, recall rate and F1 value indicators to check the classification performance of the CKAN-LSTM-MHA network for the training samples, and save the trained CKAN-LSTM-MHA network.
[0076] Accuracy ACC:
[0077] ,
[0078] Accuracy ACC can determine the overall accuracy;
[0079] Precision:
[0080] ,
[0081] Precision represents the accuracy of the prediction of the positive sample results. The larger the value, the less error the existing prediction results are likely to have.
[0082] Recall:
[0083] ,
[0084] The recall rate is for the original sample. The larger the recall rate, the more false positives there may be, but the algorithm will try its best to find every object that should be found.
[0085] F1 value:
[0086] ,
[0087] The F1 value is an objective evaluation of the model classification results by combining the recall rate and the precision rate;
[0088] The tree species classification unit is used to obtain the time-series spectral image data of the Sentinel-2 target position and target area, with a cloud mask of less than 10%; the Sentinel-2 images of the target area are preprocessed to obtain the preprocessed multispectral image data of the target area, and the trained CKAN-LSTM-MHA network is used to classify the preprocessed multispectral image data of the target area, and the classified local blocks are reconstructed into raster images to obtain the tree species classification result map.
Claims
1. A tree species classification method based on Sentinel-2 data and CKAN-LSTM-MHA network combining time, space and spectrum, characterized in that: The following steps are involved: S1. Obtain the time-series spectral image data of the Sentinel-2 target location and sample area, obtain the time-series tree species distribution in the sample area, and make tree species labels; the required Sentinel-2 time-series spectral image data is multi-temporal data within one year, and the time coverage of the data is all seasonal phases of the 12 months of the year, and the cloud mask is less than 10%; S2. Preprocessing the time series spectral image obtained in step S1 to obtain preprocessed multispectral image data; S3. Performing independent principal component analysis on the multispectral image data obtained in step S2 to obtain spectral characteristics of different bands, and segmenting the multispectral image into time-series image blocks; S4. Divide the image blocks segmented in step S3 into a temporal training data set and a temporal verification data set, and combine the two data sets with the tree species labels; S5. Build a CKAN-LSTM-MHA network, import the time series training data set obtained in step S4 into the CKAN-LSTM-MHA network, extract spectral features and spatial texture features at the same time in the CKAN layer, flatten the features output by the CKAN layer, and input them into the LSTM layer to extract time series change features, input the extracted time series change features into the multi-head attention mechanism module MHA, obtain the output image features with attention, and input the obtained image features with attention into the fully connected layer for classification; loop training for multiple times until the classification accuracy of the time series verification data set of the CKAN-LSTM-MHA network converges, use the accuracy ACC, precision Precision, recall rate and F1 value indicators to check the classification performance of the CKAN-LSTM-MHA network for the training samples, and save the trained CKAN-LSTM-MHA network; The method for constructing the CKAN-LSTM-MHA network in step S5 The following steps are involved: The first layer of the CKAN-LSTM-MHA network is the input layer, which adapts the input data to the input layer. Then, two three-dimensional CKAN layers are connected. The convolution kernel size of the two three-dimensional CKAN layers is k*l*t. The activation function of the two three-dimensional CKAN layers uses the relu function. The filters of the two three-dimensional CKAN layers are 32 and 16 respectively. The pixel spectral features are gradually extracted until a three-dimensional feature vector is obtained. Then add a deformation layer to transform the 3D feature vector data of the previous layer into data that adapts to 2D input; then add a 2D CKAN layer, the convolution kernel size of the 2D CKAN layer is k*l, the activation function of the 2D CKAN layer uses the relu function, and the filters of the 2D CKAN layer is 64, until a 2D feature vector is obtained; Then add a deformation layer to transform the two-dimensional feature vector into data suitable for the LSTM layer input, then add three LSTM layers, the number of units in the LSTM layers are 20, 30, and 20 respectively; then add the multi-head attention mechanism module MHA; then add 4 fully connected layers, the number of neural networks in the fully connected layers are 64, 32, 16, z respectively, where z is the number of tree species to be classified; add a batch normalization layer after each fully connected layer except the last layer; select cross entropy as the neural network loss function, and select Adam optimizer as the optimizer; S6. Obtain the Sentinel-2 target position and target area time-series spectral image data, with a cloud mask amount of less than 10%; use the method of step S2 to preprocess the Sentinel-2 image of the target area to obtain the preprocessed multispectral image data of the target area, use the CKAN-LSTM-MHA network trained in step S5 to classify the preprocessed multispectral image data of the target area, reconstruct the classified local blocks into raster images, and obtain the tree species classification result map.
2. The tree species classification method based on Sentinel-2 data and CKAN-LSTM-MHA network for spatiotemporal spectrum combination according to claim 1, characterized in that: The step S1 comprises the following steps: The time-series spectral images of Sentinel-2 in the target area were downloaded from the official website of the European Space Agency, and the time-series tree species distribution in the sample area was obtained through field surveys.
3. The tree species classification method based on Sentinel-2 data and CKAN-LSTM-MHA network for spatiotemporal spectrum combination according to claim 1, characterized in that: The step S2 comprises the following steps: The time series spectral images obtained in step S1 are subjected to geometric correction, radiation correction, image cropping, segmentation and mosaic preprocessing, so that the number of rows and columns of each time series remote sensing image after processing is the same, and there is no cloud-blocked area. If there is a cloud-blocked area in the time series remote sensing image when the satellite passes, it is replaced with image data of the same month in other years; the preprocessed multispectral image data is obtained.
4. The tree species classification method based on Sentinel-2 data and CKAN-LSTM-MHA network for spatiotemporal spectrum combination according to claim 1, characterized in that: The step S3 comprises the following steps: The multispectral image data obtained in step S2 is subjected to independent principal component analysis to obtain spectral features of different bands, and the spectral features of the first five bands with the most spectral features are selected as the extracted spectral features. The image is segmented into time-series image blocks of size s*s for input to the network, where 10 <s<30。 5. A tree species classification system based on Sentinel-2 data and CKAN-LSTM-MHA network combining time, space and spectrum, characterized in that: include: Acquire sample data units, which are used to obtain Sentinel-2 target location and sample area time-series spectral image data, obtain time-series tree species distribution in the sample area, and make tree species labels; the required Sentinel-2 time-series spectral image data is multi-temporal data within a year, and the time coverage of the data is all seasonal phases of the 12 months of the year, with cloud mask less than 10%; A data preprocessing unit is used to preprocess the acquired time-series spectral images to obtain preprocessed multispectral image data, perform independent principal component analysis on the acquired multispectral image data to obtain spectral characteristics of different bands, and segment the multispectral images into time-series image blocks; divide the segmented image blocks into a time-series training data set and a time-series verification data set, and combine the two data sets with tree species labels; The model training unit is used to build a CKAN-LSTM-MHA network, import the acquired time series training data set into the CKAN-LSTM-MHA network, extract spectral features and spatial texture features at the same time in the CKAN layer, flatten the features output by the CKAN layer, and input them into the LSTM layer to extract time series change features, input the extracted time series change features into the multi-head attention mechanism module MHA, obtain the output image features with attention, and input the obtained image features with attention into the fully connected layer for classification; the training is repeated for multiple times until the classification accuracy of the time series verification data set of the CKAN-LSTM-MHA network converges, and the classification performance of the CKAN-LSTM-MHA network for training samples is checked using the accuracy rate ACC, precision rate Precision, recall rate and F1 value indicators, and the trained CKAN-LSTM-MHA network is saved; Construction method of CKAN-LSTM-MHA network in the model training unit The following steps are involved: The first layer of the CKAN-LSTM-MHA network is the input layer, which adapts the input data to the input layer. Then, two three-dimensional CKAN layers are connected. The convolution kernel size of the two three-dimensional CKAN layers is k*l*t. The activation function of the two three-dimensional CKAN layers uses the relu function. The filters of the two three-dimensional CKAN layers are 32 and 16 respectively. The pixel spectral features are gradually extracted until a three-dimensional feature vector is obtained. Then add a deformation layer to transform the 3D feature vector data of the previous layer into data that adapts to 2D input; then add a 2D CKAN layer, the convolution kernel size of the 2D CKAN layer is k*l, the activation function of the 2D CKAN layer uses the relu function, and the filters of the 2D CKAN layer is 64, until a 2D feature vector is obtained; Then add a deformation layer to transform the two-dimensional feature vector into data suitable for the LSTM layer input, then add three LSTM layers, the number of units in the LSTM layers are 20, 30, and 20 respectively; then add the multi-head attention mechanism module MHA; then add 4 fully connected layers, the number of neural networks in the fully connected layers are 64, 32, 16, z respectively, where z is the number of tree species to be classified; add a batch normalization layer after each fully connected layer except the last layer; select cross entropy as the neural network loss function, and select Adam optimizer as the optimizer; The tree species classification unit is used to obtain the time-series spectral image data of the Sentinel-2 target position and target area, with a cloud mask of less than 10%; the Sentinel-2 images of the target area are preprocessed to obtain the preprocessed multispectral image data of the target area, and the trained CKAN-LSTM-MHA network is used to classify the preprocessed multispectral image data of the target area, and the classified local blocks are reconstructed into raster images to obtain the tree species classification result map.
6. The tree species classification system based on Sentinel-2 data and CKAN-LSTM-MHA network for spatiotemporal spectral integration according to claim 5, characterized in that: In the sample data acquisition unit, the time-series spectral images of Sentinel-2 of the target area are downloaded from the official website of the European Space Agency, and the time-series tree species distribution of the sample area is obtained through field investigation.
7. The tree species classification system based on Sentinel-2 data and CKAN-LSTM-MHA network for spatiotemporal spectral integration according to claim 5, characterized in that: The data preprocessing unit performs geometric correction, radiation correction, image cropping, segmentation and mosaic preprocessing on the acquired time series spectral images, so that the number of rows and columns of each time series remote sensing image after processing is the same and there is no cloud obstruction area. If there is a cloud obstruction area in the time series remote sensing image when the satellite passes, it is replaced with image data of the same month in other years; and the preprocessed multispectral image data is obtained.
8. The tree species classification system based on Sentinel-2 data and CKAN-LSTM-MHA network for spatiotemporal spectral integration according to claim 5, characterized in that: In the data preprocessing unit, the acquired multispectral image data is subjected to independent principal component analysis to obtain spectral features of different bands, and the spectral features of the first five bands with the most spectral features are selected as the extracted spectral features, and the image is segmented into time-series image blocks of size s*s for input to the network, where 10 <s<30。
Citation Information
Patent Citations
Tree species refined classification method based on deep learning algorithm and time sequence sentinel image
CN113869370A
Handwritten table recognition method based on multi-head attention mechanism and knowledge graph
CN117132997A