Coffee bean quality control is a critical stage in processing industries to meet export and consumption standards. Traditional visual manual inspection often results in inconsistency, subjectivity, and reduced production throughput. This research implements the Roboflow Detection Transformer (RF-DETR), an end-to-end transformer-based object detection architecture, to identify subtle and complex coffee bean defects. The study uses image processing and machine learning with a labeled dataset of 2,010 coffee bean images classified into five defect categories: brown, black, unripe, broken black, and partially black. The data are split into 75% training, 17% validation, and 8% testing. Performance evaluation shows RF-DETR detects and classifies all defect types effectively, achieving a mean Average Precision (mAP) of 97,6%, with 95,7% precision, 91,0% recall, and an F1 score of 93,29%. These results indicate that RF-DETR balances accurate spatial localization with reliable class prediction, minimizes false positives, and maintains strong detection sensitivity. Therefore, RF-DETR provides a solid technological basis for high-precision, real-time automated coffee bean sorting in industrial settings. For deployment, it can be integrated with production cameras and conveyor sorting actuators to deliver fast, consistent decisions. Future work may optimize augmentation, lighting calibration, and edge computing deployment to improve robustness across varied production lines in practice.
Copyrights © 2026