A hyperspectral image classification method based on cross-scene adaptive learning
Through cross-scene adaptive learning method, deep separable embedding model and Manhattan metric space optimization feature extraction are used, combined with unsupervised domain adaptive technology and weighted K nearest neighbor classifier, the strong dependence on labeled samples in hyperspectral image classification is solved and The problem of data category imbalance has achieved efficient and accurate classification.
Patent Information
- Application Number
- CN202210018149.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-08
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-01-08
AI Technical Summary
The existing hyperspectral image classification methods have problems such as strong dependence on labeled samples, slow convergence speed, high computational cost and unbalanced data categories, especially in small samples or no samples.
A cross-scene adaptive learning method is adopted to optimize feature extraction and classification through deep separable embedded model and Manhattan metric space, combining unsupervised domain adaptive technology and weighted K nearest neighbor classifiers to reduce the model's dependence on samples and improve classification accuracy.
It significantly improves the accuracy and efficiency of hyperspectral image classification, enhances the ability to deal with data category imbalance problem, and is suitable for accurate classification in small samples or no samples.
Smart Images

Figure CN114429565B_ABST
Abstract
Description
Technical Field
[0001] The invention discloses a hyperspectral image classification method based on cross-scene adaptive learning, which belongs to the technical field of image processing. Background Art
[0002] Hyperspectral remote sensing images are images of ground areas by imaging spectrometers using dozens or even hundreds of continuous bands. They are three-dimensional images that combine spatial information and spectral information. With rich third-dimensional information, spectral information, they can more accurately segment and identify ground objects in spectral space, so they have been widely used in military target reconnaissance, forestry monitoring, vegetation research and other fields. In hyperspectral remote sensing applications, how to describe the similarity between samples has always been a difficult problem in the classification of small sample hyperspectral images. In recent years, deep learning has been widely used in the field of hyperspectral remote sensing because it is very powerful in automatically extracting features and learning different hierarchical structures. However, deep learning algorithms still have some shortcomings, such as the need for a large number of training samples and difficulty in adjusting parameters.
[0003] To this end, this patent combines the idea of cross-scene classification and uses labeled similar scenes to classify a hyperspectral scene with no labeled samples or only a few labeled samples, effectively reducing the model's dependence on samples. Although the cross-scene classification model can effectively process limited labeled samples, there are still problems of slow convergence and large network parameters. In order to improve the convergence speed of the model, the present invention introduces a deep separable convolution to reduce the number of network parameters. Since the deep separable convolution performs a convolution for each input channel of the hyperspectral spectrum, more refined spatial features are extracted, thereby improving the recognition accuracy. In order to further train small sample hyperspectral data, some researchers combine deep learning with metric learning, which not only retains the automatic feature extraction ability of deep learning, but also reduces the model's dependence on training samples. Most of the existing metric learning algorithms are based on k-nearest neighbor classification algorithms, which can better reflect the differences between features than traditional algorithms, and play a role in making the same label feature distance closer and different labels farther away. The object category is obtained by comparing the metric values of elements in space. Due to this characteristic of metric learning, features can be learned from limited labeled samples, so metric learning is widely used in the field of image classification. Generally, metric learning is used together with the K nearest neighbor classifier. However, in the classic K nearest neighbor algorithm, the metric distance between all samples is required, which can easily lead to long model operation time, high computational cost, and low efficiency in dividing sample space on high-dimensional data. Therefore, this patent introduces the ball tree algorithm for the K nearest neighbor classifier, optimizes the search efficiency, and improves the model operation time. Because hyperspectral data itself has data category imbalance, this patent weights the sample data, increases the weight of small samples, and enhances the model's ability to handle complex environments.
[0004] For example, Chinese patent application CN112733775A discloses a hyperspectral image classification method based on deep learning. By using the deep learning method, the hyperspectral image classification is fixed, streamlined and simplified. When classifying hyperspectral images, the original hyperspectral image can be quickly classified by importing it into the training model, which simplifies the difficulty of hyperspectral image classification to a certain extent, improves the efficiency of image classification, reduces the workload of image classification in the centralized classification, and improves the accuracy of image classification. However, this method requires the construction of a hyperspectral data training sample set and a test set, and cannot be applied to the hyperspectral image classification of small samples or lack of samples, resulting in poor classification accuracy. For another example, Chinese patent application CN112784774A discloses a small sample hyperspectral classification method based on data enhancement, which realizes data enhancement of hyperspectral image data, solves the small sample problem to a certain extent, trains a better classifier through the amplified training sample, and improves the classification recognition rate of hyperspectral data under similar conditions. However, this method still depends on samples, and existing samples must be available for data enhancement.
[0005] Therefore, there is still a need for a hyperspectral image classification method based on cross-scene adaptive learning to solve the problem that the existing hyperspectral image classification methods have models that are too dependent on labeled samples. Summary of the invention
[0006] In view of the shortcomings of the existing technology, the present invention proposes a hyperspectral image classification method based on cross-scene adaptive learning, which can reduce the dependence of the classification model on samples and enhance the model's ability to handle data category imbalance problems, significantly improving the classification accuracy, and providing new ideas for the research and engineering application of accurate classification of hyperspectral images with small samples or no samples.
[0007] The object of the present invention is achieved in that:
[0008] A hyperspectral image classification method based on cross-scene adaptive learning includes the following steps:
[0009] Step a, inputting the original hyperspectral data set to be classified;
[0010] Step b, dividing the input hyperspectral image original data set;
[0011] The labeled samples are called the source data set SD, and the unlabeled samples are called the target data set TD;
[0012] Step c: extract features from the source dataset SD and the target dataset TD as input samples, and input the input samples into the improved deep separable embedding model to obtain the feature map of each layer output;
[0013] Step d: cluster the output of the deep separable embedding model using the KMeans algorithm;
[0014] Step e: Input the clustered input samples into the discriminator model to reduce the differences between different data sets, distinguish the source data set SD from the target data set TD, and obtain an embedding space containing only the target data set TD.
[0015] Step f, mapping the target scene samples obtained in step e into the Manhattan metric space, measuring the Manhattan metric distance between any two samples, and further optimizing the embedding space to obtain a more compact embedding space;
[0016] Step g: classify the embedded space of the target scene obtained in step f by using an improved weighted K nearest neighbor classifier WKNN.
[0017] In the above-mentioned hyperspectral image classification method based on cross-scene adaptive learning, step c is specifically as follows:
[0018] Step c1: Select non-overlapping 5×5×Kband neighborhoods from the source dataset SD and the target dataset TD as input samples. Among them, n is the total number of training samples, and each x in n i The training samples all have corresponding label values y i , the label corresponds to the category information of each input sample;
[0019] Step c2: Input the input sample of size 5×5×Kband into the deep separable embedding model to obtain the feature map of each layer output.
[0020] In the above-mentioned hyperspectral image classification method based on cross-scene adaptive learning, in step d, C K is the cluster center to form the source scene cluster and target scene clustering Prepare for cross-scene knowledge transfer; where S is each type of feature in the source scene, and T is each type of feature in the target scene.
[0021] In the above-mentioned hyperspectral image classification method based on cross-scene adaptive learning, step e is specifically as follows:
[0022] Step e1: Build a discriminator model consisting of four cascaded fully connected layers
[0023] The size of the first layer is 1×128, the size of the second and third layers is 1×64, and the size of the fourth layer is 1×2; and each fully connected layer has a ReLU activation function to increase the nonlinearity of the network, improve the fit and training speed of the network model, and the formula is as follows:
[0024]
[0025] Step e2: Project the samples clustered in step d into the discriminator, and use the unsupervised domain adaptation technology to reduce the difference between the source scene and the target scene, so that the target scene forms a distribution similar to the source scene, and perform cross-scene feature migration, specifically:
[0026] The two isolated embedding spaces of size 1×128 are mapped to the common embedding space by the first fully connected layer, and the features of the source scene in the space are learned. Subsequently, the output feature map is further optimized through the second and third layers to make the target scene form a distribution similar to that of the source scene. The final formed common embedding space is input into the fourth fully connected layer;
[0027] Step e3: Optimize the embedding space by training the unsupervised domain adaptation technology and distinguish the source dataset SD from the target dataset TD to obtain the embedding space of only the target dataset TD. The loss function is as follows:
[0028]
[0029] in, and θ are the target embedding models respectively and the discriminator D θ The parameters are adjusted by θ and The distribution between feature embeddings, finally remove the samples of the source scene, leaving only the embedding space of the target scene samples, the unsupervised domain adaptation technology is divided into optimizing the spatial loss function and the discriminative space loss function
[0030] In the above-mentioned hyperspectral image classification method based on cross-scene adaptive learning, in step f:
[0031] The Manhattan metric distance is defined as:
[0032]
[0033] Among them, x p and x q are any two samples in the Manhattan metric space;
[0034] In order to optimize the structural information of the Manhattan metric space, the ternary loss function is trained:
[0035]
[0036] Among them, x p And tools x q Samples with the same label, x p and x lSamples with different labels eventually obtain a more compact metric space.
[0037] In the above-mentioned hyperspectral image classification method based on cross-scene adaptive learning, step g is specifically as follows:
[0038] Step g1: Divide the embedding space of the target scene obtained in step f to construct a spherical space to improve the search efficiency of WKNN classification; select a distance C from the current center of the circle. K The farthest observation point I1, and the observation point I2 farthest from I1, assign all the observation points closest to these two points in the circle to the centers of these two clusters, and then calculate the center point of each cluster and the minimum radius containing all its belonging observation points, and continue to recurse to obtain a spherical space;
[0039] Step g2: Weight the hyperspectral data to increase the proportion of small samples, and complete the final classification through KNN; the weight of each type of sample in the hyperspectral data set is defined as:
[0040]
[0041] in, is the weight of each type of sample, K is the category of the sample, CN K is the number of samples in the Kth category;
[0042] Step g3: assign weights to samples according to the weights of each category obtained in step g2. First, sort the Manhattan distances calculated by the metric model and assign corresponding weights. The weight is as follows:
[0043]
[0044] The weighted distance is as follows:
[0045]
[0046] in, Represents the distance information of the K-th class sample;
[0047] Then find the K nearest neighbor sample points, calculate the probability of occurrence of the category to which K belongs, and the category with the largest probability is the category of the sample.
[0048] Furthermore, in step c2, the depthwise separable embedding model includes five layers, and the structure is: conventional convolution layer → depthwise separable convolution layer → conventional convolution layer → average pooling layer → fully connected layer; the size of the conventional convolution kernel and the depthwise separable convolution kernel are both 1×1, the padding is 0, the stride is 1, the size of the average pooling kernel is 5×5, the size of the fully connected layer is 1×128, and the number of filters is 200. Each layer in the first three neural networks is followed by a batch normalization layer and a ReLU activation function, specifically:
[0049] Step c2-1: extract low-level features through the first convolutional layer and output a feature map with a size of 5×5×200. The convolution operation is as follows:
[0050]
[0051] in, is the jth feature map of the lth layer, is the i-th feature map of the l-1th layer, M is the number of input feature maps; trainable parameters and They are randomly initialized respectively, * is the convolution operation;
[0052] Step c2-2: The feature map is mapped to the second layer of deep separable convolution to reduce the parameters of the model. After the introduction of deep separable convolution, the second and third layers of the original convolutional neural network are processed together. Therefore, the parameters of the deep separable convolution are compared with the parameters of the second and third layers and the double-layer convolution layer. The formula is as follows:
[0053]
[0054] Then, higher-level features are extracted through the third and fourth conventional convolutional layers to generate a feature map of size 1×1×200;
[0055] Step c2-3: Map the feature map output by step c2-2 to the average pooling layer, compress the sample size, reduce the number of parameters, and output the feature map with a size of 1×128. Finally, pass it through the fully connected layer to obtain a feature embedding with an output size of 1×128.
[0056] Furthermore, step e3 is specifically as follows:
[0057] Step e3-1: Optimize the embedding space to reduce the differences between different data.
[0058]
[0059] Preserve domain-invariant features so that the target scene can better learn features.
[0060] Step e3-2: distinguish the source dataset SD and the target dataset TD, and retain the embedding space of only the target dataset TD, specifically:
[0061]
[0062] In the projected space, we train the parameters θ to distinguish the embedding features of the two scenes. and And continuously update the embedding space of the target scene.
[0063] Beneficial effects:
[0064] The hyperspectral image classification method based on cross-scene adaptive learning in the present invention can reduce the dependence of the classification model on samples, enhance the model's ability to handle data category imbalance problems, and significantly improve the classification accuracy, providing new ideas for the research and engineering applications of accurate classification of hyperspectral images with small or no samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is a flow chart.
[0066] Figure 2 It is a cross-scene classification model diagram.
[0067] Figure 3 is a deep separable embedding model.
[0068] Figure 4 is the discriminator model.
[0069] Figure 5 is the Manhattan metric model.
[0070] Figure 6 is the WKNN classifier.
[0071] Figure 7 This is the pseudo-color and true value map of Indiana.
[0072] Figure 8 This is the Pavia pseudo-color and true value map.
[0073] Fig. 9 This is the Indiana classification result map.
[0074] Fig.10 This is the Pavia classification result diagram. DETAILED DESCRIPTION
[0075] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.
[0076] The present invention aims at the problem of lack of training sample classification in the field of hyperspectral remote sensing images, and proposes a classification method based on cross-scene adaptive learning. First, on the basis of unsupervised domain adaptation technology, cross-scene knowledge transfer is performed to reduce the differences between source scenes and target scenes. At the same time, a deep separable embedding model is introduced for use in the cross-scene adaptive learning model to improve the convergence speed and feature extraction ability of the model. Subsequently, the Manhattan degree distance is learned in the Manhattan metric space to reduce the computational cost of the model. At the same time, the weighted K nearest neighbor classifier introduces the ball tree to improve the search efficiency and obtain the final object category. The deep separable embedding model used in the method of the present invention is first introduced in detail below, where the flow chart is as follows: Figure 1 shown.
[0077] The deep separable embedding model used in the present invention consists of two parts: a deep convolutional neural network and a deep separable convolution. The introduction of the deep separable convolution retains the ability of the cross-scene model to automatically extract features, making up for the problem of slow convergence speed caused by the depth of the embedding model layers. Considering the small amount of data in hyperspectral images, in order to improve the robustness and recognition accuracy of the model, this patent sets a smaller convolution kernel for training small samples.
[0078] The cross-scenario adaptive learning model of the present invention is described in detail below with reference to the accompanying drawings. Figure 2 As shown, the present invention is specifically implemented according to the following steps:
[0079] The first step is to build a dataset
[0080] The data set with training samples in the hyperspectral data set is called the source data set (Source Data, SD), and the data set without training samples is called the target data set (Target Data, TD). The training samples of all experiments in the present invention are 180 training samples randomly selected from the hyperspectral data, and the remaining samples are test samples.
[0081] In order to verify the effectiveness of the model proposed in this patent for hyperspectral data classification, two public hyperspectral datasets, Indiana and Pavia, were used to test the classification algorithm. The Indiana scene data was acquired by the AVIRIS sensor in Northwest Tippecanoe Country. Two separate datasets were selected as the source scene and the target scene, where both scenes have the same size of 400×300×220. The two scenes share 7 land cover classes for classification. The Pavia scene data was acquired from the DAIS sensor over the Pavia area in Italy. The experiment selected Pavia University with a size of 243×243×72 as the source scene image for training, and Pavia Center with a size of 400×400×72 as the target scene image for prediction. The two scenes share 6 land cover classes for classification. The detailed information of the two datasets is shown in Table 1, and their ground truth maps are shown in Figure 7 , 8 .
[0082] Table 1. Detailed information on categories in the Indiana and Pavia datasets
[0083]
[0084] The second step is to build a "cross-scenario adaptive learning model" network architecture
[0085] The cross-scenario adaptive learning model consists of four core parts: a deep separable embedding model, a discriminator model, a Manhattan metric model, and a WKNN classifier.
[0086] (1) The deep separable embedding model includes: convolution layer, deep separable convolution layer, batch normalization, ReLU activation function, average pooling layer and fully connected layer. The deep separable embedding model is as follows: Figure 3 As shown in the figure. Considering that the depthwise separable convolution reduces the model training time but also reduces the classification accuracy, a hybrid convolutional network is set in the first three layers of the neural network to extract diversified features. The order of the layers is convolutional layer, depthwise separable convolutional layer, and convolutional layer. The size of all convolutional kernels is 1×1, the padding is 0, the step size is 1, and the final output is 5×5×200. Considering the limited embedding space, the output samples are compressed by the average pooling layer, the size of the average pooling kernel is 5×5, and the feature map of size 1×128 is finally output by the fully connected layer.
[0087] (2) Discriminator model: including fully connected layer (FC), batch normalization and ReLU activation function to achieve cross-scenario knowledge transfer. The discriminator model is as follows: Figure 4As shown, the fully connected layer contains three layers, the size of the first layer is 1×128, the size of the second and third fully connected layers are both 1×64, and the size of the fourth fully connected layer is 1×2. In order to further optimize and distinguish the common embedding space, the ternary loss function is trained, and the final public embedding space is input into the Manhattan metric model.
[0088] (3) Manhattan metric model: The embedding space output by the discriminator model is input into the Manhattan metric space to learn the Manhattan metric distance between any two samples. The Manhattan metric model is as follows: Figure 5 As shown, training the ternary loss function obtains a more compact metric space, and finally obtains a more compact metric space.
[0089] (4) WKNN classifier: The WKNN model is as follows Figure 6 As shown, first divide the Manhattan metric feature space and select a distance C from the current circle center K The farthest observation point I1, and the observation point I2 farthest from I1, assign all the observation points closest to these two points in the circle to the centers of the two clusters, and then calculate the center point of each cluster and the minimum radius containing all its observation points. Continuously recurse to obtain a ball tree. In the ball tree space, considering the imbalance of data categories in hyperspectral data, give samples close to the cluster center a greater weight, increase the proportion of small samples, and finally input them into the WKNN classifier for classification. In WKNN, first calculate the Manhattan distance obtained by the metric model, sort it, and assign the corresponding weight. Then find the K nearest neighbor sample points, calculate the probability of the K categories appearing, and the category with the largest probability is the category of the sample.
[0090] Step 3: "Cross-scenario adaptive learning model" parameter setting
[0091] All experimental results are the average of 10 experiments. Because reducing the parameters in the network is conducive to small sample training, the size of the input data is set to 5×5. The epoch is set to 1000, SGD is optimized, the momentum is set to 1, and the learning rate is set to 0.001. The training samples of all experiments are randomly selected from the hyperspectral data. Through a large number of experiments, it is found that when the number of training samples is 180, the accuracy and running time are balanced.
[0092] The present invention conducts a comparative analysis on the values of three evaluation indicators, namely OA, AA and Kappa coefficient. It can be found from Tables 2 and 3 that, compared with classification methods such as RBF-SVM, EMP-SVM, DCNN, ED DMM UDA, and compared with commonly used hyperspectral classification models, the present invention can obtain higher classification accuracy, and the accuracy is significantly improved. Compared with other methods, the method of the present invention has the highest accuracy.
[0093] Table 2 Classification results of Indiana dataset
[0094]
[0095] Table 3 Classification results of Pavia dataset
[0096]
[0097] In order to subjectively evaluate the classification effect, Fig. 9 , Fig.10 Two true value images of hyperspectral data and pseudo-color images of the classification results of each method are shown respectively. It can be seen that the proposed method is closer to the actual distribution of objects, and the area of misclassification is greatly reduced. Compared with radial basis function-based support vector machine (RBF-SVM), morphological profilometry-based support vector machine (EMP-SVM) and deep convolutional neural network (DCNN), and Euclidean metric-based unsupervised domain adaptation classification (ED DMM UDA), the classification effect is greatly improved.
[0098] This paper uses deep separable convolution to replace the traditional convolution layer and proposes a new cross-scene adaptive learning hyperspectral image object classification model. The model is based on unsupervised domain adaptation technology and introduces deep separable convolution into the deep separable embedding model, which solves the problem of slow convergence of deep convolutional neural networks. At the same time, the Manhattan metric distance is learned to save the computational cost of the cross-scene model. Finally, the ball tree weighted KNN classifier is introduced to enhance the model's ability to handle data category imbalance problems and the classifier search efficiency.
Claims
1. A hyperspectral image classification method based on cross-scene adaptive learning, characterized in that: The following steps are involved: Step a, inputting the original hyperspectral data set to be classified; Step b, dividing the input hyperspectral image original data set; The labeled samples are called the source data set SD, and the unlabeled samples are called the target data set TD; Step c: extract features from the source dataset SD and the target dataset TD as input samples, and input the input samples into the improved deep separable embedding model to obtain the feature map of each layer output; Step d: cluster the output of the deep separable embedding model using the KMeans algorithm; Step e: Input the clustered input samples into the discriminator model to reduce the differences between different data sets, distinguish the source data set SD from the target data set TD, and obtain an embedding space containing only the target data set TD. Step e is as follows: Step e1: Build a discriminator model consisting of four cascaded fully connected layers. The size of the first layer is 1×128, the size of the second and third layers is 1×64, and the size of the fourth layer is 1×2. Each fully connected layer is followed by a ReLU activation function to increase the nonlinearity of the network, improve the fit of the network model and the training speed. The formula is as follows: Step e2: Project the samples clustered in step d into the discriminator, and use the unsupervised domain adaptation technology to reduce the difference between the source scene and the target scene, so that the target scene forms a distribution similar to the source scene, and perform cross-scene feature migration, specifically: The two isolated embedding spaces of size 1×128 are mapped to the common embedding space by the first fully connected layer, and the features of the source scene in the space are learned. Subsequently, the output feature map is further optimized through the second and third layers to make the target scene form a distribution similar to that of the source scene. The final formed common embedding space is input into the fourth fully connected layer; Step e3: Optimize the embedding space by training the unsupervised domain adaptation technology and distinguish the source dataset SD from the target dataset TD to obtain the embedding space of only the target dataset TD. The loss function is as follows: in, and θ are the target embedding models respectively and the discriminator D θ The parameters are adjusted by θ and The distribution between feature embeddings, finally remove the samples of the source scene, leaving only the embedding space of the target scene samples, the unsupervised domain adaptation technology is divided into optimizing the spatial loss function and the discriminative space loss function Step f, mapping the target scene samples obtained in step e into the Manhattan metric space, measuring the Manhattan metric distance between any two samples, and further optimizing the embedding space to obtain a more compact embedding space; Step g: classify the embedded space of the target scene obtained in step f by using the improved weighted K nearest neighbor classifier WKNN. The specific improvement is that the search mechanism of the sphere space is introduced to optimize the search efficiency of neighboring samples in the WKNN classification process, thereby improving the classification performance and calculation speed. Step g is specifically as follows: Step g1: Divide the embedding space of the target scene obtained in step f to construct a spherical space to improve the search efficiency of WKNN classification; select a distance C from the current center of the circle. K The farthest observation point I1, and the observation point I2 farthest from I1, assign all the observation points closest to these two points in the circle to the centers of these two clusters, and then calculate the center point of each cluster and the minimum radius containing all its belonging observation points, and continue to recurse to obtain a spherical space; Step g2: Weight the hyperspectral data to increase the proportion of small samples, and complete the final classification through KNN; the weight of each type of sample in the hyperspectral data set is defined as: in, is the weight of each type of sample, K is the category of the sample, CN K is the number of samples in the Kth category; Step g3: assign weights to samples according to the weights of each category obtained in step g2. First, sort the Manhattan distances calculated by the metric model and assign corresponding weights. The weight is as follows: The weighted distance is as follows: in, Represents the distance information of the K-th class sample; Then find the K nearest neighbor sample points, calculate the probability of occurrence of the category to which K belongs, and the category with the largest probability is the category of the sample.
2. The hyperspectral image classification method based on cross-scene adaptive learning according to claim 1 is characterized in that: Step c is specifically as follows: Step c1: Select non-overlapping 5×5×Kband neighborhoods from the source dataset SD and the target dataset TD as input samples. Among them, n is the total number of training samples, and each x in n i The training samples all have corresponding label values y i , the label corresponds to the category information of each input sample; Step c2: Input the input sample of size 5×5×Kband into the deep separable embedding model to obtain the feature map of each layer output.
3. The hyperspectral image classification method based on cross-scene adaptive learning according to claim 1 is characterized in that: In step d, C K is the cluster center to form the source scene cluster and target scene clustering Prepare for cross-scene knowledge transfer; where S is each type of feature in the source scene, and T is each type of feature in the target scene.
4. The hyperspectral image classification method based on cross-scene adaptive learning according to claim 1 is characterized in that: In step f: The Manhattan metric distance is defined as: Among them, x p and x q are any two samples in the Manhattan metric space; In order to optimize the structural information of the Manhattan metric space, the ternary loss function is trained: Among them, x p And tools x q Samples with the same label, x p and x l Samples with different labels eventually obtain a more compact metric space.
5. The hyperspectral image classification method based on cross-scene adaptive learning according to claim 2 is characterized in that: In step c2, the depthwise separable embedding model contains five layers, and the structure is: regular convolution layer → depthwise separable convolution layer → regular convolution layer → average pooling layer → fully connected layer; the size of the regular convolution kernel and the depthwise separable convolution kernel are both 1×1, the padding is 0, the stride is 1, the size of the average pooling kernel is 5×5, the size of the fully connected layer is 1×128, and the number of filters is 200. Each layer in the first three neural networks is followed by a batch normalization layer and a ReLU activation function, specifically: Step c2-1: extract low-level features through the first convolutional layer and output a feature map with a size of 5×5×200. The convolution operation is as follows: in, is the jth feature map of the lth layer, is the i-th feature map of the l-1th layer, M is the number of input feature maps; trainable parameters and They are randomly initialized respectively, * is the convolution operation; Step c2-2: The feature map is mapped to the second layer of deep separable convolution to reduce the parameters of the model. After the introduction of deep separable convolution, the second and third layers of the original convolutional neural network are processed together. Therefore, the parameters of the deep separable convolution are compared with the parameters of the second and third layers and the double-layer convolution layer. The formula is as follows: Then, higher-level features are extracted through the third and fourth conventional convolutional layers to generate a feature map of size 1×1×200; Step c2-3: Map the feature map output by step c2-2 to the average pooling layer, compress the sample size, reduce the number of parameters, and output the feature map with a size of 1×128. Finally, pass it through the fully connected layer to obtain a feature embedding with an output size of 1×128.
6. The hyperspectral image classification method based on cross-scene adaptive learning according to claim 1 is characterized in that: Step e3 is specifically as follows: Step e3-1: Optimize the embedding space to reduce the differences between different data. The formula is as follows: Preserve domain-invariant features so that the target scene can better learn features; Step e3-2: distinguish the source dataset SD and the target dataset TD, and retain the embedding space of only the target dataset TD, specifically: In the projected space, we train the parameters θ to distinguish the embedding features of the two scenes. and And continuously update the embedding space of the target scene.
