An 11-Categorical AI Food Classification Model Based on Mobile-Net Neural Networks

  • Yongqing Yu BASIS International School Park Lane Harbour, Huizhou 516001, China
  • Yishan Zou Department of Education, University of Pennsylvania, Philadelphia 19104, USA
  • Yu Sun Department of Computer Science, California State Polytechnic University, Pomona 91768, USA
Keywords: Food classification, Python, Data preprocessing, Mobile-net, Epochs, Overfitting, Learning rate, Batch size

Abstract

As obesity becomes increasingly common worldwide [1], more people want to lose weight to improve their health and image. According to the Centers for Disease Control and Prevention (CDC), long-term changes in daily eating habits (such as regarding food/ nutrition type, calorie intake) are successful at keeping weights off [2]. Therefore, it would be helpful to have an artificial intelligence (AI) mobile program that identifies the types of food the user consumes and automatically calculates the total calories. This paper examines the development and optimization of an 11-categorical food classification model based on the Mobile-Net neural network using Python. Specifically, it classifies any food image as one of bread, dairy, dessert, egg product, fried food, meat, noodles, rice, seafood, soup, or fruit/vegetables. Methods of optimization include data preprocessing and learning rate and batch size adjustments. Experimental results show that scaling image inputs to standard size (Python Numpy resize) function), 300 training epochs, dynamic learning rate (start with 0.001 and *0.1 for every 30 epochs), and a batch size of 16 yields our best model of 83.44% accuracy.

Published
2021-10-26