gvinod commited on
Commit
5e588da
·
verified ·
1 Parent(s): 65bd4a2

Add SimpleFood45 images, annotations, YOLOv8 weights and dataset card

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +166 -0
  2. assets/samples.jpg +3 -0
  3. data/20230927_102352.jpg +3 -0
  4. data/20230927_102353.jpg +3 -0
  5. data/20230927_102355.jpg +3 -0
  6. data/20230927_102356.jpg +3 -0
  7. data/20230927_102358.jpg +3 -0
  8. data/20230927_102400.jpg +3 -0
  9. data/20230927_102403.jpg +3 -0
  10. data/20230927_102404.jpg +3 -0
  11. data/20230927_102406.jpg +3 -0
  12. data/20230927_102409.jpg +3 -0
  13. data/20230927_102425.jpg +3 -0
  14. data/20230927_102427.jpg +3 -0
  15. data/20230927_102428.jpg +3 -0
  16. data/20230927_102430.jpg +3 -0
  17. data/20230927_102432.jpg +3 -0
  18. data/20230927_102433.jpg +3 -0
  19. data/20230927_102435.jpg +3 -0
  20. data/20230927_102436.jpg +3 -0
  21. data/20230927_102440.jpg +3 -0
  22. data/20230927_102441.jpg +3 -0
  23. data/20230927_102456.jpg +3 -0
  24. data/20230927_102458.jpg +3 -0
  25. data/20230927_102459.jpg +3 -0
  26. data/20230927_102500.jpg +3 -0
  27. data/20230927_102502.jpg +3 -0
  28. data/20230927_102503.jpg +3 -0
  29. data/20230927_102505.jpg +3 -0
  30. data/20230927_102506.jpg +3 -0
  31. data/20230927_102509.jpg +3 -0
  32. data/20230927_102511.jpg +3 -0
  33. data/20230927_102538.jpg +3 -0
  34. data/20230927_102539.jpg +3 -0
  35. data/20230927_102540.jpg +3 -0
  36. data/20230927_102541.jpg +3 -0
  37. data/20230927_102542.jpg +3 -0
  38. data/20230927_102543.jpg +3 -0
  39. data/20230927_102545.jpg +3 -0
  40. data/20230927_102546.jpg +3 -0
  41. data/20230927_102551.jpg +3 -0
  42. data/20230927_102552.jpg +3 -0
  43. data/20230927_102634.jpg +3 -0
  44. data/20230927_102636.jpg +3 -0
  45. data/20230927_102637.jpg +3 -0
  46. data/20230927_102638.jpg +3 -0
  47. data/20230927_102639.jpg +3 -0
  48. data/20230927_102640.jpg +3 -0
  49. data/20230927_102642.jpg +3 -0
  50. data/20230927_102643.jpg +3 -0
README.md CHANGED
@@ -1,3 +1,169 @@
1
  ---
2
  license: cc-by-nc-nd-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ![SimpleFood45 sample images](assets/samples.jpg)
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

  • SHA256: 5a9d1de99b0be886b6e1cb2c0caba680d132b9ec81b96181fae315d9d99b299b
  • Pointer size: 131 Bytes
  • Size of remote file: 329 kB
data/20230927_102352.jpg ADDED

Git LFS Details

  • SHA256: c3fed457f1a0f5b8ade172123e801034c25fc203f2b0f10bc0bda314ec7d503e
  • Pointer size: 132 Bytes
  • Size of remote file: 1.7 MB
data/20230927_102353.jpg ADDED

Git LFS Details

  • SHA256: 16d81ba938212d0d1e905a76d2139f2e8aba730d9497c83f891d407932a5a82b
  • Pointer size: 132 Bytes
  • Size of remote file: 1.61 MB
data/20230927_102355.jpg ADDED

Git LFS Details

  • SHA256: 04749670935eb401fbf3e037109ef007efa6d3063fe9cf9337eb3221047c29ec
  • Pointer size: 132 Bytes
  • Size of remote file: 1.95 MB
data/20230927_102356.jpg ADDED

