Grading Coffee Beans using Extraction of Shape-Based Features Coupled with Support Vector Machine
Abstract
Evaluating coffee beans through a computer vision system (CVs) requires a large number of visual attributes to be extracted, but may affect prediction accuracy. Therefore, it is essential to reduce the large features to gain better prediction accuracy by generating new data that represents the most informative dimensions of the original data. Previous studies are limited to comparing different methods of feature extraction. The objective of this research was to explore the comparison of six feature extraction methods (PCA, EFA, LDA, SVD, ICA, and PLS) combined with support vector machine (SVM) as a supervised approach to predict three groups of coffee beans, namely long-berry, normal, and peaberry, for grading issues. SVM with three kernel functions (linear, RBF, and sigmoid) was used to construct a superior classification model. Data were acquired from coffee images processed to generate shape-based features. The results show that LDA provides a better visualization in separating sample classes according to the score plot with 2 variables obtained. The combination of SVM and LDA has a better recognition of coffee beans for grading, which is higher than that of other combinations. A combination of SVM-sigmoid with EFA gave mostly the worst recognition. Our findings proved that the investigation of feature extraction methods and SVM successfully achieve accurate results on grading coffee beans.
Downloads
References
Adebayo, D.S., & Olumide, O. (2016). Fish classification algorithm using single value decomposition. International Journal of Innovative Research in Science, Engineering and Technology, 5(2), 1621–1628.
Ahad, M.T., Li, Y., Song, B., & Bhuiyan, T. (2023). Comparison of CNN-based deep learning architectures for rice diseases classification. Artificial Intelligence in Agriculture, 9, 22–35. https://doi.org/10.1016/j.aiia.2023.07.001
Al-Mejibli, I.S., Alwan, J.K., & Abd, D.H. (2020). The effect of gamma value on support vector machine performance with different kernels. International Journal of Electrical and Computer Engineering, 10(5), 5497–5506. https://doi.org/10.11591/IJECE.V10I5.PP5497-5506
Bedaso, M., Meshesha, M., & Diriba, C. (2022). Grading ethiopian coffee raw quality using image processing techniques. Research Square, 2022(1). https://doi.org/10.21203/rs.3.rs-1980632/v1
Bhavsar, H.P., & Panchal, M. (2012). A review on support vector machine for data classification. International Journal of Advanced Research in Computer Engineering & Technology, 1(10), 2278–1323.
Brereton, R.G., & Lloyd, G.R. (2010). Support vector machines for classification and regression. Analyst, 135(2), 230–267. https://doi.org/10.1039/b918972f
Dawson-Howe, K. (2014). A Practical Introduction to Computer Visio with OpenCV. John Wiley & Sons, Ltd.
de Almeida, V.E., de Sousa Fernandes, D.D., Diniz, P.H.G.D., de Araújo Gomes, A., Véras, G., Galvão, R.K.H., & Araujo, M.C.U. (2021). Scores selection via Fisher’s discriminant power in PCA-LDA to improve the classification of food data. Food Chemistry, 363, 130296. https://doi.org/10.1016/j.foodchem.2021.130296
Fordellone, M., Bellincontro, A., & Mencarelli, F. (2018). Partial least squares discriminant analysis: A dimensionality reduction method to classify hyperspectral data. Statistica Applicata, 31(2), 181–200. https://doi.org/10.48550/arXiv.1806.09347
Géron, A. (2019). Hands-on Machine Learning whit Scikit-Learing, Keras and TensorFlow. O’Reilly Media, Inc.
Hastie, T., Rosset, S., Tibshirani, R., & Zhu, J. (2004). The entire regularization path for the support vector machine. Journal of Machine Learning Research, 5(Oct), 1391–1415.
Howley, T., Madden, M.G., O’Connell, M.L., & Ryder, A.G. (2006). The effect of principal component analysis on machine learning accuracy with high-dimensional spectral data. Knowledge-Based Systems, 19(5), 363–370. https://doi.org/10.1016/j.knosys.2005.11.014
Husin, Z., Shakaff, A.Y.M., Aziz, A.H.A., Farook, R.S.M., Jaafar, M.N., Hashim, U., & Harun, A. (2012). Embedded portable device for herb leaves recognition using image processing techniques and neural network algorithm. Computers and Electronics in Agriculture, 89, 18–29. https://doi.org/10.1016/j.compag.2012.07.009
International Coffee Organization. (2018). Grading and classification of green coffee. The International Coffee Organization, 1–5. Retrieved from http://www.ico.org/projects/Good-Hygiene-Practices/cnt/cnt_en/sec_3/docs_3.3/Grading & class.pdf
Jayaprakash, C., Damodaran, B.B., Viswanathan, S., & Soman, K.P. (2020). Randomized independent component analysis and linear discriminant analysis dimensionality reduction methods for hyperspectral image classification. Journal of Applied Remote Sensing, 14(3), 36507. https://doi.org/10.1117/1.JRS.14.036507
Koklu, M., & Ozkan, I.A. (2020). Multiclass classification of dry beans using computer vision and machine learning techniques. Computers and Electronics in Agriculture, 174, 105507. https://doi.org/10.1016/j.compag.2020.105507
Koklu, M., Cinar, I., & Taspinar, Y.S. (2021). Classification of rice varieties with deep learning methods. Computers and Electronics in Agriculture, 187, 106285. https://doi.org/10.1016/j.compag.2021.106285
Kumar, G., & Bhatia, P.K. (2014). A detailed review of feature extraction in image processing systems. International Conference on Advanced Computing and Communication Technologies (ACCT), 5–12. http://dx.doi.org/10.1109/ACCT.2014.74
Lin, H., Sheng, H., Sun, G., Li, Y., Xiao, M., & Wang, X. (2021). Identification of pumpkin powdery mildew based on image processing PCA and machine learning. Multimedia Tools and Applications, 80(14), 21085–21099. https://doi.org/10.1007/s11042-020-10419-1
Lopes, J.F., Ludwig, L., Barbin, D.F., Grossmann, M.V.E., & Barbon, S. (2019). Computer vision classification of barley flour based on spatial pyramid partition ensemble. Sensors (Switzerland), 19(13), 1–17. https://doi.org/10.3390/s19132953
Meenu, M., Kurade, C., Neelapu, B. C., Kalra, S., Ramaswamy, H. S., & Yu, Y. (2021). A concise review on food quality assessment using digital image processing. Trends in Food Science and Technology, 118(Part A), 106–124. https://doi.org/10.1016/j.tifs.2021.09.014
Mehmood, T., Liland, K.H., Snipen, L., & Sæbø, S. (2012). A review of variable selection methods in Partial Least Squares Regression. Chemometrics and Intelligent Laboratory Systems, 118, 62–69. https://doi.org/10.1016/j.chemolab.2012.07.010
Mountrakis, G., Im, J., & Ogole, C. (2011). Support vector machines in remote sensing: A review. ISPRS Journal of Photogrammetry and Remote Sensing, 66(3), 247–259. https://doi.org/10.1016/j.isprsjprs.2010.11.001
Oliveira, M.M., Cerqueira, B.V., Barbon, S., & Barbin, D.F. (2021). Classification of fermented cocoa beans (cut test) using computer vision. Journal of Food Composition and Analysis, 97, 103771. https://doi.org/10.1016/j.jfca.2020.103771
Pazoki, A.R., Farokhi, F., & Pazoki, Z. (2014). Classification of rice grain varieties using two artificial neural networks (mlp and neuro-fuzzy). Journal of Animal and Plant Sciences, 24(1), 336–343.
Saputra, I., & Kristiyanti, D.A. (2022). Machine Learning untuk Pemula. Bandung: Informatika.
Soleimanipour, A., Chegini, G.R., & Massah, J. (2018). Classification of anthurium flowers using combination of PCA, LDA and support vector machine. Agricultural Engineering International: CIGR Journal, 20(1), 219–228.
Tran, H.T.M., Vargas, C.A.C., Slade Lee, L., Furtado, A., Smyth, H., & Henry, R. (2017). Variation in bean morphology and biochemical composition measured in different genetic groups of arabica coffee (Coffea arabica L.). Tree Genetics and Genomes, 13(3), 54. https://doi.org/10.1007/s11295-017-1138-8
Turi, B., Abebe, G., & Goro, G. (2013). Classification of Ethiopian coffee beans using imaging techniques. East African Journal of Sciences, 7(1), 1–10.
Wallelign, S. (2020). An intelligent system for coffee grading and disease identification [Master’s thesis]. École Nationale d’Ingénieurs de Brest. Machine Learning.
Widyotomo, S., & Mulato, S. (2005). Performance of a table vibration type coffee grading machine. Pelita Perkebunan (a Coffee and Cocoa Research Journal), 21(1), 55–72. https://doi.org/10.22302/iccri.jur.pelitaperkebunan.v21i1.125
Wirth, M.A. (2004). Shape Analysis & Measurement. University of Guelph, Computing and Information Science, Image Processing Group. http://www.cyto.purdue.edu/cdroms/micro2/content/education/wirth10.pdf (July 2, 2023),
Zeeshan, M., Prabhu, A., Arun, C., & Rani, N.S. (2020). Fruit Classification System Using Multiclass Support Vector Machine Classifier. Proceedings of the International Conference on Electronics and Sustainable Communication Systems, ICESC 2020, 289–294. http://dx.doi.org/10.1109/ICESC48915.2020.9155817
Zhang, C., Zhang, S., Yang, J., Shi, Y., & Chen, J. (2017). Apple leaf disease identification using genetic algorithm and correlation based feature selection method. International Journal of Agricultural and Biological Engineering, 10(2), 74–83. https://doi.org/10.3965/j.ijabe.20171002.2166
Zhang, Y., & Wu, L. (2012). Classification of fruits using computer vision and a multiclass support vector machine. Sensors (Switzerland), 12(9), 12489–12505. https://doi.org/10.3390/s120912489

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.


