add food vision 199 script
Browse files
food_vision_199_classes.py
CHANGED
@@ -18,9 +18,11 @@ _CITATION = "TODO"
|
|
18 |
_DESCRIPTION = "Images of 199 food classes from the Nutrify app."
|
19 |
|
20 |
# Read lines of class_names.txt
|
21 |
-
|
|
|
22 |
_NAMES = f.read().splitlines()
|
23 |
|
|
|
24 |
class Food199(datasets.GeneratorBasedBuilder):
|
25 |
"""Food199 Images dataset"""
|
26 |
|
|
|
18 |
_DESCRIPTION = "Images of 199 food classes from the Nutrify app."
|
19 |
|
20 |
# Read lines of class_names.txt
|
21 |
+
class_names = datasets.DownloadManager().download("class_names.txt")
|
22 |
+
with open(class_names, "r") as f:
|
23 |
_NAMES = f.read().splitlines()
|
24 |
|
25 |
+
# Create Food199 class
|
26 |
class Food199(datasets.GeneratorBasedBuilder):
|
27 |
"""Food199 Images dataset"""
|
28 |
|