varora commited on
Commit
4198a51
1 Parent(s): 5f7902f

changes to hit.py

Browse files
Files changed (1) hide show
  1. hit.py +8 -3
hit.py CHANGED
@@ -81,7 +81,7 @@ class NewDataset(datasets.GeneratorBasedBuilder):
81
  features = datasets.Features(
82
  {
83
  "gender": datasets.Value("string"),
84
- "mri_seg": datasets.Array3D(dtype="int64", shape=(None, 192, 256)),
85
  "mri_labels": {
86
  "NO": datasets.Value("int32"),
87
  "LT": datasets.Value("int32"),
@@ -180,11 +180,16 @@ class NewDataset(datasets.GeneratorBasedBuilder):
180
  for subject_path in filepath:
181
  with gzip.open(subject_path, 'rb') as f:
182
  data = pickle.load(f)
 
 
 
183
  key = data['subject_ID']
184
- #del data['mri_seg_dict']
185
  #del data['smpl_dict']
186
- #del data['mri_seg']
187
  #del data['mri_labels']
188
  #del data['resolution']
189
  #del data['center']
 
 
190
  yield key, data
 
81
  features = datasets.Features(
82
  {
83
  "gender": datasets.Value("string"),
84
+ "mri_seg": datasets.Array3D(dtype="int32", shape=(None, 192, 256)),
85
  "mri_labels": {
86
  "NO": datasets.Value("int32"),
87
  "LT": datasets.Value("int32"),
 
180
  for subject_path in filepath:
181
  with gzip.open(subject_path, 'rb') as f:
182
  data = pickle.load(f)
183
+ print(f"pc shape: {data['body_cont_pc'].shape}")
184
+ print(f"mri_seg shape: {data['mri_seg'].shape}")
185
+ print(f"mri_seg_dict shape: {data['body_mask'].shape}")
186
  key = data['subject_ID']
187
+ #del data['body_mask'] # nan
188
  #del data['smpl_dict']
189
+ #del data['mri_seg'] # reshape
190
  #del data['mri_labels']
191
  #del data['resolution']
192
  #del data['center']
193
+ #del data['body_cont_pc'] # nan
194
+
195
  yield key, data