A semi-supervised hyperspectral image classification method based on unreliable pseudo-label learning

By using knowledge distillation models and contrastive learning methods in hyperspectral image classification, reliable and unreliable pseudo labels are effectively utilized, which solves the problem of underutilization of unlabeled samples and improves classification accuracy.

CN115953621BActive Publication Date: 2025-10-03HUAZHONG NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211571102.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-08
Publication Date
2025-10-03
Estimated Expiration
2042-12-08

AI Technical Summary

Technical Problem

Existing pseudo-label-based semi-supervised hyperspectral image classification methods fail to effectively utilize the potential information in unlabeled samples, resulting in insufficient classification accuracy.

Method used

The knowledge distillation model is used to build student and teacher networks. The reliable and unreliable samples are divided according to the category probability entropy of unlabeled samples. The number of training samples is expanded using reliable pseudo-labels. The features of unreliable samples are fully utilized through comparative learning methods to construct an objective function to optimize network parameters.

Benefits of technology

The accuracy of hyperspectral image classification is significantly improved, especially in the case of a small number of labeled samples, which fully utilizes the information of unlabeled samples and improves the classification performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115953621B_ABST
    Figure CN115953621B_ABST
Patent Text Reader

Abstract

The present invention discloses a semi-supervised hyperspectral image classification method based on unreliable pseudo-label learning, comprising: (1) constructing two teacher and student neural network models with the same structure for extracting sample features; (2) pre-training the teacher network model using a small amount of labeled samples; (3) dividing the unlabeled samples into reliable and unreliable samples according to category probabilities; (4) using the reliable predicted values ​​as the correct pseudo-labels and calculating the supervision loss with the small amount of labeled samples; (5) constructing anchor pixels, positive samples and negative samples through a sampling strategy, and using contrastive learning to reuse the sample features of the unreliable predicted values; (6) calculating the objective function and optimizing the parameters of the neural network model; and (7) predicting the hyperspectral image classification performance. The present invention adopts a contrastive learning method to use the unreliable pseudo-labels as negative samples of the corresponding categories, thereby supplementing the model with a large amount of complementary information and improving the classification performance of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of remote sensing image processing, and in particular relates to a semi-supervised learning method in scenarios with few training samples, which can be used for tasks such as hyperspectral image classification. Background Art

[0002] Hyperspectral images captured by hyperspectral imagers aboard aerial and space remote sensing platforms contain rich spatial and spectral information about the observed scene. Hyperspectral image classification aims to use spectral and spatial information to infer the object category corresponding to each pixel in the image. This technology can provide technical support for fields such as precision agriculture, environmental governance, and energy development. Thanks to the powerful feature representation capabilities of deep learning, current hyperspectral image classification methods based on deep learning have achieved excellent classification performance. However, these methods typically require sufficient labeled samples for supervised model training. However, labeling large numbers of hyperspectral images requires significant human, financial, and time resources, limiting their application flexibility.

[0003] Hyperspectral image classification methods based on semi-supervised learning aim to learn discriminative features using a small number of labeled samples and a large number of unlabeled samples to alleviate the problem of insufficient labeled training samples. Jia et al., in "Asemisupervised siamese network for hyperspectral image classification," IEEE Transactions on Geoscience and Remote Sensing, vol. 60, art no. 5516417, 2022, proposed using an autoencoder to capture potential correlations between data in hyperspectral images, pre-training an initial classifier, and then fine-tuning the model using a siamese network on a small number of labeled samples. Wu et al., in "Semi-supervised deep learning using pseudo labels for hyperspectral image classification," IEEE Transactions on Image Processing, vol. 27, no. 3, pp. 1259–1270, 2018, proposed pre-training an initial classifier on labeled samples and then using this classifier to predict the unlabeled samples. The classifier then obtains the class confidence of the unlabeled samples and selects the high-confidence predictions as the correct pseudo labels to be added to the labeled samples to iteratively update the weight parameters of the entire network. Existing pseudo-label-based semi-supervised hyperspectral image classification methods usually focus on utilizing high-confidence unlabeled samples for model training.

[0004] In pseudo-label-based semi-supervised hyperspectral image classification methods, the class confidence of each unlabeled sample is generally obtained through an initial classifier. The unlabeled samples are then divided into reliable and unreliable samples using a pre-set confidence threshold. The predicted class of the reliable sample is then used as the correct pseudo-label and added to the labeled sample training set for model training, while the unreliable samples are discarded. However, such methods ignore the potential information contained in low-confidence unlabeled samples, resulting in the unreliable samples not being fully utilized to improve classification accuracy. Summary of the Invention

[0005] This paper addresses the problem that existing methods fail to effectively utilize unlabeled samples and proposes a method to improve classification performance by using unreliable sample features. Based on the idea of ​​using reliable pseudo-labels to expand the training sample capacity, this paper further proposes to fully utilize samples with unreliable pseudo-labels to improve feature discriminability.

[0006] The technical solution for achieving the purpose of the present invention comprises the following steps:

[0007] (1) Build a neural network based on the knowledge distillation model, and construct two student networks and teacher network structures with the same structure for sample feature extraction;

[0008] (2) Use supervised learning to pre-train the teacher network model on the labeled sample set to obtain the initial classifier;

[0009] (3) After the unlabeled samples pass through the student network, the class probability of the samples is obtained. The entropy calculated by the class probability of the unlabeled samples is used to divide the unlabeled samples into reliable samples and unreliable samples;

[0010] (4) Add the reliable unlabeled samples as the correct pseudo labels to the labeled samples, calculate the supervision loss of the labeled and unlabeled samples, and optimize the teacher neural network;

[0011] (5) For unreliable unlabeled samples, a contrastive learning method is used to fully utilize the sample features of unreliable pixels. Anchor pixels, positive samples, and negative samples are constructed in the corresponding set by sampling to calculate the contrastive loss and optimize the teacher network.

[0012] (6) Construct the objective function of the model, update the teacher network parameters through the back-propagation strategy, and use the teacher network model parameters to update the student network parameters;

[0013] (7) Load the trained network model, predict the category information corresponding to the pixel points on the test set, and calculate the classification accuracy by comparing it with the true label.

[0014] Furthermore, both the student network and the teacher network are based on a visual transformer model, including a linear transformer, an encoder, and a classifier;

[0015] During the first N iterations of the teacher network, first, the hyperspectral image patch X with labels i After passing through the linear converter, it is combined with the trainable category embedding as the input information of the encoder h; secondly, the output features of the sample are obtained through the multi-layer encoder, and the category probability of the sample is obtained with the help of the classifier f; finally, the cross entropy function is used to calculate the error between the predicted value and the true label to optimize the teacher network parameters.

[0016] Furthermore, the specific implementation of step (3) is as follows:

[0017] (3a) Obtaining the class probability of unlabeled samples: unlabeled samples After the student network encoder and classifier, the category probability p of the sample is obtained j ∈R C ;

[0018] (3b) Calculate the entropy of unlabeled samples: The entropy obtained by calculating the class probability of unlabeled samples reflects the reliability of the sample prediction value. The class probability generated in step (3a) is used to calculate the entropy of unlabeled samples. The entropy H(p j );

[0019]

[0020] Where C represents the number of categories;

[0021] (3c) Divide the unlabeled samples into reliable and unreliable samples according to the dynamic threshold: set the entropy below the threshold γ t The unlabeled samples are regarded as reliable labeled samples, and vice versa, as unreliable samples;

[0022]

[0023]

[0024] Among them, percentile() represents the quantile, flatten() represents the linear flattening operation, is the initial ratio, is the ratio of the tth iteration, epochs represents the total number of iterations of the model, and t is the current number of training times.

