Abstract: Hyperspectral image classification, a task that assigns pre-defined classes to each pixel in a hyperspectral image of remote sensing scenes, often faces challenges due to the neglect of correlations between spectrally similar pixels. This oversight can lead to inaccurate edge definitions and difficulties in managing minor spectral variations in contiguous areas. To address these issues, we introduce the novel Dual-stage Spectral Supertoken Classifier (DSTC), inspired by superpixel concepts. DSTC employs spectrum-derivative-based pixel clustering to group pixels with similar spectral characteristics into spectral supertokens. By projecting the classification of these tokens onto the image space, we achieve pixel-level results that maintain regional classification consistency and precise boundary. Moreover, recognizing the diversity within tokens, we propose a class-proportion-based soft label. This label adaptively assigns weights to different categories based on their prevalence, effectively managing data distribution imbalances and enhancing classification performance. Comprehensive experiments on WHU-OHS, IP, KSC, and UP datasets corroborate the robust classification capabilities of DSTC and the effectiveness of its individual components.
Introduction
Hyperspectral Image Classification (HSIC) involves assigning land-cover categories—such as dry farms, rivers, or rural settlements—to pixels in images containing hundreds of spectral bands. Traditional deep learning models typically treat this as a pixel-wise task. However, this approach suffers from two major flaws: spatial inconsistency, leading to "salt-and-pepper" noise and blurred boundaries, and computational inefficiency, as processing every pixel individually is expensive.
To overcome these limitations, we propose the Dual-stage Spectral Supertoken Classifier (DSTC). This framework moves away from pixel-wise processing by grouping spectrally similar pixels into "supertokens," which naturally enforces regional consistency and reduces the computational primitives the model must handle.
Methodology
The DSTC architecture is designed for both precision and efficiency, utilizing a two-stage pipeline.
Stage 1: Spectral Supertoken Generation
The first stage focuses on reducing data complexity while preserving essential features. A Spatial-preserved Feature Encoder (based on a UNet architecture) extracts deep semantic features without losing spatial resolution. A key innovation here is Spectrum-derivative-based Clustering. By calculating 1st and 2nd order spectral derivatives, the model can distinguish between overlapping spectral peaks and subtle variations more effectively than raw intensity alone. Pixels are then assigned to centroids to form Spectral Supertokens (SSTs).
Stage 2: Token-to-Pixel Prediction
In the second stage, a Transformer Classifier models the long-range relationships between these supertokens. Because the model processes a few hundred tokens instead of millions of pixels, it achieves massive efficiency gains. To handle mixed-pixel regions and data imbalances, we introduce the Class-proportion-based Soft Label (CPSL). Unlike standard "hard" labels, CPSL assigns a soft label based on the actual proportion of classes within a token's boundary, providing more nuanced supervision.
Experimental Results
The DSTC model was evaluated on several benchmark datasets, including WHU-OHS, Indian Pines (IP), Kennedy Space Center (KSC), and University of Pavia (UP).
- Superior Accuracy: On the large-scale WHU-OHS dataset, the DSTC-P variant achieved a Class Average F1-score (CF1) of 0.723, outperforming established models like 3D-FCN (0.683) and ViT (0.673).
- Efficiency: The DSTC-P model required only 16.15G FLOPs, representing a reduction in computational load of over 95% compared to models like 3D-CNN (1814G).
- Visual Precision: Qualitative results demonstrate that DSTC produces significantly sharper boundaries for complex features like river bends and rural settlements, where traditional models often produce fuzzy edges.
Conclusion
The Dual-stage Spectral Supertoken Classifier (DSTC) provides a robust solution for hyperspectral image classification by leveraging spectral derivatives for clustering and transformers for token-wise classification. While its advantages are most pronounced in large-scale contexts with significant spatial information, its efficiency and boundary precision mark a significant step forward for remote sensing applications. Future work will explore extending this supertoken approach to other high-resolution tasks such as change detection.
Summary updated