Git LFS Details

  • SHA256: 11341932eeaeac732cf871a74a745c09926766e3b10f6fff71849f5fcf25791e
  • Pointer size: 132 Bytes
  • Size of remote file: 2.19 MB
data/20230927_102358.jpg ADDED

Git LFS Details

  • SHA256: b5e69e27f1816296d38b5c9659c869d1808d159374e9e09ec9d84daf01aefd61
  • Pointer size: 132 Bytes
  • Size of remote file: 1.73 MB
data/20230927_102400.jpg ADDED

Git LFS Details

  • SHA256: 313dc6727b40bf90db7d23914ba2dceb418aad6f9cdf452e64b5f6fdc9d44b1d
  • Pointer size: 132 Bytes
  • Size of remote file: 1.78 MB
data/20230927_102403.jpg ADDED

Git LFS Details

  • SHA256: 91f0c97feebb01e2fa51dd348d689e50d649f6184d6e8ca028ec8b5bdb12f437
  • Pointer size: 132 Bytes
  • Size of remote file: 1.8 MB
data/20230927_102404.jpg ADDED

Git LFS Details

  • SHA256: e98144cc2fd78745b001cb03bfac0c1c8ee83aad2f6bee2d01112b6a7cb06f16
  • Pointer size: 132 Bytes
  • Size of remote file: 2.3 MB
data/20230927_102406.jpg ADDED

Git LFS Details

  • SHA256: 7def23cddff90e0f10699ecd951c2fec3b8ca0b7672d0038b83e7a44b4ff530a
  • Pointer size: 132 Bytes
  • Size of remote file: 1.91 MB
data/20230927_102409.jpg ADDED

Git LFS Details

  • SHA256: 83481b99f6b6f429f15f01413031906fec8a009d4e8bfe3018d72f0c5317f1ab
  • Pointer size: 132 Bytes
  • Size of remote file: 1.72 MB
data/20230927_102425.jpg ADDED

Git LFS Details

  • SHA256: 1d68f12ef3f87007cbd5f1fdd30a7a1b31e3f060e4e1771b607ffe94fd45ba54
  • Pointer size: 132 Bytes
  • Size of remote file: 1.58 MB
data/20230927_102427.jpg ADDED

Git LFS Details

  • SHA256: 8e75005ad1405ff43148e7ceda6a6c959469697a6981cef8f05d01ae8e2ca0d9
  • Pointer size: 132 Bytes
  • Size of remote file: 1.61 MB
data/20230927_102428.jpg ADDED

Git LFS Details

  • SHA256: b0c4a54271cea64e5e9180bf9c9fc7e0b8a29950518c8fe100fc5e82c6cd76a9
  • Pointer size: 132 Bytes
  • Size of remote file: 1.29 MB
data/20230927_102430.jpg ADDED

Git LFS Details

  • SHA256: 6e4d4eff923c301a8fdd3c369beb10d3b2f5aa2fc7e5052c5051442f185f6ee1
  • Pointer size: 132 Bytes
  • Size of remote file: 1.43 MB
data/20230927_102432.jpg ADDED

Git LFS Details

  • SHA256: bfdccc06deb0cc8c58850bb679ba93e11e68ca45b405bd0a2f656123e3e979f7
  • Pointer size: 132 Bytes
  • Size of remote file: 1.23 MB
data/20230927_102433.jpg ADDED

Git LFS Details

  • SHA256: 4ff05db235ea9229c2113f397fbb774cadb9e5e59a9c7f4f96d1bf504567385b
  • Pointer size: 132 Bytes
  • Size of remote file: 1.62 MB
data/20230927_102435.jpg ADDED

Git LFS Details

  • SHA256: 808130f81d5806278c1f2c3ad2962429f01797d15528817f71dda98172e6dcd6
  • Pointer size: 132 Bytes
  • Size of remote file: 2.04 MB
data/20230927_102436.jpg ADDED

Git LFS Details

  • SHA256: 68d419f3e6a069df075141290345faf18999a9c2bf3336ab696d3ab37b289005
  • Pointer size: 132 Bytes
  • Size of remote file: 2.27 MB
data/20230927_102440.jpg ADDED

