Maintaining a healthy diet is an important goal for many people. The main cause of not maintaining it lies in the imbalance between the amount of calories intake and daily physical activity. One way to achieve this is by tracking the amount of
calories consumed.
Presently, most of the available calorie estimation tools require the user to enter some information about the food item, and its size. Our proposed approach
alleviates this task of users by automatically estimating the calories from food images.
We propose a Multiclass food classification using a food image dataset, and then estimating the weight and the calorie content in the respective food item using deep
learning and computer vision techniques.
The dataset consisted of 2 resources through which the data has been combined. Both the datasets are available on the internet.
Resources
- FOODD Dataset
- ECUST Food Dataset (ECUSTFD) (https://github.com/Liang-yc/ECUSTFD-resized-)
The dataset is combined from both resources and contains around 2500 images for 10 classes of food which includes the top and side view of the food. The dataset is annotated with the density and calorie information per 100 gm serving of the food item.
Classes
'Apple', 'Banana', 'Beans', 'Boiled Egg', 'Doughnut', 'Grape', 'MoonCake',
'Orange', 'Pasta', 'Qiwi'.
The data preprocessing steps have been listed out here:
- Images are resized to 192192 for the VGG-19 Model, 224224 for the Inception V3 Model, and 400*400 for our Proposed CNN Scratch Model.
- Mean RGB pixel intensity is subtracted from the imagenet dataset.
- Data augmentation is done by adding images with different orientations and varying intensities.
- The images were normalized and standardised for pixel scaling.
The proposed methodology for our Problem Statement has been listed out below.
- Food Classification using Deep Learning methods: Proposed CNN Scratch Model and Pretrained models (VGG-19 and Inception-V3) are used to classify the food item.
- Image Segmentation using Otsu Algorithm (Computer Vision): The food has been segmented out from the food image in order to find out the exact food area using the thumb as a calibration object.
- Volume Estimation: The volume of the food item is calculated using the shape of the food item.
- Calorie Calculation: The calories have been calculated using the density of the food item and calorie per 100gm.
The screenshots from the webserver has been added which has 2 parts:
- Home
- Predict