Hybrid CNN-Based Classification of Coffee Bean Roasting Levels Using RGB and GLCM Features - Halim, Rico; Riftiarrasyid, Mohammad Faisal (Engineering, MAthematics and Computer Science Journal (EMACS), 2025)
This study aims to develop a hybrid Convolutional Neural Network (CNN) model for classifying the roasting levels of Coffea arabica beans by integrating RGB color and GLCM texture features. A total of 1,600 high-resolution images were used, consisting of 1,200 training images and 400 testing images, evenly distributed across four roasting levels: Green, Light, Medium, and Dark. Local feature extraction was performed using a sliding window approach to capture fine-grained color and texture information from each image. Three model types were evaluated: a CNN with RGB-only input, a CNN with GLCM-only input, and a hybrid CNN with dual inputs. The hybrid model consistently demonstrated superior performance, achieving a validation accuracy of 99.74%, with minimal misclassification and stable convergence throughout training. Furthermore, six architectural variations of the hybrid model were tested by applying dropout and L2 regularization techniques. The model combining both dropout and L2 regularization achieved the most balanced results in terms of accuracy, generalization, and training stability. This research contributes an effective feature fusion strategy for fine-grained visual classification tasks, particularly in domains where inter-class visual differences are subtle. The proposed approach offers a cost-effective and scalable solution that is well-suited for real-time implementation in small to medium-sized coffee production facilities, and it shows strong potential for broader applications in agricultural product quality assessment.