A Lightweight Classical Machine Learning Pipeline for Rice NPK Deficiency Classification Using Hand-Crafted Feature Fusion

Authors

  • Dhiyaussalam Politeknik Negeri Banjarmasin, Indonesia
  • Kun Nursyaiful Priyo Pamungkas Politeknik Negeri Banjarmasin, Indonesia
  • Wanvy Arifha Saputra Politeknik Negeri Banjarmasin, Indonesia
  • Ahmad Yusuf Politeknik Negeri Banjarmasin, Indonesia
Pages Icon

DOI:

https://doi.org/10.63158/journalisi.v8i2.1486

Keywords:

classical machine learning, hand-crafted features, feature fusion, NPK deficiency classification, rice leaf

Abstract

Many high-accuracy deep learning solutions for plant nutrient deficiency remain impractical in resource-limited settings due to computational cost and limited explainability. This study proposes a lightweight classical machine learning pipeline for rice leaf NPK (nitrogen, phosphorus, potassium) deficiency classification on the publicly available Kaggle Nutrient-Deficiency-Symptoms-in-Rice dataset (1,156 images); all results should be interpreted in this dataset context rather than as field-validated performance. The pipeline applies HSV-based leaf segmentation to reduce background influence. It extracts a 126-dimensional feature set combining masked color moments, HSV histograms, vegetation indices, LBP and GLCM texture descriptors, and spatial symptom ratios. Hyperparameters are tuned via RandomizedSearchCV with 5-fold StratifiedKFold and macro-F1 scoring; final evaluation uses a held-out 80/20 stratified test set kept separate throughout tuning. XGBoost achieves the best test performance (accuracy 0.9267; macro-F1 0.9233), followed by SVM-RBF (0.9224; 0.9187) and Random Forest. Feature importance analysis confirms that color moments dominate class separability, with texture and spatial features providing complementary support. The dominant remaining error is phosphorus–potassium confusion. The novelty lies in integrating leaf-focused preprocessing with a structured, low-cost feature representation suitable for mobile or edge deployment.

Downloads

Download data is not yet available.

References

[1] X. Liao and H. Yang, “Diagnosis of early nitrogen, phosphorus and potassium deficiency categories in rice based on multimodal integration and knowledge distillation,” Sci. Rep., vol. 15, no. 1, p. 13014, Apr. 2025, doi: 10.1038/s41598-025-97585-0.

[2] M. S. H. Talukder and A. K. Sarkar, “Nutrients deficiency diagnosis of rice crop by weighted average ensemble learning,” Smart Agric. Technol., vol. 4, no. 100155, 2023, doi: 10.1016/j.atech.2022.100155.

[3] L. Chen et al., “Identification of nitrogen, phosphorus, and potassium deficiencies in rice based on static scanning technology and hierarchical identification method,” PLoS One, vol. 9, no. 11, pp. 1–17, 2014, doi: 10.1371/journal.pone.0113200.

[4] A. Y. Reddy and T. R. Balaga, “Enhancing Precision Agriculture Based on Explainable AI for Automated Nutrient Deficiency Diagnosis in Rice Using Attention SqueezeNet,” Ing. des Syst. d’Information, vol. 30, no. 1, pp. 181–190, 2025, doi: 10.18280/isi.300115.

[5] M. Sobhana, V. R. Sindhuja, V. Tejaswi, and Durgesh, “Deep Ensemble Mobile Application for Recommendation of Fertilizer Based on Nutrient Deficiency in Rice Plants Using Transfer Learning Models,” Int. J. Interact. Mob. Technol., vol. 16, no. 16, pp. 100–112, 2022, doi: 10.3991/ijim.v16i16.31497.

[6] N. Ahmad, H. M. S. Asif, G. Saleem, M. U. Younus, S. Anwar, and M. R. Anjum, “Leaf Image-Based Plant Disease Identification Using Color and Texture Features,” Wirel. Pers. Commun., vol. 121, no. 2, pp. 1139–1168, 2021, doi: 10.1007/s11277-021-09054-2.

