1313__all__  =  [
1414    "CellPoseUnet" ,
1515    "cellpose_nuclei" ,
16-     "cellpose_panoptic" ,
1716    "omnipose_nuclei" ,
18-     "omnipose_panoptic" ,
1917]
2018
2119
@@ -249,34 +247,6 @@ def cellpose_nuclei(n_nuc_classes: int, **kwargs) -> nn.Module:
249247    return  cellpose_unet 
250248
251249
252- def  cellpose_panoptic (n_nuc_classes : int , n_tissue_classes : int , ** kwargs ) ->  nn .Module :
253-     """Initialize Cellpose for panoptic segmentation. 
254- 
255-     Cellpose: 
256-     - https://www.nature.com/articles/s41592-020-01018-x 
257- 
258-     Parameters 
259-         n_nuc_classes (int): 
260-             Number of nuclei type classes. 
261-         n_tissue_classes (int): 
262-             Number of tissue type classes. 
263-         **kwargs: 
264-             Arbitrary key word args for the CellPoseUnet class. 
265- 
266-     Returns: 
267-         nn.Module: The initialized Cellpose+ U-net model. 
268-     """ 
269-     cellpose_unet  =  CellPoseUnet (
270-         decoders = ("type" , "tissue" ),
271-         heads = {
272-             "type" : {"nuc_cellpose" : 2 , "nuc_type" : n_nuc_classes },
273-             "tissue" : {"tissue_type" : n_tissue_classes },
274-         },
275-         ** kwargs ,
276-     )
277-     return  cellpose_unet 
278- 
279- 
280250def  omnipose_nuclei (n_nuc_classes : int , ** kwargs ) ->  nn .Module :
281251    """Create the baseline Omnipose U-net for nuclei segmentation. 
282252
@@ -300,33 +270,3 @@ def omnipose_nuclei(n_nuc_classes: int, **kwargs) -> nn.Module:
300270    cellpose_unet .aux_key  =  "omnipose" 
301271
302272    return  cellpose_unet 
303- 
304- 
305- def  omnipose_panoptic (n_nuc_classes : int , n_tissue_classes : int , ** kwargs ) ->  nn .Module :
306-     """Create the Omnipose U-net with nuclei- and tissue segmentation decoders. 
307- 
308-     Omnipose: 
309-     - https://www.biorxiv.org/content/10.1101/2021.11.03.467199v2 
310- 
311-     Parameters: 
312-         n_nuc_classes (int): 
313-             Number of nuclei type classes. 
314-         n_tissue_classes (int): 
315-             Number of tissue type classes. 
316-         **kwargs: 
317-             Arbitrary key word args for the CellPoseUnet class. 
318- 
319-     Returns: 
320-         nn.Module: The initialized Cellpose+ U-net model. 
321-     """ 
322-     cellpose_unet  =  CellPoseUnet (
323-         decoders = ("type" , "tissue" ),
324-         heads = {
325-             "type" : {"nuc_omnipose" : 2 , "nuc_type" : n_nuc_classes },
326-             "tissue" : {"tissue_type" : n_tissue_classes },
327-         },
328-         ** kwargs ,
329-     )
330-     cellpose_unet .aux_key  =  "omnipose" 
331- 
332-     return  cellpose_unet 
0 commit comments