Datasets:
Add SimpleFood45 images, annotations, YOLOv8 weights and dataset card
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- README.md +166 -0
- assets/samples.jpg +3 -0
- data/20230927_102352.jpg +3 -0
- data/20230927_102353.jpg +3 -0
- data/20230927_102355.jpg +3 -0
- data/20230927_102356.jpg +3 -0
- data/20230927_102358.jpg +3 -0
- data/20230927_102400.jpg +3 -0
- data/20230927_102403.jpg +3 -0
- data/20230927_102404.jpg +3 -0
- data/20230927_102406.jpg +3 -0
- data/20230927_102409.jpg +3 -0
- data/20230927_102425.jpg +3 -0
- data/20230927_102427.jpg +3 -0
- data/20230927_102428.jpg +3 -0
- data/20230927_102430.jpg +3 -0
- data/20230927_102432.jpg +3 -0
- data/20230927_102433.jpg +3 -0
- data/20230927_102435.jpg +3 -0
- data/20230927_102436.jpg +3 -0
- data/20230927_102440.jpg +3 -0
- data/20230927_102441.jpg +3 -0
- data/20230927_102456.jpg +3 -0
- data/20230927_102458.jpg +3 -0
- data/20230927_102459.jpg +3 -0
- data/20230927_102500.jpg +3 -0
- data/20230927_102502.jpg +3 -0
- data/20230927_102503.jpg +3 -0
- data/20230927_102505.jpg +3 -0
- data/20230927_102506.jpg +3 -0
- data/20230927_102509.jpg +3 -0
- data/20230927_102511.jpg +3 -0
- data/20230927_102538.jpg +3 -0
- data/20230927_102539.jpg +3 -0
- data/20230927_102540.jpg +3 -0
- data/20230927_102541.jpg +3 -0
- data/20230927_102542.jpg +3 -0
- data/20230927_102543.jpg +3 -0
- data/20230927_102545.jpg +3 -0
- data/20230927_102546.jpg +3 -0
- data/20230927_102551.jpg +3 -0
- data/20230927_102552.jpg +3 -0
- data/20230927_102634.jpg +3 -0
- data/20230927_102636.jpg +3 -0
- data/20230927_102637.jpg +3 -0
- data/20230927_102638.jpg +3 -0
- data/20230927_102639.jpg +3 -0
- data/20230927_102640.jpg +3 -0
- data/20230927_102642.jpg +3 -0
- data/20230927_102643.jpg +3 -0
README.md
CHANGED
|
@@ -1,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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-nd-4.0
|
| 3 |
+
pretty_name: SimpleFood45
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
task_categories:
|
| 7 |
+
- image-classification
|
| 8 |
+
- object-detection
|
| 9 |
+
- image-to-3d
|
| 10 |
+
tags:
|
| 11 |
+
- food
|
| 12 |
+
- nutrition
|
| 13 |
+
- dietary-assessment
|
| 14 |
+
- portion-estimation
|
| 15 |
+
- volume-estimation
|
| 16 |
+
- energy-estimation
|
| 17 |
+
- 3d
|
| 18 |
+
size_categories:
|
| 19 |
+
- n<1K
|
| 20 |
+
configs:
|
| 21 |
+
- config_name: default
|
| 22 |
+
data_files:
|
| 23 |
+
- split: train
|
| 24 |
+
path:
|
| 25 |
+
- data/*.jpg
|
| 26 |
+
- data/metadata.csv
|
| 27 |
---
|
| 28 |
+
|
| 29 |
+
# SimpleFood45
|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
|
| 33 |
+
**SimpleFood45** is a dataset for **image-based food portion estimation**. It contains 513 smartphone photos of 45 real food items from 12 food types. Each item was photographed from several camera poses. Annotations give the ground-truth **weight (g)**, **volume (mL)** and **energy (kcal)**.
|
| 34 |
+
|
| 35 |
+
The dataset was introduced with the paper [*Food Portion Estimation via 3D Object Scaling*](https://arxiv.org/abs/2404.12257) (Vinod, He, Shao & Zhu, CVPR Workshops 2024) from the Video and Image Processing Laboratory (VIPER), Purdue University.
|
| 36 |
+
|
| 37 |
+
## Dataset summary
|
| 38 |
+
|
| 39 |
+
| | |
|
| 40 |
+
|---|---|
|
| 41 |
+
| Images | 513 (JPEG, 4000 × 2252, about 2 MB each) |
|
| 42 |
+
| Food items | 45 |
|
| 43 |
+
| Food types | 12 |
|
| 44 |
+
| Annotations | Weight (g), volume (mL), energy (kcal) |
|
| 45 |
+
| Capture device | Samsung Galaxy S22 Ultra |
|
| 46 |
+
| Capture dates | September to December 2023 |
|
| 47 |
+
|
| 48 |
+
Most foods are photographed on a black calibration board with a white dot grid, next to a printed checkerboard that serves as a reference object of known size. Pizza is photographed on a white plate with the checkerboard beside it.
|
| 49 |
+
|
| 50 |
+
## Repository layout
|
| 51 |
+
|
| 52 |
+
```
|
| 53 |
+
data/
|
| 54 |
+
├── 20230927_102352.jpg # 513 images, named by capture timestamp
|
| 55 |
+
├── ...
|
| 56 |
+
└── metadata.csv # per-image annotations
|
| 57 |
+
weights/
|
| 58 |
+
└── yolo_vfn_filtered.pt # YOLOv8 food detector used in the paper
|
| 59 |
+
assets/
|
| 60 |
+
└── samples.jpg # preview image for this card
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
### `metadata.csv`
|
| 64 |
+
|
| 65 |
+
| Column | Type | Description |
|
| 66 |
+
|---|---|---|
|
| 67 |
+
| `file_name` | string | Image file name in `data/` |
|
| 68 |
+
| `label` | string | Food type (e.g. `bagel`, `apple`) |
|
| 69 |
+
| `weight_g` | float | Ground-truth weight in grams |
|
| 70 |
+
| `volume_ml` | float | Ground-truth volume in millilitres |
|
| 71 |
+
| `energy_kcal` | float | Ground-truth energy in kilocalories |
|
| 72 |
+
|
| 73 |
+
All images of the same physical item share the same weight, volume and energy values.
|
| 74 |
+
|
| 75 |
+
### Annotated food types
|
| 76 |
+
|
| 77 |
+
| Food type | Items | Images | Weight (g) | Volume (mL) | Energy (kcal) |
|
| 78 |
+
|---|---:|---:|---|---|---|
|
| 79 |
+
| apple | 4 | 40 | 186 – 196 | 240.9 – 253.9 | 109.7 – 115.6 |
|
| 80 |
+
| avocado | 4 | 40 | 190 – 243 | 196.7 – 251.6 | 304.0 – 388.8 |
|
| 81 |
+
| bagel | 4 | 40 | 92 – 100 | 281.1 – 308.2 | 242.9 – 264.0 |
|
| 82 |
+
| biscuit | 2 | 30 | 45 – 46 | 112.4 – 114.9 | 166.5 – 170.2 |
|
| 83 |
+
| blueberry_muffin | 4 | 40 | 98 – 102 | 218.4 – 232.7 | 367.5 – 382.5 |
|
| 84 |
+
| broccoli | 4 | 40 | 13 – 26 | 23.6 – 47.1 | 4.4 – 8.8 |
|
| 85 |
+
| chicken_nugget | 2 | 40 | 14 – 15 | 21.0 – 22.5 | 43.0 – 46.1 |
|
| 86 |
+
| cinnamon_roll | 4 | 40 | 65 – 96 | 189.8 – 280.4 | 293.8 – 433.9 |
|
| 87 |
+
| corn | 3 | 30 | 210 – 245 | 263.1 – 307.0 | 232.6 – 367.5 |
|
| 88 |
+
| croissant | 4 | 40 | 41 – 46 | 157.1 – 181.7 | 166.5 – 186.8 |
|
| 89 |
+
| strawberry | 3 | 40 | 16 – 23 | 18.0 – 25.9 | 5.8 – 8.3 |
|
| 90 |
+
|
| 91 |
+
### Images without annotations
|
| 92 |
+
|
| 93 |
+
93 images have empty annotation fields in `metadata.csv`:
|
| 94 |
+
|
| 95 |
+
- **53 images** (captured 2023-10-03) show **two foods together** on the calibration board, for example an avocado with a chicken nugget, or corn with a croissant.
|
| 96 |
+
- **40 images** (captured 2023-12-04) show a **slice of pizza** on a plate.
|
| 97 |
+
|
| 98 |
+
The current release does not include ground-truth values for these images.
|
| 99 |
+
|
| 100 |
+
## Usage
|
| 101 |
+
|
| 102 |
+
### Load with 🤗 Datasets
|
| 103 |
+
|
| 104 |
+
```python
|
| 105 |
+
from datasets import load_dataset
|
| 106 |
+
|
| 107 |
+
ds = load_dataset("purdueviperlab/SimpleFood45", split="train")
|
| 108 |
+
sample = ds[0]
|
| 109 |
+
sample["image"] # PIL.Image
|
| 110 |
+
sample["label"], sample["weight_g"], sample["volume_ml"], sample["energy_kcal"]
|
| 111 |
+
|
| 112 |
+
# Keep only annotated images
|
| 113 |
+
annotated = ds.filter(lambda x: x["label"] is not None)
|
| 114 |
+
```
|
| 115 |
+
|
| 116 |
+
### Download the raw files
|
| 117 |
+
|
| 118 |
+
```python
|
| 119 |
+
from huggingface_hub import snapshot_download
|
| 120 |
+
|
| 121 |
+
path = snapshot_download("purdueviperlab/SimpleFood45", repo_type="dataset")
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
Or with the CLI:
|
| 125 |
+
|
| 126 |
+
```bash
|
| 127 |
+
hf download purdueviperlab/SimpleFood45 --repo-type dataset --local-dir SimpleFood45
|
| 128 |
+
```
|
| 129 |
+
|
| 130 |
+
### Food detector weights
|
| 131 |
+
|
| 132 |
+
`weights/yolo_vfn_filtered.pt` is the [Ultralytics](https://github.com/ultralytics/ultralytics) YOLOv8 detection model used in the paper's pipeline. It was trained on a filtered subset of the VIPER-FoodNet (VFN) dataset and saved with `ultralytics==8.0.188`.
|
| 133 |
+
|
| 134 |
+
```python
|
| 135 |
+
from huggingface_hub import hf_hub_download
|
| 136 |
+
from ultralytics import YOLO
|
| 137 |
+
|
| 138 |
+
ckpt = hf_hub_download("purdueviperlab/SimpleFood45", "weights/yolo_vfn_filtered.pt", repo_type="dataset")
|
| 139 |
+
model = YOLO(ckpt)
|
| 140 |
+
results = model("data/20230927_102352.jpg")
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
## Intended use
|
| 144 |
+
|
| 145 |
+
SimpleFood45 is intended for research on:
|
| 146 |
+
|
| 147 |
+
- Estimating food portion size, volume and energy from a single image or from multiple views
|
| 148 |
+
- 3D food reconstruction and object scaling
|
| 149 |
+
- Image-based dietary assessment
|
| 150 |
+
|
| 151 |
+
The dataset is small and was captured in a controlled lab setting, with single items or pairs of items on a uniform background. Results on SimpleFood45 may not carry over to real-world meal images with mixed dishes, clutter or different lighting.
|
| 152 |
+
|
| 153 |
+
## License
|
| 154 |
+
|
| 155 |
+
Released under [CC BY-NC-ND 4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/). You may use it for non-commercial research with attribution. You may not distribute modified versions.
|
| 156 |
+
|
| 157 |
+
## Citation
|
| 158 |
+
|
| 159 |
+
If you use SimpleFood45, please cite:
|
| 160 |
+
|
| 161 |
+
```bibtex
|
| 162 |
+
@article{vinod2024food,
|
| 163 |
+
title={Food Portion Estimation via 3D Object Scaling},
|
| 164 |
+
author={Vinod, Gautham and He, Jiangpeng and Shao, Zeman and Zhu, Fengqing},
|
| 165 |
+
journal={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
|
| 166 |
+
pages={3741--3749},
|
| 167 |
+
year={2024}
|
| 168 |
+
}
|
| 169 |
+
```
|
assets/samples.jpg
ADDED
|
Git LFS Details
|
data/20230927_102352.jpg
ADDED
|
Git LFS Details
|
data/20230927_102353.jpg
ADDED
|
Git LFS Details
|
data/20230927_102355.jpg
ADDED
|
Git LFS Details
|
data/20230927_102356.jpg
ADDED
|
Git LFS Details
|
data/20230927_102358.jpg
ADDED
|
Git LFS Details
|
data/20230927_102400.jpg
ADDED
|
Git LFS Details
|
data/20230927_102403.jpg
ADDED
|
Git LFS Details
|
data/20230927_102404.jpg
ADDED
|
Git LFS Details
|
data/20230927_102406.jpg
ADDED
|
Git LFS Details
|
data/20230927_102409.jpg
ADDED
|
Git LFS Details
|
data/20230927_102425.jpg
ADDED
|
Git LFS Details
|
data/20230927_102427.jpg
ADDED
|
Git LFS Details
|
data/20230927_102428.jpg
ADDED
|
Git LFS Details
|
data/20230927_102430.jpg
ADDED
|
Git LFS Details
|
data/20230927_102432.jpg
ADDED
|
Git LFS Details
|
data/20230927_102433.jpg
ADDED
|
Git LFS Details
|
data/20230927_102435.jpg
ADDED
|
Git LFS Details
|
data/20230927_102436.jpg
ADDED
|
Git LFS Details
|
data/20230927_102440.jpg
ADDED
|
Git LFS Details
|
data/20230927_102441.jpg
ADDED
|
Git LFS Details
|
data/20230927_102456.jpg
ADDED
|
Git LFS Details
|
data/20230927_102458.jpg
ADDED
|
Git LFS Details
|
data/20230927_102459.jpg
ADDED
|
Git LFS Details
|
data/20230927_102500.jpg
ADDED
|
Git LFS Details
|
data/20230927_102502.jpg
ADDED
|
Git LFS Details
|
data/20230927_102503.jpg
ADDED
|
Git LFS Details
|
data/20230927_102505.jpg
ADDED
|
Git LFS Details
|
data/20230927_102506.jpg
ADDED
|
Git LFS Details
|
data/20230927_102509.jpg
ADDED
|
Git LFS Details
|
data/20230927_102511.jpg
ADDED
|
Git LFS Details
|
data/20230927_102538.jpg
ADDED
|
Git LFS Details
|
data/20230927_102539.jpg
ADDED
|
Git LFS Details
|
data/20230927_102540.jpg
ADDED
|
Git LFS Details
|
data/20230927_102541.jpg
ADDED
|
Git LFS Details
|
data/20230927_102542.jpg
ADDED
|
Git LFS Details
|
data/20230927_102543.jpg
ADDED
|
Git LFS Details
|
data/20230927_102545.jpg
ADDED
|
Git LFS Details
|
data/20230927_102546.jpg
ADDED
|
Git LFS Details
|
data/20230927_102551.jpg
ADDED
|
Git LFS Details
|
data/20230927_102552.jpg
ADDED
|
Git LFS Details
|
data/20230927_102634.jpg
ADDED
|
Git LFS Details
|
data/20230927_102636.jpg
ADDED
|
Git LFS Details
|
data/20230927_102637.jpg
ADDED
|
Git LFS Details
|
data/20230927_102638.jpg
ADDED
|
Git LFS Details
|
data/20230927_102639.jpg
ADDED
|
Git LFS Details
|
data/20230927_102640.jpg
ADDED
|
Git LFS Details
|
data/20230927_102642.jpg
ADDED
|
Git LFS Details
|
data/20230927_102643.jpg
ADDED
|
Git LFS Details
|