[7] J. Mkhatshwa, T. Kavu, and O. Daramola, “Analysing the Performance and Interpretability of CNN-Based Architectures for Plant Nutrient Deficiency Identification,” Computation, vol. 12, no. 6, 2024, doi: 10.3390/computation12060113.

[8] M. J. Sulastri, D. R. Sulistyaningrum, and H. Nurhadi, “Detection of Nutrient Deficiency in Rice Plants Based on Leaf Image,” 2021 Int. Conf. Adv. Mechatronics, Intell. Manuf. Ind. Autom. ICAMIMIA 2021 - Proceeding, pp. 143–148, 2021, doi: 10.1109/ICAMIMIA54022.2021.9807811.

[9] S. Supreetha, R. Premalathamma, and M. S. H., “Deep learning techniques to detect nutrient deficiency in rice plants,” in Proc. Int. Conf. Inventive Comput. Technol. (ICICT), Apr. 2024, pp. 699–705.

[10] B. Naresh Kumar and S. Sakthivel, “Rice leaf disease classification using a fusion vision approach,” Sci. Rep., vol. 15, no. 1, p. 8692, Mar. 2025, doi: 10.1038/s41598-025-87800-3.

[11] N. Islam and P. Richhariya, “Deep Learning-Based Classification of Rice Leaf Diseases Using Hybrid Ensemble Models,” Int. J. Innov. Sci. Eng. Manag., pp. 34–41, Dec. 2024, doi: 10.69968/ijisem.2024v3i434-41.

[12] A. Purnama, E. Fauzi, and B. A. Prasetyo, “Implementing PSO-based Image Segmentation for Detecting Sweet Potato Leaf Disease,” Int. J. Multidiscip. Approach Res. Sci., vol. 3, no. 02, pp. 447–457, 2025, doi: 10.59653/ijmars.v3i02.1482.

[13] B. S. Riza, R. Rosnelly, and V. H. S. Edy, “Application of Digital Image Processing for Orchid Image Segmentation in Morphological Plant Analysis,” J. Appl. Sci. Eng. Technol. Educ., vol. 7, no. 1, pp. 94–101, 2025, doi: 10.35877/454RI.asci3772.

[14] C. Fang, X. Wang, and Q. Wang, “Adaptive morphology structural element construction algorithm based on local pixel density and symmetry,” Multimed. Tools Appl., vol. 82, no. 1, pp. 195–215, 2023, doi: 10.1007/s11042-022-13259-3.

[15] J. Yan, K. Liang, C. Liu, and M. Gao, “Citrus recognition in orchard scene based on modified HSV-morphology method,” Appl. Comput. Eng., vol. 88, no. 1, pp. 69–76, 2024, doi: 10.54254/2755-2721/88/20241637.

[16] T. Xu, L. Yao, L. Xu, Q. Chen, and Z. Yang, “Image Segmentation of Cucumber Seedlings Based on Genetic Algorithm,” Sustainability, vol. 15, no. 4, 2023, doi: 10.3390/su15043089.

[17] M. A. Hutchison and C. M. Koepferl, “Contour Analysis Tool: An Interactive Tool for Background and Morphology Analysis,” Astrophys. J., vol. 975, no. 1, p. 27, 2024, doi: 10.3847/1538-4357/ad779f.

[18] S. Zhiwei et al., “Image-based Pretreatment Study of Rice Blast Disease,” J. Adv. Appl. Sci. Res., vol. 6, no. 3, pp. 1–15, 2024, doi: 10.46947/joaasr632024945.

[19] H. Rezvan, M. J. Valadan Zoej, F. Youssefi, and E. Ghaderpour, “Automated Rice Seedling Segmentation and Unsupervised Health Assessment Using Segment Anything Model with Multi-Modal Feature Analysis,” Sensors, vol. 25, no. 17, 2025, doi: 10.3390/s25175546.

