mmv_im2im.postprocessing package¶
Submodules¶
mmv_im2im.postprocessing.basic_collection module¶
- mmv_im2im.postprocessing.basic_collection.extract_segmentation(im: ndarray | Tensor, channel: int, cutoff: float | str | None = None, batch_dim: bool = True) ndarray [source]¶
extract segmentation from a prediction
Parameters:¶
- im: ndarray or torch.Tensor
the multi-class prediction (1, C, W, H) or (1, C, Z, Y, X)
- channel: int
which channel to select
- cutoff: float or str
either a fixed cutoff value or a segmentation method from skimage, default is None (do not apply any cutoff)
- batch_dim: bool
whether there is a batch dimension (default is True)
mmv_im2im.postprocessing.embedseg_cluster module¶
- class mmv_im2im.postprocessing.embedseg_cluster.Cluster_2d(grid_y, grid_x, pixel_y, pixel_x)[source]¶
Bases:
object
- class mmv_im2im.postprocessing.embedseg_cluster.Cluster_3d(grid_z, grid_y, grid_x, pixel_z, pixel_y, pixel_x, one_hot=False)[source]¶
Bases:
object
- mmv_im2im.postprocessing.embedseg_cluster.generate_instance_clusters(pred: ndarray | Tensor, grid_x: int = 768, grid_y: int = 768, pixel_x: int = 1, pixel_y: int = 1, n_sigma: int = 2, seed_thresh: float = 0.5, min_mask_sum: int = 10, min_unclustered_sum: int = 10, min_object_size: int = 10, grid_z: int = 32, pixel_z: int = 1)[source]¶