Euniceyeee commited on
Commit
70891f4
1 Parent(s): bf3bc6e

Update kidney-ct-abnormality.py

Browse files
Files changed (1) hide show
  1. kidney-ct-abnormality.py +7 -2
kidney-ct-abnormality.py CHANGED
@@ -49,8 +49,13 @@ class KidneyCTAbnormality(datasets.GeneratorBasedBuilder):
49
  description=_DESCRIPTION,
50
  features=datasets.Features(
51
  {
52
- "image": datasets.Image(),
53
  "label": datasets.ClassLabel(num_classes=2, names=LABELS),
 
 
 
 
 
54
  }
55
  ),
56
  supervised_keys=("image", "label"),
@@ -102,6 +107,6 @@ class KidneyCTAbnormality(datasets.GeneratorBasedBuilder):
102
  img_array_c = img_array.astype('uint8')
103
  img_array_cr = img_array_c.transpose(2, 0, 1)[..., np.newaxis]
104
  yield i, {
105
- "image": img_array_cr,
106
  "label": meta["abnormality"],
107
  }
 
49
  description=_DESCRIPTION,
50
  features=datasets.Features(
51
  {
52
+ "images": datasets.Sequence(datasets.Image()),
53
  "label": datasets.ClassLabel(num_classes=2, names=LABELS),
54
+
55
+ # features = Features({'post': Sequence(feature={'text': Value(dtype='string'),
56
+ # 'upvotes': Value(dtype='int32'),
57
+ # 'label': ClassLabel(num_classes=2, names=['hot', 'cold'])})})
58
+
59
  }
60
  ),
61
  supervised_keys=("image", "label"),
 
107
  img_array_c = img_array.astype('uint8')
108
  img_array_cr = img_array_c.transpose(2, 0, 1)[..., np.newaxis]
109
  yield i, {
110
+ "images": img_array_cr,
111
  "label": meta["abnormality"],
112
  }