Hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning

By combining a three-layer domain adaptation scheme of unsupervised domain adaptation and supervised domain adaptation, and using a large kernel attention model and XGBoost ensemble classifier, the problems of limited training samples and slow computation speed in hyperspectral image classification are solved, and efficient cross-scene classification effects are achieved.

CN115393719BActive Publication Date: 2025-09-05HARBIN UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211047569.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-29
Publication Date
2025-09-05
Estimated Expiration
2042-08-29

AI Technical Summary

Technical Problem

Existing hyperspectral image classification models have insufficient generalization performance under the condition of limited training samples, slow calculation speed and low reliability of single classifiers, making it difficult to effectively utilize the advantages of unsupervised domain adaptation and supervised domain adaptation.

Method used

Combining unsupervised domain adaptation with supervised domain adaptation, a large-core attention model and XGBoost ensemble classifier are designed. Through a three-layer domain adaptation scheme of spatial-spectral domain adaptation and ensemble learning, the large-core attention model is used to increase the receptive field and reduce the number of parameters, and combined with XGBoost to improve computational efficiency and classification accuracy.

Benefits of technology

It improves the accuracy of hyperspectral image classification, solves the problems of slow computation speed and low reliability of single classifier in cross-scene image classification, and provides new research ideas for hyperspectral image classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115393719B_ABST
    Figure CN115393719B_ABST
Patent Text Reader

Abstract

The present invention discloses a hyperspectral image classification method that combines spatial-spectral domain adaptation with ensemble learning, and belongs to the field of image classification technology. The method sequentially inputs labeled data in the source domain, unlabeled data in the target domain, and a small amount of labeled data, and extracts features from the source and target domains through a spatial-spectral attention model, wherein the spatial-spectral attention model introduces large kernel attention (LKA), which can utilize the local structural information of the image, capture long-distance dependencies, and has adaptability in spatial and spectral dimensions; then the feature-extracted data is input into a discriminator and the source domain data is clustered to form cluster centers, and then the target domain data is iteratively mapped to various cluster centers; finally, classification is performed through XGBoost to alleviate the problems of slow model calculation speed and low credibility of single classifiers, effectively improving the accuracy of hyperspectral image ground object classification, and providing a new reference idea for subsequent research and related applications of cross-scene hyperspectral image classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The hyperspectral image classification method of the present invention combines spatial-spectral domain adaptation with ensemble learning and belongs to image classification. Background Art

[0002] Hyperspectral images are acquired by imaging spectrometers, which provide tens to hundreds of narrowband spectral information for each pixel, producing a complete and continuous spectral curve. The rich spectral and spatial information in hyperspectral images, characterized by a "map-to-spectrum" fusion, facilitates the distinction between different land cover types and has important applications in agricultural and forestry monitoring, urban remote sensing, and other fields. Therefore, hyperspectral image classification has long been a hot topic in image processing research.

[0003] Over the past few decades, a variety of neural network-based classification algorithms have been extensively studied, such as 2D convolution, 3D convolution, and graph convolution. While significant breakthroughs have been achieved, they still suffer from a significant drawback: model training requires a large number of labeled samples. However, due to the complexity of hyperspectral images, manual labeling is difficult, resulting in a limited number of labeled samples. Therefore, how to achieve good generalization performance for models with limited training samples has become an urgent issue. Domain adaptation technology is an important approach to addressing the lack of labeled data. Its concept is to adapt knowledge from one domain (the source domain) to another domain (the target domain). It can be used to reduce spectral shifts between images across scenes in hyperspectral image classification tasks. Depending on whether there is a small amount of labeled data in the target domain, domain adaptation can be divided into unsupervised domain adaptation and supervised domain adaptation. The main strategy of unsupervised domain adaptation is to guide feature learning by minimizing the distribution difference between source and target features. To this end, adversarial learning is a commonly used method in unsupervised domain adaptation. According to probability theory, the confidence of a single classifier is inferior to that of an ensemble of multiple classifiers. Furthermore, the large number of features in hyperspectral images and the large number of neural network parameters result in slow model performance. These are also issues that the present invention aims to address. Summary of the Invention

