@@ -1477,15 +1477,15 @@ def cellpose_segmentation(self, input_image):
14771477 np .max (input_image ) - np .min (input_image )
14781478 ) # min max normalize to 0-1 range as cellpose expects this
14791479
1480- masks , _ , _ , _ = model .eval (
1480+ masks = model .eval (
14811481 [input_image ],
14821482 rescale = self .rescale ,
14831483 normalize = self .normalize ,
14841484 diameter = self .diameter ,
14851485 flow_threshold = self .flow_threshold ,
14861486 cellprob_threshold = self .cellprob_threshold ,
14871487 channels = [1 , 0 ],
1488- )
1488+ )[ 0 ]
14891489 masks = np .array (masks ) # convert to array
14901490
14911491 # ensure all edge classes are removed
@@ -1587,15 +1587,15 @@ def cellpose_segmentation(self, input_image):
15871587 np .max (input_image ) - np .min (input_image )
15881588 ) # min max normalize to 0-1 range as cellpose expects this
15891589
1590- masks_nucleus , _ , _ , _ = model .eval (
1590+ masks_nucleus = model .eval (
15911591 [input_image ],
15921592 rescale = self .rescale ,
15931593 normalize = self .normalize ,
15941594 diameter = self .diameter ,
15951595 flow_threshold = self .flow_threshold ,
15961596 cellprob_threshold = self .cellprob_threshold ,
15971597 channels = [1 , 0 ],
1598- )
1598+ )[ 0 ]
15991599 masks_nucleus = np .array (masks_nucleus ) # convert to array
16001600
16011601 # manually delete model and perform gc to free up memory on GPU
@@ -1610,15 +1610,15 @@ def cellpose_segmentation(self, input_image):
16101610
16111611 model = self ._load_model (model_type = "cytosol" , gpu = self .use_GPU , device = self .device )
16121612
1613- masks_cytosol , _ , _ , _ = model .eval (
1613+ masks_cytosol = model .eval (
16141614 [input_image ],
16151615 rescale = self .rescale ,
16161616 normalize = self .normalize ,
16171617 diameter = self .diameter ,
16181618 flow_threshold = self .flow_threshold ,
16191619 cellprob_threshold = self .cellprob_threshold ,
16201620 channels = [2 , 1 ],
1621- )
1621+ )[ 0 ]
16221622 masks_cytosol = np .array (masks_cytosol ) # convert to array
16231623
16241624 # manually delete model and perform gc to free up memory on GPU
@@ -1852,15 +1852,15 @@ def cellpose_segmentation(self, input_image):
18521852 np .max (input_image ) - np .min (input_image )
18531853 ) # min max normalize to 0-1 range as cellpose expects this
18541854
1855- masks_cytosol , _ , _ , _ = model .eval (
1855+ masks_cytosol = model .eval (
18561856 [input_image ],
18571857 rescale = self .rescale ,
18581858 normalize = self .normalize ,
18591859 diameter = self .diameter ,
18601860 flow_threshold = self .flow_threshold ,
18611861 cellprob_threshold = self .cellprob_threshold ,
18621862 channels = [2 , 1 ],
1863- )
1863+ )[ 0 ]
18641864 masks_cytosol = np .array (masks_cytosol ) # convert to array
18651865
18661866 # manually delete model and perform gc to free up memory on GPU
0 commit comments