Classification of Pear Varieties Using the K-Nearest Neighbor Algorithm and Extraction of Shape, Color, Texture, and Size Features
This study develops a pear variety classification system based on digital images using the K-Nearest Neighbor (KNN) algorithm. The data used included 195 images from three pear varieties, namely Century, Forel Afrika, and Singo, which were analyzed by utilizing various features such as color (RGB), texture (Local Binary Pattern), shape (area, circumference, length-width ratio), and size (bounding box dimensions). The preprocessing process removes the image's background to increase focus on the main object, thus allowing for more optimal feature extraction. The dataset is divided into 80% for training and 20% for model testing. The evaluation results show that the KNN model can achieve an accuracy of 85%, with an average precision value of 0.85, recall of 0.89, and F1-score of 0.85. These results prove that the KNN algorithm is effective in accurately classifying pear varieties, which can significantly contribute to applying digital image-based technology for automatic classification needs in the agricultural sector.
Authors
- Dedy Kiswanto (ORCID: https://orcid.org/0009-0001-0324-5826)
- Rezkya Nadilla Putri
- Keysa Shifa Adwitia Sitepu
Institutions
- State University of Medan (ID)
Publication Details
- Journal
- Golden Ratio of Data in Summary
- Published
- 2025-02-01
- DOI
- https://doi.org/10.52970/grdis.v5i1.910
- Primary Topic
- Plant Physiology and Cultivation Studies
- Type
- article
- Field-Weighted Citation Impact
- 0.00