Ejemplo n.º 1
0
 def build(self, datadir, vols, spec, aug):
     print("Spec")
     print(spec)
     dp = DataProvider(spec)
     for vol in vols:
         print("Vol: {}".format(vol))
         dp.add_dataset(self.build_dataset(datadir, vol))
     dp.set_augment(aug)
     dp.set_imgs(["input"])
     dp.set_segs(["soma_label"])
     self.dataprovider = dp
Ejemplo n.º 2
0
 def build(self, data, spec, aug, prob):
     dp = DataProvider(spec)
     keys = data.keys()
     for k in keys:
         dp.add_dataset(self.build_dataset(k, data[k]))
     dp.set_augment(aug)
     dp.set_imgs(['input'])
     dp.set_segs(['affinity'])
     if prob:
         dp.set_sampling_weights(p=[prob[k] for k in keys])
     else:
         dp.set_sampling_weights(p=None)
     self.dataprovider = dp
     print(dp)