Test time augmentations#1794
Conversation
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
|
requires #1795. |
monai/data/test_time_augmentation.py
Outdated
| batch_output = torch.Tensor(batch_output) | ||
|
|
||
| # check binary labels are extracted | ||
| if not all(torch.unique(batch_output.int()) == torch.Tensor([0, 1])): |
There was a problem hiding this comment.
This class will only work with segmentation networks then? Could it theoretically make sense for other tasks like image-to-image transformation? The returned values may make less sense perhaps.
There was a problem hiding this comment.
I've removed the check. We have the return_full_data if the user doesn't want to use the default metrics (e.g., computing the mode probably doesn't make sense for floating point numbers).
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
|
@wyli do you think you could provide some insight into this error? I can't see how any of the files I've modified could cause this. Also I'm getting a flake error. This comes from: if isinstance(transform, Compose):
# call recursively for each sub-transform
return any(is_transform_rand_invertible(t) for t in transform.transforms)When the if statement is satisfied, transform must therefore be of type |
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
|
Hi @rijobro for the first error, I think it's because to replicate the issue in a system without ignite: |
|
I couldn't replicate the pytype error either... perhaps have a |
Signed-off-by: Richard Brown <[email protected]>
|
@wyli ok so the ignite must be because I'm importing |
agreed, I think they are generic properties. cc @Nic-Ma |
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
|
Hi @wyli, current tests are failing: https://github.com/Project-MONAI/MONAI/pull/1794/checks?check_run_id=2169625488#step:11:5093. But device is set with |
strange, how do I get the corresponding code of that log? |
|
Don't think you can do it from the logs, but you can obviously get it from the changed files in the PR. Here's the problematic |
the log corresponds to 6b488c https://github.com/Project-MONAI/MONAI/pull/1794/checks?check_run_id=2169625488#step:3:472 which is the commit before this device update, and the latest test doesn't show the error, correct? |
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
| # check that whenever randoms is True, invertibles is also true | ||
| for r, i in zip(randoms, invertibles): | ||
| if r and not i: | ||
| raise RuntimeError( |
There was a problem hiding this comment.
this could be a warning because the random factors may be in the model, we may want to do test aug with a randomised model...
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
This reverts commit bb2e141. Signed-off-by: Richard Brown <[email protected]>
Test time augmentations.
closes #718
Status
Ready
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests.make htmlcommand in thedocs/folder.