Git LFS Details

  • SHA256: 918d23ba9f6b37dc6f882044fa68bc9c9ed8e7122befbd523b09913b7e4e0729
  • Pointer size: 132 Bytes
  • Size of remote file: 1.84 MB
data/20230927_102441.jpg ADDED

Git LFS Details

  • SHA256: 7779e0a913986db2d382c119ffe5b3070514d62d03a3be38dfab9440a64efdb2
  • Pointer size: 132 Bytes
  • Size of remote file: 1.6 MB
data/20230927_102456.jpg ADDED

Git LFS Details

  • SHA256: 26e7514a321d00c728953bfc253e94b0ed63b91c38e5e2d37987028d2f360389
  • Pointer size: 132 Bytes
  • Size of remote file: 1.54 MB
data/20230927_102458.jpg ADDED

Git LFS Details

  • SHA256: a37abb6feb1f78f5760e6dc38f378b5c00a2097de7890153d577c5cdc76d2462
  • Pointer size: 132 Bytes
  • Size of remote file: 1.27 MB
data/20230927_102459.jpg ADDED

Git LFS Details

  • SHA256: b395f6aa3c683bf8a1fa260b342656fc19a6e596db31ede24e203d1c0e1a2326
  • Pointer size: 132 Bytes
  • Size of remote file: 1.71 MB
data/20230927_102500.jpg ADDED

Git LFS Details

  • SHA256: ab3d165d0e5dbfa760d02aefc6384ae5689611afcecd8b6ff6f3d4bb97e3e50f
  • Pointer size: 132 Bytes
  • Size of remote file: 1.9 MB
data/20230927_102502.jpg ADDED

Git LFS Details

  • SHA256: 7c60ff2cb22b59bc56476255ebab43d4f559c3c7c32d293bdd1957a6e8e499b0
  • Pointer size: 132 Bytes
  • Size of remote file: 1.91 MB
data/20230927_102503.jpg ADDED

Git LFS Details

  • SHA256: c3b5cc92749618a82df6ee382f902078f69d6e3257b755758a53376966277f9f
  • Pointer size: 132 Bytes
  • Size of remote file: 1.83 MB
data/20230927_102505.jpg ADDED

Git LFS Details

  • SHA256: e1cccc14f0f7ad5f4ce2e318ae69a5f7c2a17dd289d3f9dad186dc3a5e21dd24
  • Pointer size: 132 Bytes
  • Size of remote file: 1.86 MB
data/20230927_102506.jpg ADDED

Git LFS Details

  • SHA256: cbd053c30c9439d03aca0cd6f296b8a5c8da39192cc0d1d84e00b3bcb8286184
  • Pointer size: 132 Bytes
  • Size of remote file: 1.81 MB
data/20230927_102509.jpg ADDED

Git LFS Details

  • SHA256: 335feeb12005071b3cacd17dc5f11eb0abe1f7f9fb6099de37c2b30df8fca83c
  • Pointer size: 132 Bytes
  • Size of remote file: 1.67 MB
data/20230927_102511.jpg ADDED

Git LFS Details

  • SHA256: d9ddf41aa1604e32062c082e6ce020f484159b5be993947111404271d093803d
  • Pointer size: 132 Bytes
  • Size of remote file: 1.52 MB
data/20230927_102538.jpg ADDED

Git LFS Details

  • SHA256: e18afea801acfbd18cc9d5f082f5081b2d5d9745969ef26871282cebf2e80af9
  • Pointer size: 132 Bytes
  • Size of remote file: 1.75 MB
data/20230927_102539.jpg ADDED

Git LFS Details

  • SHA256: 1debe2cdac667112b5231bfa1efe8786f9bbfd3931e9ab7ba64221ccedcdc86a
  • Pointer size: 132 Bytes
  • Size of remote file: 2.35 MB
data/20230927_102540.jpg ADDED

Git LFS Details

  • SHA256: 5d3f872d9a5aefda434cc694f483f525894525e4a817f5620d9a9eb0322b86b0
  • Pointer size: 132 Bytes
  • Size of remote file: 2.07 MB
