Analysis of the Combination of K-Nearest Neighbor (KNN) and K-Means for the Classification of Rice Leaf Diseases Using Image Segmentation Method
Downloads
Rice is a staple food crop in many Asian countries, including Indonesia, and plays a crucial role in ensuring food security and economic stability. However, rice production is significantly threatened by various leaf diseases, which can lead to substantial yield losses if not detected early. Traditional disease identification methods rely heavily on manual observation, making them inefficient and prone to errors, particularly in early stages when symptoms are less visible. This study aims to develop an automatic classification system for rice leaf diseases by combining K-Means clustering and K-Nearest Neighbor (KNN) algorithms using image segmentation techniques. The research utilized a dataset of 5,932 rice leaf images obtained from Kaggle, consisting of four disease categories: Bacterial Blight, Blast, Brown Spot, and Tungro. The methodology involved preprocessing steps including grayscale conversion, image resizing, and feature extraction, followed by segmentation using K-Means and classification using KNN with various K values. The results indicate that the combination method provides effective classification performance, with the highest accuracy achieved at 88% under a 90:10 training-testing data ratio. Additionally, smaller K values tend to yield better accuracy compared to larger ones. Despite some misclassification between visually similar diseases, the proposed model demonstrates strong potential for practical application. This system can assist farmers in early disease detection, reduce crop losses, and contribute to improving agricultural productivity through data-driven approaches.
Copyright (c) 2026 Rizal Afandi, Kartini, Retno Mumpuni

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlike 4.0 International (CC-BY-SA). that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work.



