Answers are grounded in this paper and cite their sources.
The quality of coffee beans is a key determinant of a product’s market value and competitiveness in the international market, which is significantly influenced by the presence of physical defects in green coffee beans. To date, the inspection and sorting of defective coffee beans are still largely performed manually, making the process subjective, time-consuming, and prone to inconsistencies due to human visual limitations. This study aims to apply the You Only Look Once version 11 (YOLO11n) model to detect nine classes of coffee bean defects, namely black, broken, foreign, fraghusk, green, husk, immature, infested, and sour. The dataset consists of 1,800 images containing a total of 3,425 object instances, divided into training, validation, and test sets in a 70:20:10 ratio. The model was trained for 50 epochs using the AdamW optimizer, a transfer learning strategy based on pre-trained COCO weights, and a combination of data augmentation techniques to improve model generalization. The training results showed excellent performance, with mAP@50 reaching 0.97–0.98 and mAP@50–95 in the range of 0.70–0.75, with no signs of significant overfitting. Class-wise evaluation revealed the highest accuracy for the “husk,” “foreign,” “black,” and “infested” classes, while the “sour” and “fraghusk” classes showed relatively lower accuracy due to their visual similarity to the “green” and “infested” classes. These results indicate that YOLO11n opens up opportunities for the development of more objective, faster, and more efficient coffee bean quality inspection systems on resource-constrained devices.
No takes yet. Share an insight, caveat, or question.
Jumasa et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: