An Intelligent Image-Based Approach for Classification of Bangladeshi Pineapple Varieties
Juwel Das Asish
Bangladesh Agricultural University, Mymensingh, Bangladesh.
Mahbubun Nahar
Jatiya Kabi Kazi Nazrul Islam University, Trishal, Bangladesh.
S M Abdullah Al Shuaeb *
Bangladesh Agricultural University, Mymensingh, Bangladesh.
Md. Mizanur Rahman
Jatiya Kabi Kazi Nazrul Islam University, Trishal, Bangladesh.
*Author to whom correspondence should be addressed.
Abstract
In Bangladesh, pineapple variety identification is still largely dependent on experience and eye-tracking. As a result, there is a possibility of misclassification in marketing, grading, pricing, and agricultural supply chain management. This study proposes a feature-based machine learning approach to automatically identify varieties from pineapple images. In the proposed approach, noise reduction, contrast adjustment, and fruit region (ROI) separation will be performed through image preprocessing. Then, three classes of features—color, texture, and shape—will be extracted to create a composite feature vector, where RGB/HSV-based statistical features will be used for color features, LBP/GLCM-based descriptors for texture features, and contour-based metrics (such as area, perimeter, circularity, and aspect ratio) will be used for shape features. The collected dataset will be divided into training and testing parts, and the varieties will be classified using Decision Tree and k-Nearest Neighbors (KNN) algorithms. Accuracy, precision, recall, and F1-score will be used to measure the effectiveness of the models. The research presents a solution that can be implemented at low computational cost, which can provide effective support for rapid variety identification, quality control, and agricultural decision-making at the field level. The dataset consists of three pineapple varieties with a total of 1410 images after augmentation, divided into 80% training and 20% testing sets. Decision Tree and K-Nearest Neighbor classifiers were employed for classification, where texture-based feature combinations showed the best performance. The proposed low-cost and interpretable framework can support farmers, traders, and agricultural stakeholders in variety identification, quality control, and supply chain decision-making.
Keywords: Decision Tree (DT), K-Nearest Neighbors (KNN), Machine Learning (ML)