[20] M. Keskar and D. D. Maktedar, “Hybrid deep-spatio textural feature model for medicinal plant disease classification,” Indones. J. Electr. Eng. Comput. Sci., vol. 30, no. 1, pp. 356–365, 2023, doi: 10.11591/ijeecs.v30.i1.pp356-365.

[21] M. J. Hoque, M. S. Islam, and M. Khaliluzzaman, “AI‐Powered Precision in Diagnosing Tomato Leaf Diseases,” Complexity, vol. 2025, no. 1, Jan. 2025, doi: 10.1155/cplx/7838841.

[22] R. S. Krishnan and E. G. Julie, “Computer aided detection of leaf disease in agriculture using convolution neural network based squeeze and excitation network,” Automatika, vol. 64, no. 4, pp. 1038–1053, 2023, doi: 10.1080/00051144.2023.2241792.

[23] B. Luna‐Benoso, J. C. Martínez‐Perales, J. Cortés‐Galicia, R. Flores‐Carapia, and V. M. Silva‐García, “Detection of diseases in tomato leaves by color analysis,” Electron., vol. 10, no. 9, pp. 1–16, 2021, doi: 10.3390/electronics10091055.

[24] N. S. B. Mat Said, H. Madzin, S. K. Ali, and N. S. Beng, “Comparison of color-based feature extraction methods in banana leaf diseases classification using SVM and K-NN,” Indones. J. Electr. Eng. Comput. Sci., vol. 24, no. 3, pp. 1523–1533, 2021, doi: 10.11591/ijeecs.v24.i3.pp1523-1533.

[25] B. Yue et al., “Research on SPAD Inversion of Rice Leaves at a Field Scale Based on Machine Vision and Leaf Segmentation Techniques,” Agric., vol. 15, no. 12, pp. 1–24, 2025, doi: 10.3390/agriculture15121270.

[26] P. Pradhan, B. Kumar, K. Kumar, and R. Bhutiani, “Plant leaf disease detection using local binary pattern and deep convolutional neural networks,” Environ. Conserv. J., vol. 26, no. 1, pp. 66–78, 2025, doi: 10.36953/ECJ.29292943.

[27] J. D. Thiagarajan et al., “Analysis of banana plant health using machine learning techniques,” Sci. Rep., vol. 14, no. 1, pp. 1–23, 2024, doi: 10.1038/s41598-024-63930-y.

[28] C. Nyasulu et al., “A comparative study of Machine Learning-based classification of Tomato fungal diseases: Application of GLCM texture features,” Heliyon, vol. 9, no. 11, p. e21697, 2023, doi: 10.1016/j.heliyon.2023.e21697.

[29] Z. Hou et al., “Selection of Optimal Diagnostic Positions for Early Nutrient Deficiency in Cucumber Leaves Based on Spatial Distribution of Raman Spectra,” Plants, vol. 14, no. 8, pp. 1–17, 2025, doi: 10.3390/plants14081199.

[30] D. Ma, L. Wang, L. Zhang, Z. Song, T. U. Rehman, and J. Jin, “Stress distribution analysis on hyperspectral corn leaf images for improved phenotyping quality,” Sensors, vol. 20, no. 13, pp. 1–13, 2020, doi: 10.3390/s20133659.

[31] M. Saberi Anari, “A Hybrid Model for Leaf Diseases Classification Based on the Modified Deep Transfer Learning and Ensemble Approach for Agricultural AIoT-Based Monitoring,” Comput. Intell. Neurosci., vol. 2022, no. 1, 2022, doi: 10.1155/2022/6504616.

[32] F. Budiman and E. Sugiarto, “Non-linear Multiclass SVM Classification Optimization using Large Datasets of Geometric Motif Image,” Int. J. Adv. Comput. Sci. Appl., vol. 12, no. 9, pp. 284–290, 2021, doi: 10.14569/IJACSA.2021.0120932.