[0004] To address these issues, the present invention combines unsupervised and supervised domain adaptation to propose a three-layer domain adaptation solution. Furthermore, the present invention incorporates large-core attention in the adversarial domain adaptation generator and decomposes the large core to ensure that the network has a smaller number of parameters while increasing the receptive field. The present invention also introduces the XGBoost ensemble classifier, renowned for its speed and efficiency, to address the issues of slow computation and low reliability of single classifiers.

[0005] The object of the present invention is achieved like this:

[0006] Step a: input the hyperspectral data set to be classified;

[0007] Step b: Divide the input hyperspectral dataset into two parts: the source domain dataset is named S (Source) and the target domain dataset is named T (Target);

[0008] Step c: Select a training set from the source domain dataset, and select disjoint labeled training sets and unlabeled training sets from the target domain dataset;

[0009] Step d: Input the source domain training set and the target domain unlabeled training set into the source domain feature extractor respectively

[0010] Feature extraction is performed in the Source Extractor (SE) and the target domain feature extractor (TE), where both the source domain feature extractor and the target domain feature extractor adopt the spatial spectral attention model structure;

[0011] Step e: The feature-extracted data is fed into the discriminator, which is used to distinguish between source domain and target domain data. The discriminator and the target domain feature extractor (generator) compete with each other to improve the feature transfer capability of the target domain feature extractor.

[0012] Step f: Inputting a small amount of labeled target domain samples into the target domain feature extractor, so that the target domain feature extractor can learn the true distribution of the target domain data;

[0013] Step g: Map the source domain and target domain data to the same common domain space, and cluster the target domain data using the cluster centers of the source domain data;

[0014] Step h: Use XGBoost integrated classifier to classify the extracted features to obtain the final classification results;

[0015] The hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning according to claim 1 is characterized in that step c specifically comprises:

[0016] Step c1: In the source domain dataset, randomly select 180 source domain samples of size 5×5×ch for each class, where ch is the spectral band, and retain the labels as the source domain training set, named source labeled samples (SLS).

[0017] Step c2: Randomly select 20 target domain samples of size 5×5×ch for each class in the target domain dataset, retain the labels as the target domain labeled training set, and name it TLS (Target labeled samples);

[0018] Step c3: In the target domain dataset, 200 target domain samples of size 5×5×ch are randomly selected for each class, and after removing the labels, they are used as the target domain unlabeled training set, named as the target domain data TUS (Target unlabeled samples).

[0019] According to the hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning, step d is specifically as follows:

[0020] Step d1: The source domain training set and the target domain unlabeled training set are fed into the deep hyperparameter model and then average pooled.

[0021] Step d2: Input the data processed in step d1 into the large kernel attention model (LKA), and then flatten the data using full connection;

[0022] According to the hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning, step e is specifically as follows:

[0023] Step e1: Construct a discriminator with a structure of fully connected layer-ReLU activation function-fully connected layer-ReLU activation function-fully connected layer-Softmax activation function. The input data size of the first layer is 1×128, the input data size of the second and third layers is 1×64, and the fourth layer and output data size is 1×2.

[0024] Step e2: The improvement of the feature transfer capability of the spatial spectral attention model is achieved by optimizing the loss function, as shown in the following formula:

[0025]

[0026] in, is the target domain unlabeled training sample TUS, α is the parameter of the target domain feature extractor, β is the parameter of the discriminator, SLS is the source domain training sample, SE() is the source domain feature extractor, and TE() is the target domain feature extractor. β () is the discriminator in adversarial learning, which is used to distinguish whether the input features are from the source domain or the target domain.

[0027] According to the hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning, in step f, the spatial-spectral attention model trained in step e is adjusted using a labeled training set in the target domain, so that the spatial-spectral attention model can further learn the conditional probability distribution of samples in the target domain. This layer uses the mean square error as the loss function, and its optimization formula is:

[0028]

[0029] in, Sample TLS with a small number of labels for the target domain, is the training dataset, is a tag set.

[0030] According to the hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning, step g is specifically as follows:

