alkzar90 commited on
Commit
8f04e43
1 Parent(s): 6fd172f

check label type

Browse files
Files changed (1) hide show
  1. NIH-Chest-X-ray-dataset.py +7 -6
NIH-Chest-X-ray-dataset.py CHANGED
@@ -81,11 +81,11 @@ class XChest(datasets.GeneratorBasedBuilder):
81
  {
82
  "image_file_path": datasets.Value("string"),
83
  "image": datasets.Image(),
84
- #"labels": datasets.features.ClassLabel(names=_NAMES),
85
- "labels": datasets.features.Sequence(
86
- datasets.features.ClassLabel(num_classes=len(_NAMES),
87
- names=_NAMES)
88
- )
89
  }
90
  ),
91
  supervised_keys=("image", "labels"),
@@ -146,6 +146,7 @@ class XChest(datasets.GeneratorBasedBuilder):
146
  "image_file_path": path,
147
  "image": path,
148
  #"labels": ["Mass", "Hernia"]
149
- "labels": [5, 14]
 
150
  }
151
 
 
81
  {
82
  "image_file_path": datasets.Value("string"),
83
  "image": datasets.Image(),
84
+ "labels": datasets.features.ClassLabel(names=_NAMES),
85
+ #"labels": datasets.features.Sequence(
86
+ # datasets.features.ClassLabel(num_classes=len(_NAMES),
87
+ # names=_NAMES)
88
+ # )
89
  }
90
  ),
91
  supervised_keys=("image", "labels"),
 
146
  "image_file_path": path,
147
  "image": path,
148
  #"labels": ["Mass", "Hernia"]
149
+ #"labels": [5, 14]
150
+ "labels": "Mass"
151
  }
152