Пример #1
0
 def test_MODEL_predictionAugmentated_2D(self):
     data_aug = Data_Augmentation()
     pp = Preprocessor(self.data_io2D,
                       batch_size=2,
                       data_aug=data_aug,
                       analysis="fullimage")
     nn = Neural_Network(preprocessor=pp)
     for sample in self.sample_list2D:
         predictions = nn.predict_augmentated(sample)
         self.assertEqual(len(predictions), 2)
         for pred in predictions:
             self.assertEqual(pred.shape, (16, 16, 3))
Пример #2
0
 def test_MODEL_predictionAugmentated_3D(self):
     data_aug = Data_Augmentation()
     pp = Preprocessor(self.data_io3D,
                       batch_size=1,
                       patch_shape=(8, 8, 8),
                       data_aug=data_aug,
                       analysis="patchwise-crop")
     nn = Neural_Network(preprocessor=pp,
                         architecture=UNet_standard(depth=2))
     for sample in self.sample_list3D:
         predictions = nn.predict_augmentated(sample)
         self.assertEqual(len(predictions), 3)
         for pred in predictions:
             self.assertEqual(pred.shape, (16, 16, 16, 3))