人們對健康飲食的議題越來越重視,主要是因為人們的飲食攝取不均衡,造成了許多的代謝和營養缺乏等問題。隨著人工智慧(AI)的快速發展,應用在食物的影像識別模型,也取得了相當的成果。但是大部分研究多半採用西方食物的分類,且國內食物辨識的相關研究較稀少,因此本研究旨在探討AI在臺灣飲食文化中的應用,以提高對健康飲食的關注,解決國內食物辨識的挑戰,並評估不同深度學習演算法的性能,來判斷是否有足夠的辨識率。 本研究使用的資料集為自行收集與網路抓取(3:7)的臺灣食物照片,共1300張分13類,使用預訓練模型微調並運用遷移式學習來訓練模型,以確保模型的通用性和準確性。模型的選擇涵蓋了多種圖像分類的架構,包括CoCa ( Contrastive Captioners )、CoAtNet ( Convolution and Attention Network )和EfficientNet等進行比較。研究根據性能指標,如:準確度(Accuracy)、精確度(Precision)、召回率(Recall)和F1-score等來評估這些模型,與CoAtNet (79.23%) 和EfficientNet (67.69%)的準確率相比,CoCa 演算法在營養食品分類任務中表現出最好,達到84.62%的準確度。 本研究具有實用上的價值,能為相關研究提供模型的權重檔,同時為健康飲食相關的APP開發者提供模型的參考。模型的分類結果可以讓人們清楚了解自己的飲食攝取,藉由其他資訊或醫師建議來改善自己的飲食習慣,從而促進更健康的生活方式。
With the rapid development of artificial intelligence (AI), significant progress has been made in applying AI to food image recognition models. However, most studies predominantly focus on categorizing Western foods, and there is a scarcity of research on food recognition in Taiwan. Therefore, this study aims to explore the application of AI in Taiwanese dietary culture to raise awareness of healthy eating, address the challenges of food recognition in the country, and evaluate the performance of different deep learning algorithms to determine if they achieve sufficient recognition rates. The dataset used in this study consists of 1300 Taiwan food images collected through manual gathering and web scraping (ratios for 3:7), categorized into 13 classes. Pre-trained models were fine-tuned using transfer learning to ensure their generality and accuracy. Various image classification architectures including CoCa (Contrastive Captioners), CoAtNet (Convolution and Attention Network), and EfficientNet were compared. Performance evaluation metrics such as Accuracy, Precision, Recall, and F1-score were used. The CoCa algorithm exhibited the highest accuracy of 84.62% in the nutritional food classification task, compared to CoAtNet (79.23%) and Efficient-Net (67.69%). This study holds practical value by providing model weight files for related research and serving as a reference for developers of health-related apps. The classification results of the models enable individuals to gain insights into their dietary intake, allowing them to improve their dietary habits through additional information or medical advice, thereby promoting a healthier lifestyle.