update loading script and readme file
Browse files- README.md +218 -0
- food_vision_199_classes.py +2 -2
README.md
ADDED
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
dataset_info:
|
3 |
+
features:
|
4 |
+
- name: image
|
5 |
+
dtype: image
|
6 |
+
- name: label
|
7 |
+
dtype:
|
8 |
+
class_label:
|
9 |
+
names:
|
10 |
+
'0': almond_butter
|
11 |
+
'1': almonds
|
12 |
+
'2': apple
|
13 |
+
'3': apricot
|
14 |
+
'4': asparagus
|
15 |
+
'5': avocado
|
16 |
+
'6': bacon
|
17 |
+
'7': bacon_and_egg_burger
|
18 |
+
'8': bagel
|
19 |
+
'9': baklava
|
20 |
+
'10': banana
|
21 |
+
'11': banana_bread
|
22 |
+
'12': barbecue_sauce
|
23 |
+
'13': beans
|
24 |
+
'14': beef
|
25 |
+
'15': beef_curry
|
26 |
+
'16': beef_mince
|
27 |
+
'17': beef_stir_fry
|
28 |
+
'18': beer
|
29 |
+
'19': beetroot
|
30 |
+
'20': biltong
|
31 |
+
'21': blackberries
|
32 |
+
'22': blueberries
|
33 |
+
'23': bok_choy
|
34 |
+
'24': bread
|
35 |
+
'25': broccoli
|
36 |
+
'26': broccolini
|
37 |
+
'27': brownie
|
38 |
+
'28': brussel_sprouts
|
39 |
+
'29': burrito
|
40 |
+
'30': butter
|
41 |
+
'31': cabbage
|
42 |
+
'32': calamari
|
43 |
+
'33': candy
|
44 |
+
'34': capsicum
|
45 |
+
'35': carrot
|
46 |
+
'36': cashews
|
47 |
+
'37': cauliflower
|
48 |
+
'38': celery
|
49 |
+
'39': cheese
|
50 |
+
'40': cheeseburger
|
51 |
+
'41': cherries
|
52 |
+
'42': chicken_breast
|
53 |
+
'43': chicken_thighs
|
54 |
+
'44': chicken_wings
|
55 |
+
'45': chilli
|
56 |
+
'46': chimichurri
|
57 |
+
'47': chocolate
|
58 |
+
'48': chocolate_cake
|
59 |
+
'49': coconut
|
60 |
+
'50': coffee
|
61 |
+
'51': coleslaw
|
62 |
+
'52': cookies
|
63 |
+
'53': coriander
|
64 |
+
'54': corn
|
65 |
+
'55': corn_chips
|
66 |
+
'56': cream
|
67 |
+
'57': croissant
|
68 |
+
'58': crumbed_chicken
|
69 |
+
'59': cucumber
|
70 |
+
'60': cupcake
|
71 |
+
'61': daikon_radish
|
72 |
+
'62': dates
|
73 |
+
'63': donuts
|
74 |
+
'64': dragonfruit
|
75 |
+
'65': eggplant
|
76 |
+
'66': eggs
|
77 |
+
'67': enoki_mushroom
|
78 |
+
'68': fennel
|
79 |
+
'69': figs
|
80 |
+
'70': french_toast
|
81 |
+
'71': fried_rice
|
82 |
+
'72': fries
|
83 |
+
'73': fruit_juice
|
84 |
+
'74': garlic
|
85 |
+
'75': garlic_bread
|
86 |
+
'76': ginger
|
87 |
+
'77': goji_berries
|
88 |
+
'78': granola
|
89 |
+
'79': grapefruit
|
90 |
+
'80': grapes
|
91 |
+
'81': green_beans
|
92 |
+
'82': green_onion
|
93 |
+
'83': guacamole
|
94 |
+
'84': guava
|
95 |
+
'85': gyoza
|
96 |
+
'86': ham
|
97 |
+
'87': honey
|
98 |
+
'88': hot_chocolate
|
99 |
+
'89': ice_coffee
|
100 |
+
'90': ice_cream
|
101 |
+
'91': iceberg_lettuce
|
102 |
+
'92': jerusalem_artichoke
|
103 |
+
'93': kale
|
104 |
+
'94': karaage_chicken
|
105 |
+
'95': kimchi
|
106 |
+
'96': kiwi_fruit
|
107 |
+
'97': lamb_chops
|
108 |
+
'98': leek
|
109 |
+
'99': lemon
|
110 |
+
'100': lentils
|
111 |
+
'101': lettuce
|
112 |
+
'102': lime
|
113 |
+
'103': mandarin
|
114 |
+
'104': mango
|
115 |
+
'105': maple_syrup
|
116 |
+
'106': mashed_potato
|
117 |
+
'107': mayonnaise
|
118 |
+
'108': milk
|
119 |
+
'109': miso_soup
|
120 |
+
'110': mushrooms
|
121 |
+
'111': nectarines
|
122 |
+
'112': noodles
|
123 |
+
'113': nuts
|
124 |
+
'114': olive_oil
|
125 |
+
'115': olives
|
126 |
+
'116': omelette
|
127 |
+
'117': onion
|
128 |
+
'118': orange
|
129 |
+
'119': orange_juice
|
130 |
+
'120': oysters
|
131 |
+
'121': pain_au_chocolat
|
132 |
+
'122': pancakes
|
133 |
+
'123': papaya
|
134 |
+
'124': parsley
|
135 |
+
'125': parsnips
|
136 |
+
'126': passionfruit
|
137 |
+
'127': pasta
|
138 |
+
'128': pawpaw
|
139 |
+
'129': peach
|
140 |
+
'130': pear
|
141 |
+
'131': peas
|
142 |
+
'132': pickles
|
143 |
+
'133': pineapple
|
144 |
+
'134': pizza
|
145 |
+
'135': plum
|
146 |
+
'136': pomegranate
|
147 |
+
'137': popcorn
|
148 |
+
'138': pork_belly
|
149 |
+
'139': pork_chop
|
150 |
+
'140': pork_loins
|
151 |
+
'141': porridge
|
152 |
+
'142': potato_bake
|
153 |
+
'143': potato_chips
|
154 |
+
'144': potato_scallop
|
155 |
+
'145': potatoes
|
156 |
+
'146': prawns
|
157 |
+
'147': pumpkin
|
158 |
+
'148': radish
|
159 |
+
'149': ramen
|
160 |
+
'150': raspberries
|
161 |
+
'151': red_onion
|
162 |
+
'152': red_wine
|
163 |
+
'153': rhubarb
|
164 |
+
'154': rice
|
165 |
+
'155': roast_beef
|
166 |
+
'156': roast_pork
|
167 |
+
'157': roast_potatoes
|
168 |
+
'158': rockmelon
|
169 |
+
'159': rosemary
|
170 |
+
'160': salad
|
171 |
+
'161': salami
|
172 |
+
'162': salmon
|
173 |
+
'163': salsa
|
174 |
+
'164': salt
|
175 |
+
'165': sandwich
|
176 |
+
'166': sardines
|
177 |
+
'167': sausage_roll
|
178 |
+
'168': sausages
|
179 |
+
'169': scrambled_eggs
|
180 |
+
'170': seaweed
|
181 |
+
'171': shallots
|
182 |
+
'172': snow_peas
|
183 |
+
'173': soda
|
184 |
+
'174': soy_sauce
|
185 |
+
'175': spaghetti_bolognese
|
186 |
+
'176': spinach
|
187 |
+
'177': sports_drink
|
188 |
+
'178': squash
|
189 |
+
'179': starfruit
|
190 |
+
'180': steak
|
191 |
+
'181': strawberries
|
192 |
+
'182': sushi
|
193 |
+
'183': sweet_potato
|
194 |
+
'184': tacos
|
195 |
+
'185': tamarillo
|
196 |
+
'186': taro
|
197 |
+
'187': tea
|
198 |
+
'188': toast
|
199 |
+
'189': tofu
|
200 |
+
'190': tomato
|
201 |
+
'191': tomato_chutney
|
202 |
+
'192': tomato_sauce
|
203 |
+
'193': turnip
|
204 |
+
'194': watermelon
|
205 |
+
'195': white_onion
|
206 |
+
'196': white_wine
|
207 |
+
'197': yoghurt
|
208 |
+
'198': zucchini
|
209 |
+
splits:
|
210 |
+
- name: train
|
211 |
+
num_bytes: 1413273
|
212 |
+
num_examples: 19747
|
213 |
+
- name: test
|
214 |
+
num_bytes: 349131
|
215 |
+
num_examples: 4941
|
216 |
+
download_size: 2778026
|
217 |
+
dataset_size: 1762404
|
218 |
+
---
|
food_vision_199_classes.py
CHANGED
@@ -46,8 +46,8 @@ class Food199(datasets.GeneratorBasedBuilder):
|
|
46 |
"""
|
47 |
csv = dl_manager.download("annotations.csv")
|
48 |
df = pd.read_csv(csv)
|
49 |
-
df_train_annotations = df[df["split"] == "train"].to_dict(orient="records")
|
50 |
-
df_test_annotations = df[df["split"] == "test"].to_dict(orient="records")
|
51 |
|
52 |
return [
|
53 |
datasets.SplitGenerator(name=datasets.Split.TRAIN,
|
|
|
46 |
"""
|
47 |
csv = dl_manager.download("annotations.csv")
|
48 |
df = pd.read_csv(csv)
|
49 |
+
df_train_annotations = df[["filename", "label"]][df["split"] == "train"].to_dict(orient="records")
|
50 |
+
df_test_annotations = df[["filename", "label"]][df["split"] == "test"].to_dict(orient="records")
|
51 |
|
52 |
return [
|
53 |
datasets.SplitGenerator(name=datasets.Split.TRAIN,
|