Skip to content
Snippets Groups Projects
Commit efce29dc authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Tests pass

parent 04b4d523
No related branches found
No related tags found
No related merge requests found
......@@ -157,7 +157,11 @@ class IlastikPixelClassifierModel(IlastikModel, SemanticSegmentationModel):
def label_pixel_class(self, img: GenericImageDataAccessor, **kwargs):
pxmap = self.infer(img)
mask = pxmap.get_mono(self.params['px_class']).apply(lambda x: x > self.params['px_prob_threshold'])
mask = pxmap.get_mono(
self.params['px_class']
).apply(
lambda x: x > self.params['px_prob_threshold']
)
return mask
......
......@@ -344,7 +344,7 @@ class TestIlastikOnMultichannelInputs(TestServerTestCase):
mod = ilm.IlastikObjectClassifierFromPixelPredictionsModel(
{'project_file': self.pa_ob_pxmap_classifier.__str__()}
)
obmap = mod.infer(img, pxmap)[0]
obmap = mod.infer(img, pxmap)
self.assertEqual(obmap.hw, img.hw)
self.assertEqual(obmap.nz, img.nz)
......
......@@ -72,8 +72,12 @@ class BaseTestRoiSetMonoProducts(object):
'name': 'ilastik_px_mod',
'project_file': fp_px,
'model': ilm.IlastikPixelClassifierModel(
{'project_file': fp_px},
)
{
'project_file': fp_px,
'px_class': 0,
'px_prob_threshold': 0.5,
},
),
},
'object_classifier': {
'name': 'ilastik_ob_mod',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment