Im2Calories: Towards an Automated Mobile Vision Food Diary

Austin Myers, Nick Johnston, Vivek Rathod, Anoop Korattikara, Alexander N. Gorban, Nathan Silberman, Sergio Guadarrama, George Papandreou, Jonathan Huang, Kevin MurphyICCV 2015

Abstract

We present a system which can recognize the contents of your meal from a single image, and then predict its nutritional contents, such as calories. The simplest version assumes that the user is eating at a restaurant for which we know the menu. In this case, we can collect images offline to train a multi-label classifier. At run time, we apply the classifier (running on your phone) to predict which foods are present in your meal, and we lookup the corresponding nutritional facts. We apply this method to a new dataset of images from 23 different restaurants, using a CNN-based classifier, significantly outperforming previous work. The more challenging setting works outside of restaurants. In this case, we need to estimate the size of the foods, as well as their labels. This requires solving segmentation and depth / volume estimation from a single image. We present CNN-based approaches to these problems, with promising preliminary results.

Introduction

Accurate tracking of caloric intake is a cornerstone of managing health conditions like obesity and diabetes. However, manual logging is notoriously burdensome and inaccurate, with human error often exceeding 400 calories per day. Automated food logging via computer vision offers a scalable solution but faces significant hurdles: food is visually amorphous, ingredients are often hidden, and calorie calculation requires precise volume estimation. The Im2Calories project aims to address these challenges by providing an automated system that works "in the wild."

System Architecture

The Im2Calories system employs a multi-stage pipeline to transform a single meal photo into a nutritional report.

The Im2Calories system pipeline, integrating GPS-based restaurant detection, food classification, segmentation, and depth estimation.

The process begins with Meal Detection, using a GoogLeNet-based binary classifier to verify the presence of food. For restaurant-based meals, the system utilizes GPS data to narrow the search space to a specific menu, transforming a massive classification task into a more manageable one. Multi-label Classification then identifies the various food items present. To handle visually similar items, the system employs label clustering via a K-nearest neighbor graph, which improves top-1 accuracy.

Semantic Segmentation and Volume Estimation

To estimate calories accurately, the system must determine the quantity of each food item. This is achieved through two key technical components:

  1. Semantic Segmentation: Using the "DeepLab" architecture (CNN + Conditional Random Fields), the system identifies the exact pixels for each food item. A critical insight was using classification results as "context" to refine the segmentation, which significantly reduces false positives (e.g., misidentifying parts of a burger as pancakes).
Comparison of semantic segmentation methods. Incorporating classification context into the CRF significantly reduces false positives.
  1. Volume Estimation: The system predicts a depth map from a single RGB image using a CNN. By identifying the table surface via RANSAC and projecting pixels into 3D space, it creates a voxel representation to estimate physical volume. This demonstrates that single-view depth estimation is a viable path for food quantification.

Datasets and Results

The research introduced several new benchmarks, including a Restaurant Dataset covering 23 major US chains (99k images) and GFood-3d/NFood-3d for depth validation.

Key results include:

  • Classification: On the MenuMatch benchmark, the system achieved a Mean Average Precision (mAP) of 81.4%, nearly doubling the previous state-of-the-art (51.2%).
  • Calorie Estimation: Predictions were significantly more accurate than crowdsourced alternatives like MealSnap.
  • On-Device Performance: The models were successfully optimized for Android, running in under one second locally, ensuring privacy and offline availability.

Conclusion and Future Work

While Im2Calories represents a significant leap forward, challenges remain. Calorie density varies by preparation method (e.g., frying vs. grilling), and internal ingredients (occlusions) remain invisible to the camera. Future work will focus on improving instance segmentation for overlapping items and better integrating semantic relationships between food labels. The ultimate goal is an "auto-complete" for food logging that minimizes user effort while maximizing nutritional awareness.

Summary updated

BibTeX
@inproceedings{myers2015im,
  author = {Austin Myers and Nick Johnston and Vivek Rathod and Anoop Korattikara and Alexander N. Gorban and Nathan Silberman and Sergio Guadarrama and George Papandreou and Jonathan Huang and Kevin Murphy},
  title = {{Im2Calories: Towards an Automated Mobile Vision Food Diary}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2015},
  url = {https://openreview.net/forum?id=By-h8-fdZS},
}
Figure