Datasets:
Tasks:
Image Classification
Sub-tasks:
multi-class-image-classification
Languages:
English
Size:
1K<n<10K
License:
add path feature in the dataset
Browse files- rock-glacier-dataset.py +2 -0
rock-glacier-dataset.py
CHANGED
@@ -83,6 +83,7 @@ class RockGlacierDataset(datasets.GeneratorBasedBuilder):
|
|
83 |
features = datasets.Features({
|
84 |
"image": datasets.Image(),
|
85 |
"labels": datasets.features.ClassLabel(names=_NAMES),
|
|
|
86 |
})
|
87 |
keys = ("image", "labels")
|
88 |
|
@@ -153,6 +154,7 @@ class RockGlacierDataset(datasets.GeneratorBasedBuilder):
|
|
153 |
yield i, {
|
154 |
"image": path,
|
155 |
"labels": os.path.basename(os.path.dirname(path)).lower(),
|
|
|
156 |
}
|
157 |
|
158 |
if self.config.name == "image-segmentation":
|
|
|
83 |
features = datasets.Features({
|
84 |
"image": datasets.Image(),
|
85 |
"labels": datasets.features.ClassLabel(names=_NAMES),
|
86 |
+
"path": datasets.features.Value("string"),
|
87 |
})
|
88 |
keys = ("image", "labels")
|
89 |
|
|
|
154 |
yield i, {
|
155 |
"image": path,
|
156 |
"labels": os.path.basename(os.path.dirname(path)).lower(),
|
157 |
+
"path": path,
|
158 |
}
|
159 |
|
160 |
if self.config.name == "image-segmentation":
|