Comparative Performance Analysis of Modified VGG16 and Slim-CNN for Arabica Coffee Bean Defect Classification


Yusriel Ardian(1*); I Nyoman gede Arya Astawa(2); Novta Danyel Irawan(3); I Putu Bagus Arya Pradnyana(4); Agung Sulistyo(5);

(1) Politeknik Unisma Malang
(2) Politeknik Negeri Bali
(3) Politeknik Unisma Malang
(4) Politeknik Negeri Bali
(5) Politeknik Unisma Malang
(*) Corresponding Author

  

Abstract


Defect detection in Arabica coffee beans is a critical aspect of quality control, particularly for export-oriented commodities that require consistent visual standards and uniform quality across production batches. Black and partial-black defects are known to significantly affect market value, quality perception, and sensory characteristics. Meanwhile, manual inspection processes remain vulnerable to evaluator subjectivity and inter-operator inconsistency.This study aims to conduct a comparative analysis between a Modified VGG16 architecture and Slim-CNN for detecting these two defect categories using a deep learning-based Convolutional Neural Network (CNN) approach. The dataset consists of 4,080 high-resolution images of Arabica green coffee beans captured using a 24.2 MP macro camera under controlled lighting conditions to minimize shadows and visual distortion. To preserve the natural characteristics of the defects, minimal data augmentation was applied using cropping and 15-degree rotation techniques. The Modified VGG16 architecture was simplified by reducing the complexity of the fully connected layers, integrating batch normalization, and applying dropout to enhance training stability and computational efficiency. Slim-CNN was employed as a lightweight comparative model with fewer parameters and lower memory requirements, making it suitable for resource-constrained deployment scenarios. Four training schemes were evaluated using variations in learning rate and epoch number to assess configuration impacts on performance. Experimental results show that Modified VGG16 achieved the highest test accuracy of 86.7% at a learning rate of 0.001 with 3 epochs, demonstrating a strong balance between training and validation accuracy. Slim-CNN exhibited shorter training time and lower computational complexity, although with slightly lower classification accuracy compared to Modified VGG16. These findings highlight a trade-off between classification performance and computational efficiency in selecting CNN architectures for coffee bean defect detection. Although the results demonstrate potential for industrial automatic classification systems, further validation using larger datasets and more comprehensive evaluation schemes is required to improve model generalization. This study contributes to the development of a more measurable, adaptive, and efficient deep learning-based coffee quality inspection system to support agro-export industry requirements.


Keywords


Arabica Coffee Beans; Defect Detection; Modified VGG16; Slim-CNN; Image Classification

  
  

Full Text:

PDF
  

Article Metrics

Abstract view: 113 times
PDF view: 62 times
     

Digital Object Identifier

doi  https://doi.org/10.33096/ilkom.v18i1.3244.85-96
  

Cite

References


C. N. Cain et al., “Investigating sensory-classified roasted arabica coffee with GC × GC-TOFMS and chemometrics to understand potato taste defect,” Microchem. J., 2023, doi: 10.1016/j.microc.2023.109578.

P. Wang, H.-W. Tseng, T.-C. Chen, and C.-H. Hsia, “Deep Convolutional Neural Network for Coffee Bean Inspection,” Sensors Mater., 2021, doi: 10.18494/sam.2021.3277.

R. Rusinek et al., “How to Identify Roast Defects in Coffee Beans Based on the Volatile Compound Profile,” Molecules, vol. 27, 2022, doi: 10.3390/molecules27238530.

S. Chang and C. Huang, “Deep Learning Model for the Inspection of Coffee Bean Defects,” Appl. Sci., vol. 11, no. 17, p. 8226, 2021, doi: 10.3390/app11178226.

M. Jumarlis, M. Mirfan, and A. R. Manga, “Classification of Coffee Bean Defects Using Gray-Level Co-Occurrence Matrix and K-Nearest Neighbor,” Ilk. J. Ilm., vol. 14, no. 1, pp. 1–9, Apr. 2022, doi: 10.33096/ilkom.v14i1.910.1-9.

Y. Ardian, N. D. Irawan, S. Sutoko, I. N. G. A. Astawa, I. B. I. Purnama, and F. A. Dwiyanto, “A Novel Approach to Defect Detection in Arabica Coffee Beans Using Deep Learning: Investigating Data Augmentation and Model Optimization,” Knowl. Eng. Data Sci., vol. 7, no. 1, p. 117, Nov. 2024, doi: 10.17977/um018v7i12024p117-127.

A. J, J. R, D. Popescu, M. Chowdary, and J. D., “Deep Learning-Based Leaf Disease Detection in Crops Using Images for Agricultural Applications,” Agronomy, 2022, doi: 10.3390/agronomy12102395.