[0025] Furthermore, the specific implementation of step (4) is as follows:

[0026] (4a) Labeled sample supervision loss: After the labeled sample is extracted through the teacher network feature, the predicted value of the sample is obtained, and the cross entropy function is used to calculate the predicted value of the labeled sample and the true label The supervision loss L s :

[0027]

[0028] Among them, l ce is the cross entropy loss function, θ represents the total training parameters of the teacher network, |D l | is the number of labeled samples, h and f represent the encoder and classifier respectively;

[0029] (4b) Supervision loss of unlabeled samples: First, the partially reliable prediction value of the sample obtained in step (3) is selected, and the entropy of the probability of the class of pixel j is lower than the threshold γ t The predicted value is used as the correct pseudo label of the unlabeled sample Increase the number of labeled training samples for the model:

[0030]

[0031] Among them, γ t Indicates the threshold for judging unlabeled samples as reliable pseudo labels;

[0032] Then, the output of the teacher neural network corresponding to the unlabeled sample is used as the predicted value of the unlabeled sample, and the supervision loss L of the unlabeled sample is calculated by the cross entropy loss function. u :

[0033]

[0034] in, is the predicted label of the unlabeled sample after passing through the teacher network, |D u | is the number of reliable pseudo labels.

[0035] Furthermore, the construction method of the anchor pixel in step (5) is as follows;

[0036] First, for the labeled sample, the candidate anchor pixel set of category c Defined as:

[0037]

[0038] in, represents the label of the labeled sample, z i is the feature representation of pixel i, δ p Indicates the threshold of reliable positive samples;

[0039] Secondly, for unlabeled data, the corresponding candidate anchor pixel set The calculation is as follows:

[0040]

[0041] and Similarity, calculation The main difference is that the pseudo label of pixel j is generated by the teacher network To replace the labels of manually labeled samples and reduce the cost of data annotation;

[0042] Finally, the set A of reliable anchor pixels of category c c Defined as:

[0043]

[0044] Furthermore, the positive sample in step (5) is constructed as follows;

[0045] Positive samples of category c It is defined as the center representation of the corresponding category anchor pixel:

[0046]

[0047] Among them, |A c | represents the number of anchor pixels belonging to category c.

[0048] Furthermore, the negative sample in step (5) is constructed as follows;

[0049] Define a binary variable n i (c) Determine whether sample i is a negative sample of category c:

[0050]

[0051] in, and are binary variable indicators of whether the i-th sample in the labeled and unlabeled samples is judged to be a negative sample of category c;

[0052] First, define the pixel category probability prediction order O i =argsort(p i ), obviously, O i (argmax p i )=0 and O i (argmin p i ) = C-1; For the i-th labeled sample, the predicted probability of the negative sample belonging to category c needs to meet the following requirements: (a) it does not belong to category c; (b) it is difficult to distinguish between category c and the true label of sample i;

[0053]

[0054] Among them, r l Indicates the lower bound of the threshold;

[0055] Secondly, for the i-th unlabeled sample, the category prediction probability of the negative sample belonging to category c satisfies: (a) unreliable; (b) may not belong to category c; (c) does not belong to the least likely category;

[0056]

[0057] Among them, r h It represents the upper limit of the threshold;

[0058] Finally, the negative sample set N of category c c Defined as:

[0059] N c ={z i |n i (c)=1}.

[0060] Furthermore, the contrast loss function L in step (5) c Defined as:

[0061]

[0062] Among them, C represents the number of categories, M is the number of anchor pixels, and z ci The feature representation of the i-th anchor pixel of category c, each anchor pixel corresponds to a positive sample and N negative samples, respectively and express.

[0063] Furthermore, the objective function L in step (6) is composed of the supervised loss L of the labeled samples s , the supervision loss L for unlabeled samples u and contrast loss L c It consists of three parts, which optimize the parameters of the teacher network model by using the back-propagation algorithm:

