This data set consists of 10 food categories, with 5,000 images. For each class, 125 manually reviewed test images are provided as well as 375 training images. On purpose, the training images were not cleaned, and thus still contain some amount of noise. This comes mostly in the form of intense colors and sometimes wrong labels. All images were rescaled to have a maximum side length of 512 pixels.
- apple pie
- baby back ribs
- baklava
- beef carpaccio
- beef tartare
- beet salad
- beignets
- bibimbap
- bread pudding
- breakfast burrito
food-MNIST/
images/
<class_name>/
<image_id>.jpg
meta/
classes.txt
test.json
test.txt
train.json
train.txt
Returns:
It returns two tuples
- x_train, x_test: uint8 array of RGB image data with shape (num_samples, width, height, 3) from the image_data_format backend setting o either channels_first or channels_last respectively.
- y_train, y_test: uint8 array of category labels (integers in range 0-9) with shape (num_samples,).
Returns: dictionary of labels
Example
(x_train, y_train), (x_test, y_test) = food_mnist.load_data()
labels_dict = food_mnist.labels()
git clone https://github.com/srohit0/food_mnist.git
import mnist_food
...
...
(x_train, y_train), (x_test, y_test) = food_mnist.load_data()
labels_dict = food_mnist.labels()
- Here is a simple example of using food_mnist in google colab notebook
- Here is a complete example of training food-MNIST dataset on a simple network with over 75% training accuracy
Original paper on Food-101 – Mining Discriminative Components with Random Forests
This dataset was created out of necessity to train food-samples on smaller machine with under 8GB RAM. Source of this dataset is Food-101 dataset
Credit: All images can be found in the "images" folder and are organized per class. All image ids are unique and correspond to the foodspotting.com review ids. Thus the original articles can retrieved trough http://www.foodspotting.com/reviews/<image_id> or through the foodspotting api (http://www.foodspotting.com/api). The test/train splitting used in the experiment of our paper, can be found in the "meta" directory. For any questions on the original Food-101 dataset contact bossard@vision.ee.ethz.ch