Abstract:Element content non-destructive testing technology can provide key real-time data for precise environmental regulation of plant growth and development. Taking watermelon seedlings as an example, a deep learning detection method based on graph feature fusion for nitrogen, phosphorus, and potassium content was proposed. Firstly, high-resolution hyperspectral images of watermelon seedling leaves were captured by using a hyperspectral image. The content of the three elements in the leaves was determined by using a continuous flow chemical analyzer. Then, the BOC-GF spectral preprocessing method and the RF algorithm were used to establish a prediction model. Based on the CARS and SPA algorithms, feature bands were preliminarily selected. Then, considering the number of bands and modeling accuracy, an optimal band evaluation method was designed to further reduce the number of bands to 3~4. Finally, the colour and texture features of the colour images segmented by using the U-Net network were extracted and used as inputs along with the spectral reflectance features to construct a prediction model for the three elemental contents based on the Self-Attention-BiLSTM network. The experimental results showed that the R2 values for predicting nitrogen, phosphorus, and potassium content were 0.961, 0.954, and 0.958, respectively, with corresponding RMSE values of 0.294%, 0.262%, and 0.196%. These results indicated a high level of modeling accuracy. Using this model to test two other varieties of watermelon, the R2 values exceeded 0.899 and the RMSE values were less than 0498%, indicating that the model had excellent generalization ability. This hyperspectral modeling method achieved high accuracy detection with a small number of spectral bands, striking a good balance between precision and efficiency. It laied a solid theoretical foundation for the development of portable hyperspectral detection equipment in the future.