Classification Of Mango Fruit Types Using The Knn Method Based On Shape Feature Extraction

Authors

  • Alan Prayogi Master of Computer Science, Faculty of Engineering and Computer Science, Potensi Utama University
  • Hartono Master of Computer Science, Faculty of Engineering and Computer Science, Potensi Utama University
  • Roslina Master of Computer Science, Faculty of Engineering and Computer Science, Potensi Utama University

DOI:

https://doi.org/10.35842/icostec.v3i1.72

Keywords:

Classification, Mango, Shape, K-Nearest Neighbor (KNN)

Abstract

—Mango is one of the flagship fruits and is highly
favored by the community. Mangoes are widely loved for their
varied flavors, and with the multitude of mango varieties, it
can be challenging for the general public to classify them. The
types of mangoes commonly consumed by the majority of the
population are harum manis mango, manalagi mango, and
apple mango. Each mango variety has its own distinctive
shape that can be used as a basis in the identification process.
The image capture is done using a mobile phone camera. The
captured images will be used as training data, consisting of 30
images of apple mango, 30 images of harum manis mango, and
30 images of manalagi mango, resulting in a total of 90
training images for various types of mango fruits.
Furthermore, there are 10 test images for each type of apple
mango, harum manis mango, and manalagi mango, resulting
in a total of 30 test images for various types of mango fruits.
Therefore, the total for the entire mango image dataset is 120
digital image data. The K-Nearest Neighbor (KNN) method is
used for the classification of mango types. In this algorithm,
the value of K (number of nearest neighbors) is assumed to be
K=3, using both the Euclidean Distance measurement method
and the Manhattan Distance measurement method. The
method is employed to make a comparison between the
Euclidean Distance measurement model and the Manhattan
Distance measurement model, determining the final
classification results and optimizing the accuracy level in the
KNN algorithm. The results of this research indicate that
using the KNN method with a value of K=3, the Manhattan
distance measurement model is superior to the Euclidean
distance measurement model. The Manhattan distance
measurement model yields an accuracy rate of 91%, Precision
of 91%, Recall of 91%, and F1-Score of 91%.

Published

2024-02-17