Leveraging deep learning for coffee bean grading: A comparative analysis of convolutional neural network models

Chris Chan Enriquez; Jinky Marcelo; Donah Rae Verula; Nathalie Joy Casildo.

Transactions on Science and Technology, 11(1), 1 - 6.

Back to main issue

ABSTRACT
Accurate and efficient coffee bean grading is crucial for ensuring consistency, quality control, and standardization in the coffee industry. However, traditional manual methods are time-consuming, subjective, and costly. Deep learning approaches, particularly convolutional neural networks (CNNs), have shown remarkable performance in image classification tasks, offering a promising solution for automated coffee bean grading. However, these models encounter significant challenges due to the inherent characteristics of coffee beans, including their small size, limited visual features, and lack of texture. This study aims to address this challenge by comparatively analyzing various CNN models to identify the most effective architecture for automatic coffee bean grading. Specifically, we evaluate the performance of ten models: DenseNet, MobileNet, Inception, InceptionResNet, ResNet50, ResNet101, ResNet152, VGG16, VGG19, and Xception. Our experimental results demonstrate that DenseNet achieves the highest accuracy of 0.989, followed by MobileNet and ResNet152 with 0.982 and 0.980 accuracy, respectively. DenseNet has the highest precision and F1 score among all the models, with a precision of 0.996 and an F1 score of 0.992. VGG19 has the lowest accuracy of 0.902 and the lowest F1 score of 0.899. Overall, our analysis reveals that DenseNet, MobileNet and ResNet152 outperform other models for coffee bean grading accuracy. The findings of this study can contribute to the development of more accurate and efficient coffee bean grading systems that can benefit the coffee industry.

KEYWORDS: Coffee grading; Precision agriculture; Coffee beans; Computer vision; Deep learning



Download this PDF file

REFERENCES
  1. Amtate, G. & Teferi, D. 2022. Multiclass classification of Ethiopian coffee bean using deep learning. Ethiopian Journal of Science, 45(3), 309-321.
  2. Chollet, F. 2017. Xception: Deep learning with depthwise separable convolutions. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 21 - 26 July 2017, Honolulu, HI, USA. pp. 1251-1258.
  3. Febriana, A., Muchtar, K., Dawood, R. & Lin, C. Y. 2022. USK-COFFEE Dataset: A Multi-class Green Arabica Coffee Bean Dataset for Deep Learning. 2022 IEEE International Conference on Cybernetics and Computational Intelligence (CyberneticsCom). 16-18 June 2022, Malang, Indonesia. pp. 469-473.
  4. García, M., Candelo-Becerra, J. E. & Hoyos, F. E. 2019. Quality and defect inspection of green coffee beans using a computer vision system. Applied Sciences, 9(19), 4195.
  5. Hakim, M., Djatna, T. & Yuliasih, I. 2020. Deep learning for roasting coffee bean quality assessment using computer vision in mobile environment. 2020 International Conference on Advanced Computer Science and Information Systems (ICACSIS). 17-18 October, 2020, Depok, Indonesia, pp 363-370.
  6. He, K., Zhang, X., Ren, S. & Sun, J. 2016. Deep residual learning for image recognition. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 27-30 June, 2016, Las Vegas, USA. pp 770-778.
  7. Howard, A. G., Zhu, M., Chen, B., Kalenichenko, D., Wang, W., Weyand, T. & Adam, H. 2017. MobileNets: efficient convolutional neural networks for mobile vision applications. ArXiv, abs/1704.04861.
  8. Hsia, C. H., Lee, Y. H. & Lai, C. F. 2021. An explainable and lightweight deep convolutional neural network for quality detection of green coffee beans. Sensors, 21(6), 2046.
  9. Huang, G., Liu, Z., Van Der Maaten, L. & Weinberger, K. Q. 2017. Densely connected convolutional networks. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 21-26 July, 2017, Honolulu, Hawaii, USA. pp 4700-4708.
  10. Janandi, R. & Cenggoro, T. W. 2020. An implementation of convolutional neural network for coffee beans quality classification in a mobile information system. 2020 International Conference on Information Management and Technology (ICIMTech). 13-14 August, 2020, Bandung, Indonesia. pp 218-222.
  11. Kamilaris, A. & Prenafeta-Boldú, F. 2018. A review of the use of convolutional neural networks in agriculture. The Journal of Agricultural Science, 156(3), 312-322.
  12. Krizhevsky, A., Sutskever, I. & Hinton, G. E. 2012. ImageNet classification with deep convolutional neural networks. Advances in neural information processing systems, 25, 1097-1105.
  13. Najafabadi, M. M., Villanustre, F., Khoshgoftaar, T. M., Seliya, N., Wald, R. & Muharemagic, E. 2015. Deep learning applications and challenges in big data analytics. Journal of Big Data, 2, Article number 1.
  14. Rivalto, A., Pranowo, & Santoso, A. J. 2020. Classification of indonesian coffee types with deep learning. AIP Conference Procceedings, 2217(1), 030014.
  15. Samoggia, A. & Riedel, B. 2019. Consumers' Perceptions of Coffee Health Benefits and Motives for Coffee Consumption and Purchasing. Nutrients 18;11(3):653.
  16. Simonyan, K. & Zisserman, A. 2015. Very deep convolutional networks for large-scale image recognition. arXiv, 1409.1556.
  17. Szegedy, C., Ioffe, S., Vanhoucke, V. & Alemi, A. A. 2017. Inception-v4, inception-resnet and the impact of residual connections on learning. AAAI'17: Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence. 4-9 February, 2017, San Francisco, California, USA. pp 4278–4284.
  18. Tamayo-Monsalve, M. A., Mercado-Ruiz, E., Villa-Pulgarin, J. P. & Bravo-Ortiz, M. A. 2022. Coffee Maturity Classification Using Convolutional Neural Networks and Transfer Learning. IEEE Access, 10, 42971-42982.
  19. Unal, Y., Taspinar, Y. S., Cinar, I. & Kursun, R. 2022. Application of pre-trained deep convolutional neural networks for coffee beans species detection. Food Analytical Methods, 15(1), 3232-3243.
  20. Vilcamiza, G., Trelles, N., Vinces, L. & Oliden, J. 2022. A coffee bean classifier system by roast quality using convolutional neural networks and computer vision implemented in an NVIDIA Jetson Nano. Congreso Internacional de Innovación y Tendencias en Ingeniería (CONIITI). 5-7 October, 2022, Bogota, Colombia, pp 1-6.
  21. Wallelign, S., Polceanu, M., Jemal, T. & Buche, C. 2019. Coffee grading with convolutional neural networks using small datasets with high variance. Journal of WSCG, 1-2, 113-120.