[0031] Step g1: Map the labeled data in the source domain to a public domain space through the spatial spectral attention model, and take the average value to obtain the cluster center of the source domain;

[0032] Step g2: Map the target domain unlabeled data to the same public domain space and cluster the target data in the public domain space using the cluster centers of the source domain. In order to minimize the distribution difference between the source and target domains in the public domain space, a mapping clustering loss is introduced to measure the degree of aggregation of similar samples in the public domain space. By iterative mapping and optimizing the clustering loss, the distance between the cluster centers of the source and target domains is continuously reduced. The optimization formula for the mapping clustering loss for all categories is:

[0033]

[0034] Among them, C k Represents the cluster center of the k-th class sample, and its value is the mean of the k-th class sample. Reducing the mapping clustering loss helps to classify the target domain samples in the public domain space.

[0035] According to the hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning, step h is specifically as follows:

[0036] Step h1, define the objective function as:

[0037]

[0038] Where n is the number of samples, y i is the label of the i-th sample, is the predicted value of the i-th sample, used to calculate the sample loss, K represents the number of trees, f k Represents the kth tree, its formula is to map samples to leaf nodes, and Ω is used to measure the complexity of the model.

[0039] Step h2: Initialize the predicted value of each sample;

[0040] Step h3: Calculate the derivative of the loss function for each sample prediction value;

[0041] Step h4: build a new decision tree based on the derivative information;

[0042] Step h5: Use the new decision tree to predict the sample value and fit the residual between the previous tree and the true value;

[0043] Step h6: Repeat steps h3-h5 until the residual is less than the threshold.

[0044] Beneficial effects:

[0045] This paper introduces large kernel attention (LKA), which has the dual advantages of convolution and attention. It can utilize the local structural information of the image, capture long-distance dependencies, and has adaptability in spatial and spectral dimensions. It uses the XGBoost ensemble classifier, which is famous for its speed and efficiency, to alleviate the problems of slow calculation speed and low credibility of single classifier, effectively improving the accuracy of hyperspectral image classification.

[0046] This provides a new reference for subsequent research and related applications of cross-scene hyperspectral image classification.

[0047] Figure 1 This is a flow chart of the hyperspectral image classification method that combines spatial-spectral domain adaptation with ensemble learning in the present invention.

[0048] Figure 2 This is a hyperspectral image classification model diagram that combines spatial-spectral domain adaptation with ensemble learning.

[0049] Figure 3 It is the spatial spectral attention model diagram in the method of the present invention.

[0050] Figure 4 It is a schematic diagram of the macronucleus decomposition structure in the method of the present invention.

[0051] Figure 5 These are the pseudo-color and true-value images of the Pavia dataset used in the method of the present invention.

[0052] Figure 6 These are the pseudo-color and true-value images of the Indiana dataset used in the method of the present invention.

[0053] Figure 7 It is a classification result diagram of the Pavia dataset in the method of the present invention.

[0054] Figure 8 This is a diagram of the classification results in the Indiana dataset in the method of the present invention. DETAILED DESCRIPTION

[0055] The specific embodiments of the present invention are described in further detail below based on the accompanying drawings.

[0056] The hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning in this specific embodiment is as follows: Figure 1 As shown, the network principle diagram is as follows Figure 2 As shown, the following steps are included:

[0057] Step a: input the hyperspectral image to be classified;

[0058] In this specific embodiment, two open source datasets with high authority in the field of hyperspectral are used: the Pavia dataset and the Indiana dataset.

[0059] (1) Pavia dataset: The Pavia dataset is an image of the urban area of ​​Pavia, Italy, captured by the Digital Airborne Imaging System (DAIS) sensor. The University of Pavia is selected as the source domain for training, and the center of Pavia is selected as the target domain. The source domain size is (243, 243, 72), and the target domain size is (400, 400, 72). The false color image and the ground truth image are as follows: Figure 5 There are six corresponding land cover classifications from C1 to C6, as shown in Table 1.

[0060] Table 1 Details of the Pavia dataset

