Perbandingan Performa CNN MobileNetV2 dan K-Nearest Neighbors untuk Klasifikasi Kondisi Tanaman Cabai
Abstract
Diseases and pests affecting chili plants can reduce crop quality and productivity if not detected at an early stage. The identification of plant conditions is still commonly performed through manual visual observation, making the process prone to diagnostic errors and time-consuming. This study aims to compare the performance of a MobileNetV2-based Convolutional Neural Network (CNN) and K-Nearest Neighbors (KNN) for chili plant condition classification using digital images. The dataset consisted of 7,991 training images, 515 validation images, and 355 testing images generated through a cropping process based on bounding-box annotations, covering seven categories of chili plant conditions: Anthracnose, Aphid, Armyworm, Healthy, Leaf Spot, Whitefly, and Yellowisha. Preprocessing included image resizing to 128 × 128 pixels and normalization. The CNN model employed a MobileNetV2 architecture with transfer learning, while the KNN model utilized manually extracted features consisting of Histogram of Oriented Gradients (HOG), Local Binary Pattern (LBP), and Color Histogram. Model performance was evaluated using a confusion matrix, accuracy, precision, recall, and F1-score with a weighted-average approach. The results show that CNN outperformed KNN, achieving an accuracy of 81.69%, precision of 86.28%, recall of 81.69%, and F1-score of 81.34%, whereas KNN achieved an accuracy of 45.63%, precision of 66.80%, recall of 45.63%, and F1-score of 42.24%. The contribution of this study lies in providing a comparative analysis between deep learning and traditional machine learning approaches on a dataset encompassing diseases, pests, and healthy conditions within the same classification scenario. The findings indicate that CNN's automatic feature extraction capability produces more effective visual representations than the manually engineered features used by KNN.
Downloads
References
Ashurov, A. Y., Al-Gaashani, M. S. A. M., Samee, N. A., Alkanhel, R., Atteia, G., Abdallah, H. A., & Saleh Ali Muthanna, M. (2024). Enhancing plant disease detection through deep learning: a Depthwise CNN with squeeze and excitation integration and residual skip connections. Frontiers in Plant Science, 15. https://doi.org/10.3389/fpls.2024.1505857
Balaji, B., Satyanarayana Murthy, T., & Kuchipudi, R. (2023). A Comparative Study on Plant Disease Detection and Classification Using Deep Learning Approaches. International Journal of Image, Graphics and Signal Processing, 15(3), 48–59. https://doi.org/10.5815/ijigsp.2023.03.04
Borhani, Y., Khoramdel, J., & Najafi, E. (2022). A deep learning based approach for automated plant disease classification using vision transformer. Scientific Reports, 12(1). https://doi.org/10.1038/s41598-022-15163-0
Dai, M., Sun, W., Wang, L., Dorjoy, M. M. H., Zhang, S., Miao, H., Han, L., Zhang, X., & Wang, M. (2023). Pepper leaf disease recognition based on enhanced lightweight convolutional neural networks. Frontiers in Plant Science, 14. https://doi.org/10.3389/fpls.2023.1230886
Demilie, W. B. (2024). Plant disease detection and classification techniques: a comparative study of the performances. Journal of Big Data, 11(1). https://doi.org/10.1186/s40537-023-00863-9
Falaschetti, L., Manoni, L., Leo, D. Di, Pau, D., Tomaselli, V., & Turchetti, C. (2022). A CNN-based image detector for plant leaf diseases classification. HardwareX, 12, e00363. https://doi.org/10.17605/OSF.IO/UCM8D
Hajar, S., Murinto, M., & Yudhana, A. (2025). Comparison of Transfer Learning Strategies Using MobileNetV2 and ResNet50 for Ecoprint Leaf Classification. Jurnal Teknik Informatika (Jutif), 6(5), 3251–3264. https://doi.org/10.52436/1.jutif.2025.6.5.5266
Leite, D. V., de Brito, A. V., Faccioli, G. G., & Haddad Souza Vieira, G. (2025). Deep Learning Models for Detection and Severity Assessment of Cercospora Leaf Spot (Cercospora capsici) in Chili Peppers Under Natural Conditions. Plants, 14(13). https://doi.org/10.3390/plants14132011
Liu, J., & Wang, X. (2021). Plant diseases and pests detection based on deep learning: a review. In Plant Methods (Vol. 17, Number 1). BioMed Central Ltd. https://doi.org/10.1186/s13007-021-00722-9
Lu, J., Tan, L., & Jiang, H. (2021). Review on convolutional neural network (CNN) applied to plant leaf disease classification. In Agriculture (Switzerland) (Vol. 11, Number 8). MDPI AG. https://doi.org/10.3390/agriculture11080707
Ms. Lolakshi P. K., Ananya H S, Prathiksha L Shetty, Prakyath S Shetty, & Vibha M. (2023). Plant Leaf Disease Detection using KNN Algorithm. International Journal of Advanced Research in Science, Communication and Technology, 21–25. https://doi.org/10.48175/ijarsct-7828
Odounfa, M. G. F., Hounmenou, C. G., Salako, V. K., Affokpon, A., & Kakaï, R. L. G. (2025). Deep learning enables precision agriculture for sustainable chili pepper disease detection in Benin. Discover Artificial Intelligence, 5(1). https://doi.org/10.1007/s44163-025-00583-4
Ozturk, A. I., & Yildirim, O. (2025). A comparative analysis of HOG and LBP feature extraction techniques in AdaBoost for image recognition. International Journal of Innovative Research and Scientific Studies, 8(2), 696–703. https://doi.org/10.53894/ijirss.v8i2.5290
Pacal, I., Kunduracioglu, I., Alma, M. H., Deveci, M., Kadry, S., Nedoma, J., Slany, V., & Martinek, R. (2024). A systematic review of deep learning techniques for plant diseases. Artificial Intelligence Review, 57(11). https://doi.org/10.1007/s10462-024-10944-7
Pandian, J. A., Kanchanadevi, K., Kumar, V. D., Jasińska, E., Goňo, R., Leonowicz, Z., & Jasiński, M. (2022). A Five Convolutional Layer Deep Convolutional Neural Network for Plant Leaf Disease Detection. Electronics (Switzerland), 11(8). https://doi.org/10.3390/electronics11081266
Pandian, J. A., Kumar, V. D., Geman, O., Hnatiuc, M., Arif, M., & Kanchanadevi, K. (2022). Plant Disease Detection Using Deep Convolutional Neural Network. Applied Sciences (Switzerland), 12(14). https://doi.org/10.3390/app12146982
Rahman, A., Subekti, S., & Rokhani. (2021). Adaptation of cayenne pepper farmers (Capsicum frutescens L.) on climate change in Jelbuk Subdistrict Jember. IOP Conference Series: Earth and Environmental Science, 892(1). https://doi.org/10.1088/1755-1315/892/1/012037
Rainio, O., Teuho, J., & Klén, R. (2024). Evaluation metrics and statistical tests for machine learning. Scientific Reports, 14(1). https://doi.org/10.1038/s41598-024-56706-x
Sundari, M. T., Darsono, Sutrisno, J., & Antriyandarti, E. (2021). Analysis of chili farming in Indonesia. IOP Conference Series: Earth and Environmental Science, 905(1). https://doi.org/10.1088/1755-1315/905/1/012046
Zahirah, D., Purnawansyah, P., Kurniati, N., & Darwis, H. (2024). Digital Image Classification Of Herbal Leaves Using Knn And Cnn With Glcm Features. Jurnal Teknik Informatika (Jutif), 5(1), 61–67. https://doi.org/10.52436/1.jutif.2024.5.1.1162
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Perbandingan Performa CNN MobileNetV2 dan K-Nearest Neighbors untuk Klasifikasi Kondisi Tanaman Cabai
Pages: 128-139
Copyright (c) 2026 Tegar Wahyu Adi Saputra, Rodhiyah Mardhiyyah

This work is licensed under a Creative Commons Attribution 4.0 International License.
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 Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment 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 acknowledgment 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 (Refer to The Effect of Open Access).













