Datasets:
Tasks:
Image Classification
Sub-tasks:
multi-class-image-classification
Languages:
English
Size:
1K<n<10K
License:
Add _info(self) for image-segmentation
Browse files- rock-glacier-dataset.py +6 -3
rock-glacier-dataset.py
CHANGED
@@ -70,10 +70,14 @@ class RockGlacierDataset(datasets.GeneratorBasedBuilder):
|
|
70 |
"labels": datasets.features.ClassLabel(names=_NAMES),
|
71 |
})
|
72 |
keys = ("image", "labels")
|
73 |
-
task = [ImageClassification(image_column="image", label_column="labels")]
|
74 |
|
75 |
if self.config.name == "image-segmentation":
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
return datasets.DatasetInfo(
|
79 |
description=_DESCRIPTION,
|
@@ -81,7 +85,6 @@ class RockGlacierDataset(datasets.GeneratorBasedBuilder):
|
|
81 |
supervised_keys=keys,
|
82 |
homepage=_HOMEPAGE,
|
83 |
citation=_CITATION,
|
84 |
-
task_templates=task,
|
85 |
)
|
86 |
|
87 |
|
|
|
70 |
"labels": datasets.features.ClassLabel(names=_NAMES),
|
71 |
})
|
72 |
keys = ("image", "labels")
|
|
|
73 |
|
74 |
if self.config.name == "image-segmentation":
|
75 |
+
features = datasets.Features({
|
76 |
+
"image": datasets.Image(),
|
77 |
+
"labels": datasets.Image(),
|
78 |
+
})
|
79 |
+
keys = ("image", "labels")
|
80 |
+
|
81 |
|
82 |
return datasets.DatasetInfo(
|
83 |
description=_DESCRIPTION,
|
|
|
85 |
supervised_keys=keys,
|
86 |
homepage=_HOMEPAGE,
|
87 |
citation=_CITATION,
|
|
|
88 |
)
|
89 |
|
90 |
|