[0061] Category Number Category Name Number of source domain samples Number of target domain samples C1 Trees 266 2424 C2 Asphalt 266 1704 C3 Parking lot 265 287 C4 Bitumen 206 685 C5 Meadow 273 1251 C6 Soil 213 1475

[0062] (2) Indiana dataset: The Indiana dataset is an image of the Indiana Proving Ground in northwestern Indiana, USA, captured by the Airborne Visible / Infrared Imaging Spectrometer (AVIRIS). Two non-overlapping regions are selected as the source domain and the target domain. The source domain size is (400, 300, 220), and the target domain size is also (400, 300, 220). The false color image and the ground truth image are as follows: Figure 6 There are seven corresponding land cover classifications from C1 to C7, as shown in Table 2.

[0063] Table 2 Details of the Indiana dataset

[0064]

[0065]

[0066] Step b: Divide the input hyperspectral dataset into two parts: the source domain dataset is named S (Source) and the target domain dataset is named T (Target);

[0067] Assuming that the source domain and the target domain contain some common cross-features, through feature transformation, the features of the source domain and the target domain are transformed into the same space, so that the source domain data and the target domain data in the space have the same data distribution. Then traditional machine learning is performed, which can solve the problem of few target domain labels.

[0068] Step c: Select a training set from the source domain dataset, and select disjoint labeled training sets and unlabeled training sets from the target domain dataset;

[0069] The labeled source domain training set and the unlabeled target domain training set are used for transfer learning. Although the labeled target domain training set is limited in number, it represents the true distribution of target domain samples and can largely reflect the characteristics of the primary domain. The ultimate goal of cross-scene hyperspectral classification is to enable the model to learn the sample distribution of the target domain to the greatest extent possible. Therefore, even a small number of target domain samples can provide the model with realistic target domain sample distribution information.

[0070] Step c1: In the source domain dataset, randomly select 180 source domain samples of size 5×5×ch for each class, where ch is the spectral band, and retain the labels as the source domain training set, named source labeled samples (SLS).

[0071] Step c2: Randomly select 20 target domain samples of size 5×5×ch for each class in the target domain dataset, retain the labels as the target domain labeled training set, and name it TLS (Target labeled samples);

[0072] Step c3: In the target domain dataset, 200 target domain samples of size 5×5×ch are randomly selected for each class, and after removing the labels, they are used as the target domain unlabeled training set, named as the target domain data TUS (Target unlabeled samples).

[0073] Step d: Input the source domain training set and the target domain unlabeled training set into the source domain feature extractor respectively

[0074] Feature extraction is performed in the Source Extractor (SE) and the target domain feature extractor (TE), where both the source domain feature extractor and the target domain feature extractor adopt the spatial spectral attention model structure;

[0075] Step d1: Feed the source domain training set and the target domain unlabeled training set into a deep hyperparameter model and perform average pooling. The deep hyperparameter model is composed of four layers of deep hyperparameter convolution, batch normalization, ReLU activation function, and dropout in series. The deep hyperparameter convolution kernel size is 1×1, padding is 0, and the average pooling filter size is 5×5.

[0076] Deep hyperparameter convolution is derived from traditional convolution and depthwise convolution In traditional convolution, the convolution layer performs sliding processing on the input data, and each element of the output feature is obtained by the dot product of the horizontal slice of the convolution kernel and the image block P. M and N are the spatial dimensions of P, C in is the number of input feature maps, D mul is the number of depthwise convolutions, C out is the number of output feature maps. In deep convolutional layers, during the training phase, the depthwise convolution kernel is convolved with each input channel. After training, the multiple layers of compound linear operations used for overparameterization are collapsed into a compact single-layer representation. Only this single layer is then used for inference, making the computational effort equivalent to that of a regular layer.

[0077] In step d2, the processed data from step d1 is fed into the Large Kernel Attention (LKA) model, which is then flattened using full connectivity. The LKA model consists of a series of depthwise convolution, depthwise atrous convolution, and pointwise convolution. The depthwise convolution kernel size is 5×5 with a padding of 2; the depthwise atrous convolution kernel size is 7×7 with a padding of 9 and a dilation of 3; and the pointwise convolution kernel size is 1×1 with a padding of 0.

