CellposeTransform
Bases: OnlyInstMapTransform
__init__ ¶
Generate flows from a heat diffused label mask.
https://www.nature.com/articles/s41592-020-01018-x
Parameters:
Name | Type | Description | Default |
---|---|---|---|
deduplicate
|
bool, default=True
|
Whether to fix duplicate values in the mask before transforming. This adds overhead, so use only if you know that the mask has duplicates. |
True
|
__call__ ¶
Fix duplicate values and generate flows.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
inst
|
ndarray
|
Instance labelled mask. Shape (H, W). |
required |
Returns:
Type | Description |
---|---|
ndarray
|
np.ndarray: Horizontal and vertical flows of objects. Shape: (2, H, W). Dtype: float64. |