Peaberry and normal coffee bean classification using CNN, SVM, and KNN: Their implementation in and the limitations of Raspberry Pi 3

IF 1.9 Q2 AGRICULTURE, MULTIDISCIPLINARY
Hira Lal Gope, Hidekazu Fukai
{"title":"Peaberry and normal coffee bean classification using CNN, SVM, and KNN: Their implementation in and the limitations of Raspberry Pi 3","authors":"Hira Lal Gope, Hidekazu Fukai","doi":"10.3934/agrfood.2022010","DOIUrl":null,"url":null,"abstract":"Peaberries are a special type of coffee bean with an oval shape. Peaberries are not considered defective, but separating peaberries is important to make the shapes of the remaining beans uniform for roasting evenly. The separation of peaberries and normal coffee beans increases the value of both peaberries and normal coffee beans in the market. However, it is difficult to sort peaberries from normal beans using existing commercial sorting machines because of their similarities. In previous studies, we have shown the availability of image processing and machine learning techniques, such as convolutional neural networks (CNNs), support vector machines (SVMs), and k-nearest-neighbors (KNNs), for the classification of peaberries and normal beans using a powerful desktop PC. As the next step, assuming the use of our system in the least developed countries, this study was performed to examine their implementation in and the limitations of Raspberry Pi 3. To improve the performance, we modified the CNN architecture from our previous studies. As a result, we found that the CNN model outperformed both linear SVM and KNN on the use of Raspberry Pi 3. For instance, the trained CNN could classify approximately 13.77 coffee bean images per second with 98.19% accuracy of the classification with 64×64 pixel color images on Raspberry Pi 3. There were limitations of Raspberry Pi 3 for linear SVM and KNN on the use of large image sizes because of the system's small RAM size. Generally, the linear SVM and KNN were faster than the CNN with small image sizes, but we could not obtain better results with both the linear SVM and KNN than the CNN in terms of the classification accuracy. Our results suggest that the combination of the CNN and Raspberry Pi 3 holds the promise of inexpensive peaberries and a normal bean sorting system for the least developed countries.","PeriodicalId":44793,"journal":{"name":"AIMS Agriculture and Food","volume":"1 1","pages":""},"PeriodicalIF":1.9000,"publicationDate":"2022-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"13","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"AIMS Agriculture and Food","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.3934/agrfood.2022010","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"AGRICULTURE, MULTIDISCIPLINARY","Score":null,"Total":0}
引用次数: 13

Abstract

Peaberries are a special type of coffee bean with an oval shape. Peaberries are not considered defective, but separating peaberries is important to make the shapes of the remaining beans uniform for roasting evenly. The separation of peaberries and normal coffee beans increases the value of both peaberries and normal coffee beans in the market. However, it is difficult to sort peaberries from normal beans using existing commercial sorting machines because of their similarities. In previous studies, we have shown the availability of image processing and machine learning techniques, such as convolutional neural networks (CNNs), support vector machines (SVMs), and k-nearest-neighbors (KNNs), for the classification of peaberries and normal beans using a powerful desktop PC. As the next step, assuming the use of our system in the least developed countries, this study was performed to examine their implementation in and the limitations of Raspberry Pi 3. To improve the performance, we modified the CNN architecture from our previous studies. As a result, we found that the CNN model outperformed both linear SVM and KNN on the use of Raspberry Pi 3. For instance, the trained CNN could classify approximately 13.77 coffee bean images per second with 98.19% accuracy of the classification with 64×64 pixel color images on Raspberry Pi 3. There were limitations of Raspberry Pi 3 for linear SVM and KNN on the use of large image sizes because of the system's small RAM size. Generally, the linear SVM and KNN were faster than the CNN with small image sizes, but we could not obtain better results with both the linear SVM and KNN than the CNN in terms of the classification accuracy. Our results suggest that the combination of the CNN and Raspberry Pi 3 holds the promise of inexpensive peaberries and a normal bean sorting system for the least developed countries.
使用CNN、SVM和KNN对咖啡豆和普通咖啡豆进行分类:它们在树莓派3中的实现和限制
草莓是一种椭圆形的特殊咖啡豆。不认为是有缺陷的,但是把豌豆分开是很重要的,这样可以使剩下的豆子形状均匀,以便烘烤均匀。将草莓和普通咖啡豆分离,增加了草莓和普通咖啡豆在市场上的价值。然而,由于它们的相似性,使用现有的商业分选机很难将豌豆从普通豆中分选出来。在之前的研究中,我们已经展示了图像处理和机器学习技术的可用性,例如卷积神经网络(cnn)、支持向量机(svm)和k-近邻(knn),用于使用功能强大的台式PC对草莓和普通豆类进行分类。下一步,假设在最不发达国家使用我们的系统,本研究将检查它们在树莓派3中的实现和局限性。为了提高性能,我们修改了之前研究中的CNN架构。结果,我们发现CNN模型在使用树莓派3时优于线性支持向量机和KNN。例如,训练后的CNN每秒可以对大约13.77张咖啡豆图像进行分类,其分类准确率为树莓派3上64×64像素彩色图像的98.19%。由于系统的RAM较小,Raspberry Pi 3对于线性SVM和KNN在使用大图像尺寸方面存在限制。一般来说,在图像尺寸较小的情况下,线性SVM和KNN的分类速度都比CNN快,但在分类精度上,我们不能同时使用线性SVM和KNN获得比CNN更好的结果。我们的研究结果表明,CNN和树莓派3的结合为最不发达国家提供了廉价的豌豆和正常的豆类分类系统。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
AIMS Agriculture and Food
AIMS Agriculture and Food AGRICULTURE, MULTIDISCIPLINARY-
CiteScore
3.70
自引率
0.00%
发文量
34
审稿时长
8 weeks
期刊介绍: AIMS Agriculture and Food covers a broad array of topics pertaining to agriculture and food, including, but not limited to:  Agricultural and food production and utilization  Food science and technology  Agricultural and food engineering  Food chemistry and biochemistry  Food materials  Physico-chemical, structural and functional properties of agricultural and food products  Agriculture and the environment  Biorefineries in agricultural and food systems  Food security and novel alternative food sources  Traceability and regional origin of agricultural and food products  Authentication of food and agricultural products  Food safety and food microbiology  Waste reduction in agriculture and food production and processing  Animal science, aquaculture, husbandry and veterinary medicine  Resources utilization and sustainability in food and agricultural production and processing  Horticulture and plant science  Agricultural economics.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信