PSO-Optimized Machine Learning Models for Non-Destructive Nitrogen Assessment in Lettuce Via Smartphone Imagery
摘要
Nitrogen (N) is a fundamental macronutrient governing plant growth, yield formation, and nutrient use efficiency. Thus, rapid and accurate assessment of plant N status is essential for sustainable fertilization strategies. This study aimed to develop and evaluate a non-destructive, smartphone-based analytical framework integrated with machine learning (ML) to estimate lettuce (Lactuca sativa L.) nitrogen status efficiently and cost-effectively. A chemometric workflow was developed in MATLAB, incorporating image enhancement, automated feature extraction, supervised modeling, and hyperparameter optimization. Two image preprocessing techniques—Multi-Scale Retinex with Color Restoration (MSRCR) and gray-card-based color calibration—were assessed to determine their effect on spectral–color feature discrimination and model performance. Subsequently, extracted features were input into Random Forest Regression (RFR), Support Vector Regression (SVR), and Artificial Neural Networks (ANNs). To further enhance model performance, Particle Swarm Optimization (PSO) was employed for automated hyperparameter tuning. The combination of image enhancement and PSO-driven optimization significantly improved model robustness and predictive performance. Among the evaluated algorithms, RFR achieved the highest accuracy in estimating nitrogen status. Moreover, enhanced image preprocessing improved feature separability, resulting in more reliable and stable model outputs. Overall, the proposed framework offers a practical, scalable, and low-cost digital approach for nitrogen monitoring using readily available mobile imaging tools. The results demonstrate the potential of integrating smartphone-based sensing and ML-driven optimization to support precision nitrogen management and decision-support systems in agricultural and environmental applications.