karolyartur commited on
Commit
0c3aeea
1 Parent(s): 17d6cad

Update SMVB.py

Browse files
Files changed (1) hide show
  1. SMVB.py +1 -1
SMVB.py CHANGED
@@ -142,7 +142,7 @@ class SMVBDataset(datasets.GeneratorBasedBuilder):
142
  file_infos.append((file_path, file_object.read()))
143
  else:
144
  # file_infos.append((file_path, np.load(io.BytesIO(file_object.read())).flatten()))
145
- file_infos.append((file_path, [0]))
146
  if (i+1)%len(keys) == 0:
147
  img_features_dict = {k:{'path':d[0],'bytes':d[1]} for k,d in zip(keys,file_infos) if k in ['image','mask']}
148
  array_features_dict = {k:d[1] for k,d in zip(keys,file_infos) if not k in ['image','mask']}
 
142
  file_infos.append((file_path, file_object.read()))
143
  else:
144
  # file_infos.append((file_path, np.load(io.BytesIO(file_object.read())).flatten()))
145
+ file_infos.append((file_path, np.load(io.BytesIO(file_object.read())).flatten() if i%len(keys) == 3 else [0]))
146
  if (i+1)%len(keys) == 0:
147
  img_features_dict = {k:{'path':d[0],'bytes':d[1]} for k,d in zip(keys,file_infos) if k in ['image','mask']}
148
  array_features_dict = {k:d[1] for k,d in zip(keys,file_infos) if not k in ['image','mask']}