MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / __init__

Method __init__

monai/apps/deepedit/interaction.py:45–59  ·  view source on GitHub ↗
(
        self,
        deepgrow_probability: float,
        transforms: Sequence[Callable] | Callable,
        train: bool,
        label_names: None | dict[str, int] = None,
        click_probability_key: str = "probability",
        max_interactions: int = 1,
    )

Source from the content-addressed store, hash-verified

43 """
44
45 def __init__(
46 self,
47 deepgrow_probability: float,
48 transforms: Sequence[Callable] | Callable,
49 train: bool,
50 label_names: None | dict[str, int] = None,
51 click_probability_key: str = "probability",
52 max_interactions: int = 1,
53 ) -> None:
54 self.deepgrow_probability = deepgrow_probability
55 self.transforms = Compose(transforms) if not isinstance(transforms, Compose) else transforms
56 self.train = train
57 self.label_names = label_names
58 self.click_probability_key = click_probability_key
59 self.max_interactions = max_interactions
60
61 def __call__(self, engine: SupervisedTrainer | SupervisedEvaluator, batchdata: dict[str, torch.Tensor]) -> dict:
62 if batchdata is None:

Callers

nothing calls this directly

Calls 1

ComposeClass · 0.90

Tested by

no test coverage detected