Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mirroring test-time augmentation #96

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Add mirroring test-time augmentation #96

wants to merge 10 commits into from

Conversation

naga-karthik
Copy link
Collaborator

This is a small PR that updates the inference script by adding mirroring test-time augmentation. Mirroing is also done in nnunet inference and @plbenveniste also noticed improved predictions for canproco SC seg preds.

Copy link
Member

@valosekj valosekj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and working fine, thanks!

sw_batch_size=4, predictor=net, overlap=0.5, progress=False)[0], dims=[axis]
)
# average the prediction
batch["pred"] /= 3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering if averaging should be done after clamping ?
Because averaging is done before clamping, if a voxel is seen only once, its value will be 0.33 and therefore will be removed afterward at clamping (done at 0.5).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh man, this is an excellent catch! thanks for pointing this much important thing out! I'm going to fix it in the next commit!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 4beb690

@naga-karthik
Copy link
Collaborator Author

@plbenveniste do you think it's good to merge after the update of moving up torch.clamp before averaging?

@plbenveniste
Copy link
Collaborator

Looks good to me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants