pytorch-grad-cam
pytorch-grad-cam copied to clipboard
Use custom test-time augmentations
Thank you for creating this library. I slightly modified BaseCAM
to pass a ttach.Compose
object so we can use a custom set of test-time augmentations in forward_augmentation_smoothing()
.
Hi, Sorry for the very late reply. And thanks for this PR! going to merge this !
Was curious if you have examples of test time augmentations that worked in your case? Did they work better than the default ones? I'm wondering if this is something worth adding to the Readme.
Hi, Thanks for checking the PR. Vertical flipping helped in my case where I was training a classifier on a private medical imaging dataset. Vertical flip and minor rotations improve the prediction performance in medical imaging applications. Additionally, I wanted to have the same custom set of augmentations during inference and visualization of CAM images.
Better later than never, this was merged, thank you for the contribution!