monailabel.deepedit.transforms module¶
- class monailabel.deepedit.transforms.AddRandomGuidanced(guidance='guidance', discrepancy='discrepancy', weight_map=None, probability='probability')[source]¶
Bases:
monai.transforms.transform.Randomizable
,monai.transforms.transform.Transform
Add random guidance based on discrepancies that were found between label and prediction.
- Parameters
guidance (
str
) – key to guidance source, shape (2, N, # of dim)discrepancy (
str
) – key to discrepancy map between label and prediction shape (2, C, H, W, D) or (2, C, H, W)probability (
str
) – key to click/interaction probability, shape (1)weight_map (
Optional
[str
]) – optional key to predetermined weight map used to increase click likelihood in higher weight areas shape (C, H, W, D) or (C, H, W)
- randomize(data=None)[source]¶
Within this method,
self.R
should be used, instead of np.random, to introduce random factors.all
self.R
calls happen here so that we have a better chance to identify errors of sync the random state.This method can generate the random factors based on properties of the input data.
- Raises
NotImplementedError – When the subclass does not override this method.
- class monailabel.deepedit.transforms.DiscardAddGuidanced(keys, number_intensity_ch=1, probability=1.0, allow_missing_keys=False)[source]¶
Bases:
monai.transforms.transform.MapTransform
Discard positive and negative points according to discard probability
- Parameters
keys (
Union
[Collection
[Hashable
],Hashable
]) – Thekeys
parameter will be used to get and set the actual data item to transformnumber_intensity_ch (
int
) – number of intensity channelsprobability (
float
) – probability of discarding clicks
- __init__(keys, number_intensity_ch=1, probability=1.0, allow_missing_keys=False)[source]¶
Discard positive and negative points according to discard probability
- Parameters
keys (
Union
[Collection
[Hashable
],Hashable
]) – Thekeys
parameter will be used to get and set the actual data item to transformnumber_intensity_ch (
int
) – number of intensity channelsprobability (
float
) – probability of discarding clicks
- class monailabel.deepedit.transforms.PosNegClickProbAddRandomGuidanced(guidance='guidance', discrepancy='discrepancy', probability='probability', pos_click_probability=0.5, weight_map=None)[source]¶
Bases:
monai.transforms.transform.Randomizable
,monai.transforms.transform.Transform
Add random guidance based on discrepancies that were found between label and prediction.
- Parameters
guidance (
str
) – key to guidance source, shape (2, N, # of dim)discrepancy (
str
) – key to discrepancy map between label and prediction shape (2, C, H, W, D) or (2, C, H, W)probability (
str
) – key to click/interaction probability, shape (1)pos_click_probability (
float
) – if click, probability of a positive click (probability of negative click will be 1 - pos_click_probability)weight_map (
Optional
[str
]) – optional key to predetermined weight map used to increase click likelihood in higher weight areas shape (C, H, W, D) or (C, H, W)
- randomize(data=None)[source]¶
Within this method,
self.R
should be used, instead of np.random, to introduce random factors.all
self.R
calls happen here so that we have a better chance to identify errors of sync the random state.This method can generate the random factors based on properties of the input data.
- Raises
NotImplementedError – When the subclass does not override this method.