changes to hit.py
Browse files
hit.py
CHANGED
@@ -84,9 +84,9 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
84 |
#"mri_seg": datasets.Value("int64"),
|
85 |
#"mri_labels": datasets.Sequence(datasets.Sequence(datasets.Value("int64"))),
|
86 |
#"mri_seg_dict": datasets.Sequence(datasets.Sequence(datasets.Value("float"))),
|
87 |
-
|
88 |
#"center": datasets.Value("double"),
|
89 |
-
"smpl_dict": datasets.features.Mapping(datasets.Value("float32")),#datasets.Sequence(datasets.Sequence(datasets.Value("double"))),
|
90 |
"dataset_name": datasets.Value("string"),
|
91 |
"subject_ID": datasets.Value("string")
|
92 |
# These are the features of your dataset like images, labels ...
|
@@ -165,9 +165,9 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
165 |
data = pickle.load(f)
|
166 |
key = data['subject_ID']
|
167 |
del data['mri_seg_dict']
|
168 |
-
|
169 |
del data['mri_seg']
|
170 |
del data['mri_labels']
|
171 |
-
del data['resolution']
|
172 |
del data['center']
|
173 |
yield key, data
|
|
|
84 |
#"mri_seg": datasets.Value("int64"),
|
85 |
#"mri_labels": datasets.Sequence(datasets.Sequence(datasets.Value("int64"))),
|
86 |
#"mri_seg_dict": datasets.Sequence(datasets.Sequence(datasets.Value("float"))),
|
87 |
+
"resolution": datasets.Array(dtype="float32", shape=None),
|
88 |
#"center": datasets.Value("double"),
|
89 |
+
#"smpl_dict": datasets.features.Mapping(datasets.Value("float32")),#datasets.Sequence(datasets.Sequence(datasets.Value("double"))),
|
90 |
"dataset_name": datasets.Value("string"),
|
91 |
"subject_ID": datasets.Value("string")
|
92 |
# These are the features of your dataset like images, labels ...
|
|
|
165 |
data = pickle.load(f)
|
166 |
key = data['subject_ID']
|
167 |
del data['mri_seg_dict']
|
168 |
+
del data['smpl_dict']
|
169 |
del data['mri_seg']
|
170 |
del data['mri_labels']
|
171 |
+
#del data['resolution']
|
172 |
del data['center']
|
173 |
yield key, data
|