Datasets:
frgfm
commited on
Commit
·
a41adbe
1
Parent(s):
7ceb202
style: Fixed object naming
Browse files- imagenette.py +7 -7
imagenette.py
CHANGED
@@ -48,7 +48,7 @@ _LABEL_MAP = [
|
|
48 |
_REPO = "https://huggingface.co/datasets/frgfm/imagenette/resolve/main/metadata"
|
49 |
|
50 |
|
51 |
-
class
|
52 |
"""BuilderConfig for OpenFire."""
|
53 |
|
54 |
def __init__(self, data_url, metadata_urls, **kwargs):
|
@@ -58,16 +58,16 @@ class OpenFireConfig(datasets.BuilderConfig):
|
|
58 |
matadata_urls: dictionary with keys 'train' and 'validation' containing the archive metadata URLs
|
59 |
**kwargs: keyword arguments forwarded to super.
|
60 |
"""
|
61 |
-
super(
|
62 |
self.data_url = data_url
|
63 |
self.metadata_urls = metadata_urls
|
64 |
|
65 |
|
66 |
-
class
|
67 |
-
"""
|
68 |
|
69 |
BUILDER_CONFIGS = [
|
70 |
-
|
71 |
name="full_size",
|
72 |
description="All images are in their original size.",
|
73 |
data_url="https://s3.amazonaws.com/fast-ai-imageclas/imagenette2.tgz",
|
@@ -76,7 +76,7 @@ class OpenFire(datasets.GeneratorBasedBuilder):
|
|
76 |
"validation": f"{_REPO}/imagenette2/val.txt",
|
77 |
},
|
78 |
),
|
79 |
-
|
80 |
name="320px",
|
81 |
description="All images were resized on their shortest side to 320 pixels.",
|
82 |
data_url="https://s3.amazonaws.com/fast-ai-imageclas/imagenette2-320.tgz",
|
@@ -85,7 +85,7 @@ class OpenFire(datasets.GeneratorBasedBuilder):
|
|
85 |
"validation": f"{_REPO}/imagenette2-320/val.txt",
|
86 |
},
|
87 |
),
|
88 |
-
|
89 |
name="160px",
|
90 |
description="All images were resized on their shortest side to 160 pixels.",
|
91 |
data_url="https://s3.amazonaws.com/fast-ai-imageclas/imagenette2-160.tgz",
|
|
|
48 |
_REPO = "https://huggingface.co/datasets/frgfm/imagenette/resolve/main/metadata"
|
49 |
|
50 |
|
51 |
+
class ImagenetteConfig(datasets.BuilderConfig):
|
52 |
"""BuilderConfig for OpenFire."""
|
53 |
|
54 |
def __init__(self, data_url, metadata_urls, **kwargs):
|
|
|
58 |
matadata_urls: dictionary with keys 'train' and 'validation' containing the archive metadata URLs
|
59 |
**kwargs: keyword arguments forwarded to super.
|
60 |
"""
|
61 |
+
super(ImagenetteConfig, self).__init__(version=datasets.Version("1.0.0"), **kwargs)
|
62 |
self.data_url = data_url
|
63 |
self.metadata_urls = metadata_urls
|
64 |
|
65 |
|
66 |
+
class Imagenette(datasets.GeneratorBasedBuilder):
|
67 |
+
"""Imagenette dataset."""
|
68 |
|
69 |
BUILDER_CONFIGS = [
|
70 |
+
ImagenetteConfig(
|
71 |
name="full_size",
|
72 |
description="All images are in their original size.",
|
73 |
data_url="https://s3.amazonaws.com/fast-ai-imageclas/imagenette2.tgz",
|
|
|
76 |
"validation": f"{_REPO}/imagenette2/val.txt",
|
77 |
},
|
78 |
),
|
79 |
+
ImagenetteConfig(
|
80 |
name="320px",
|
81 |
description="All images were resized on their shortest side to 320 pixels.",
|
82 |
data_url="https://s3.amazonaws.com/fast-ai-imageclas/imagenette2-320.tgz",
|
|
|
85 |
"validation": f"{_REPO}/imagenette2-320/val.txt",
|
86 |
},
|
87 |
),
|
88 |
+
ImagenetteConfig(
|
89 |
name="160px",
|
90 |
description="All images were resized on their shortest side to 160 pixels.",
|
91 |
data_url="https://s3.amazonaws.com/fast-ai-imageclas/imagenette2-160.tgz",
|