data/20230927_102541.jpg ADDED

Git LFS Details

  • SHA256: 377083d5f09b790de313fe20c998b5d837b7e7e70c6b9b5f49a89a45ec75b705
  • Pointer size: 132 Bytes
  • Size of remote file: 1.83 MB
data/20230927_102542.jpg ADDED

Git LFS Details

  • SHA256: ac63e6c853c2ab090150bf5d518e4b5fe6b5a9d26c52ec265d1c85a5ab8c9891
  • Pointer size: 132 Bytes
  • Size of remote file: 1.63 MB
data/20230927_102543.jpg ADDED

Git LFS Details

  • SHA256: f365d6ba6cf0ff1255c3d6b4f6b6119922d0d0e20fff89faabbd56d76547cfcc
  • Pointer size: 132 Bytes
  • Size of remote file: 1.54 MB
data/20230927_102545.jpg ADDED

Git LFS Details

  • SHA256: 7fe00f009c49bef6621fcd40be26dc26a87fd6a1282ffcac1a48423cc4b96005
  • Pointer size: 132 Bytes
  • Size of remote file: 1.52 MB
data/20230927_102546.jpg ADDED

Git LFS Details

  • SHA256: 07a7084ba07867a61cdeeceb9204cbf005700227d75df4ad56c9443e1f0bc9dc
  • Pointer size: 132 Bytes
  • Size of remote file: 2.47 MB
data/20230927_102551.jpg ADDED

Git LFS Details

  • SHA256: bec5975c8735a09cdc983dbd5322721d7e7aa6bf37ae3c0256dc5dc10538373c
  • Pointer size: 132 Bytes
  • Size of remote file: 1.93 MB
data/20230927_102552.jpg ADDED

Git LFS Details

  • SHA256: ae98af1917b53b38b95b307e61b3aa115832a69f5348b3d09994e7f357b1b31d
  • Pointer size: 132 Bytes
  • Size of remote file: 1.54 MB
data/20230927_102634.jpg ADDED

Git LFS Details

  • SHA256: 2e88d47459982b6a15d5a9588eb7337b0107741cd897c1b6cb2083248cd3258d
  • Pointer size: 132 Bytes
  • Size of remote file: 1.53 MB
data/20230927_102636.jpg ADDED

Git LFS Details

  • SHA256: 8e3203434a23470a9406e8fffc83363c148d7a2127f773bb4c8ce6825a6c179e
  • Pointer size: 132 Bytes
  • Size of remote file: 1.87 MB
data/20230927_102637.jpg ADDED

Git LFS Details

  • SHA256: f04d6f79a3deec621255791eaedd57c1ff09857d45b1a86c692b1ddbcf93a490
  • Pointer size: 132 Bytes
  • Size of remote file: 2 MB
data/20230927_102638.jpg ADDED

Git LFS Details

  • SHA256: 67213b21819cb68ac5650f7bc0d40f35b0df1fd1a2814fb27f00e0cd0c8457dc
  • Pointer size: 132 Bytes
  • Size of remote file: 2.58 MB
data/20230927_102639.jpg ADDED

Git LFS Details

  • SHA256: dc04d46868c85662c4c87ddddab9b592d724f692999154ebf73fd7e1087f40ce
  • Pointer size: 132 Bytes
  • Size of remote file: 1.85 MB
data/20230927_102640.jpg ADDED

Git LFS Details

  • SHA256: 488f4f230c24e006bc4170f32568515c43fef56cbdf76bd7bfce272af0b92e3f
  • Pointer size: 132 Bytes
  • Size of remote file: 1.92 MB
data/20230927_102642.jpg ADDED

Git LFS Details

  • SHA256: 810ab03d7b56468b7214305795f76af41d097dccfc04dae48731f57b9f66d403
  • Pointer size: 132 Bytes
  • Size of remote file: 2.31 MB
data/20230927_102643.jpg ADDED

Git LFS Details

  • SHA256: d9d6853e19d71ab51630f332a2847bf851837b7b438da8274ee341783e46e896
  • Pointer size: 132 Bytes
  • Size of remote file: 2.46 MB