B. Baiju et al., “Robust CRW crops leaf disease detection and classification in agriculture using hybrid deep learning models,” Plant Methods, vol. 21, 2025, doi: 10.1186/s13007-025-01332-5.

A. Ashurov et al., “Enhancing plant disease detection through deep learning: a Depthwise CNN with squeeze and excitation integration and residual skip connections,” Front. Plant Sci., vol. 15, 2025, doi: 10.3389/fpls.2024.1505857.

W. B. Demilie, “Plant disease detection and classification techniques: a comparative study of the performances,” J. Big Data, vol. 11, pp. 1–43, 2024, doi: 10.1186/s40537-023-00863-9.

R. Klangbunrueang, P. Pookduang, W. Chansanam, and T. Lunrasri, “AI-Powered Lung Cancer Detection: Assessing VGG16 and CNN Architectures for CT Scan Image Classification,” Informatics, vol. 12, p. 18, 2025, doi: 10.3390/informatics12010018.

N. Zhou, “Image recognition in depth: comparative study of CNN and Pre-trained VGG16 architecture for classification tasks,” vol. 13075, pp. 130751Y-130751Y–7, 2024, doi: 10.1117/12.3026829.

N. Zakaria and Y. M. M. Hassim, “A Review Study oftheVisual Geometry Group Approachesfor Image Classification,” J. Appl. Sci. Technol. Comput., 2024, doi: 10.30880/jastec.2024.01.01.003.

I. N. G. A. Astawa, M. L. Radhitya, I. W. R. Ardana, and F. A. Dwiyanto, “Face Images Classification using VGG-CNN,” Knowl. Eng. Data Sci., vol. 4, no. 1, p. 49, 2021, doi: 10.17977/um018v4i12021p49-54.

I. N. G. A. Astawa and Y. Ardian, “Sistem Deteksi Cacat Biji Kopi Arabika Berbasis Deep Learning CNN VGG-16 dengan Dataset Augmentasi.” 2025.

S. Cong and Y. Zhou, “A review of convolutional neural network architectures and their optimizations,” Artif. Intell. Rev., vol. 56, pp. 1905–1969, 2022, doi: 10.1007/s10462-022-10213-5.

M. A. Widneh, A. A. Alemu, and D. D. Getie, “Exploring Batch Normalization’s Impact on Dense Layers of Multiclass and Multilabel Classifiers,” Int. J. Intell. Syst., vol. 2025, 2025, doi: 10.1155/int/1466655.

P. Peyal and Others, “CNN and SVM Hybrid Model for Corn Leaf Disease Detection,” Comput. Agric., 2024, doi: 10.1016/j.compag.2024.108755.

Y. Chou et al., “Deep Learning Model for Defective Bean Inspection with GAN‐Structured Automated Labeled Data Augmentation in Coffee Industry,” Appl. Sci., vol. 9, no. 19, p. 4166, 2019, doi: 10.3390/app9194166.

S. Arwatchananukul, D. Xu, P. Charoenkwan, S. A. Moon, and R. Saengrayap, “Implementing a Deep Learning Model for Defect Classification in Thai Arabica Green Coffee Beans,” Smart Agric. Technol., vol. 9, p. 100680, 2024, doi: 10.1016/j.atech.2024.100680.

J. J. Bird, C. Barnes, L. J. Manso, A. Ek’art, and D. Faria, “Fruit Quality and Defect Image Classification with Conditional GAN Data Augmentation,” ArXiv, vol. abs/2104.05647, 2021, doi: 10.1016/j.scienta.2021.110684.

A. Nasiri, A. Taheri-Garavand, D. Fanourakis, Y. Zhang, and N. Nikoloudakis, “Automated Grapevine Cultivar Identification via Leaf Imaging and Deep Convolutional Neural Networks: A Proof-of-Concept Study Employing Primary Iranian Varieties,” Plants, vol. 10, 2021, doi: 10.3390/plants10081628.

N. Zakaria and Y. M. M. Hassim, “Improved Image Classification Task Using Enhanced Visual Geometry Group of Convolution Neural Networks,” JOIV Int. J. Informatics Vis., 2023, doi: 10.30630/joiv.7.4.1752.

S. Kazi, B. Palkar, and D. Mishra, “VCNet: Optimized Deep Learning framework with deep feature extraction and genetic algorithm for multiclass rice crop disease detection,” MethodsX, vol. 15, 2025, doi: 10.1016/j.mex.2025.103551.

D. Zhang et al., “An efficient lightweight convolutional neural network for industrial surface defect detection,” Artif. Intell. Rev., vol. 56, pp. 10651–10677, 2023, doi: 10.1007/s10462-023-10438-y.

H. Ma, T. Çelik, and H. Li, “Lightweight attention convolutional neural network through network slimming for robust facial expression recognition,” Signal, Image Video Process., vol. 15, pp. 1507–1515, 2021, doi: 10.1007/s11760-021-01883-9.