[0078] After adding LKA, the problem of small network receptive field caused by small convolution kernel can be improved through two approaches: deep hyperparameterized convolution and large kernel. In order to avoid large convolution kernel increasing the parameters of the network model and making it unfavorable for small sample training, LKA decomposes the large kernel into Figure 4 The three parts shown are: spatial local convolution (depth convolution), spatial long-distance convolution (depth hole convolution) and spectral convolution (1×1 convolution). The specific decomposition size is a K×K convolution decomposed into an expansion rate d, the size is A deep dilation convolution (Deepwise Dilation Convolution, DW-D-Conv), a (2d-1)×(2d-1) deep convolution (Deepwise Convolution, DW-Conv) and a 1×1 convolution (PointwiseConvolution, PW-Conv).

[0079] After large kernel decomposition, the model can not only capture long-range dependencies and increase the receptive field, but also ensure that the computational cost and number of parameters are very small. LKA also introduces a new attention method from the spatial and spectral dimensions, which can select distinctive features based on the spatial and spectral characteristics of the input and automatically ignore noise responses. After capturing long-range dependencies, LKA generates an attention map by estimating the importance of pixels. The calculation formula is:

[0080] Attention=Conv 1×1(DW-D-Conv(DW-Conv(F)))

[0081]

[0082] Where F∈R C×H×W is the input feature map, Attention∈R C×H×W represents the attention map. Indicates pixel-by-pixel multiplication.

[0083] Step e: The feature-extracted data is fed into the discriminator, which is used to distinguish between source domain and target domain data. The discriminator and the target domain feature extractor (generator) compete with each other to improve the feature transfer capability of the target domain feature extractor.

[0084] Step e1: Construct a discriminator with a structure of fully connected layer-ReLU activation function-fully connected layer-ReLU activation function-fully connected layer-Softmax activation function. The input data size of the first layer is 1×128, the input data size of the second and third layers is 1×64, and the fourth layer and output data size is 1×2.

[0085] By using the ReLU activation function to increase the network nonlinearity, the convergence speed of the network model is improved. The formulas of the ReLU and Softmax activation functions are as follows:

[0086]

[0087] Step e2: The improvement of the feature transfer capability of the spatial spectral attention model is achieved by optimizing the loss function, as shown in the following formula:

[0088]

[0089] in, is the target domain unlabeled training sample TUS, α is the parameter of the target domain feature extractor, β is the parameter of the discriminator, SLS is the source domain training sample, SE() is the source domain feature extractor, and TE() is the target domain feature extractor. β () is the discriminator in adversarial learning, which is used to distinguish whether the input features are from the source domain or the target domain.

[0090] Adversarial learning: First, initialize the parameters of the generator (the Spatial Spectral Attention model) and the discriminator D. Next, randomly sample samples from the source domain training set and feed the target domain unlabeled training samples into the Spatial Spectral Attention model to generate 180 samples. The Spatial Spectral Attention model is fixed, and the discriminator D is trained to best distinguish whether the data comes from the source or target domain. Then, after cyclically updating the discriminator D, the Spatial Spectral Attention model is updated once. After 200 epochs of updates, the ideal discrimination probability reaches 0.5, completing training.

[0091] In step f, the target domain samples with a small amount of labels are input into the target domain feature extractor, allowing the target domain feature extractor to learn the true distribution of the target domain data. The spatial spectral attention model trained in step e is adjusted using the target domain labeled training set, allowing the spatial spectral attention model to further learn the conditional probability distribution of the target domain samples. This layer uses the mean squared error as the loss function, and its optimization formula is:

[0092]

[0093] in, Sample TLS with a small number of labels for the target domain, is the training dataset, is a tag set.

[0094] In this step, assuming that the two samples x1 and x2 are similar, their corresponding outputs y1 and y2 should also be similar. This means that if two inputs are of the same class and belong to the same cluster, their corresponding outputs need to be similar, and vice versa; assuming that the input data points form clusters and each cluster corresponds to an output class, then if the points are in the same cluster, they can be considered to belong to the same class. The second assumption can also be viewed as a low-density separation assumption, that is, the given decision boundary is located in a low-density area. The relationship between the two assumptions is easy to see. A high-density area may divide a cluster into two different categories, resulting in different classes belonging to the same cluster, which violates the second assumption. In this case, supervised domain adaptation with labeled data can be used to constrain the model to have consistent predictions on some small-perturbation unlabeled data to push its decision boundary to the low-density area.