[33] Dhiyaussalam, A. Wibowo, F. A. Nugroho, E. A. Sarwoko, and I. M. A. Setiawan, “Classification of Headache Disorder Using Random Forest Algorithm,” in 2020 4th International Conference on Informatics and Computational Sciences (ICICoS), IEEE, Nov. 2020, pp. 1–5. doi: 10.1109/ICICoS51170.2020.9299105.

[34] Dhiyaussalam and S. Uyun, “Optimization of Random Forest Hyperparameters with Genetic Algorithm in Classification of Lung Cancer,” in 2023 6th International Seminar on Research of Information Technology and Intelligent Systems (ISRITI), 2023, pp. 82–88. doi: 10.1109/ISRITI60336.2023.10467686.

[35] D. Boldini, F. Grisoni, D. Kuhn, L. Friedrich, and S. A. Sieber, “Practical guidelines for the use of gradient boosting for molecular property prediction,” J. Cheminform., vol. 15, no. 1, pp. 1–13, 2023, doi: 10.1186/s13321-023-00743-7.

[36] A. Eley, T. T. Hlaing, D. Breininger, Z. Helforoush, and N. N. Kachouie, “Monte Carlo Gradient Boosted Trees for Cancer Staging: A Machine Learning Approach,” Cancers (Basel)., vol. 17, no. 15, pp. 1–27, 2025, doi: 10.3390/cancers17152452.

[37] J. Edin et al., “Automated Medical Coding on MIMIC-III and MIMIC-IV: A Critical Review and Replicability Study,” SIGIR 2023 - Proc. 46th Int. ACM SIGIR Conf. Res. Dev. Inf. Retr., pp. 2572–2582, 2023, doi: 10.1145/3539618.3591918.

[38] Y. Liu et al., “Development and external validation of machine learning models for the early prediction of malnutrition in critically ill patients: a prospective observational study,” BMC Med. Inform. Decis. Mak., vol. 25, no. 1, 2025, doi: 10.1186/s12911-025-03082-9.

[39] C. Chen et al., “Application of GA-WELM Model Based on Stratified Cross-Validation in Intrusion Detection,” Symmetry (Basel)., vol. 15, no. 9, pp. 1–14, 2023, doi: 10.3390/sym15091719.

[40] V. Teodorescu and L. Obreja Brașoveanu, “Assessing the Validity of k-Fold Cross-Validation for Model Selection: Evidence from Bankruptcy Prediction Using Random Forest and XGBoost,” Computation, vol. 13, no. 5, 2025, doi: 10.3390/computation13050127.

[41] O. M. Alyasiri and Y. N. Cheah, “Multi-Class Text Classification using Machine Learning Techniques,” Eng. Technol. Appl. Sci. Res., vol. 15, no. 3, pp. 22598–22604, 2025, doi: 10.48084/etasr.9994.

[42] M. Amudha and K. Brindha, “Rice Leaf Nutrient Deficiency Classification System Using CAR-Capsule Network,” IEEE Access, vol. 12, pp. 169518–169532, 2024, doi: 10.1109/ACCESS.2024.3498606.

[43] M. Sharma, K. Nath, R. K. Sharma, C. J. Kumar, and A. Chaudhary, “Ensemble Averaging of Transfer Learning Models for Identification of Nutritional Deficiency in Rice Plant,” Electron., vol. 11, no. 1, 2022, doi: 10.3390/electronics11010148.

Downloads

Published

2026-04-12

Issue

Section

Articles

How to Cite

[1]
Dhiyaussalam, K. N. P. Pamungkas, W. A. Saputra, and A. Yusuf, “A Lightweight Classical Machine Learning Pipeline for Rice NPK Deficiency Classification Using Hand-Crafted Feature Fusion”, journalisi, vol. 8, no. 2, pp. 1780–1811, Apr. 2026, doi: 10.63158/journalisi.v8i2.1486.

Most read articles by the same author(s)