Resumo:
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 analyze the importance of shape and color features for different machine learning techniques, such as Support Vector Machine (SVM), Deep Neural Network (DNN) and Random Forest (RF), to assess coffee beans’ defects. For this purpose, an algorithm written in Python language was used to extract shape and color features from coffee beans images. The dataset obtained was then used as input to the machine learning algorithms, developed using Python and R programing languages. The data reported in this study pointed to the importance of color descriptors for classifying coffee beans defects. Among the variables used, the components Gmean from RGB (Red, Green and Blue) color space and Vmean from HSV (Hue, Saturation and Value) color space were some of the most relevant features for the classification models. The results reported in this study indicate that all the classifier models presented similar performance. In addition, computer vision along with machine learning algorithms can be used to classify coffee beans with a very high accuracy (> 88%).