Date Fruit Classification using K-Nearest Neighbor with Principal Component Analysis and Binary Particle Swarm Optimization
Abstract
Various cultivars of date fruits distributed throughout exhibit diverse complexity and unique attributes, including color, flavor, shape, and texture. These distinctive characteristics and appearance occasionally lack variability in date fruits, since various kinds of date fruit may have subtle differences in color, shape, and texture. To overcome the difficulty of sorting and classifying multiple types of date fruit, a classification model was developed to categorize date fruit according to their visual appearances and digital characteristics. This study proposes a classification system that categorizes date fruit into five distinct types. The system achieves this by extracting features related to date fruit images' color, shape, and texture. Specifically, color moments, HOG descriptors, and circularity are used for feature extraction. The resulting high-quality training data is then used to train a K-Nearest-Neighbor (KNN) classifier. Considering the parameters applied to develop the proposed classification model is essential. Therefore, the proposed KNN model will be optimized by Principal Component Analysis (PCA) and Binary Particle Swarm Optimization (BPSO). PCA is employed for dimensionality reduction, whereas BPSO is implemented to discover the optimal neighbors. The experimental results demonstrated that the classification model achieved an accuracy of 93.85%, a considerable improvement of 12% over barebone KNN.
Downloads
References
Food and A. O. of the United Nations, “Food and Agriculture Commodities Production 2020.” Accessed: May 18, 2022. [Online]. Available: https://www.fao.org/faostat/en/#rankings/ countries_by_commodity/
A. Nasiri, A. Taheri-Garavand, and Y.-D. Zhang, “Image-based deep learning automated sorting of date fruit,” Postharvest Biol. Technol., vol. 153, pp. 133–141, Jul. 2019, doi: 10.1016/j.postharvbio.2019.04.003.
X. Liu, D. Zhao, W. Jia, W. Ji, and Y. Sun, “A Detection Method for Apple Fruits Based on Color and Shape Features,” IEEE Access, vol. 7, pp. 67923–67933, 2019, doi: 10.1109/ACCESS.2019.2918313.
Fernanda Januar Pratama, Wikky Fawwaz Al Maki, and Febryanti Sthevanie, “Big Cats Classification Based on Body Covering,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 5, no. 5, pp. 984–991, Oct. 2021, doi: 10.29207/resti.v5i5.3328.
A. Wang, W. Zhang, and X. Wei, “A review on weed detection using ground-based machine vision and image processing techniques,” Comput. Electron. Agric., vol. 158, pp. 226–240, Mar. 2019, doi: 10.1016/j.compag.2019.02.005.
F. Anowar, S. Sadaoui, and B. Selim, “Conceptual and empirical comparison of dimensionality reduction algorithms (PCA, KPCA, LDA, MDS, SVD, LLE, ISOMAP, LE, ICA, t-SNE),” Computer Science Review, vol. 40. Elsevier Ireland Ltd, May 01, 2021. doi: 10.1016/j.cosrev.2021.100378.
T. Tri Saputra Sibarani and C. Author, “Analysis K-Nearest Neighbors (KNN) in Identifying Tuberculosis Disease (Tb) By Utilizing Hog Feature Extraction,” Int. Comput. Sci. Inf. Technol. JournalISSN, vol. 1, no. 1, pp. 33–38, 2020.
L. Kumar and K. K. Bharti, “An improved BPSO algorithm for feature selection,” in Lecture Notes in Electrical Engineering, Springer Verlag, 2019, pp. 505–513. doi: 10.1007/978-981-13-2685-1_48.
A. K. Mishra, P. Roy, and S. Bandyopadhyay, “Binary Particle Swarm Optimization Based Feature Selection (BPSO-FS) for Improving Breast Cancer Prediction,” 2021, pp. 373–384. doi: 10.1007/978-981-15-4992-2_35.
W. S. N. Alhamdan and J. M. Howe, “Date Fruit Image Dataset in Controlled Environment.” Accessed: May 27, 2022. [Online]. Available: https://www.kaggle.com/datasets/wadhasnalhamdan/date-fruit-image-dataset-in-controlled-environment
Z. Wang, E. Wang, and Y. Zhu, “Image segmentation evaluation: a survey of methods,” Artif. Intell. Rev., vol. 53, no. 8, pp. 5637–5674, Dec. 2020, doi: 10.1007/s10462-020-09830-9.
A. Bhargava and A. Bansal, “Classification and Grading of Multiple Varieties of Apple Fruit,” Food Anal. Methods, vol. 14, no. 7, pp. 1359–1368, Jul. 2021, doi: 10.1007/s12161-021-01970-0.
X. Zenggang, T. Zhiwen, C. Xiaowen, Z. Xue-min, Z. Kaibin, and Y. Conghuan, “Research on Image Retrieval Algorithm Based on Combination of Color and Shape Features,” J. Signal Process. Syst., vol. 93, no. 2–3, pp. 139–146, Mar. 2021, doi: 10.1007/s11265-019-01508-y.
P. U. Riswana, “Extract Circular Object by tracing Region Boundary and using Circularity Measure,” Int. Res. J. Eng. Technol., 2019, [Online]. Available: www.irjet.net
W. Zhou, S. Gao, L. Zhang, and X. Lou, “Histogram of Oriented Gradients Feature Extraction from Raw Bayer Pattern Images,” IEEE Trans. Circuits Syst. II Express Briefs, vol. 67, no. 5, pp. 946–950, May 2020, doi: 10.1109/TCSII.2020.2980557.
Rismiyati and H. A. Wibawa, “Snake Fruit Classification by Using Histogram of Oriented Gradient Feature and Extreme Learning Machine,” in 2019 3rd International Conference on Informatics and Computational Sciences (ICICoS), IEEE, Oct. 2019, pp. 1–5. doi: 10.1109/ICICoS48119.2019.8982528.
G. T. Reddy et al., “Analysis of Dimensionality Reduction Techniques on Big Data,” IEEE Access, vol. 8, pp. 54776–54788, 2020, doi: 10.1109/ACCESS.2020.2980942.
E. Hossain, M. F. Hossain, and M. A. Rahaman, “A Color and Texture Based Approach for the Detection and Classification of Plant Leaf Disease Using KNN Classifier,” in 2019 International Conference on Electrical, Computer and Communication Engineering (ECCE), IEEE, Feb. 2019, pp. 1–6. doi: 10.1109/ECACE.2019.8679247.
Haviluddin et al., “A Performance Comparison of Euclidean, Manhattan and Minkowski Distances in K-Means Clustering,” in 2020 6th International Conference on Science in Information Technology: Embracing Industry 4.0: Towards Innovation in Disaster Management, ICSITech 2020, Institute of Electrical and Electronics Engineers Inc., Oct. 2020, pp. 184–188. doi: 10.1109/ICSITech49800.2020.9392053.
R. K. Chaurasiya, M. I. Khan, D. Karanjgaokar, and B. K. Prasanna, “BPSO-Based Feature Selection for Precise Class Labeling of Diabetic Retinopathy Images,” 2020, pp. 253–264. doi: 10.1007/978-981-13-8196-6_24.
V. P. Kour and S. Arora, “Particle Swarm Optimization Based Support Vector Machine (P-SVM) for the Segmentation and Classification of Plants,” IEEE Access, vol. 7, pp. 29374–29385, 2019, doi: 10.1109/ACCESS.2019.2901900.
Mojtaba Ahmadieh Khanesar, Mohammad Teshnehlab, and Mahdi Aliyari Shoorehdeli, “A novel binary particle swarm optimization,” in 2007 Mediterranean Conference on Control & Automation, IEEE, Jun. 2007, pp. 1–6. doi: 10.1109/MED.2007.4433821.
Copyright (c) 2023 Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi)
This work is licensed under a Creative Commons Attribution 4.0 International License.
Copyright in each article belongs to the author
- The author acknowledges that the RESTI Journal (System Engineering and Information Technology) is the first publisher to publish with a license Creative Commons Attribution 4.0 International License.
- Authors can enter writing separately, arrange the non-exclusive distribution of manuscripts that have been published in this journal into other versions (eg sent to the author's institutional repository, publication in a book, etc.), by acknowledging that the manuscript has been published for the first time in the RESTI (Rekayasa Sistem dan Teknologi Informasi) journal ;