[0095] Step g: Map the source domain and target domain data to the same common domain space, and cluster the target domain data using the cluster centers of the source domain data;

[0096] Step g1: Map the labeled data in the source domain to a public domain space through the spatial spectral attention model, and take the average value to obtain the cluster center of the source domain;

[0097] The clustering algorithm is K-Means. The idea of ​​K-Means is to divide the data into a predetermined number of clusters, K, based on minimizing the error function. Distance is used as the evaluation metric for similarity, which means that the closer the distance between two objects, the greater their similarity.

[0098] The algorithm process is as follows:

[0099] (1) Randomly select K (K value is different for different data sets) objects from N sample data as the initial cluster centers;

[0100] (2) Calculate the distance between each sample and each cluster center, and assign the object to the cluster with the closest distance. The distance formula between two points is:

[0101]

[0102] Where x is a sample point and μ is the cluster center;

[0103] (3) After all objects are assigned, the centers of the K clusters are recalculated;

[0104] (4) Compare with the K cluster centers calculated in the previous time. If the cluster centers have changed, go to step (2);

[0105] (5) When the centroid does not change, stop and output the clustering results.

[0106] Step g2: Map the target domain unlabeled data to the same public domain space and cluster the target data in the public domain space using the cluster centers of the source domain. In order to minimize the distribution difference between the source and target domains in the public domain space, a mapping clustering loss is introduced to measure the degree of aggregation of similar samples in the public domain space. By iterative mapping and optimizing the clustering loss, the distance between the cluster centers of the source and target domains is continuously reduced. The optimization formula for the mapping clustering loss for all categories is:

[0107]

[0108] Among them, C k Represents the cluster center of the k-th class sample, and its value is the mean of the k-th class sample. Reducing the mapping clustering loss helps to classify the target domain samples in the public domain space.

[0109] Step h: Use XGBoost integrated classifier to classify the extracted features to obtain the final classification results;

[0110] Step h1, define the objective function as:

[0111]

[0112] Where n is the number of samples, y i is the label of the i-th sample, is the predicted value of the i-th sample, used to calculate the sample loss, K represents the number of trees, f k represents the kth tree, and its formula is to map samples to leaf nodes. Ω is used to measure the complexity of the model. t-1 After training, it is no longer adjusted. The t-th tree is represented as:

[0113]

[0114] Among them, x represents the training sample. When training the t-th tree, its objective function is:

[0115]

[0116] Among them, x i represents the i-th training sample, It can represent the complexity of the first t-1 trees, which is a constant and does not affect the optimization results of the model. Therefore, after Taylor expansion of the above formula and removing the constant term, we can get:

[0117]

[0118] in, It is a model composed of the first t-1 trees.

[0119] To facilitate discussion of Ωf t The present invention defines [w1,w2,...,w T ] represents the output vector of the leaf node, let q(x):R d →{1,2,3,,T} represents the mapping of samples to leaf nodes, then f t (x) = w q(x) ,wR T Ω(f t ) can be defined as:

[0120]

[0121] Among them, T represents the number of leaf nodes, w j represents the output of leaf node j, λ and γ are coefficients. Therefore, the objective function can be organized as:

[0122]

[0123] This is the function that needs to be optimized in the end;

[0124] Step h2: Initialize the predicted value of each sample;

[0125] Step h3: Calculate the derivative of the loss function for each sample prediction value;

[0126] Step h4: build a new decision tree based on the derivative information;

[0127] Step h5: Use the new decision tree to predict the sample value and fit the residual between the previous tree and the true value;

[0128] Step h6: Repeat steps h3-h5 until the residual is less than the threshold.

