Supervised Contrastive Learning for Open-Set Hyperspectral Image Classification
Zhaokui Li, Ke Bi, Yan Wang, Zhuoqun Fang, Jinen Zhang
Abstract
Although hyperspectral image (HSI) classification has made great progress, most classification methods assume that the training and test data have the same class, and that there are no classes in the test data that are not present in the training data. As a result, unknown classes are ignored during model building, which requires the use of open-set classification (OSC) methods to reject unknown classes. However, the current OSC methods do not consider the constraints during feature learning, which can lead to the problem that the feature spaces of known and unknown classes may tend to be consistent. To ensure the discriminability of the feature space and improve the accuracy of the OSC, we propose a novel open-set HSI classification framework based on supervised contrastive learning (OSC-SCL). By adding SCL to spectral and spatial feature learning respectively, not only samples in the same class can be pulled closer, but also unknown classes can be distinguished from known classes. We also introduce a class anchor-based clustering strategy, which can effectively reject unknown classes while ensuring that known classes are correctly classified. Our method is validated on two HSI datasets and outperforms existing state-of-the-art methods.