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.
Copyrights © 2026