Vevi Maritha
Universitas Persatuan Guru Republik Indonesia Madiun

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Hyperparameter-Tuned K-Nearest Neighbor for Herbal Leaf Classification Using Shape, Color, and Texture Feature Fusion in Smart Agriculture Avip Kurniawan; Agustinus Eko Setiawan; Vevi Maritha; Muhammad Abrar Argianata
Journal of Information System and Informatics Vol 8 No 5 (2026): October
Publisher : Asosiasi Doktor Sistem Informasi Indonesia

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.63158/journalisi.v8i5.1938

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.