Hyperspectral imaging and dynamic selective peak transformer for early-stage classification of lettuce heat responses
Abstract
Introduction Early-stage detection and classification of lettuce heat responses are essential for non-destructive phenotyping, yet conventional assessment mainly relies on visible symptoms and manual observation. Methods This study constructed a lettuce hyperspectral dataset comprising heat-sensitive and heat-tolerant varieties under control and high-temperature treatments, and proposed the Dynamic Selective Peak Transformer (DSPformer). DSPformer integrates edge-enhanced feature extraction, dynamic multi-scale spatial-spectral representation, Peak-k selective attention, and a confusion-aware dynamic focal loss to enhance discriminative features while reducing spectral redundancy, class imbalance, and inter-class confusion. Results Under the patch-level evaluation protocol, DSPformer achieved 96.22% accuracy, 95.55% recall, 96.35% precision, and 95.95% F1-score, outperforming the compared CNN- and Transformer-based models. Day-wise evaluation showed that DSPformer reached 82.61% accuracy on Day 1 and 96.55% on Day 3, before visible heat-stress symptoms appeared on Day 6. Under a plant-level partition protocol, DSPformer maintained robust performance with 93.76 +/- 0.49% accuracy. Additional evaluation on the Indian Pines benchmark further demonstrated the applicability of DSPformer to general hyperspectral image classification. Discussion These findings suggest that hyperspectral imaging can capture heat-stress-sensitive information beyond visual phenotypes, and that DSPformer provides a promising framework for early, non-destructive lettuce heat-response screening and hyperspectral phenotyping-assisted breeding.