[0064] L=L s +λ u L u +λ c L c

[0065] Among them, λ u and λ c are the weights of the unlabeled sample supervision loss and contrast loss in the objective function, respectively.

[0066] Furthermore, in step (3c) The value of is 10.

[0067] This paper designs a semi-supervised hyperspectral image classification method based on unreliable pseudo-label learning. A neural network model based on an attention mechanism dynamically extracts rich spectral information and complex spatial information about the central pixel. This method fully utilizes the sample characteristics of unreliable pseudo-label data, alleviating the problem of insufficient training samples and improving the accuracy of hyperspectral image classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] To more clearly illustrate the technical solutions implemented in the present invention, the following briefly introduces the various modules required in the embodiment description. Obviously, the drawings described below are merely schematic diagrams of the present invention. Those skilled in the art can expand upon these drawings without inventive effort.

[0069] Figure 1 It is a network flow chart of the present invention. DETAILED DESCRIPTION

[0070] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0071] In the present invention, X∈R H×W×D represents a 3D hyperspectral image, x i ∈R D is a hyperspectral pixel, where H and W represent the height and width of the hyperspectral image, respectively, and D represents the number of spectral bands. The original hyperspectral dataset contains a small number of labeled samples and a large number of unlabeled samples. We use and denote labeled samples and unlabeled samples respectively, N l and N u Indicates the number of labeled and unlabeled samples respectively. In hyperspectral images, since adjacent pixels may belong to the same category, X i ∈R h×w×D represents the hyperspectral image block centered at pixel i, and h×w is the spatial size of the image block.

[0072] Reference Figure 1 , the steps implemented by the present invention are as follows:

[0073] Step 1: Pre-train the teacher neural network.

[0074] (1a) Constructing the teacher neural network: Building a sample feature extraction network based on the visual transformer model.

[0075] The standard visual transform mainly includes a linear transformer, an encoder and a classifier. The transform cuts the input image into a series of fixed-size, non-overlapping image blocks. After the image blocks pass through the linear transformer, they are combined with category embedding and position encoding as the input information of the encoder. The multi-head attention mechanism, as the core component of the visual transformer, enables the model to focus on important data information, obtain feature representations of different subspaces, realize dynamic modeling of input sample information, and use the residual structure to alleviate gradient disappearance. Finally, the category probability of the sample is obtained through the softmax classifier. In addition, since remote sensing satellites are prone to rotational transformation during the imaging process, compared with the standard visual transformer, the present invention removes the position embedding to reduce the impact of changes in ground object distribution on classification performance.

[0076] (1b) Pre-training teacher neural network: In the first N iterations of the model, first, the hyperspectral image block X with the label i After passing through a linear transformer, the information is combined with a trainable class embedding as the input to the encoder h. Next, the output features of the sample are obtained through a multi-layer encoder, and the class probability of the sample is obtained using the classifier f. Finally, the cross-entropy function is used to calculate the error between the predicted value and the true label to optimize the parameters of the teacher network.

[0077] Step 2: Construct the student neural network.

[0078] Based on the knowledge distillation architecture, we build student and teacher neural networks with identical structures. The main difference between the student and teacher networks is the model parameter update strategy. After pre-training the teacher network in step 1, we use the teacher network parameters to initialize the student network model.

[0079] Step 3: Use the student network to divide the unlabeled samples into reliable samples and unreliable samples.

[0080] (3a) Obtaining the class probability of unlabeled samples: unlabeled samples After the student network encoder and classifier, the category probability p of the sample is obtained j ∈R C ;

[0081] (3b) Calculating the entropy of unlabeled samples: The present invention uses the entropy obtained by calculating the category probability of unlabeled samples to reflect the reliability of the sample prediction value. The category probability generated in step (3a) is used to calculate the entropy of unlabeled samples. The entropy H(p j );

[0082]

[0083] Where C represents the number of categories.