[0129] The experimental evaluation indicators adopted by the present invention are overall accuracy (OA), average accuracy (AA) and Kappa coefficient (K). Table 3 and Table 4 respectively show the detailed classification results of the method proposed in the present invention and other comparative methods on two data sets. It can be seen that compared with radial basis function support vector machine (RBF-SVM), extended morphological profile support vector machine (EMP-SVM), deep convolutional neural network (DCNN), unsupervised domain adaptive classification algorithm based on Euclidean distance (ED-DMM-UDA), and unsupervised domain adaptive weighted KNN cross-scene classification method (MDDUWK) combined with Manhattan metric and deep parameterized convolution, the classification performance of the model proposed in the present invention on both data sets reached the highest, with OA reaching 91.62% and 65.98% respectively. In order to verify the effectiveness of each component of the model, two sets of ablation experiments were conducted, including experiments using only LKA in the model (SSDA) and experiments using only XGBoost in the model (SDAI). The results of the two sets of ablation experiments show that both LKA and XGBoost used in the present invention can improve the classification accuracy of the model.

[0130] In order to subjectively evaluate the classification effect, Figure 7 and Figure 8 The ground truth maps for the Pavia and Indiana datasets, along with the classification results for each method, are shown. The order of the classification methods is the same as in Tables 3 and 4. It can be seen that the proposed classification algorithm more closely matches the actual object distribution, significantly reducing the area of ​​misclassification, further demonstrating the effectiveness of the proposed method in hyperspectral data classification.

[0131] Table 3 Comparison of classification accuracy of different classification methods for Pavia dataset (%)

[0132]

[0133] Table 4 Comparison of classification accuracy of different classification methods for the Indiana dataset (%)

[0134]

[0135]

Claims

1. A hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning, characterized by: The following steps are involved: Step a: input the hyperspectral data set to be classified; Step b: Divide the input hyperspectral dataset into two parts: the source domain dataset is named S (Source) and the target domain dataset is named T (Target); Step c: Select a training set from the source domain dataset, and select disjoint labeled training sets and unlabeled training sets from the target domain dataset; Step d: Input the source domain training set and the target domain unlabeled training set into the source domain feature extractor (SourceExtractor, SE) and the target domain feature extractor (Target Extractor, TE) respectively for feature extraction. Both the source domain feature extractor and the target domain feature extractor adopt the spatial spectral attention model structure, wherein the spatial spectral attention model includes a deep hyperparameter model and a large core attention model. The specific structure is: 4 deep hyperparameter convolutions-batch normalization-ReLU activation function-Dropout structure-large core attention model in series. The large core attention model includes: deep convolution-deep void convolution-point convolution in series; Step e: The feature-extracted data is fed into the discriminator, which is used to distinguish the source domain data from the target domain data. The discriminator and the target domain feature extractor compete with each other to improve the feature transfer capability of the target domain feature extractor. Step f: Inputting a small amount of labeled target domain samples into the target domain feature extractor, so that the target domain feature extractor can learn the true distribution of the target domain data; Step g: Map the source domain and target domain data to the same common domain space, and cluster the target domain data using the cluster centers of the source domain data; Step h: Use the XGBoost ensemble classifier to classify the extracted features to obtain the final classification results.

2. The hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning according to claim 1 is characterized in that: Step c specifically includes the following steps: Step c1: In the source domain dataset, randomly select 180 source domain samples of size 5×5×ch for each class, where ch is the spectral band, and retain the labels as the source domain training set, named source labeled samples (SLS). Step c2: Randomly select 20 target domain samples of size 5×5×ch for each class in the target domain dataset, retain the labels as the target domain labeled training set, and name it TLS (Target labeled samples); Step c3: In the target domain dataset, 200 target domain samples of size 5×5×ch are randomly selected for each class, and after removing the labels, they are used as the target domain unlabeled training set, named as the unlabeled target domain data TUS (Target unlabeled samples).

