Visual Segmentation and Classification of Coffee Beans After Roasting - Firdaus Alamanda; Rudy Susanto; Wiji Lestari (Politeknik Negeri Batam, 2025)
This research aims to develop an image-based system for segmenting and classifying coffee beans after roasting using deep learning. A U-Net architecture was applied to isolate coffee beans from the background with high spatial accuracy, achieving a mean Intersection over Union (IoU) of 0.8833 and Dice Coefficient of 0.9375. The segmented images were then classified into six roasting levels green, light, light to medium, medium, medium to dark, and dark using a modified ResNet-50 model, which reached an overall classification accuracy of 86%. The system demonstrates strong performance for clear categories but shows overlapping predictions for visually similar classes such as “medium” and its neighboring levels, indicating that boundaries between roasting stages can be ambiguous. This study provides an objective and automated alternative for roast quality inspection, reducing reliance on subjective human assessment. However, to meet industrial standards, further improvements are needed, such as integrating additional image features or ensemble models to increase discrimination power. This two-stage system serves as a promising foundation for future developments in automated coffee quality control.