A research team focused on potential real-world AI solutions for agricultural producers says it has created a highly accurate computational model for identifying defects in green coffees.
The group of scientists from Bangladesh and Japan compared multiple versions of customized YOLO (You Only Look Once) models. YOLO is a type of deep learning algorithm for real-time object detection that is already in use in applications such as medical imaging, security cameras and self-driving cars.
The research team said employing YOLO modeling in green coffee production might ultimately benefit green coffee producers and other industry actors who have relied on hand sorting for various quality control tasks.
“Detecting defective beans is vital for improving coffee production processes,” the researchers wrote, adding, “especially in developing countries like Bangladesh, where it could significantly boost the economy and improve the livelihoods of farmers.”
As of this writing, there was at least one machine already in use in the coffee industry employing AI algorithms for real-time defect detection, the Avercasso CS1 from Taiwan. Its algorithms and hardware remain proprietary.
For the new open-access study, the researchers collected more than 5,000 high-resolution images of green coffee beans, while identifying for defects listed as: black beans, broken beans, faded beans and sour beans.
Those images were used to train six different YOLO models, each of which was then tested for accuracy.
One custom-modified model, called YOLOv8n, stood above the rest of the field in terms of defect identification accuracy. The model also bested other models in minimizing false positives and negatives.
“The proposed custom-YOLOv8n model exhibited superior performance across all key metrics when compared to previous versions, suggesting its strong potential for practical applications in coffee bean defect detection,” the study states.
However, the researchers also noted several practical limitations, including significant computational resources required to refine the model and an extensive training process.
Additionally, the study focused on coffees from a single source in Bangladesh, meaning the efficacy of the models may not necessarily translate when applied to different types of coffees from different countries or regions.
“Expanding the dataset to include beans from diverse origins and defect types could improve the model’s generalizability,” the researchers wrote. “Future research could also integrate IoT (Internet of Things) devices for real-time monitoring and explore applications beyond coffee, such as detecting defects in other agricultural products.”
The full study, called “Comparative analysis of YOLO models for green coffee bean detection and defect classification,” was published in the Nature journal Scientific Reports.
Comments? Questions? News to share? Contact DCN’s editors here.