Coffee Beans Classification Using Convolutional Neural Networks Based On Extraction Value Analysis In Grayscale Color Space
Abstract
Coffee is a vital agricultural commodity, and precise classification of coffee beans is crucial for quality assessment and agricultural practices. In this study, we propose a methodology utilizing Convolutional Neural Networks (CNN) based on ResNet-101 architecture for coffee bean classification. The novelty of our approach lies in the integration of comprehensive feature extraction from grayscale coffee bean images, including mean, standard deviation, skewness, energy, entropy, and smoothness, with the transfer learning capabilities of CNN. Through this integration, we achieved exceptional classification performance, with the CNN model attaining accuracy, recall, precision, and F1-score metrics of 99.44% and 100% on the training data, and 100% on the testing data. These results underscore the robustness and generalization capability of our methodology in accurately classifying coffee bean types. While the dataset used in this study is experimental, the comprehensive feature extraction and the effectiveness of the CNN architecture suggest the potential for accurate classification of coffee bean types beyond the experimental data, provided the new data shares similar characteristics to the collected samples. For future research, we recommend exploring the integration of two transfer learning techniques within CNN architectures to further enhance coffee bean classification systems. Specifically, leveraging pre-trained CNN models as a foundation for feature extraction, while simultaneously fine-tuning specific layers to adapt to the nuances of coffee bean classification tasks, could offer improved model performance and scalability.
Downloads
References
N. D. M. Romauli, F. T. K. Siahaan, M. Sagala, H. V Sihombing, H. Ambarita, and H. Manurung, “Comparative investigation on the nutritional value of fresh coffee pulp, cascara powder, and cascara sap from arabica, robusta, and liberica coffee,” IOP Conf Ser Earth Environ Sci, vol. 1230, no. 1, p. 012153, Sep. 2023, doi: 10.1088/1755-1315/1230/1/012153.
Y. Sarvina, T. June, S. H. Sutjahjo, R. Nurmalina, and E. Surmaini, “Why Should Climate Smart Agriculture Be Promoted In The Indonesian Coffee Production System?,” J Sustain Sci Manag, vol. 16, no. 7, pp. 347–363, Oct. 2021, doi: 10.46754/jssm.2021.10.024.
P. S. U. Putra, M. F. Sodiq, R. R. Ramdhani, S. P. N. Abdi, and D. R. Adhika, “Evaluation of Carbon Dots from Arabica, Liberica, and Robusta Spent Coffee Grounds as Fluorescent Agents,” in Proceedings of the 7th International Conference on Materials Engineering and Nanotechnology 2023 (ICMEN 2023); 04-05 Nov, Kuala Lumpur, Malaysia, C. Y. Chee and C. Wang, Eds., Singapore: Springer Nature Singapore, 2024, pp. 105–117. doi: 10.1007/978-981-97-4080-2_9.
S. Suryaningsih, R. Tasalim, and S. Rahman, “Effect of Foot Reflection Massage on Blood Pressure Reduction in Hypertension Patients,” Journal of Advances in Medicine and Pharmaceutical Sciences (JAMAPS), vol. 1, no. 2, pp. 44–51, Nov. 2022, doi: 10.36079/lamintang.jamaps-0102.442.
E. Czarniecka-Skubina, M. Pielak, P. Sałek, R. Korzeniowska-Ginter, and T. Owczarek, “Consumer choices and habits related to coffee consumption by poles,” Int J Environ Res Public Health, vol. 18, no. 8, Apr. 2021, doi: 10.3390/ijerph18083948.
K. Fibrianto et al., “Sensory profiling of Robusta and Liberica coffee leaves functional tea by modifying brewing temperature,” IOP Conf Ser Earth Environ Sci, vol. 475, no. 1, p. 012028, Apr. 2020, doi: 10.1088/1755-1315/475/1/012028.
K. Fibrianto, B. S. Muliadi, C. A. Tedja, A. Hartari, A. M. Legowo, and A. N. Al-Baarri, “Brewing characterization for optimum functional properties of Dampit Robusta (Coffea canephora) and Liberica (Coffea Liberica) coffee leaves tea,” IOP Conf Ser Earth Environ Sci, vol. 515, no. 1, p. 012065, Jun. 2020, doi: 10.1088/1755-1315/515/1/012065.
M. A. Tamayo-Monsalve et al., “Coffee Maturity Classification Using Convolutional Neural Networks and Transfer Learning,” IEEE Access, vol. 10, pp. 42971–42982, 2022, doi: 10.1109/ACCESS.2022.3166515.
B. T. W. Putra, R. Amirudin, and B. Marhaenanto, “The Evaluation of Deep Learning Using Convolutional Neural Network (CNN) Approach for Identifying Arabica and Robusta Coffee Plants,” Journal of Biosystems Engineering, vol. 47, no. 2, pp. 118–129, 2022, doi: 10.1007/s42853-022-00136-y.
T. A. Heryanto and I. G. B. B. Nugraha, “Classification of Coffee Beans Defect Using Mask Region-based Convolutional Neural Network,” in 2022 International Conference on Information Technology Systems and Innovation (ICITSI), 2022, pp. 333–339. doi: 10.1109/ICITSI56531.2022.9970890.
Priyanka and D. Kumar, “Feature Extraction and Selection of kidney Ultrasound Images Using GLCM and PCA,” in Procedia Computer Science, Elsevier B.V., 2020, pp. 1722–1731. doi: 10.1016/j.procs.2020.03.382.
A. Sarkar, Md. Maniruzzaman, Md. S. Ahsan, M. Ahmad, M. I. Kadir, and S. M. Taohidul Islam, “Identification and Classification of Brain Tumor from MRI with Feature Extraction by Support Vector Machine,” in 2020 International Conference for Emerging Technology (INCET), IEEE, Jun. 2020, pp. 1–4. doi: 10.1109/INCET49848.2020.9154157.
Q. A. Putra, C. A. Sari, E. H. Rachmawanto, N. R. D. Cahyo, E. Mulyanto, and M. A. Alkhafaji, “White Bread Mold Detection using K-Means Clustering Based on Grey Level Co-Occurrence Matrix and Region of Interest,” in 2023 International Seminar on Application for Technology of Information and Communication (iSemantic), 2023, pp. 376–381. doi: 10.1109/iSemantic59612.2023.10295369.
S. Luong, “Video Sign Language Recognition using Pose Extraction and Deep Learning Models,” San Jose State University, San Jose, CA, USA, 2023. doi: 10.31979/etd.jm4c-myd4.
D. Fajri Riesaputri, C. Atika Sari, D. R. Ignatius Moses Setiadi, and E. Hari Rachmawanto, “Classification of Breast Cancer using PNN Classifier based on GLCM Feature Extraction and GMM Segmentation,” in Proceedings - 2020 International Seminar on Application for Technology of Information and Communication: IT Challenges for Sustainability, Scalability, and Security in the Age of Digital Disruption, iSemantic 2020, Institute of Electrical and Electronics Engineers Inc., Sep. 2020, pp. 83–87. doi: 10.1109/iSemantic50169.2020.9234207.
N. R. D. Cahyo, C. A. Sari, E. H. Rachmawanto, C. Jatmoko, R. R. A. Al-Jawry, and M. A. Alkhafaji, “A Comparison of Multi Class Support Vector Machine vs Deep Convolutional Neural Network for Brain Tumor Classification,” in 2023 International Seminar on Application for Technology of Information and Communication (iSemantic), IEEE, Sep. 2023, pp. 358–363. doi: 10.1109/iSemantic59612.2023.10295336.
E. H. Rachmawanto and P. N. Andono, “Deteksi Karakter Hiragana Menggunakan Metode Convolutional Neural Network,” Jurnal Nasional Pendidikan Teknik Informatika (JANAPATI), vol. 11, no. 3, pp. 183–191, Dec. 2022, doi: 10.23887/janapati.v11i3.50144.
E. H. Rachmawanto, C. A. Sari, and F. O. Isinkaye, “A good result of brain tumor classification based on simple convolutional neural network architecture,” Telkomnika (Telecommunication Computing Electronics and Control), vol. 22, no. 3, pp. 711–719, Jun. 2024, doi: 10.12928/TELKOMNIKA.v22i3.25863.
I. P. Kamila, C. A. Sari, E. H. Rachmawanto, and N. R. D. Cahyo, “A Good Evaluation Based on Confusion Matrix for Lung Diseases Classification using Convolutional Neural Networks,” Advance Sustainable Science, Engineering and Technology, vol. 6, no. 1, p. 0240102, Dec. 2023, doi: 10.26877/asset.v6i1.17330.
M. M. I. Al-Ghiffary, C. A. Sari, E. H. Rachmawanto, N. M. Yacoob, N. R. D. Cahyo, and R. R. Ali, “Milkfish Freshness Classification Using Convolutional Neural Networks Based on Resnet50 Architecture,” Advance Sustainable Science Engineering and Technology, vol. 5, no. 3, p. 0230304, Oct. 2023, doi: 10.26877/asset.v5i3.17017.
Copyright (c) 2025 Bagus Raffi Santoso, Christy Atika Sari, Eko Hari Rachmawanto
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).