1866 Add TransformInverter handler#1970
Conversation
Signed-off-by: Nic Ma <[email protected]>
f68639f to
c632b37
Compare
Signed-off-by: Nic Ma <[email protected]>
c632b37 to
13e1617
Compare
|
Thanks for looking into this @Nic-Ma. I notice an issue here that I hadn't thought about previously. During training/validation/testing, there will typically be a ground truth label attached, and we'll want to use those transforms for the inverse. At deployment, we'll probably only be using images (no labels). And typically for labels, we'll use nearest-neighbour interpolation, whereas for images we'll use something else (e.g., linear). So if we do the inverse as you've suggested in this PR, we'll probably be using non-nearest neighbour interpolation on our labels. I wonder if this would be solved by simply doing |
Signed-off-by: Nic Ma <[email protected]>
|
/black |
|
Hi @rijobro , Thanks for your review, there are another 2 minor issues about inverse logic:
About the sampling question you proposed, it's a good point, let me add another arg Thanks. |
Signed-off-by: Nic Ma <[email protected]>
Signed-off-by: Nic Ma <[email protected]>
|
/black |
rijobro
left a comment
There was a problem hiding this comment.
test is basic, but I suppose testing shape is sufficient here, as voxel values are tested in test_inverse.py. Thanks!
Have you tested this personally to check it works as you expect?
Signed-off-by: monai-bot <[email protected]>
|
Hi @rijobro , Thanks for your review, I already tested it with the workflow example: And I will write another PR to solve the Thanks. |
|
thanks @rijobro chat with Nic offline that we plan to update to store/use the inverse parameters such as |
* [DLMED] add TransformInverter handler Signed-off-by: Nic Ma <[email protected]> * [DLMED] fix typo Signed-off-by: Nic Ma <[email protected]> * [DLMED] add support in SegmentationSaver handler Signed-off-by: Nic Ma <[email protected]> * [DLMED] fix flake8 issue Signed-off-by: Nic Ma <[email protected]> * [DLMED] fix flake8 issue Signed-off-by: Nic Ma <[email protected]> * [DLMED] fix CI test Signed-off-by: Nic Ma <[email protected]> * [MONAI] python code formatting Signed-off-by: monai-bot <[email protected]> Co-authored-by: monai-bot <[email protected]> Signed-off-by: Neha Srivathsa <[email protected]>
Fixes #1866 .
Description
This PR added the ignite handler to invert transforms for model output data.
Status
Ready
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests.make htmlcommand in thedocs/folder.