A new prototype coffee inspection system combines AI and a simple mechanical idea — flipping coffee beans over — to capture more data to improve defect detection.
The prototype was developed by a research team in Mexico, which found that photographing both sides of the beans improved defect detection by 25.7% compared with photographing only one side. Their findings were published Aug. 21 in the MDPI journal Agriculture.
Addressing Blind Spots
The researchers said the work responds to a common problem in automated green coffee quality control: potential blind spots when only one side of a coffee bean is visible.
The prototype was designed around 350-gram green coffee samples. It used a hopper, dispenser roller and mechanical flipping system to present small groups of beans to two 16-megapixel cameras under controlled LED lighting. The system first photographed one side, then mechanically rotated the coffees 180 degrees, then photographed the opposite side.
The researchers built a 12-class image dataset covering 11 defect categories plus normal green coffee. The defect categories included sour, brocade, peaberry, shell, elephant, frozen, black, ear, broken, dry and triangle.
The authors said the dataset was generated from expertly classified samples and expanded through data augmentation, ultimately producing 9,600 images for model training and evaluation. The researchers then tested the system using four different neural-network models, with one called YOLOv8 performing the best, with 97.4% precision and 99.6% recall.
That falls in line with 2024 research from Bangladesh and Japan that found a customized YOLOv8n model most effective in green coffee defect detection, compared to other YOLO (You Only Look Once) models.
Yet the new study’s most distinctive finding may be tied to old-fashioned mechanics, with a substantial improvement coming from physically flipping the beans.
AI in Green Coffee
In practical terms, the prototype was not presented as a high-volume commercial optical sorter. Processing a standard 350-gram grading sample required approximately 38-40 minutes. The authors also cautioned that the sample used to compare single- and dual-sided inspection was limited and called for testing with larger and more diverse samples.
Yet the project adds more AI-based fuel to a rapidly expanding field of methods and products for green and roasted coffee quality control.
Relatively new companies such as Demetria, Avercasso and ProfilePrint have helped lead a new wave of technical innovation in coffee analysis, sorting and quality assessment at various stages of the supply chain. All of those brands have brought products to market within the past five years.
The authors of the new study are affiliated with Tecnológico Nacional de México/Instituto Tecnológico de Orizaba and the Autonomous University of the State of Mexico. The study was funded through a Tecnológico Nacional de México grant, and the authors declared no conflicts of interest.
Comments? Questions? News to share? Contact DCN’s editors here. For all the latest coffee industry news, subscribe to the DCN newsletter.


Comment