Artificial intelligence system analyses coffee quality in minutes
Artificial intelligence system analyses coffee quality in minutes
The Brazilian coffee supply chain should incorporate, in the next years, an intelligent and unprecedented system to streamline and improve the certification process of the beverage. This new technology uses advanced computer techniques to analyze and classify overall coffee quality automatically and in minutes. This analysis is carried out without the need to prepare the coffee beverage, since the adopted technology examines images of ground coffee. Currently, the most reliable quality assessment is the sensorial analysis, in which human tasters taste the beverage.
Named CoffeeClass, the technology was developed by researchers from Embrapa Instrumentation, located in the state of São Paulo, and uses computer vision and artificial intelligence (AI) to check the overall quality of roasted and ground coffee. The development and application of the system can contribute to the execution of the public policies and standards created for the sector, besides approximating the consumer to quality-certification systems. Coffee moves one of the main chains of Brazilian agribusiness, which generates an annual revenue of approximately US$ 5 billion for the country.
This technological solution interprets patterns observed in enlarged images of roasted and ground coffee, correlating them with their overall quality identified in the beverage. For this, it employs reflectance and fluorescence imaging techniques, in which differentiated lights are applied to the sample of roasted and ground coffee in order to evidence compounds related to the quality of the beverage.
In the future, consumers will be able to use the technology at grocery stores
The AI built into the system learns to “look” at the sample, extract patterns, and predict the overall quality class of the coffee under analysis. AI is a research area that unites several disciplines and aims to develop computational methods capable of mimicking human cognitive abilities, such as learning, logic, and process optimization.
For now, this smart tool is only a prototype, but it already has great potential to cause innovations in the coffee value chain. It is believed that, in the future, the system could be used by producers in the field and even by consumers at grocery stores.
CoffeeClass will be presented at International Coffee Week, which will happen from November 7 to 9, when Embrapa Instrumentation will sign a technical cooperation agreement with Associação Brasileira da Indústria do Café (ABIC), aiming improvements in the functionality and performance of the system. The signing will take place on the 8th of the month, at the Expominas trade fair center, the venue of the event, in Belo Horizonte, in the state of Minas Gerais.
Smart computing to understand coffee
The research with CoffeeClass began in 2013 and was developed by the analyst Ednaldo José Ferreira from Embrapa. The work was carried out within the scope of the research consortium, Consórcio Pesquisa Café, created in 1997 and that involves about 50 education, research, and rural extension institutions, under the coordination of Embrapa Coffee. According to Ferreira, the research was born out of a shortage of the chain that required an automated tool for coffee analysis.
The proposal was to develop an automated tool to assist coffee tasters – experts in the sensorial analysis – and, this way, to consolidate a technology specifically for certification based on the overall quality (OQ) parameters adopted by the program for coffee quality assessment, Programa de Qualidade do Café (PQC), of ABIC. The proof of concept and the prototype were initially based on the classification used by this program, but, according to Ferreira, the technology can be adapted to other coffee quality indicators.
OQ is the joint perception of characteristics, such as aroma, flavor, body, acidity, astringency, bitterness, fragrance, among others, that contribute to the composition of an overall score in a sensorial scale – of 0 to 10 for PQC of ABIC – used as an indicator of product quality. It is carried out by a team of trained experts, who use the standardized preparation of a coffee beverage as the basis of the analysis protocol, a process popularly known as the “cup test”.
PQC, launched in 2004, uses the OQ score to certify the product in three categories: “Gourmet”, for very high quality coffee; “Superior”, for relatively high quality coffee; and “Traditional/Extra strong”, for coffee with recommended quality and an affordable price.
An easy-to-use technology
A doctor of Computer Sciences and Computational Mathematics, Ferreira explains that several tools were tested before the development of CoffeeClass. “The focus of the research was always to create a simple and low-cost apparatus, which could be operated without difficulties, with simple commands, by all actors of the coffee chain, at the farm, before leaving the field, at laboratories, cooperatives, roasters, grocery stores, coffee shops, among others”, he says.
Ferreira resorted to Data Science to carry out the pilot study using 120 samples of roasted and ground coffee, already certified by PQC, from several regions of the country, which allowed creating a bank with more than 2,400 digital images. “We identified its potential and developed a module called smart core, based on a group of artificial intelligence methods and techniques, whose objective is to automatically improve the performance of the analysis”, he explains.
In laboratory tests, the technology identified the coffee categories Gourmet, Superior, Traditional, and not recommended with an accuracy slightly over 75% for blind samples.
The study employed low-cost commercial digital microscopes that use different LEDs as a light source for the analyzed samples of approximately one gram each, besides a sample holder and a software both developed by Embrapa Instrumentation.
Ferreira explains that the interaction between the distinct lights and the coffee sample produces patterns in the images enlarged by the digital microscope, which allows characterizing coffee. The lights at different wavelengths allow detecting coffee composition, as well as mixtures with low-quality grains (defects and others), which interfere with its overall quality.
“The variations in color observed in the enlarged digital imagens, obtained directly from a sample of roasted and ground coffee, reveal characteristics closely related to the overall quality of the product”, he clarifies.
The tool has shown significant potential in laboratory analyses; however, the leader of the project believes that it is possible to advance further and develop other indicators to increment CoffeeClass.
“The challenge now is to understand the characteristics revealed by the smart system and to extend the horizon for the application of the technology”, states Ferreira. For this new stage of the research, he says he prepared and submitted a new project to the program Consórcio Pesquisa Café, with which he intends to further develop the study.
In the next stage, the study will unite different expertise from universities, research institutions, and governmental organizations, such as Ministério da Agricultura, Pecuária e Abastecimento (Mapa) and its official laboratories (Lanagros), besides other entities of historical and renowned excellence as actors in the coffee chain.
“Aiming to automate and modernize these analyses, Embrapa Instrumentation, with the support of Consórcio Pesquisa Café and a partnership with ABIC, will finalize and launch this technology, unprecedented worldwide. Without a doubt, CoffeeClass will revolutionize the classification of coffee in Brazil, so that we can increasingly consolidate and conquer new markets”, declares Lucas Tadeu Ferreira, the deputy technical head of the Technology Transfer area of Embrapa Coffee.
Empowering the sector
For Karla Barros, a 24-year-old barista who made of her hobby a profession, this new technology is an excellent opportunity to empower the coffee sector. “I believe this is a tool that can even be used by farmers to improve field production”, highlights the coffee specialist.
A civil engineer who graduated at the end of 2017 from Universidade de São Paulo (USP), the barista says she is happy with her new profession, which she began a year ago at a coffee bistro in São Carlos, in the state of São Paulo, after taking courses at coffee laboratories in the capital, also named São Paulo, of the state.
“We are prepared, in theory and practice, to become baristas, who are professionals specialized in preparing high quality coffee. So, it is good to know there is a technology capable of analyzing the quality of the beverages we prepare, from the most simple to the most elaborate ones, in a safe and fast way”, she comments.
Photo: Thiago César
Cooperation to increase the maturity of the technology
Increasing the technology maturity level of CoffeeClass, aimed at this niche market, is on the radar of the partnership with ABIC, which is already an expert in certification by PQC. The association has already certified more than 700 brands in Brazil.
Among the actions foreseen by the cooperation and that should be implemented in the next 18 months, are the project itself and the development of a new system for the online storage of images and information obtained from quality reports prepared by PQC. Moreover, Embrapa’s researcher predicts that the samples provided by ABIC will allow improving the technology of CoffeeClass to better represent the universe of Brazilian coffee quality.
“CoffeeClass is more than a project for the development of an equipment. By increasing consumer knowledge of coffee characteristics, it solves a secular problem that is allowing the consumers to realize that coffee beverages are not all the same. Their differences, from the used raw material to how they are prepared, create the personality of each coffee beverage and allow the consumer to identify his/her taste and preference”, evaluates the executive director of ABIC, Natan Herszkowicz.
According to him, CoffeeClass will have an important role in consumer education. “With it, roasters will be able to define exactly what they will offer, and to establish and technically prove the differences between their products and those of their competitors, increasing transparency, which is highly valued in the beverage industry”, he says.
“I believe CoffeeClass will positively influence coffee consumption. And it will put Brazil at the forefront of the technology applied to the beverage”, he concludes.
The size of Brazilian coffeeAs the greatest coffee producer and exporter, as well as the second consumer worldwide, Brazil shipped, in 2017, more than US$ 5 billion in grains to other countries. The plant originated in Africa is the fifth product in the export basket of Brazilian agribusiness. According to Companhia Nacional de Abastecimento (Conab), the estimated harvest for this year is of almost 60 million bags of 60 kg processed coffee. The Brazilian product is already found in more than 120 countries around the world. Data from Brazilian Coffee Exporters Council (Cecafé) indicate that, from January to September 2018, coffee from Brazil generated US$ 3.536 billion in currency fluctuation, with 23.644 million bags of 60 kg each being exported. This volume is 7.3% greater than the one registered in the same period in 2017, which was of 22.031 million bags. According to information from Ministério da Agricultura, Pecuária e Abastecimento, the coffee sector occupies an area of 2 million hectares, with approximately 300 thousand producers, in about 1,900 municipalities, distributed throughout 11 states: Minas Gerais, São Paulo, Espírito Santo, Bahia, Rondônia, Paraná, Rio de Janeiro, Goiás, Mato Grosso, Amazonas, and Pará. The coffee production chain is responsible for creating more than 8 million jobs in the country.
|
Translation: Micla Cardoso de Souza
Joana Silva (MTb 19.554/SP)
Embrapa Instrumentação
Press inquiries
instrumentacao.imprensa@embrapa.br
Phone number: (16) 2107 2901
Edilson Fragalle (MTb 21.837/SP)
Embrapa Instrumentação
Further information on the topic
Citizen Attention Service (SAC)
www.embrapa.br/contact-us/sac/