[0084] (3c) Divide the unlabeled samples into reliable and unreliable samples according to the dynamic threshold: set the entropy below the threshold γ t Unlabeled samples with high reliability are considered reliable labeled samples, and unlabeled samples with low reliability are considered unreliable samples. As the model is iteratively trained, the reliability of the samples continues to improve. To determine the reliability of the samples, the present invention designs a linear threshold adjustment strategy to dynamically divide the ratio of reliable and unreliable samples.

[0085]

[0086]

[0087] Among them, percentile() represents the quantile, flatten() represents the linear flattening operation, is the initial ratio, which is 10. is the ratio of the tth iteration, epochs represents the total number of iterations of the model, and t is the current number of training times.

[0088] Step 4: Add reliable samples to labeled samples and construct a supervised loss function.

[0089] (4a) Labeled sample supervision loss: After the labeled sample is extracted through the teacher network feature, the predicted value of the sample is obtained, and the cross entropy function is used to calculate the predicted value of the labeled sample and the true label The supervision loss L s :

[0090]

[0091] Among them, l ce is the cross entropy loss function, θ represents the total training parameters of the teacher network, |D l | is the number of labeled samples, h and f represent the encoder and classifier respectively.

[0092] (4b) Supervision loss of unlabeled samples: First, the partially reliable prediction value of the sample obtained in step 3 is selected, and the entropy of the probability of the class of pixel j is lower than the threshold γ t The predicted value is used as the correct pseudo label of the unlabeled sample Increase the number of labeled training samples for the model:

[0093]

[0094] Among them, γ t Represents the threshold for judging unlabeled samples as reliable pseudo labels.

[0095] Then, the output of the teacher neural network corresponding to the unlabeled sample is used as the predicted value of the unlabeled sample, and the supervision loss L of the unlabeled sample is calculated by the cross entropy loss function. u :

[0096]

[0097] in, is the predicted label of the unlabeled sample after passing through the teacher network, |D u | is the number of reliable pseudo labels.

[0098] Step 5: Use unreliable sample optimization to construct a contrast loss function.

[0099] Directly using unreliable pseudo-labels can reduce hyperspectral image classification performance. This paper employs a contrastive learning approach to reuse the sample features of these unreliable predictions to better distinguish class information. The contrastive learning method proposed in this paper primarily consists of three components: anchor pixels, positive samples, and negative samples. These components are sampled from corresponding sets, reducing the model's computational cost.

[0100] (5a) Anchor pixels: First, for the labeled sample, the candidate anchor pixel set of category c Defined as:

[0101]

[0102] in, represents the label of the labeled sample, z i is the feature representation of pixel i, δ p Represents the threshold of reliable positive samples.

[0103] Secondly, for unlabeled data, the corresponding candidate anchor pixel set The calculation is as follows:

[0104]

[0105] and Similarity, calculation The main difference is that the pseudo label of pixel j is generated by the teacher network To replace the manual labeling of sample labels and reduce the cost of data annotation.

[0106] Finally, the set A of reliable anchor pixels of category c c Defined as:

[0107]

[0108] (5b) Positive samples: Contrastive learning aims to make samples of the same category as close as possible in the feature space and samples of different categories as far away as possible to improve classification accuracy. In this invention, the positive samples of category c It is defined as the center representation of the corresponding category anchor pixel:

[0109]

[0110] Among them, |A c | represents the number of anchor pixels belonging to category c.

[0111] (5c) Negative sample: The present invention defines a binary variable n i (c) Determine whether sample i is a negative sample of category c:

[0112]

[0113] in, and are binary variable indicators of whether the i-th sample in the labeled and unlabeled samples is judged to be a negative sample of category c.

[0114] First, the present invention defines the pixel category probability prediction order: i =argsort(p i ), obviously, O i (argmax p i )=0 and O i (argmin p i ) = C-1. For the i-th labeled sample, the predicted probability of the negative sample belonging to category c needs to meet the following requirements: (a) it does not belong to category c; (b) it is difficult to distinguish between category c and the true label of sample i:

[0115]

[0116] Among them, r l Indicates the lower threshold.

[0117] Secondly, for the i-th unlabeled sample, the category prediction probability of the negative sample belonging to category c satisfies: (a) unreliable; (b) may not belong to category c; (c) does not belong to the least likely category.

[0118]

[0119] Among them, r h It represents the upper limit of the threshold.

[0120] Finally, the negative sample set N of category c c Defined as:

[0121] N c={z i |n i (c) = 1}

[0122] Due to the long tail of the dataset, the number of negative sample candidate sets for certain categories is relatively small, and there may be an imbalance in the number of negative samples across different categories. To maintain a stable number of negative samples for category c, the present invention constructs a category storage queue for each category to store the candidate set of negative samples for the corresponding category, thereby improving the effectiveness of the model.

[0123] (5d) Construct contrastive loss function.

[0124] By generating anchor pixels, positive samples and negative samples, the contrast loss function L c Defined as:

[0125]

[0126] Where M is the number of anchor pixels, z ci The feature representation of the i-th anchor pixel of category c, each anchor pixel corresponds to a positive sample and N negative samples, respectively and express.

[0127] Step 6: Construct the objective function and optimize the neural network model.

[0128] (6a) Constructing the objective function

[0129] The model loss function L proposed in this paper is composed of the supervision loss L of the labeled sample s , the supervision loss L for unlabeled samples u and contrast loss L c It consists of three parts, which optimize the parameters of the teacher network model by using the back-propagation algorithm:

[0130] L=L s +λ u L u +λ c L c

[0131] Among them, λ u and λ c are the weights of the unlabeled sample supervision loss and contrast loss in the objective function, respectively.

[0132] (6b) Model parameter update

[0133] The present invention adopts a knowledge distillation model architecture, selects the attention mechanism as the backbone network of the model, constructs two student networks and teacher networks with the same structure, uses the backpropagation algorithm with the help of the objective function to update the parameters of the teacher network, and updates the student network parameters through the teacher network.

[0134] Step 7: Predict the hyperspectral image classification performance.

[0135] Load the trained model, predict the category information of hyperspectral pixels on the test set, and calculate the classification accuracy by comparing it with the true label.

[0136] The effects of the present invention can be further illustrated by the following experiments.

[0137] 1. Experimental Conditions

[0138] The present invention performs simulation on an Intel(R) Xeon(R) Gold 6240R CPU@2.40GHz, a GeForce RTX3090 graphics card, and an Ubuntu 20.04 operating system using PyTorch and other related toolkits.

[0139] 2. Experimental content

[0140] The effectiveness of the present invention was verified in two public hyperspectral image databases: Houston 2013 and Kennedy Space Center (KSC). Ten samples from each category were randomly selected from both databases as labeled samples, and the remaining samples were unlabeled. The performance of different methods was evaluated using accuracy (OA), average accuracy (AA), and kappa coefficient. Following the specific steps of the present invention, scores for the relevant indicators were calculated and recorded. Comparison results with other methods are shown in Tables 1 and 2.

[0141] The comparison algorithms are from the following literature:

[0142] [1] B.Liu, X.Yu, P.Zhang,

[0143] [2]Y.Chen, Z.Lin,

[0144] [3] S. Liu, Q. Shi, and L. Zhang, "Few-shot hyperspectral image classification with unknown classes using multitask deep learning," IEEE Transactions on Geoscience and Remote Sensing, vol.59, no.6, pp.5085–5102, 2020.

[0145] [4] S.Jia, S.Jiang, Z.Lin, M.Xu, W.Sun, Q.Huang, J.Zhu, and X.Jia, "Asemisupervised siamese network for hyperspectral image," IEEE Transactions on Geoscience and Remote Sensing, vol.60, pp.1–17, 2022.

