Back in 2023, Ivan Barinskiy, a Computer Science student at the University of York mentioned that he was considering implementing a machine learning model to detect roasted coffee bean defects, and reached out to me to see if I would be willing to contribute to his third year dissertation alongside Nottingham based coffee roaster, Vibe With Coffee.
After talking through the details, I started saving every coffee bean defect that I could get my hands on, focusing specifically on Quakers (Sovda have a great explanation on Quakers here), Under-roasted coffee beans, Burnt coffee beans Insect Damaged coffee beans (such as coffee borer beetle damage) and Mould Damaged coffee beans - basically any defect that can be identified visually.
Lots of coffee beans were sent for evaluation:
- Wush Wush
- Caturra
- SL-28
- Ethiopian Heirloom
- Catuai
- Red Bourbon
- Typica
- Guji & Yirgacheffe Landraces
And included many different processing methods:
- Carbonic Maceration
- Fruit Infused
- Honey
- Natural
- Anaerobic Natural
- Washed
Ivan's implementation method involved training several image classification algorithms to determine which one worked best.
In his own words, Ivan describes them as the following:
Here are the initial results from Ivan's trial:
Which demonstrated that the Pre-trained MobileNet and ResNet 50 were the most effective at detecting defects, with the highest overall accuracy of 95%. After some training renditions, Ivan's machine learning models MobileNet and ResNet 50 models enabled him to produce an incredibly accurate set of results.
The Full publication of Ivan's work can be found here:
Click here for the full publication
Along with the full data set, which can be found here:
Barinskiy, I. (2024). Identifying defects in roasted coffee beans using image classification algorithms [Data set]. https://github.com/dont-text-me/RoastDefectsDataset
You can find the abridged data here:
https://bean-classifier-demo.vercel.app/
And finally, you can find the full open source publication including the relevant download links here: https://github.com/dont-text-me/PRBX-work
Don't forget to check out our current coffee offerings to get your hands on some of the best beans out there (Defect free ;) )
Looking to collaborate with us on a project like this one?
Drop us an enquiry here!