-
Notifications
You must be signed in to change notification settings - Fork 1.5k
additional events in the deepgrow interaction engine #2056
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
This is a feature request for adding extra engine events within the click simulation loops during the deepgrow model training:
MONAI/monai/apps/deepgrow/interaction.py
Lines 61 to 77 in abad841
| for j in range(self.max_interactions): | |
| inputs, _ = engine.prepare_batch(batchdata) | |
| inputs = inputs.to(engine.state.device) | |
| engine.network.eval() | |
| with torch.no_grad(): | |
| if engine.amp: | |
| with torch.cuda.amp.autocast(): | |
| predictions = engine.inferer(inputs, engine.network) | |
| else: | |
| predictions = engine.inferer(inputs, engine.network) | |
| batchdata.update({CommonKeys.PRED: predictions}) | |
| batchdata[self.key_probability] = torch.as_tensor( | |
| ([1.0 - ((1.0 / self.max_interactions) * j)] if self.train else [1.0]) * len(inputs) | |
| ) | |
| batchdata = self.transforms(batchdata) |
the main benefit is to have flexible simulation handlers attached to the inner loops
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request