FoodX-251: A Dataset for Fine-grained Food Classification

Parneet Kaur, Karan Sikka, Weijun Wang, Serge J. Belongie, Ajay DivakaranarXiv 2019

Abstract

Automated food recognition is a critical component of health and nutrition applications, yet it remains a challenging computer vision task due to high intra-class variability and low inter-class similarity. This paper introduces FoodX-251, a large-scale dataset featuring 158,846 images across 251 fine-grained categories. By utilizing a webly-supervised training set and a human-verified evaluation set, FoodX-251 provides a rigorous benchmark for deep learning models. Our baseline experiments demonstrate that full network fine-tuning is essential for capturing the subtle textural cues necessary for accurate food classification.

Introduction: The Challenge of Food Recognition

Manual food journaling is a tedious process that often leads to low user compliance in health apps. Automating this via computer vision is a "holy grail" for the industry, yet food classification is notoriously difficult. The primary obstacles include:

  • Fine-grained categories: Subtle visual differences distinguish similar items like "marble cake" and "chocolate cake."
  • High intra-class variability: A single dish, such as pasta, can vary wildly in appearance based on plating and ingredients.
  • Low inter-class variability: Different dishes often share similar colors and textures.
  • Data Scarcity: Existing datasets are often small, regionally focused, or lack rigorous verification.

Methodology

The FoodX-251 dataset was constructed using a multi-step pipeline to ensure both scale and quality:

  1. Category Expansion: Starting with the Food-101 dataset, the authors used WordNet to identify 251 sibling categories, focusing on fine-grained distinctions.
  2. Data Acquisition: Images were web-scraped for all categories.
  3. Human Verification: To create a reliable benchmark, 200 images per class were manually verified by three human raters.
  4. Dataset Partitioning: The verified images form the validation (12k) and test (28k) sets. The remaining 118k unverified web images serve as the training set, facilitating "webly-supervised" learning research.

The FoodX-251 Dataset

FoodX-251 offers a miscellaneous global variety of food items, surpassing predecessors in both class count and image volume. The dataset's diversity is key to training models that can generalize across different cuisines and presentation styles.

Examples of fine-grained food categories in FoodX-251, illustrating high intra-class variability and subtle inter-class differences.

Key Insights: Navigating Web Noise

A significant contribution of this work is the categorization of noise found in web-scraped food data. Understanding these noise types is crucial for developing robust "webly-supervised" models that can learn from imperfect data.

  • Cross-domain noise: Images depicting raw ingredients or packaged products instead of the prepared dish.
  • Cross-category noise: Images containing multiple food items where the label only refers to one (e.g., a photo of chips and guacamole labeled only as "guacamole").
Comparison of target class images with cross-domain and cross-category noise.

Furthermore, the authors found that standard ImageNet-trained feature extractors are insufficient for food. Because food recognition relies on specific textural and compositional cues, models perform significantly better when the entire network is fine-tuned rather than just the final layer.

Experimental Results

Baselines were established using a ResNet-101 architecture. The results emphasize the necessity of full-network adaptation to the specific domain of food imagery:

Method Val Top-3 Error Test Top-3 Error
ResNet-101 (Last layer only) 36% 37%
ResNet-101 (Full Fine-tuning) 16% 17%

The 20% improvement from full fine-tuning suggests that low-level features learned on general objects (like cars or animals) must be significantly adjusted to recognize the complex textures and compositions of food.

Conclusion and Future Work

FoodX-251 serves as a robust benchmark, as evidenced by its use in the iFood-2019 challenge. However, classification is only the first step toward a complete nutritional tool. Future research must integrate segmentation and 3D volume estimation for accurate calorie counting. Additionally, the inherent noise in the training set provides a fertile ground for developing advanced webly-supervised learning algorithms that can effectively filter or weight noisy samples during training.

Summary updated

BibTeX
@misc{kaur2019foodx,
  author = {Parneet Kaur and Karan Sikka and Weijun Wang and Serge J. Belongie and Ajay Divakaran},
  title = {{FoodX-251: A Dataset for Fine-grained Food Classification}},
  year = {2019},
  eprint = {1907.06167},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.06167},
}
Figure