update data loading script
Browse files
food_vision_199_classes.py
CHANGED
@@ -236,7 +236,7 @@ class Food199(datasets.GeneratorBasedBuilder):
|
|
236 |
description=_DESCRIPTION,
|
237 |
features=datasets.Features(
|
238 |
{
|
239 |
-
"image": datasets.
|
240 |
"label": datasets.ClassLabel(names=_NAMES)
|
241 |
}
|
242 |
),
|
@@ -272,7 +272,7 @@ class Food199(datasets.GeneratorBasedBuilder):
|
|
272 |
This function takes in the kwargs from the _split_generators method and can then yield information from them.
|
273 |
"""
|
274 |
for id_, row in enumerate(annotations):
|
275 |
-
row["image"] = row.pop("filename")
|
276 |
row["label"] = row.pop("label")
|
277 |
yield id_, row
|
278 |
|
|
|
236 |
description=_DESCRIPTION,
|
237 |
features=datasets.Features(
|
238 |
{
|
239 |
+
"image": datasets.Value("string"),
|
240 |
"label": datasets.ClassLabel(names=_NAMES)
|
241 |
}
|
242 |
),
|
|
|
272 |
This function takes in the kwargs from the _split_generators method and can then yield information from them.
|
273 |
"""
|
274 |
for id_, row in enumerate(annotations):
|
275 |
+
row["image"] = str(row.pop("filename"))
|
276 |
row["label"] = row.pop("label")
|
277 |
yield id_, row
|
278 |
|