We got nuts! use deep neural networks to classify images of common edible nuts.

IF 1.9 Q3 NUTRITION & DIETETICS Nutrition and health Pub Date : 2024-06-01 Epub Date: 2022-07-21 DOI:10.1177/02601060221113928
Ruopeng An, Joshua Perez-Cruet, Junjie Wang
{"title":"We got nuts! use deep neural networks to classify images of common edible nuts.","authors":"Ruopeng An, Joshua Perez-Cruet, Junjie Wang","doi":"10.1177/02601060221113928","DOIUrl":null,"url":null,"abstract":"<p><strong>Background: </strong>Nuts are nutrient-dense foods that contribute to healthier eating. Food image datasets enable artificial intelligence (AI) powered diet-tracking apps to help people monitor daily eating patterns.</p><p><strong>Aim: </strong>This study aimed to create an image dataset of commonly consumed nut types and use it to build an AI computer vision model to automate nut type classification tasks.</p><p><strong>Methods: </strong>iPhone 11 was used to take photos of 11 nut types-almond, brazil nut, cashew, chestnut, hazelnut, macadamia, peanut, pecan, pine nut, pistachio, and walnut. The dataset contains 2200 images, 200 per nut type. The dataset was randomly split into the training (60% or 1320 images), validation (20% or 440 images), and test sets (20% or 440 images). A neural network model was constructed and trained using transfer learning and other computer vision techniques-data augmentation, mixup, normalization, label smoothing, and learning rate optimization.</p><p><strong>Results: </strong>The trained neural network model correctly predicted 338 out of 440 images (40 per nut type) in the validation set, achieving 99.55% accuracy. Moreover, the model classified the 440 images in the test set with 100% accuracy.</p><p><strong>Conclusion: </strong>This study built a nut image dataset and used it to train a neural network model to classify images by nut type. The model achieved near-perfect accuracy on the validation and test sets, demonstrating the feasibility of automating nut type classification using smartphone photos. Being made open-source, the dataset and model can assist the development of diet-tracking apps that facilitate users' adoption and adherence to a healthy diet.</p>","PeriodicalId":19352,"journal":{"name":"Nutrition and health","volume":null,"pages":null},"PeriodicalIF":1.9000,"publicationDate":"2024-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Nutrition and health","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1177/02601060221113928","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2022/7/21 0:00:00","PubModel":"Epub","JCR":"Q3","JCRName":"NUTRITION & DIETETICS","Score":null,"Total":0}
引用次数: 0

Abstract

Background: Nuts are nutrient-dense foods that contribute to healthier eating. Food image datasets enable artificial intelligence (AI) powered diet-tracking apps to help people monitor daily eating patterns.

Aim: This study aimed to create an image dataset of commonly consumed nut types and use it to build an AI computer vision model to automate nut type classification tasks.

Methods: iPhone 11 was used to take photos of 11 nut types-almond, brazil nut, cashew, chestnut, hazelnut, macadamia, peanut, pecan, pine nut, pistachio, and walnut. The dataset contains 2200 images, 200 per nut type. The dataset was randomly split into the training (60% or 1320 images), validation (20% or 440 images), and test sets (20% or 440 images). A neural network model was constructed and trained using transfer learning and other computer vision techniques-data augmentation, mixup, normalization, label smoothing, and learning rate optimization.

Results: The trained neural network model correctly predicted 338 out of 440 images (40 per nut type) in the validation set, achieving 99.55% accuracy. Moreover, the model classified the 440 images in the test set with 100% accuracy.

Conclusion: This study built a nut image dataset and used it to train a neural network model to classify images by nut type. The model achieved near-perfect accuracy on the validation and test sets, demonstrating the feasibility of automating nut type classification using smartphone photos. Being made open-source, the dataset and model can assist the development of diet-tracking apps that facilitate users' adoption and adherence to a healthy diet.

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
我们有坚果!使用深度神经网络对常见食用坚果的图像进行分类。
背景:坚果是营养丰富的食品,有助于人们更健康地饮食。方法:使用 iPhone 11 拍摄 11 种坚果的照片--杏仁、巴西坚果、腰果、栗子、榛子、夏威夷果、花生、山核桃、松子、开心果和核桃。数据集包含 2200 张图片,每种坚果类型 200 张。数据集被随机分成训练集(60% 或 1320 张图片)、验证集(20% 或 440 张图片)和测试集(20% 或 440 张图片)。利用迁移学习和其他计算机视觉技术--数据增强、混合、归一化、标签平滑和学习率优化--构建并训练了一个神经网络模型:经过训练的神经网络模型正确预测了验证集 440 张图片中的 338 张(每种坚果 40 张),准确率达到 99.55%。此外,该模型对测试集中的 440 幅图像进行了分类,准确率达到 100%:本研究建立了一个坚果图像数据集,并用它来训练一个神经网络模型,以便按坚果类型对图像进行分类。该模型在验证集和测试集上达到了近乎完美的准确率,证明了使用智能手机照片自动进行坚果类型分类的可行性。由于数据集和模型是开源的,因此可以帮助开发饮食跟踪应用程序,促进用户采用和坚持健康饮食。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Nutrition and health
Nutrition and health Medicine-Medicine (miscellaneous)
CiteScore
3.50
自引率
0.00%
发文量
160
期刊最新文献
ChatGPT as a psychotherapist for anxiety disorders: An empirical study with anxiety patients. Efficacy of prebiotic, probiotic, and synbiotics in improving growth in children under age five years in Africa: A protocol for a systematic review. Relationship between maternal anemia during pregnancy and the risk of preeclampsia: A multicenter case-control study. Long-term food supplementation with sweet basil (Ocimum basilicum L.) prevents age-associated cognitive decline in female mice. Impact of cultural, nutrition, and lifestyle transition on human milk composition between the Orang Asli communities in Peninsular Malaysia: A study protocol.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1