alkzar90 commited on
Commit
5c0a2f5
·
1 Parent(s): 2a19855

add path feature in the dataset

Browse files
Files changed (1) hide show
  1. 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":