Beispiel #1
0
 def test_IOI_DICTIONARY_predictionhandling(self):
     my_dict = dict()
     my_dict["dict_sample"] = (self.img, self.seg)
     interface = Dictionary_interface(my_dict)
     sample_list = interface.initialize("")
     interface.save_prediction(self.seg, "dict_sample", "")
     pred = interface.load_prediction("dict_sample", "")
     self.assertTrue(np.array_equal(pred, self.seg))
Beispiel #2
0
 def test_IOI_DICTIONARY_predictionhandling(self):
     my_dict = dict()
     my_dict["dict_sample"] = (self.img, self.seg)
     interface = Dictionary_interface(my_dict)
     sample_list = interface.initialize("")
     sample = MIScnn_sample.Sample("dict_sample", np.asarray([0]), 1, 2)
     sample.add_prediction(self.seg);
     interface.save_prediction(sample, "")
     pred = interface.load_prediction("dict_sample", "")
     self.assertTrue(np.array_equal(pred.reshape(self.seg.shape), self.seg))