StardistTransform
Bases: OnlyInstMapTransform
__init__ ¶
Generate radial distance maps from a label mask.
https://arxiv.org/abs/1806.03535
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n_rays
|
int, default=32
|
Number of rays used for computing distance maps. |
32
|
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 radial distance maps.
Parameters inst (np.ndarray): Instance labelled mask. Shape (H, W).
Returns np.ndarray: Pixelwise radial distance maps. Shape: (n_rays, H, W). Dtype: float64.