A research team has developed a hyperspectral library for 14 NPK nutrient stress conditions in rice, using a terrestrial hyperspectral camera to collect and analyze 420 rice stress images. The transformer-based deep learning network SHCFTT accurately identified nutrient stress patterns, outperforming SVM, 1D-CNN, and 3D-CNN models with an accuracy ranging from 93.92% to 100%. This method enhances the precision of nutrient stress detection, contributing to improved crop health monitoring and decision-making in precision agriculture.