K. Muchtar et al., “Edge AI-Based Detection for Defective Coffee Beans Using Deep Learning and Streamlit Framework,” IEEE Access, vol. 13, pp. 67977–67992, 2025, doi: 10.1109/access.2025.3561189.

H. L. Gope, H. Fukai, F. M. Ruhad, and S. Barman, “Comparative analysis of YOLO models for green coffee bean detection and defect classification,” Sci. Rep., vol. 14, 2024, doi: 10.1038/s41598-024-78598-7.

T. Thongnop, T. Perpaman, P. Kansiri, W. Nuchda, and S. Peungsungwan, “Quality Sorting of Green Coffee Beans from Wet Processing by Using The Principle of Machine Learning,” ASEAN J. Sci. Eng., 2021, doi: 10.17509/ajse.v1i2.41078.

G. Susanibar, J. Ramírez, J. Sánchez, R. Ramirez, and D. Arroyo, “Development of an Automated Machine for Green Coffee Beans Classification by Size and Defects,” J. Adv. Agric. Technol., 2021, doi: 10.18178/joaat.8.1.17-24.

S.-Y. Chen, M.-F. Chiu, and X.-W. Zou, “Real-time defect inspection of green coffee beans using NIR snapshot hyperspectral imaging,” Comput. Electron. Agric., vol. 197, p. 106970, Jun. 2022, doi: 10.1016/j.compag.2022.106970.

A. J. N. Lualhati, J. B. Mariano, A. E. L. Torres, and S. D. Fenol, “Development and Testing of Green Coffee Bean Quality Sorter using Image Processing and Artificial Neural Network,” Mindanao J. Sci. Technol., 2022, doi: 10.61310/mndjsteect.1048.22.

H. Thai, H. Ko, and J. Huh, “Coffee Bean Defects Automatic Classification Realtime Application Adopting Deep Learning,” IEEE Access, 2024.

R. A. Lashaki, Z. Raeisi, N. Razavi, M. Goodarzi, and H. Najafzadeh, “Optimized classification of dental implants using convolutional neural networks and pre-trained models with preprocessed data,” BMC Oral Health, vol. 25, 2025, doi: 10.1186/s12903-025-05704-0.

K. Alomar, H. I. Aysel, and X. Cai, “Data Augmentation in Classification and Segmentation: A Survey and New Strategies,” J. Imaging, vol. 9, 2023, doi: 10.3390/jimaging9020046.

J. Zhang, G. Cosma, and J. Watkins, “Image Enhanced Mask R-CNN: A Deep Learning Pipeline with New Evaluation Measures for Wind Turbine Blade Defect Detection and Classification,” J. Imaging, vol. 7, 2021, doi: 10.3390/jimaging7030046.

T. Nguyen and others, “Real-Time Coffee Bean Defect Detection Using YOLOv4,” J. Imaging Sci. Technol., vol. 67, no. 2, p. 20501, 2023, doi: 10.2352/J.ImagingSci.Technol.2023.67.2.020501.

A. Baiganova, Z. Ubayeva, Z. Taskalyeva, L. Kaparova, R. Nurzhaubaeva, and B. Umirzakova, “Automated Defect Detection in Manufacturing Using Enhanced VGG16 Convolutional Neural Networks,” Int. J. Adv. Comput. Sci. Appl., 2025, doi: 10.14569/ijacsa.2025.0160487.

R. V Murthy, V. P. N., P. Nidoni, N. M., and K. Kumar, “Green Coffee Beans Defects Detection Using Convolution Neural Networks,” in International Advanced Research Journal in Science, Engineering and Technology (IARJSET), 2022, pp. 138–143. doi: 10.17148/IARJSET.2022.9725.

V. Mulik and V. Patil, “Smart Agriculture: A CNN-Based Approach for Crop Disease Classification and Detection,” 2025 12th Int. Conf. Comput. Sustain. Glob. Dev., pp. 1–7, 2025, doi: 10.23919/indiacom66777.2025.11115495.

R. Rani, S. Bharany, D. H. Elkamchouchi, A. U. Rehman, R. Singh, and S. Hussen, “VGG‐EffAttnNet: Hybrid Deep Learning Model for Automated Chili Plant Disease Classification Using VGG16 and EfficientNetB0 With Attention Mechanism,” Food Sci. Nutr., vol. 13, 2025, doi: 10.1002/fsn3.70653.

R. H. Prince et al., “CSXAI: a lightweight 2D CNN-SVM model for detection and classification of various crop diseases with explainable AI visualization,” Front. Plant Sci., vol. 15, 2024, doi: 10.3389/fpls.2024.1412988.


Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 Yusriel Ardian, I Nyoman Gede Arya Astawa, Novta Danyel Irawan, I Putu Bagus Arya Pradnyana, Agung Sulistyo

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