Abstract:A deep learning detection method integrating graphical features is proposed to address the demand for accurate and rapid monitoring of soil nutrient content. Initially, hyperspectral data of soil samples were collected using a hyperspectrometer, followed by laboratory-based chemical measurements of five key soil properties: alkaline hydrolyzable nitrogen (N), available phosphorus (P), available potassium (K), H?, and organic matter (OM). Prediction models were then developed using partial least squares (PLS) and random forest (RF) algorithms. Through feature selection techniques- including competitive adaptive reweighted sampling (CARS), variable combination population analysis (VCPA), and least angle regression (LARS)- a total of 17 characteristic spectral bands were identified. Subsequently, a Transformer-based prediction model was constructed by combining deep visual features and spectral reflectance features. Specifically, color images of soil samples were segmented using the DeepLab v3 + network to extract convolutional neural network (CNN) features, which were then fused with fully connected neural network (FCNN) features derived from the reflectance values of the selected characteristic bands. Experimental results demonstrate that the detection accuracies for the five soil parameters reached 91.9%, 82.4%, 91.3%, 97.7%, and 92.3%, respectively. The proposed method achieves comprehensive and accurate prediction of soil nutrient content with a limited number of spectral bands, thereby providing a theoretical foundation for the future development of low-cost, portable, and efficient soil nutrient detection devices.