Quality assessment of coffee beans through computer vision and machine learning algorithms - Santos, Fernando; Rosas, Jorge; Martins, Rodrigo; Araújo, Guilherme; Viana, Lucas; Gonçalves, Juliano (Coffee Science - ISSN 1984-3909, 2020)
The increasing market interest in coffee beverage, lead coffee growers around the world to adopt more efficient methods to select the best-quality coffee beans. Currently, coffee beans selection is carried out either manually, which is a costly and unreliable process, or using electronic sorting machines, which are often inefficient because some coffee beans defects, such as sour and immature beans, have similar spectral response patterns. In this sense, the present work aimed to assess coffee beans quality using both computer vision and machine learning techniques, such as Support Vector Machine (SVM), Deep Neural Network (DNN) and Random Forest (RF). For this purpose, an algorithm written in Python language was developed to extract shape and color features from coffee beans images. The obtained dataset was then used as input to the machine learning algorithms. The data reported in this study pointed to the importance of color descriptors for classifying coffee beans defects. Among the variables used, the components from RGB (Red, Green and Blue) and HSV (Hue, Saturation and Value) color spaces presented the most relevant contribution for the classification models. Also, the results reported in this study provides evidence that computer vision along with machine learning algorithms can be used to identify and classify coffee beans with a very high accuracy (> 90%). Key words: Deep neural network; classification; artificial intelligence; image processing; granulometry.