Defect Detection System in Coffee Beans Using Roboflow-Detection Transformer (RF-DTER) Algorithm
Keywords:
defect detection, RF-DETR algoritma, Computer Vision, quality control , coffee beansAbstract
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.
References
A. Astaraja, B. S. Syamsudin, M. Diaz, and M. Dhafin, “Optimizing coffee ripeness classification using YOLOv5 for automated detection and sorting,” Jurnal Teknik Mesin , Industri, Elektro dan Informatika, vol. 4, 2025. https://doi.org/10.55606/jtmei.v4i1.4821
M. Hoseini, S. Cocco, C. Casucci, V. Cardelli, and G. Corti, “Coffee by-products derived resources. A review,” Biomass and Bioenergy, vol. 148, May 2021 . https://doi.org/10.1016/j.biombioe.2021.106009
B. W. Ligar, “Review identifikasi dan klasifikasikan biji kopi menggunakan Computer Vision,” J. Sist. dan Teknol. Inf., vol. 11, no. 2, p. 243, 2023. https://doi.org/10.26418/justin.v11i2.54925
T. A. Anu, R. Rosnelly, D. Irawan, U. Hasibuan, and P. Bulolo5, “Klasifikasi fitur warna level roasting biji kopi menggunakan Artificial Neural Network,” Device, vol. 13, no. 1, pp. 8–13, 2023. [Online]. Available: https://ojs.unsiq.ac.id/index.php/device/article/view/4094
A. Romadhon, M. G. Setiawati, D. Y. Setyawan, and R. Dwi, “Rancang bangun sistem IoT untuk pemisah biji kopi berdasarkan warna,” Joint, vol. 1 , no. 1, pp. 19–30, 2025. [Online]. Available: https://journal.darmajaya.ac.id/index.php/joint/article/view/483
M. L. Paembonan, “Deteksi warna buah kopi toraja menggunakan digital image processing dan webcam,” Neutrino, vol. 2, no. 2, pp. 1–5, 2019.
J. Liu and X. Wang, “Plant diseases and pests detection based on deep learning : a review,” Plant Methods, pp. 1–19, 2021. https://doi.org/10.1186/s13007-021-00722-9
N. O. Adiwijaya, “Coffee defects detection based on green bean images using YOLO architecture,” 2024 IEEE 2nd Int. Conf. Electr. Eng. Comput. Inf. Technol., pp. 314–319, 2024. https://doi.org/ 10.1109/ICEECIT63698.2024.10859988
D. Diono, M. J. W. Wicaksono, A. Jefiza, and D. R. Prayudha, “Pendeteksian objek hasil pengepresan kaleng dan botol dengan metode You Only Look Once (YOLO) yang diaplikasikan pada mesin sortir pembelajaran PBL,” J. Integr., vol. 16, no. 1, pp. 1–10, 2024. https://doi.org/10.30871/ji.v16i1.4598
J. Zophie and H. H. Triharminto, “Implementasi algoritma You Only Look Once ( YOLO ) menggunakan web camera untuk mendeteksi objek statis dan dinamis", Jurnal TNI Angkatan Udara, , vol. 1, no. 1, pp. 98–109, 2020. https://doi.org/10.62828/jpb.v1i1.50
R. Sapkota, R. H. Cheppally, A. Sharda, and M. Karkee, “RF-DETR object detection vs YOLOv12 : A study of transformer-based and CNN-based architectures for single-class and multi-class greenfruit detection in complex orchard environments under label ambiguity,” Comput. Vis. Pattern Recognition-Cornell Univ., 2025. [Online]. Available: https://arxiv.org/abs/2504.13099
A. Kusnandar and A. Ardianto, “NOR Coffee Roaster penjual mesin sortir kopi indonesia.” PT.NOR Coffee Indonesia, Jember, p. 1, 2025. [Online]. Available: https://norcofeeroaster.com/hubungi-kami/
M. Masmoudi, H. Ghazzai, M. Frikha, and Y. Massoud, “Object detection learning techniques for autonomous vehicle applications,” 2019 IEEE Int. Conf. Veh. Electron. Saf., pp. 1–5, 2019. https://doi.org/10.1109/ICVES.2019.8906437
M. Hnewa and H. Radha, “Object detection under rainy conditions for autonomous vehicles : A review of State-of-the-Art and emerging techniques,” IEEE Signal Process. Mag., vol. 38, no. 1, pp. 1–13, 2021. https://doi.org/10.1109/MSP.2020.2984801
R. Elakkiya, V. Subramaniyaswamy, V. Vijayakumar, and A. Mahanti, “Cervical cancer diagnostics healthcare adversarial networks,” IEEE J. Biomed. Heal. Informatics, vol. 26, no. 4, pp. 1464–1471, 2022. https://doi.org/10.1109/JBHI.2021.3094311
Y. Zhang, “A cost-effective method for detecting and tracking moving objects using overlapping methods,” Int. J. Adv. Comput. Sci. Appl., vol. 14, no. 10, pp. 710–723, 2023. https://doi.org/10.14569/IJACSA.2023.0141076
L. Yang, T. Noguchi, and Y. Hoshino, “Development of a pumpkin fruits pick-and-place robot using an RGB-D camera and a YOLO based object detection AI model,” Comput. Electron. Agric., vol. 227, no. P2, p. 109625, 2024. https://doi.org/10.1016/j.compag.2024.109625
X. Song, L. Yan, S. Liu, T. Gao, L. Han, X. Jiang, H. Jin, Y. Zhu, "Agricultural image processing : challenges , advances , and future trends", Applied Sciences, vol. 15 no. 16, August 2025. https://doi.org/10.3390/app15169206
I. Sa, Z. Ge, F. Dayoub, B. Upcroft, T. Perez, and C. Mccool, “DeepFruits : A fruit detection system using Deep Neural Networks,” 2016. https://doi.org/10.3390/s16081222
C. M. Badgujar, A. Poulose, and H. Gan, “Agricultural object detection with You Only Look Once ( YOLO ) algorithm : A bibliometric and systematic literature review,” Comput. Electron. Agric., vol. 223, no. January, p. 109090, 2024. https://doi.org/10.1016/j.compag.2024.109090
P. S. Karthikesh, B. Jahnavi, M. Navyalokesh, C. Raja, and K. L. Krishna, “Implementation of enhanced security system using Roboflow,” 2024 11th Int. Conf. Reliab. Infocom Technol. Optim. (Trends Futur. Dir., pp. 1–5, 2024. https://doi.org/10.1109/ICRITO61523.2024.10522313
S. G. E. Brucal, L. C. M. De Jesus, S. R. P. Jr, L. A. S. Jr, and E. D. Yong, “Development of tomato leaf disease detection using YOLOv8 Model via RoboFlow 2 . 0,” 2023 IEEE 12th Glob. Conf. Consum. Electron., pp. 692–694, 2023. https://doi.org/10.1109/GCCE59613.2023.10315251
J. M. H. Villarroel and L. C. M. De Jesus, “Development of a multi-class dress code detection system utilizing RoboFlow object detection model v3,” 2025 Int. Conf. Artif. Intell. Inf. Commun., pp. 863–865, 2025. https://doi.org/10.1109/ICAIIC64266.2025.10920735
A. Varier, N. Malik, and M. Khanna, “Real-Time aerial object detection for collision prevention using Roboflow image detection,” 2025 Third Int. Conf. Networks, Multimed. Inf. Technol., pp. 1–5, 2025. https://doi.org/ 10.1109/NMITCON65824.2025.11188138
A. N. Firdaus, “Comparison performance on SOTA Deep Learning Models for coffee beans grading inspection,” 2024 14th Asian Control Conf., pp. 100–105, 2024. [Online]. Available : https://ieeexplore.ieee.org/document/10665409
Published
How to Cite
Issue
Section
Copyright (c) 2026 Sabar Sabar, Nazuwatussya’diyah Nazuwatussya’diyah, Kisna Pertiwi, Muhamad Fathurahman

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
An author who publishes in the Jurnal Otomasi Kontrol dan Instrumentasi agrees to the following terms:
- The author retains the copyright and grants the journal the right of first publication of the work simultaneously licensed under the Creative Commons Attribution-ShareAlike 4.0 License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal
- Author can enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book) with the acknowledgement of its initial publication in this journal.









