The demand for high-quality coffee continues to rise, particularly in the specialty coffee segment, which requires consistency in taste and product authenticity. Amid this trend, peaberry coffee, known for being rarer and more valuable, still faces challenges in the sorting process, which is generally manual. This method relies on workers’ visual observation and often takes considerable time, especially at large production scales. In fact, precision in sorting coffee beans greatly influences the final quality and market value of the product.
To address this issue, a research team from the Faculty of Agricultural Technology, Universitas Gadjah Mada (FTP UGM), has developed a technology to sort high-quality coffee beans using an artificial intelligence (AI)-based approach. The research has been published in the Journal of Food Measurement and Characterization in the United States.
Dr. Widiastuti Setyaningsih, S.T.P., M.Sc., as the team leader, explained that the developed innovation combines spectroscopy and AI. This technology works by reading the internal characteristics of coffee beans without damaging them. This approach enables rapid analysis while maintaining the physical integrity of the samples. In practice, the technology can more objectively identify differences between peaberry and non-peaberry beans.
“This technology is like reading the fingerprint of coffee from its chemical composition without damaging the beans,” Widi said.
The method used in this research is Near Infrared (NIR) Spectroscopy combined with machine learning. The process begins by directing light onto coffee beans to produce a spectrum that represents their chemical composition. The spectrum is then analyzed to identify components such as moisture, fat, protein, and other compounds.
According to Widi, the resulting data serve as the basis for the AI system to recognize distinctive patterns of each coffee type.
“The spectrum contains chemical information that forms the basis for distinguishing coffee characteristics,” she explained.
To improve accuracy, the spectral data are further processed using machine learning algorithms such as Support Vector Machine (SVM), Random Forest, and Linear Discriminant Analysis. These algorithms are designed to systematically distinguish peaberry from non-peaberry beans.
Before analysis, the data are preprocessed to remove noise and highlight important features. This step helps the system produce more precise and consistent classifications.
“AI reads patterns from the data, enabling it to accurately distinguish between peaberry and regular coffee,” Widi said.
The main advantage of this method lies in its ability to perform analysis quickly, objectively, and with high precision. The identification process can be carried out without relying on human visual observation, which is error-prone.
In addition, the method preserves the quality of coffee beans as it does not require destructive treatment. With high accuracy, this technology offers opportunities to improve sorting efficiency.
“With this approach, the separation process can be faster and the results more consistent,” she said.

In simple terms, the difference between peaberry and non-peaberry coffee lies in the number of beans in a single coffee cherry. Generally, one cherry produces two flat beans that face each other, known as regular or non-peaberry coffee. In contrast, peaberry coffee forms only a single, round bean due to a natural developmental process within the fruit. Its proportion is relatively small, accounting for only about 5–7 percent of total production, making it more exclusive.
“Peaberry is known as ‘lanang’ coffee, where a single fruit contains only one round bean, unlike regular coffee with two flat beans,” she explained.
So far, peaberry coffee has been separated manually, which relies on workers’ accuracy. This method is considered inefficient when handling large production volumes as it requires significant time.
Moreover, sorting results are often inconsistent because they depend on each operator’s subjectivity. The risk of misclassification is also high, particularly when the shapes of coffee beans appear similar.
“So far, separation has been done manually through visual sorting, which heavily depends on worker subjectivity,” said Widi.
Errors in the sorting process can directly affect the quality and economic value of coffee products. According to Widi, non-peaberry beans with similar shapes may be incorrectly grouped as peaberry, and vice versa. This is crucial because the proportion of peaberry in a harvest is relatively small compared to regular coffee. With only about 5–7 percent of total production, peaberry holds a higher market value in the specialty coffee segment. Inaccurate separation may lead to potential losses for producers.
“If the separation process is not optimal, the premium value of peaberry can be lost,” she said.

The implementation of this technology has the potential to bring significant changes to the coffee industry. The sorting process, previously conducted manually, can shift to an automated system supported by data-driven technology. This allows for increased production efficiency while maintaining more stable quality standards. For the specialty coffee industry, consistency in quality is essential to maintaining consumer trust.
“If the quality is consistent, it will be easier to maintain specialty coffee standards,” Widi noted.
In addition to technical aspects, this technology also carries considerable economic implications. As a premium product, peaberry has a higher selling price than regular coffee. With more accurate sorting, the potential to increase product value becomes even greater. According to Widi, this can strengthen the competitiveness of Indonesian coffee in the global market.
“The value of coffee can increase because its quality is better ensured and properly classified,” she explained.
In the future, this technology is considered to have strong potential for broader application in the agroindustry sector. The system can be integrated with automated sorting machines used in factories and at the farmer level.
Furthermore, the development of more compact and portable devices would enable direct use in the field. This innovation supports the digital transformation of the coffee industry, which is increasingly data-driven.
“This technology can be developed into an integrated system, even reaching the farmer level,” Widi said.
However, several challenges need to be addressed in its implementation. Initial investment for equipment and infrastructure remains a key consideration for industry players.
In addition, a larger database is required to make the resulting models more robust and adaptive. The gap between research outcomes in universities and their implementation in industry also presents its own challenges.
“We hope this research will not stop at publication but can truly be adopted and utilized by industry,” she concluded.
Author: Triya Andriyani
Post-editor: Zabrina Kumara
Photo: Freepik and Public Relations Documentation