3. The hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning according to claim 1 is characterized in that: Step d specifically includes the following steps: Step d1: The source domain training set and the target domain unlabeled training set are fed into the deep hyperparameter model and then average pooled. The deep hyperparameter model is composed of four deep hyperparameter convolution-batch normalization-ReLU activation function-Dropout structures in series. The deep hyperparameter convolution kernel size is 1×1, padding is 0, and the average pooling filter size is 5×5. The deep hyperparameter convolution is composed of traditional convolution. and depthwise convolution In traditional convolution, the convolution layer performs sliding processing on the input data, and each element of the output feature is obtained by the dot product of the horizontal slice of the convolution kernel and the image block P; M and N are the spatial dimensions of P, C in is the number of input feature maps, D mul is the number of depthwise convolutions, C out is the number of output feature maps; in the deep convolution layer, during the training phase, the depthwise convolution kernel is convolved with each input channel; after the training phase, the multi-layer compound linear operation used for over-parameterization is folded into a compact single-layer representation; then, only the single layer is used for inference, making the computational effort completely equivalent to that of a regular layer; Step d2: Input the data processed by d1 into the large kernel attention model (LKA), and then flatten the data using full connection.

4. The hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning according to claim 1, characterized in that: Step e specifically includes the following steps: Step e1: Construct a discriminator with a structure of fully connected layer-ReLU activation function-fully connected layer-ReLU activation function-fully connected layer-Softmax activation function. The input data size of the first layer is 1×128, the input data size of the second and third layers is 1×64, and the fourth layer and output data size is 1×2. Step e2: The improvement of the feature transfer capability of the spatial spectral attention model is achieved by optimizing the loss function, as shown in the following formula: in, is the target domain unlabeled training sample TUS, α is the parameter of the target domain feature extractor, β is the parameter of the discriminator, SLS is the source domain training sample, SE(·) is the source domain feature extractor, TE(·) is the target domain feature extractor; D β (·) is the discriminator in adversarial learning.

5. The hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning according to claim 1 is characterized in that: In step f, the spatial spectral attention model trained in step e is adjusted using the labeled training set of the target domain so that the spatial spectral attention model can further learn the conditional probability distribution of the target domain samples. The spatial spectral attention model uses the mean square error as the loss function, and its optimization formula is: in, Sample TLS with a small number of labels for the target domain, is the training dataset, is the label set, α is the parameter of the target domain feature extractor, and TE() is the target domain feature extractor.

6. The hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning according to claim 1, characterized in that: Step g specifically includes the following steps: Step g1: Map the labeled data in the source domain to a public domain space through the spatial spectral attention model, and take the average value to obtain the cluster center of the source domain; Step g2: Map the unlabeled data of the target domain to the same public domain space, and cluster the target data in the public domain space using the cluster centers of the source domain. Introduce the mapping clustering loss to measure the degree of aggregation of similar samples in the public domain space. Optimize the clustering loss through iterative mapping to continuously reduce the distance between the cluster centers of the source and target domains. The optimization formula for the mapping clustering loss of all categories is: Among them, C k Represents the cluster center of the k-th class sample, and its value is the mean of the k-th class sample; reducing the mapping clustering loss helps the classification of target domain samples in the public domain space, TE() is the target domain feature extractor, α is the parameter of the target domain feature extractor, TUS is an unlabeled training sample for the target domain.

7. The hyperspectral image classification method combining spatial-spectral domain adaptation and ensemble learning according to claim 1, characterized in that: Step h specifically includes the following steps: Step h1, define the objective function as: Where n is the number of samples, y i is the label of the i-th sample, is the predicted value of the i-th sample, used to calculate the sample loss, K represents the number of trees, f k represents the kth tree, whose formula is to map samples to leaf nodes, and Ω is used to measure the complexity of the model; Step h2: Initialize the predicted value of each sample; Step h3: Calculate the derivative of the loss function for each sample prediction value; Step h4: build a new decision tree based on the derivative information; Step h5: Use the new decision tree to predict the sample value and fit the residual between the previous tree and the true value; Step h6: Repeat steps h3-h5 until the residual is less than the threshold.

Citation Information

Patent Citations

  • Heterogeneous deep network method for non-Euclidean and Euclidean domain space spectrum feature learning

    CN112381144A

  • Method for quickly mixing high-order attention domain adversarial network based on transfer learning

    CN112446423A