[0146] Table 1 shows the performance comparison of different methods in the Houston2013 dataset.

[0147]

[0148] Table 2 shows the performance comparison of different methods on the KSC dataset

[0149]

[0150] As shown in Tables 1 and 2, compared to other semi-supervised contrast-based methods, the proposed method significantly improves hyperspectral image classification performance with a small number of labeled samples. This is because the proposed method fully utilizes the reliable predictions of a large number of unlabeled samples as correct pseudo-labels, expanding the number of training samples. Conversely, the contrastive learning method exploits the sample characteristics of unreliable predictions, improving the discriminative power of class features. Therefore, the proposed method performs better, and experiments on public databases further demonstrate its advanced nature.

Claims

1. A semi-supervised hyperspectral image classification method based on unreliable pseudo-label learning, characterized in that: The steps include: (1) Build a neural network based on the knowledge distillation model, and construct two student networks and teacher network structures with the same structure for sample feature extraction; (2) Use supervised learning to pre-train the teacher network model on the labeled sample set to obtain the initial classifier; (3) After the unlabeled samples pass through the student network, the class probability of the samples is obtained. The entropy calculated by the class probability of the unlabeled samples is used to divide the unlabeled samples into reliable samples and unreliable samples; The specific implementation of step (3) is as follows: (3a) Obtaining the class probability of unlabeled samples: unlabeled samples After the student network encoder and classifier, the category probability p of the sample is obtained j ∈R C ; (3b) Calculate the entropy of unlabeled samples: The entropy obtained by calculating the class probability of unlabeled samples reflects the reliability of the sample prediction value. The class probability generated in step (3a) is used to calculate the entropy of unlabeled samples. The entropy H(p j ); Where C represents the number of categories; (3c) Divide the unlabeled samples into reliable and unreliable samples according to the dynamic threshold: set the entropy below the threshold γ t The unlabeled samples are regarded as reliable labeled samples, and vice versa, as unreliable samples; Among them, percentile() represents the quantile, flatten() represents the linear flattening operation, is the initial ratio, is the ratio of the tth iteration, epochs represents the total number of iterations of the model, and t is the current number of training times; (4) Add the reliable unlabeled samples as the correct pseudo labels to the labeled samples, calculate the supervision loss of the labeled and unlabeled samples, and optimize the teacher neural network; (5) For unreliable unlabeled samples, a contrastive learning method is used to fully utilize the sample features of unreliable pixels. Anchor pixels, positive samples, and negative samples are constructed in the corresponding set by sampling to calculate the contrastive loss and optimize the teacher network. (6) Construct the objective function of the model, update the teacher network parameters through the back-propagation strategy, and use the teacher network model parameters to update the student network parameters; (7) Load the trained network model, predict the category information corresponding to the pixel points on the test set, and calculate the classification accuracy by comparing it with the true label.

2. The semi-supervised hyperspectral image classification method based on unreliable pseudo-label learning according to claim 1, characterized in that: The student network and the teacher network are both based on the visual transformer model, including a linear transformer, an encoder and a classifier; During the first N iterations of the teacher network, first, the hyperspectral image patch X with labels i After passing through the linear converter, it is combined with the trainable category embedding as the input information of the encoder h; secondly, the output features of the sample are obtained through the multi-layer encoder, and the category probability of the sample is obtained with the help of the classifier f; finally, the cross entropy function is used to calculate the error between the predicted value and the true label to optimize the teacher network parameters.

