An Explainable CNN and Vision Transformer-Based Approach for Real-Time Food Recognition.

IF 5 2区 医学 Q1 NUTRITION & DIETETICS Nutrients Pub Date : 2025-01-20 DOI:10.3390/nu17020362
Kintoh Allen Nfor, Tagne Poupi Theodore Armand, Kenesbaeva Periyzat Ismaylovna, Moon-Il Joo, Hee-Cheol Kim
{"title":"An Explainable CNN and Vision Transformer-Based Approach for Real-Time Food Recognition.","authors":"Kintoh Allen Nfor, Tagne Poupi Theodore Armand, Kenesbaeva Periyzat Ismaylovna, Moon-Il Joo, Hee-Cheol Kim","doi":"10.3390/nu17020362","DOIUrl":null,"url":null,"abstract":"<p><strong>Background: </strong>Food image recognition, a crucial step in computational gastronomy, has diverse applications across nutritional platforms. Convolutional neural networks (CNNs) are widely used for this task due to their ability to capture hierarchical features. However, they struggle with long-range dependencies and global feature extraction, which are vital in distinguishing visually similar foods or images where the context of the whole dish is crucial, thus necessitating transformer architecture.</p><p><strong>Objectives: </strong>This research explores the capabilities of the CNNs and transformers to build a robust classification model that can handle both short- and long-range dependencies with global features to accurately classify food images and enhance food image recognition for better nutritional analysis.</p><p><strong>Methods: </strong>Our approach, which combines CNNs and Vision Transformers (ViTs), begins with the RestNet50 backbone model. This model is responsible for local feature extraction from the input image. The resulting feature map is then passed to the ViT encoder block, which handles further global feature extraction and classification using multi-head attention and fully connected layers with pre-trained weights.</p><p><strong>Results: </strong>Our experiments on five diverse datasets have confirmed a superior performance compared to the current state-of-the-art methods, and our combined dataset leveraging complementary features showed enhanced generalizability and robust performance in addressing global food diversity. We used explainable techniques like grad-CAM and LIME to understand how the models made their decisions, thereby enhancing the user's trust in the proposed system. This model has been integrated into a mobile application for food recognition and nutrition analysis, offering features like an intelligent diet-tracking system.</p><p><strong>Conclusion: </strong>This research paves the way for practical applications in personalized nutrition and healthcare, showcasing the extensive potential of AI in nutritional sciences across various dietary platforms.</p>","PeriodicalId":19486,"journal":{"name":"Nutrients","volume":"17 2","pages":""},"PeriodicalIF":5.0000,"publicationDate":"2025-01-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC11768650/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Nutrients","FirstCategoryId":"3","ListUrlMain":"https://doi.org/10.3390/nu17020362","RegionNum":2,"RegionCategory":"医学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"NUTRITION & DIETETICS","Score":null,"Total":0}
引用次数: 0

Abstract

Background: Food image recognition, a crucial step in computational gastronomy, has diverse applications across nutritional platforms. Convolutional neural networks (CNNs) are widely used for this task due to their ability to capture hierarchical features. However, they struggle with long-range dependencies and global feature extraction, which are vital in distinguishing visually similar foods or images where the context of the whole dish is crucial, thus necessitating transformer architecture.

Objectives: This research explores the capabilities of the CNNs and transformers to build a robust classification model that can handle both short- and long-range dependencies with global features to accurately classify food images and enhance food image recognition for better nutritional analysis.

Methods: Our approach, which combines CNNs and Vision Transformers (ViTs), begins with the RestNet50 backbone model. This model is responsible for local feature extraction from the input image. The resulting feature map is then passed to the ViT encoder block, which handles further global feature extraction and classification using multi-head attention and fully connected layers with pre-trained weights.

Results: Our experiments on five diverse datasets have confirmed a superior performance compared to the current state-of-the-art methods, and our combined dataset leveraging complementary features showed enhanced generalizability and robust performance in addressing global food diversity. We used explainable techniques like grad-CAM and LIME to understand how the models made their decisions, thereby enhancing the user's trust in the proposed system. This model has been integrated into a mobile application for food recognition and nutrition analysis, offering features like an intelligent diet-tracking system.

Conclusion: This research paves the way for practical applications in personalized nutrition and healthcare, showcasing the extensive potential of AI in nutritional sciences across various dietary platforms.

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
基于可解释CNN和视觉变换的实时食物识别方法。
背景:食物图像识别是计算美食学的关键一步,在营养平台上有不同的应用。卷积神经网络(cnn)由于其捕获层次特征的能力而被广泛用于该任务。然而,它们在长期依赖关系和全局特征提取方面存在困难,这对于区分视觉上相似的食物或图像至关重要,因为整个菜肴的背景至关重要,因此需要变压器架构。目的:本研究探讨了cnn和transformer的能力,以建立一个鲁棒分类模型,该模型可以处理具有全局特征的短期和长期依赖关系,以准确分类食品图像,增强食品图像识别,从而更好地进行营养分析。方法:我们的方法结合了cnn和视觉变形器(ViTs),从RestNet50主干模型开始。该模型负责从输入图像中提取局部特征。然后将得到的特征映射传递给ViT编码器块,该编码器块使用多头关注和具有预训练权重的完全连接层处理进一步的全局特征提取和分类。结果:与当前最先进的方法相比,我们在五个不同数据集上的实验证实了卓越的性能,我们利用互补特征的组合数据集在解决全球食物多样性方面表现出增强的泛化性和稳健的性能。我们使用了可解释的技术,如grad-CAM和LIME来理解模型是如何做出决策的,从而增强了用户对拟议系统的信任。该模型已被集成到一款用于食物识别和营养分析的移动应用程序中,提供智能饮食跟踪系统等功能。结论:本研究为个性化营养和医疗保健的实际应用铺平了道路,展示了人工智能在各种饮食平台的营养科学中的广泛潜力。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Nutrients
Nutrients NUTRITION & DIETETICS-
CiteScore
9.20
自引率
15.30%
发文量
4599
审稿时长
16.74 days
期刊介绍: Nutrients (ISSN 2072-6643) is an international, peer-reviewed open access advanced forum for studies related to Human Nutrition. It publishes reviews, regular research papers and short communications. Our aim is to encourage scientists to publish their experimental and theoretical results in as much detail as possible. There is no restriction on the length of the papers. The full experimental details must be provided so that the results can be reproduced.
期刊最新文献
Analysis of Inflexibility and Eating Disorders According to the Theory of Control by Justifications and Immediate Consequences (TJC). Standardized Berry Extract Improves Selected Visual Function Outcomes in Presbyopia: A Randomized, Double-Blind, Placebo-Controlled Crossover Trial with Exploratory Biomarker Analysis. Epicardial and Visceral Adipose Tissue and Global Longitudinal Strain: A Review of Cardiac Imaging Insights in Subclinical Myocardial Dysfunction. From Phytochemical Characterization to Energy Metabolism-Driven Molecular Responses: The Anticancer Potential of Lactarius deliciosus (L.) Gray in Breast Cancer Cells. Tooth Loss, Denture Use, and Risk of Malnutrition in Older Adults in Poland: Evidence from the National PolSenior2 Study.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1