IMAGE-BASED CHILI LEAF DISEASE DETECTION USING THE K-NEAREST NEIGHBORS ALGORITHM
Kata Kunci:
Chili leaf disease, digital image processing, image classification, k-nearest neighbors, feature extractionAbstrak
Chili pepper is one of the important horticultural commodities that plays a significant role in food security and the national economy, particularly in Indonesia. However, chili production is often disrupted by plant diseases, especially those affecting the leaves. Diseases such as Cercospora, Murda Complex, Powdery Mildew, and nutrient deficiencies can significantly reduce both the quality and quantity of crop yields. Early detection of these diseases is crucial, as initial symptoms are often difficult for farmers to identify visually, making a fast, accurate, and objective disease detection system essential. This study aims to classify chili leaf diseases based on digital images using the K-Nearest Neighbors (KNN) algorithm by utilizing color and texture features. The dataset used was obtained from the public “Chili Leaf Disease Detection” dataset available on the Kaggle platform, consisting of 250 chili leaf images in .jpg format divided into five classes: Cercospora, Healthy, Murda Complex, Low Nutrient, and Powdery Mildew. The data were split into 70% training data and 30% testing data. The research stages include image preprocessing, which involves resizing images to 256 × 256 pixels, converting color space from RGB to HSV, leaf segmentation using the Saturation channel with a threshold of S > 0.2, and median filtering to reduce noise. Feature extraction was performed using HSV color histograms and Local Binary Pattern (LBP) to represent color and texture characteristics. Classification was carried out using the KNN algorithm with K values of 3, 5, and 7. The results show that the best classification accuracy of 85.33% was achieved at K = 5, indicating that this method is effective for chili leaf disease classification based on digital images.Referensi
Acito, F. (2023). k Nearest Neighbors. https://doi.org/10.1007/978-3-031-45630-5_10
Afriyanti, G., Mariya, A., Natalia, C., Nispuana, S., Farhan Wijaya, M., & Phalepi, M. Y. (2023). The Role Of The Agricultural Sector On Economic Growth In Indonesia. Indonesian Journal of Multidisciplinary Sciences (IJoMS), 2, 167–179.
Aishwarya, M. P., & Reddy, A. P. (2024). Dataset of Chilli and Onion Plant Leaf Images for Classification and Detection. Data in Brief. https://doi.org/10.1016/j.dib.2024.110524
Aminuddin, N. F., Joret, A., Zulkifli, S. A., Morsin, M., & Tukiran, Z. (2023). Computational Approaches Based On Image Processingfor Automated Disease IdentificationOn Chili Leaf Images: A Review. EMERGING ADVANCES IN INTEGRATED TECHNOLOGY, 3(2). https://doi.org/10.30880/emait.2022.03.02.002
Araujo, S. D. C. S., Malemathh, V. S., & Sundaram, K. M. (2022). Automated G-4 Disease Identification Agricultural Intelligent System: An impression and survey. 2022 2nd International Conference on Innovative Practices in Technology and Management (ICIPTM), 2, 37–43. https://doi.org/10.1109/iciptm54933.2022.9754145
Ayeshmi, S. R. M. A. M., Pranathi, J., Begum, D., Haritha, V., Khan, S., & Y, S. (2025). Disease Detection In Chilli Plants By Using Deep Learning. 5(2). https://doi.org/10.33425/3066-1226.1103
Bangun, R. H. (2021). The determinants of production and feacibility of chili pepper in province of sumatera utara. Agrisocionomics, 5(2), 8–18. https://doi.org/10.14710/agrisocionomics.v5i2.7154
Baurai, A., Rawat, P., Singh, A. N., Bhakuni, V. S., Ayush, & Manwal, M. (2024). Leaf Disease Detection Using KNN. 453–458. https://doi.org/10.1109/ictacs62700.2024.10840461
Govindarajan, S., & S, M. V. (2023). A Sequential Method for Enhancing the Image Quality of Rice Leaf Diseases by Employing Various Preprocessing Techniques. https://doi.org/10.1109/icsss58085.2023.10407605
Harshitha, H. S., Nagaraja, J., & Pruthiraja, D. (2024). Plant Disease Detection Using Image Processing. 1–6. https://doi.org/10.1109/icait61638.2024.10690485
Iqbal, M., Hussain, D., Javed, M. Y., Ellahi, F., Asim, M., Adeel, M., … Baqir, M. (2023). In Vitro Efficacy Evaluation of Agrochemical Fungicides in the Mitigation of Colletotrichum Capsici Infection. 2(Issue 02), 128–135. https://doi.org/10.69501/0vk41476
Jia, Z., & Liao, S. (2023). Leaf Recognition Using K-Nearest Neighbors Algorithm with Zernike Moments. 665–669. https://doi.org/10.1109/icivc58118.2023.10270642
Korolev, M. I., Khorev, A., Salikov, Y., & Kolomyceva, O. (2023). Development of scientific research in the field of food security at the global, national and regional levels. https://doi.org/10.20914/2310-1202-2022-3-492-499
Kunta, M., Park, J.-W., Braswell, W. E., da Graça, J. V, & Edwards, P. (2021). Modern Tools for Detection and Diagnosis of Plant Pathogens. Springer, Singapore. https://doi.org/10.1007/978-981-15-6275-4_4
Lokeswari, N., Pramesti, D., & Fakhrurroja, H. (2025). Enhancing the Accuracy of Chili Plant Disease Classification using Convolutional Neural Networks and Image Augmentation. 123–128. https://doi.org/10.1109/iaict65714.2025.11100595
Loti, N. N. A., Noor, M. R. M., & Chang, S.-W. (2021). Integrated analysis of machine learning and deep learning in chili pest and disease identification. Journal of the Science of Food and Agriculture, 101(9), 3582–3594. https://doi.org/10.1002/JSFA.10987
Mahanta, D., Dange, M. M., Trivedi, A., & Nandeha, N. (2024). Global Challenges Facing Plant Pathology: A Review on Multidisciplinary Approaches to Meet the Food Security. Journal of Scientific Research and Reports. https://doi.org/10.9734/jsrr/2024/v30i62106
Mallesh, A. S., Pamarthi, N., Murty, P. T. S., Sree, P. K., Daniya, T., & Maram, B. (2023). Smart System for Early Detection of Agricultural Plant Diseases in the Vegetation Period. https://doi.org/10.1109/idicaiei58380.2023.10406672
Mashuri, A. S., Sunyoto, A., & Kusnawi, K. (2024). Klasifikasi Penyakit Pada Daun Cabai Menggunakan Arsitektur VGG16. Journal of Electrical Engineering and Computer, 6(2), 305–313. https://doi.org/10.33650/jeecom.v6i2.9116
Mohammed, A. S., Nayyef, Y. A., & Tuama, H. N. (2025). Real-Time Plant Disease Detection by AI. European Journal of Ecology, Biology and Agriculture., 2(4), 52–69. https://doi.org/10.59324/ejeba.2025.2(4).05
Nasir, M., Suciati, N., & Wijaya, A. Y. (2017). Kombinasi Fitur Tekstur Local Binary Pattern yang Invariant Terhadap Rotasi dengan Fitur Warna Berbasis Ruang Warna HSV untuk Temu Kembali Citra Kain Tradisional. 7(1), 42–51. https://doi.org/10.35585/INSPIR.V7I1.2435
Pakutharivu, P., Sasirekha, D., Devaraj, V., & Gopi, R. S. (2023). Improving Plant Disease Detection Using Super-Resolution Generative Adversarial Networks and Enhanced Dataset Diversity. Journal of Advanced Research in Applied Sciences and Engineering Technology. https://doi.org/10.37934/araset.35.2.144157
Patil, A. R., Patil, V. I., & Lad, K. B. (2022). Feature Selection for Chili Leaf Disease Identification Using GLCM Algorithm. https://doi.org/10.1007/978-981-16-3945-6_35
Pratama, Y., Rasywir, E., Suyanti, S., Siswanto, A., & Fachruddin, F. (2025). Enhancing Areca Nut Detection and Classification Using Faster R-CNN: Addressing Dataset Limitations with Haar-like Features, Integral Image, and Anchor Box Optimization. Jurnal RESTI (Rekayasa Sistem Dan Teknologi Informasi), 9(3), 613–621. https://doi.org/10.29207/resti.v9i3.6496
Pulungan, M. R., Furqan, M., & Rifki, M. I. (2024). Klasifikasi penyakit pada daun cabai menggunakan gray level co-occurrence matrix dan k-nearest neighbor. Syntax, 5(2), 549–554. https://doi.org/10.46576/syntax.v5i2.5386
Purboseno, S., Dharmawati, N. D., & Rahayu, E. (2025). Strategies for Low-Carbon Agricultural Development Through Smart Farming of Chili Peppers. KnE Life Sciences, 9(1), 79–94. https://doi.org/10.18502/kls.v9i1.19352
Rahadiyan, D., Hartati, S., Wahyono, & Nugroho, A. P. (2022). Classification of Chili Plant Condition based on Color and Texture Features. International Conference on Intelligent Computing, 1–7. https://doi.org/10.1109/ICIC56845.2022.10006975
Rajendrakumar, S., Rajashekarappa, R., & Parvati, V. K. (2025). Identification of chilli leaf disease using contrast limited histogram equalisation and k-means clustering. Indonesian Journal of Electrical Engineering and Computer Science, 39(2), 1100. https://doi.org/10.11591/ijeecs.v39.i2.pp1100-1108
Raut, S., & Kasat, N. (2024). A Review: Citrus Disease Detection Using Machine Learning Approach. 1–5. https://doi.org/10.1109/idicaiei61867.2024.10842864
Ruby, E. D. K., Amirthayogam, G., Sasi, G., Thangavel, C., Choubey, A., & Gopalakrishnan, S. (2024). Advanced Image Processing Techniques for Automated Detection of Healthy and Infected Leaves in Agricultural Systems. Mesopotamian Journal of Computer Science, 2024, 62–70. https://doi.org/10.58496/mjcsc/2024/006
Rzanny, M., Seeland, M., Wäldchen, J., & Mäder, P. (2017). Acquiring and preprocessing leaf images for automated plant identification: understanding the tradeoff between effort and information gain. Plant Methods, 13(1), 97. https://doi.org/10.1186/S13007-017-0245-8
Shaker, B. R. M., Kumar, J. H., Chaitanya, V., Sriranjitha, P., Kumar, K. R., & Rao, P. J. M. (2021). Economics of Chilli Cultivation in Khammam District of Telangana. International Journal of Current Microbiology and Applied Sciences, 10(2), 893–901. https://doi.org/10.20546/IJCMAS.2021.1002.105
Shaparia, R., Patel, N. M., & Shah, Z. H. (2017). Flower Classification using Texture and Color Features. 2, 113–118. https://doi.org/10.29007/6MT1
Suwarningsih, W., Evandri, E., Kirana, R., Khotimah, P. H., Riswantini, D., Nugraheni, E., … Ahmadi, N. R. (2024). Kumpulan data citra telepon pintar untuk identifikasi varietas cabai merah berbasis daun. Baca: Jurnal Dokumentasi Dan Informasi, 51–59. https://doi.org/10.55981/baca.2024.7786
Tiwari, R. G., Nyamasvisva, T. E., Ibrahim, N., Dixit, A., Trivedi, N. K., & Kumar, A. (2025). Hybrid Feature Fusion and Deep Learning for High-Accuracy Anthracnose Detection in Chili Plants. Journal of Innovative Image Processing, 7(3), 602–621. https://doi.org/10.36548/jiip.2025.3.002
Toennies, K. D. (2024). Distance-Based Classifiers. https://doi.org/10.1007/978-981-99-7882-3_5
Tripathi, A., Maurya, S., Pandey, K. K., & Behera, T. K. (2024). Global Scenario of Vegetable Fungal Diseases. Vegetable Science, 51(Special Is), 54–65. https://doi.org/10.61180/vegsci.2024.v51.spl.06
Turkoglu, M., & Hanbay, D. (2019). Combination of Deep Features and KNN Algorithm for Classification of Leaf-Based Plant Species. https://doi.org/10.1109/IDAP.2019.8875911
Vedanty, P. P., Kesiman, M. W. A., Sunarya, I. M. G., & Indradewi, I. G. A. A. D. (2023). Identification of Leaf Diseases of Medicinal Plants Using K-Nearest Neighbor Based on Color, Texture, and Shape Features. 1–6. https://doi.org/10.1109/icaicta59291.2023.10390034
Vega-Huerta, H., Pajuelo-León, J., la Cruz Vélez de Villa, P. E. De, Calderon-Vilca, H. D., Maquen-Niño, G. L. E., Rios-Castillo, M. E., … Benito-Pacheco, O. (2025). K-Nearest Neighbors Model to Optimize Data Classification According to the Water Quality Index of the Upper Basin of the City of Huarmey. Applied Sciences, 15(18), 10202. https://doi.org/10.3390/app151810202
Weng, G., Liu, W., & Guo, L. (2025). Improving Accuracy of Corn Leaf Disease Recognition Through Image Enhancement Techniques. 2(5), 1–12. https://doi.org/10.70393/6a6374616d.333136
Yunefri, Y., Sutejo, Y. E., Fadrial, K. A., Ramadhani, M., & Hardianto, R. (2022). Implementation of object detection with you only look once algorithm in limited face-to-face times in pandemic. Journal of Applied Engineering and Technological Science, 4(1), 400-404.


