Journal of Information Systems and Informatics
Vol 8 No 5 (2026): October

Hyperparameter-Tuned K-Nearest Neighbor for Herbal Leaf Classification Using Shape, Color, and Texture Feature Fusion in Smart Agriculture

Avip Kurniawan (Universitas Krisnadwipayana)
Agustinus Eko Setiawan (Aisyah University)
Vevi Maritha (Universitas Persatuan Guru Republik Indonesia Madiun)
Muhammad Abrar Argianata (Universitas Krisnadwipayana)



Article Info

Publish Date
24 Oct 2026

Abstract

This study develops a lightweight K-Nearest Neighbor (K-NN) classifier to identify five Indonesian herbal leaf species—betel, bay, guava, soursop, and moringa—for potential smart-agriculture applications. The initial dataset contained 1,000 leaf images and was expanded to 6,000 images through offline augmentation. After data cleaning, 5,884 images were retained for analysis. Each image was resized to 256 × 256 pixels, converted into grayscale and HSV color spaces, and segmented using Otsu thresholding. A total of 21 features representing shape, color, and Gray-Level Co-occurrence Matrix (GLCM)-based texture characteristics were extracted. K-NN hyperparameters were optimized through Grid Search with Stratified 5-Fold Cross-Validation using 80:20, 70:30, and 60:40 training–testing splits. Under image-level evaluation, the best configuration used Manhattan distance, k = 1, and distance weighting, achieving 92.18% accuracy and a 92.29% macro F1-score on the 80:20 split. The 70:30 and 60:40 splits achieved accuracies of 91.79% and 91.21%, respectively. Misclassifications primarily occurred between soursop and guava leaves. Although the framework is compact and interpretable, augmentation before splitting may have produced optimistic results. Future work should apply source-grouped validation and assess real on-device performance.

Copyrights © 2026






Journal Info

Abbrev

isi

Publisher

Subject

Computer Science & IT

Description

Journal-ISI is a scientific article journal that is the result of ideas, great and original thoughts about the latest research and technological developments covering the fields of information systems, information technology, informatics engineering, and computer science, and industrial engineering ...