Search for a command to run...
Abstract Introduction Soil nutrient management is essential for sustainable agriculture, directly affecting crop productivity and food security. Conventional laboratory-based methods for estimating soil nitrogen (N) and phosphorus (P), although accurate, are time-consuming, labor-intensive, and unsuitable for rapid or large-scale monitoring. Objectives This study aimed to develop an efficient, accurate, and scalable framework for soil nitrogen and phosphorus estimation using hyperspectral imaging integrated with deep learning techniques. Methods A total of 286 soil samples were collected from two agricultural locations in North Dakota during pre-sowing and post-harvest periods, capturing spatio-temporal variability. Laboratory chemical analyses were conducted to quantify soil N and P, and corresponding hyperspectral data were acquired in the visible and near-infrared (VNIR) and short-wave infrared (SWIR) regions. Spectral data were processed and categorized based on laboratory reference values. A convolutional neural network (CNN) model was developed for nutrient prediction, incorporating neural architecture search (NAS) and hyperparameter tuning for model optimization. The framework was evaluated using single-sensor and fused multi-sensor datasets, with spectral augmentation techniques applied to improve model robustness. Results Baseline CNN models achieved prediction accuracies of approximately 0.44, which improved to 0.68 with multi-sensor data fusion and spectral augmentation. Integration of NAS and hyperparameter tuning resulted in an additional 10–15% performance gain, achieving a final prediction accuracy of approximately 0.83 for combined nitrogen and phosphorus classification. NAS-based models showed minimal performance differences between raw and augmented datasets, while computational training time nearly doubled due to increased model search complexity. Applying NAS on raw hyperspectral data provided the most balanced trade-off between computational efficiency and predictive performance. Conclusions The integration of hyperspectral imaging with optimized CNN architectures and NAS enables accurate, scalable, and efficient soil nutrient prediction. This framework addresses spectral variability and environmental noise, offering a robust pathway for real-time soil nutrient monitoring and advancing data-driven precision agriculture.