MONAI icon indicating copy to clipboard operation
MONAI copied to clipboard

Batch support for saliency maps

Open surajpaib opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. Currently, classes to generate saliency maps like VanillaGrad, SmoothGrad, etc. support only running on a single input sample.

Giving a batch of samples results in a ValueError due to this https://github.com/Project-MONAI/MONAI/blob/90d2acb54d5325e6727f2cc2329cb40adc8577af/monai/visualize/gradient_based.py#L90

Describe the solution you'd like Batch support for saliency maps can speed up calculation when running over an entire dataset.

Describe alternatives you've considered I'm currently calculating saliency on a large number of output features over a large number of samples, and this is quite slow despite naive parallelization.

surajpaib avatar Dec 20 '23 18:12 surajpaib