Hyperspectral remote sensing image classification method based on weighted rotation depth forest
By adopting the weighted rotating deep forest method in hyperspectral remote sensing image classification, and using multi-particle scanning and rotating cascade forest modules, the feature selection difficulties and labeled sample acquisition problems of traditional methods in high-dimensional data processing are solved, achieving higher classification accuracy and efficiency.
Patent Information
- Application Number
- CN202410545641.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2024-12-13
AI Technical Summary
Traditional hyperspectral remote sensing image classification methods face difficulties in feature selection and dimensionality reduction when processing high-dimensional and nonlinear data, and require a large number of labeled samples, which is difficult to obtain in real-life applications.
A method based on weighted rotary depth forest is adopted to construct a hyperspectral remote sensing image classification model through a multi-grained scanning module and a rotating cascade forest module, and a sliding window weighting and pooling strategy is introduced to reduce the computational complexity and improve classification accuracy.
It improves classification accuracy and robustness, reduces training time, enhances the model's perception of key features, and improves classification performance and stability.
Smart Images

Figure CN119131446A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hyperspectral remote sensing image classification, and in particular to a hyperspectral remote sensing image classification method based on improved deep forest. Background Art
[0002] Hyperspectral remote sensing image classification is a key research direction in the field of remote sensing, and it also has important application value in many fields such as environmental monitoring, precision agriculture, resource exploration, etc. Under complex surface conditions and meteorological environments, traditional ground observation methods often find it difficult to obtain comprehensive and accurate information, so it is particularly important to use remote sensing technology to effectively classify hyperspectral remote sensing images.
[0003] At present, hyperspectral remote sensing image classification based on remote sensing technology has made significant progress. The mainstream classification method tends to make comprehensive use of multi-source remote sensing data, which can include spectral information of different bands, from visible light to near infrared to thermal infrared, etc. This fusion of data helps to reveal subtle differences in objects and enhance the accuracy of classification.
[0004] Although traditional machine learning methods have been successful in some cases, they still face challenges when dealing with high-dimensional and nonlinear hyperspectral remote sensing data. For example, the high-dimensional nature of hyperspectral data requires algorithms to effectively perform feature selection and dimensionality reduction to avoid the "curse of dimensionality". In addition, these data often require a large number of labeled samples for supervised learning, which are often difficult to obtain in real applications.
[0005] In recent years, with the rapid development of deep learning technology, it has begun to show great potential in the classification of hyperspectral remote sensing images. Deep learning models can automatically learn more abstract and discriminative feature representations from raw hyperspectral data, thereby achieving more accurate classification without manual feature engineering. It can better mine the feature information in the data, so it has significant advantages in improving classification accuracy and stability, bringing new opportunities and challenges to the task of hyperspectral remote sensing image classification. Summary of the invention
[0006] The present invention aims to provide a method for improving the accuracy and efficiency of hyperspectral remote sensing image classification. The method involves collecting and preprocessing remote sensing data, and dividing it into training and test data sets. Then, a weighted hyperspectral remote sensing image classification model is constructed using a rotation forest-based technique. The model consists of multi-granularity scanning and cascade forest modules, where each cascade layer includes rotation and completely random forests. The training set is scanned and weighted sub-samples are processed through each cascade layer, and the output results of each layer are used to optimize the final classification model. The characteristic of this method is that a weighted module is introduced in the multi-granularity scanning stage, and a rotation forest is added to the cascade forest, thereby improving the accuracy and robustness of the classification, while reducing the computational complexity.
[0007] The present invention adopts the following technical solution: a hyperspectral remote sensing image classification method based on weighted rotation deep forest, comprising:
[0008] Obtain satellite remote sensing data for preprocessing, and divide the preprocessed remote sensing data into a training set and a test set;
[0009] A hyperspectral remote sensing image classification model is constructed based on an improved deep forest; the hyperspectral remote sensing image classification model includes a weighted multi-granularity scanning module and a rotation cascade forest module; each cascade layer of the cascade forest module includes two rotation forests and two completely random forests;
[0010] The training set is input into the hyperspectral remote sensing image classification model for training. The hyperspectral remote sensing image classification model performs sliding window scanning on the training set through a weighted multi-granularity scanning module to generate sub-samples, and performs weighted processing on the samples;
[0011] After obtaining the weighted samples, they are input into the pooling layer, the weighted features are pooled, and the obtained weighted pooling features are input into the rotation cascade forest.
[0012] The subsamples pass through each cascade layer of the cascade forest module, and a trained hyperspectral remote sensing image classification model is obtained according to the output classification results of each cascade layer.
[0013] Furthermore, before the training set is input into the hyperspectral remote sensing image classification model for training, the following steps are also included:
[0014] The ratio of positive and negative samples in the training set is balanced by downsampling the remote sensing data in the training set.
[0015] Furthermore, after the original sample is input into the multi-granularity scanning module of Deep Forest, the input features are processed and slid through sliding windows of different sizes to obtain feature vectors of different sizes, and the sliding window feature vectors are weighted:
[0016] On the basis of dynamically assigning weights to the forest, different weights are further assigned to the class vectors generated by sliding windows of different sizes.
[0017] Random forest weight calculation formula:
[0018]
[0019] Where S represents the accuracy of random forest. The data obtained by multi-granular scanning through a sliding window is input into a random forest and a completely random forest. The weight of each sliding window is calculated by calculating the random forest weight, and finally the weighted feature vector is constructed.
[0020] The obtained weighted feature vector is input into the pooling layer.
[0021] As an effective downsampling method, the pooling strategy can refine the results and imitate the human visual system to reduce the dimension of the visual input object. Generally speaking, there are three main advantages, namely feature invariance, feature reduction, and anti-overfitting. Therefore, the average pooling strategy is introduced to improve computational efficiency.
[0022] Implement an average pooling layer on each class matrix. Assuming that its weighted feature vector dimension is M×C, the feature dimension is reduced to M / 2×C through the pooling layer. Through concatenation, the data sample finally generates three L-dimensional transformed feature vectors
[0023] L=2[M / 2]×C,(i=1,2,3)
[0024] Since the same data samples are input into both the random forest and the completely random forest, the output results are the same type of feature matrix. The pooling strategy is used to average the two feature matrices and halve their dimensions. Therefore, it can achieve initial feature extraction without changing the feature distribution. This reduces redundant information and improves computational efficiency.
[0025] The weighted feature vector is passed through the rotation cascade forest module
[0026] Rotation forests are also a multi-classifier ensemble model based on decision trees, which have good classification performance on small and medium-sized data sets. Both rotation forests and random forests use decision trees as base classifiers. Rotation forests are different from random forests in the selection of training data sets for each classifier. When selecting each base classifier training sample, rotation forests will randomly split the feature set, and then use PCA to perform feature transformation in each feature subset (all principal components are used in the transformation, and the data dimensionality reduction effect of PCA is not used. PCA in rotation forests is not a purpose but a means). The classifier obtained in this way not only has high classification accuracy but also has large differences between base classifiers. Feature transformation also preprocesses the data to a certain extent, improves the accuracy of the overall classifier, and also improves the volatility of the bagging algorithm, making the prediction performance more stable.
[0027] (1) Randomly divide the feature set F into K subsets (K can be used as a parameter of this algorithm). The subsets may or may not intersect. In order to maximize the differences between classifiers, non-intersecting subsets are generally selected. For simplicity, assume that K is a factor of n, so that each sub-feature set contains M = n / K features. If it cannot be divided evenly, the last sub-feature set can have fewer elements.
[0028] (2) Use F ij Denotes the base classifier D i The jth sub-feature set of the training set used. For each sub-feature set F ij , randomly resample 75% of the original sample set, and only resample F in the new sample set ij The M features in are analyzed by PCA. The principal component coefficients are saved as The length is M. Note that some eigenvalues may be 0, so we may not need all eigenvectors, M j It may be less than M. The PCA process is performed on each sub-feature set rather than on the entire data set so that the training data coefficients used by each base classifier are different, thus increasing the differences between classifiers.
[0029] (3) Put all the principal component coefficient vectors obtained into a sparse rotation matrix R i middle:
[0030]
[0031] Re-rotate the matrix R according to the order of the original attribute set i Get R i ', then through XR i ′ operation to obtain the classifier C iOn this training set, the base classifier D i is trained, and then this step is repeated L times, and finally L base classifiers are obtained. Here, the base classifier uses a decision tree type algorithm, which is very sensitive to the rotation of features, so the obtained classifiers have greater differences.
[0032] (4) The final classification result is determined by the maximum confidence. For a sample x, d i,j (xR′ C ) indicates that the classifier D i Predict the possibility that x belongs to category c, label represents all possible categories, then the confidence that x belongs to category c is
[0033]
[0034] From this, the final category of x can be determined by the formula:
[0035] x=argmax(U c (x))c∈label
[0036] Furthermore, when the cascade forest module increases the cascade layer and transmits the subsample to the next cascade layer, it also includes:
[0037] The accuracy of each cascade layer is obtained in turn. When the accuracy of the next cascade layer does not change, the cascade forest module stops growing the cascade layer, and the classification results of the corresponding cascade layer output sub-samples whose current accuracy has not changed.
[0038] Furthermore, the accuracy rate is calculated as follows:
[0039] The accuracy is the ratio of correctly classified samples to the total number of samples, that is,
[0040]
[0041] Among them, n correct is the number of samples correctly classified, n total is the total number of samples.
[0042] Combined with the confusion matrix above, the formula can also be written as follows:
[0043]
[0044] Accuracy is the simplest and most intuitive evaluation indicator in classification problems.
[0045] The calculation method of the F1 score is:
[0046]
[0047] Precision reflects the model's ability to distinguish negative samples. The higher the Precision, the stronger the model's ability to distinguish negative samples. Recall reflects the model's ability to recognize positive samples. The higher the Recall, the stronger the model's ability to recognize positive samples. F1 score is a combination of the two. The higher the F1 score, the more robust the model.
[0048] The beneficial effects of the present invention are as follows: the present invention weights the features in the multi-granularity scanning module of the deep forest model, introduces a sliding window weighting module, and aims to capture the features in the data more accurately. This study further optimizes the gcFo rest model. The module weights the sliding windows at different granularities and dynamically adjusts the weights according to the features in the window, effectively improving the model's perception of key features. It provides innovative ideas for improving and improving the performance of the model, enhancing the classification performance of the model and reducing the training time. In the cascade forest stage of the deep forest model, a rotation forest is added. When the overall accuracy of the estimate is compared, the classification performance of the rotation forest algorithm is better than that of the traditional random forest algorithm. Although the rotation forest is a variant of the random forest method, it produces more accurate classification results. This is due to the training strategy of the rotation forest, because each decision tree (base classifier) in the set is trained with a data set in the rotated feature space obtained by PCA transformation. The rotation cascade forest improves the robustness and classification accuracy of the deep forest model. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 The present invention is a flow chart of a hyperspectral remote sensing image classification method based on weighted rotation deep forest.
[0050] Figure 2 The invention discloses a weighted multi-granularity scanning module for a hyperspectral remote sensing image classification method based on a weighted rotation deep forest.
[0051] Figure 3 The invention discloses a rotating cascade forest module for a hyperspectral remote sensing image classification method based on a weighted rotating deep forest. DETAILED DESCRIPTION
[0052] 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.
[0053] A flow chart of a hyperspectral remote sensing image classification method based on weighted rotation deep forest according to an embodiment of the present invention is as follows: Figure 1 As shown, including:
[0054] Obtain hyperspectral satellite remote sensing data for preprocessing, and divide the preprocessed hyperspectral remote sensing data into a training set and a test set;
[0055] The method for obtaining hyperspectral satellite remote sensing data for preprocessing is: matching the hyperspectral satellite remote sensing data with the data recorded by the ground base station; using machine learning methods to predict and fill in the missing data in the satellite remote sensing data set.
[0056] A hyperspectral remote sensing image classification model is constructed based on a deep forest; the hyperspectral remote sensing image classification model includes a weighted multi-granularity scanning module and a rotational cascade forest module; each cascade layer of the cascade forest module includes two rotational forests and two completely random forests; the present invention constructs a hyperspectral remote sensing image classification network model based on the deep forest model, the hyperspectral remote sensing image classification network model includes two parts, namely, weighted multi-granularity scanning and a rotational cascade forest, and each cascade layer of the cascade forest includes two rotational forests and two completely random forests as classifiers.
[0057] The training set is input into the hyperspectral remote sensing image classification model for training. The hyperspectral remote sensing image classification model performs sliding window scanning on the training set through the weighted multi-granularity scanning module to generate weighted features. The preprocessed training set is input into the multi-granularity scanning part of the hyperspectral remote sensing image classification network. Through sliding window scanning of different dimensions, a series of weighted features are generated. The weighted features are combined into a new weighted feature vector through the probability vector generated by the random forest of the multi-granularity scanning module and the completely random forest classifier;
[0058] After the original sample is input into the multi-granularity scanning module of Deep Forest, the input features are processed and slid through sliding windows of different sizes to obtain feature vectors of different sizes, and the feature vectors are weighted:
[0059] On the basis of dynamically assigning weights to the forest, different weights are further assigned to the class vectors generated by sliding windows of different sizes.
[0060] Random forest weight calculation:
[0061]
[0062] Where S represents the accuracy of random forest. The data obtained by multi-granular scanning through a sliding window is input into a random forest and a completely random forest. The weight of each sliding window is calculated by calculating the random forest weight, and finally the weighted feature vector is constructed.
[0063] The obtained weighted feature vector is input into the pooling layer.
[0064] Implement an average pooling layer on each class matrix. Assuming that its weighted feature vector dimension is M×C, the feature dimension is reduced to M / 2×C through the pooling layer. Through concatenation, the data sample finally generates three L-dimensional transformed feature vectors
[0065] L=2[M / 2]×C,(i=1,2,3)
[0066] Since the same data samples are input into both the random forest and the completely random forest, the output result is the same type of feature matrix. The pooling strategy is used to average the two feature matrices and reduce their dimensions by half.
[0067] The feature vectors generated in the multi-granularity scanning stage are input into the rotation cascade forest part and classified by two rotation forest and completely random forest classifiers in each cascade layer. At the same time, the classified feature vectors are concatenated with the original input feature vectors as the input of the next layer.
[0068] The subsamples pass through each cascade layer of the cascade forest module, and according to the output prediction results of each cascade layer, a trained hyperspectral remote sensing image classification model is obtained.
[0069] Rotation forest model method:
[0070] The attributes are divided into K non-overlapping subsets of equal size, and then new sample data is obtained through transformation methods such as PCA and rotation matrix. The sub-sample data obtained in this way are different from each other, thereby improving the difference and accuracy of each base classifier.
[0071] Now let F represent the attribute set, D1,D2,…D L represents L base classifiers, and the N×n matrix X represents the training sample set with N data records, and n represents the number of sample features. The model construction steps are as follows:
[0072] (1) Randomly divide F into K subsets of equal size, then each subset has approximately M = n / K attributes.
[0073] (2) Use F ij Indicates training the i-th classifier D i The jth attribute set of the training set used is resampled by 75% to generate a sample subset X i ' j , and the principal component analysis (PCA) was used to analyze F ij The sub-attributes in M are transformed to obtain j Principal components:
[0074] (3) Repeat step (2) to obtain K sub-attribute sets, which are divided into D1, D2, …D L The coefficients are stored in the coefficient matrix R i :
[0075]
[0076] Re-rotate the matrix R according to the order of the original attribute set i Get R i ', then through XR i ′ operation to obtain the classifier C i On this training set, the base classifier D i is trained, and then this step is repeated L times, and finally L base classifiers are obtained. Here, the base classifier uses a decision tree type algorithm, which is very sensitive to the rotation of features, so the obtained classifiers have greater differences.
[0077] (4) The final classification result is determined by the maximum confidence. For a sample x, d i,j (xR′ C ) indicates that the classifier D i Predict the possibility that x belongs to category c, label represents all possible categories, then the confidence that x belongs to category c is
[0078]
[0079] From this, the final category of x can be determined by the formula:
[0080] x=argmax(U c (x))c∈label
[0081] At the same time, when the cascade forest module of the present invention increases the cascade layer and transmits the subsample to the next cascade layer, it also includes: obtaining the accuracy of each cascade layer in turn, and when the accuracy of the next cascade layer does not change, the cascade forest module stops increasing the cascade layer, and the prediction result of the subsample output corresponding to the cascade layer that does not change the current accuracy. The calculation method of the accuracy is:
[0082] The accuracy is the ratio of correctly classified samples to the total number of samples, that is,
[0083]
[0084] Among them, n correct is the number of samples correctly classified, n total is the total number of samples.
[0085] Combined with the confusion matrix above, the formula can also be written as follows:
[0086]
[0087] Accuracy is the simplest and most intuitive evaluation indicator in classification problems.
[0088] Furthermore, the F1 score is calculated to evaluate the weighted rotation deep forest model.
[0089] The calculation method of F1 score is:
[0090]
[0091] Precision reveals the effectiveness of the model in identifying and excluding non-target (negative) samples; a high precision means that the model performs well in distinguishing non-target samples. Recall maps the model's ability to capture target (positive) samples; a high recall means that the model can effectively detect target samples. The F1 score is an indicator for evaluating the stability of the model, combining the advantages of precision and recall. A high F1 score represents the robustness of the model's combination of these two capabilities.
[0092] In the present invention, by introducing the concept of weights in the multi-granularity scanning link of the deep forest, the features output by the random forest are weighted, which effectively improves the model's recognition of key features. This innovative method not only enhances the classification accuracy of the model, but also shortens the time required for training. By integrating the rotation forest technology in the cascade stage of the deep forest model, the generalization ability of the model is increased and the possibility of the model over-adapting to a specific data set is reduced. The training of each decision tree in the rotation forest is based on the features that have been rotated. This diversified training enables the model to capture data characteristics from different angles, understand the data structure more comprehensively, and further optimize performance.
[0093] It should be clear that these are only recommended implementations of the present invention, and the present invention is not limited to these examples. The spirit of the present invention lies in innovation and improvement, and any modification, substitution or improvement made under the guidance of the present invention should be deemed to fall within the protection scope of the present invention.
Claims
1. A hyperspectral remote sensing image classification method based on weighted rotation deep forest, characterized in that: The method comprises the following specific steps: Acquire hyperspectral satellite remote sensing data, preprocess the acquired remote sensing image data, and split the data into a data set for model training and a data set for testing. A hyperspectral remote sensing image classification model is constructed based on a deep forest; the hyperspectral remote sensing image classification model includes a multi-granularity scanning module and a cascade forest module; each cascade layer of the cascade forest module includes two completely random forests and two rotation forests; The processed training data is input into the constructed model for training. The model first uses sliding windows of different sizes in the multi-granularity scanning module to perform multi-scale segmentation on the data, thereby generating sub-data samples of multiple scales, and assigns different weights according to the relative importance of these sliding window sub-samples to generate weighted sub-samples, which are then input into the pooling layer for pooling operations on the samples. The weighted sub-samples will pass through each cascade forest layer in the model in turn, and the output of each layer will be used to further refine the classification results, eventually forming a trained weighted rotation deep forest model for hyperspectral remote sensing image classification.
2. According to the method for hyperspectral remote sensing image classification based on weighted rotation deep forest in claim 1, the steps are: before inputting the training set into the deep forest model for training, it also includes: By preprocessing the remote sensing data in the training set, that is, matching the remote sensing data with the data recorded by the ground base station, and using machine learning technology to predict and complete the missing parts in the data set.
3. The hyperspectral remote sensing image classification method based on weighted rotation deep forest according to claim 1 is characterized in that: The method for calculating the feature weight of the multi-granularity scanning is: On the basis of dynamically assigning weights to the forest, different weights are further assigned to the class vectors generated by sliding windows of different sizes. Random forest weight calculation: Where S represents the random forest accuracy, which determines the relative importance of each sample in the overall data set. In this scoring system, the importance score of a sample is determined by the ratio of the sample's classification score to the sum of all classification scores. The data obtained by multi-granular scanning through a sliding window is input into a random forest and a completely random forest. By calculating the random forest weight, the weight of each sliding window is calculated, and finally a weighted feature vector is constructed.
4. The hyperspectral remote sensing image classification method based on weighted rotation deep forest according to claim 1, characterized in that: The method for obtaining the pooling feature is: Implement an average pooling layer on each class matrix. Assuming that its weighted feature vector dimension is M×C, the feature dimension is reduced to M / 2×C through the pooling layer. Through concatenation, the data sample finally generates three L-dimensional transformed feature vectors L=2[M / 2]×C,(i=1,2,3) Since the same data samples are input into both random forest and completely random forest, the output results are the same type of feature matrix. The pooling strategy is used to average the two feature matrices and halve their dimensions. Therefore, it can achieve initial feature extraction without changing the feature distribution. This reduces redundant information and improves computational efficiency. Finally, a weighted pooled feature vector is constructed. The feature vectors obtained by multi-granularity scanning are input into the improved cascade forest for training. Each layer of the cascade forest includes two rotation forests and two completely random forests.
5. The hyperspectral remote sensing image classification method based on weighted rotation deep forest according to claim 1, characterized in that: The model method of the rotation forest is: The dataset F containing features is randomly divided into K non-overlapping sub-datasets. In this setting, if K is a factor of n, then each sub-dataset contains M = n / K dimensional features. Here, each sub-dataset is denoted as F ij , and the samples they constitute are summarized as set Z. Next, a random 75% sub-sample is performed on this set Z, and the principal component analysis (PCA) is performed on this subset. After this analysis is completed, the principal component coefficients obtained by the analysis are recorded. And use these coefficients to construct a rotation matrix R i This rotation matrix will be used in subsequent classification model training to enhance the model's feature recognition and classification capabilities. R i It can be expressed as In the rotation forest algorithm, based on the original feature set F of the data, R i The columns are rearranged to construct an updated rotation matrix with dimensions N × n. Using the new matrix produced by this process, a new set of training XR i ′, and use these samples to train the classification model D i In short, the algorithm optimizes the classifier training process by reorganizing data features and generating new training data that has been rotated.
6. The hyperspectral remote sensing image classification method based on weighted rotation deep forest according to claim 1, characterized in that: When the cascade forest module cascades layers and transmits subsamples to the next cascade layer, it also includes: The feature vector extracted using the sliding window of the initial size is first input into the first layer of the cascade forest for training to obtain a category distribution vector. This category distribution vector is then combined with the original feature vector to form a new feature set for use in the next cascade forest layer. In each subsequent layer, the category distribution vector obtained in this layer is similarly combined with the weighted pooling feature vector of the sliding window of the corresponding size obtained by multi-granularity scanning. This merging and training step continues until a stable point of accuracy is reached. That is, when the accuracy of a certain cascade layer no longer improves, stop building more cascade layers and use the prediction results of this layer for the sample.
7. The hyperspectral remote sensing image classification method based on weighted rotation deep forest according to claim 1, characterized in that: The accuracy rate is calculated as follows: The accuracy is the ratio of correctly classified samples to the total number of samples, that is, Among them, n correct is the number of samples correctly classified, n total is the total number of samples. Combined with the confusion matrix above, the formula can also be written as: Accuracy is the simplest and most intuitive evaluation indicator in classification problems.
8. The hyperspectral remote sensing image classification method based on weighted rotation deep forest according to claim 1, characterized in that: The calculation method of the F1 score is: Precision measures the model's ability to correctly identify non-target categories. A higher precision indicates a lower misjudgment rate. Recall measures the model's ability to detect target categories. A higher recall rate indicates a more comprehensive recognition of target categories. The F1 score is the harmonic average of these two indicators. A higher F1 score means that the model maintains a higher precision while maintaining the recall rate, indicating that the overall performance of the model is relatively balanced.
Citation Information
Patent Citations
Rotating forest hyperspectral image classification method based on weighting
CN112308151A