3. The semi-supervised hyperspectral image classification method based on unreliable pseudo-label learning according to claim 1, characterized in that: The specific implementation of step (4) is as follows: (4a) Labeled sample supervision loss: After the labeled sample is extracted through the teacher network feature, the predicted value of the sample is obtained, and the cross entropy function is used to calculate the predicted value of the labeled sample and the true label The supervision loss L s : Among them, l ce is the cross entropy loss function, θ represents the total training parameters of the teacher network, |D l | is the number of labeled samples, h and f represent the encoder and classifier respectively; (4b) Supervision loss of unlabeled samples: First, the partially reliable prediction value of the sample obtained in step (3) is selected, and the entropy of the probability of the class of pixel j is lower than the threshold γ t The predicted value is used as the correct pseudo label of the unlabeled sample Increase the number of labeled training samples for the model: Among them, γ t Indicates the threshold for judging unlabeled samples as reliable pseudo labels; Then, the output of the teacher neural network corresponding to the unlabeled sample is used as the predicted value of the unlabeled sample, and the supervision loss L of the unlabeled sample is calculated by the cross entropy loss function. u : in, is the predicted label of the unlabeled sample after passing through the teacher network, |D u | is the number of reliable pseudo labels.

4. The semi-supervised hyperspectral image classification method based on unreliable pseudo-label learning according to claim 1, characterized in that: The construction method of the anchor pixel in step (5) is as follows; First, for the labeled sample, the candidate anchor pixel set of category c Defined as: in, represents the label of the labeled sample, z i is the feature representation of pixel i, δ p Indicates the threshold of reliable positive samples; Secondly, for unlabeled data, the corresponding candidate anchor pixel set The calculation is as follows: and Similarity, calculation The main difference is that the pseudo label of pixel j is generated by the teacher network To replace the labels of manually labeled samples and reduce the cost of data annotation; Finally, the set A of reliable anchor pixels of category c c Defined as:

5. The semi-supervised hyperspectral image classification method based on unreliable pseudo-label learning according to claim 1, characterized in that: Step (5) The positive sample is constructed as follows: Positive samples of category c It is defined as the center representation of the corresponding category anchor pixel: Among them, |A c | represents the number of anchor pixels belonging to category c.

6. The semi-supervised hyperspectral image classification method based on unreliable pseudo-label learning according to claim 1, characterized in that: Step (5) The negative sample is constructed as follows; Define a binary variable n i (c) Determine whether sample i is a negative sample of category c: in, and are binary variable indicators of whether the i-th sample in the labeled and unlabeled samples is judged to be a negative sample of category c; First, define the pixel category probability prediction order O i =argsort(p i ), obviously, O i (argmax p i )=0 and O i (argmin p i ) = C-1; For the i-th labeled sample, the predicted probability of the negative sample belonging to category c needs to meet the following requirements: (a) it does not belong to category c; (b) it is difficult to distinguish between category c and the true label of sample i; Among them, r l Indicates the lower bound of the threshold; Secondly, for the i-th unlabeled sample, the category prediction probability of the negative sample belonging to category c satisfies: (a) unreliable; (b) may not belong to category c; (c) does not belong to the least likely category; Among them, r h It represents the upper limit of the threshold; Finally, the negative sample set N of category c c Defined as: N c ={z i |n i (c)=1}。 7. The semi-supervised hyperspectral image classification method based on unreliable pseudo-label learning according to claim 1, characterized in that: The contrast loss function L in step (5) c Defined as: Among them, C represents the number of categories, M is the number of anchor pixels, and z ci The feature representation of the i-th anchor pixel of category c, each anchor pixel corresponds to a positive sample and N negative samples, respectively and express.

8. The semi-supervised hyperspectral image classification method based on unreliable pseudo-label learning according to claim 1, characterized in that: The objective function L in step (6) is composed of the supervised loss L of the labeled samples s , the supervision loss L for unlabeled samples u and contrast loss L c It consists of three parts, which optimize the parameters of the teacher network model by using the back-propagation algorithm: L=L s +λ u L u +λ c L c Among them, λ u and λ c are the weights of the unlabeled sample supervision loss and contrast loss in the objective function, respectively.

9. The semi-supervised hyperspectral image classification method based on unreliable pseudo-label learning according to claim 1, characterized in that: In step (3c) The value of is 10.