MONAI icon indicating copy to clipboard operation
MONAI copied to clipboard

Heatmap generation transforms

Open masadcv opened this issue 3 years ago • 6 comments

Is your feature request related to a problem? Please describe. Heatmap regression is used to address a number of regression problems. In these approaches, the targets are usually converted into heatmaps, which are directly learned using a CNN.

Describe the solution you'd like Currently, MONAI provides a number of transforms to process/pre-process input images, however a transform for generating heatmaps does not exist. The feature will essentially be a transform that takes as input the original regression labels, their ranges, heatmap size and variances for evaluating Gaussians on a heatmap grid. These will be written into a dictionary item of choice, e.g. key=label

Describe alternatives you've considered There are some existing implementation of this, e.g. https://github.com/christianpayer/MedicalDataAugmentationTool-HeatmapRegression however they don't provide a generalised/reusable solution to generating heatmaps.

More context The transform signature may look like as follows:

class GenerateHeatmap(Transform):
       def __init__(in_key, out_key, sigmas, step, range):
              ....
              ....
       def __call__(data):
              ....
              ....
           return data

masadcv avatar Nov 12 '21 18:11 masadcv

Hi @masadcv ,

Thanks for your feature request, sounds interesting. Would you like to contribute a PR for this transform directly?

Thanks in advance.

Nic-Ma avatar Nov 14 '21 23:11 Nic-Ma

I would like to contribute on this specific topic, but I am unexperience contributing to monay, so It will take some time

mariamonzon avatar Nov 30 '21 21:11 mariamonzon

Hi @Mm24 , Take your time, this would be a great first feature to get started with MONAI. Let me know if you need a hand with anything related to this, I may be able to help out.

You may find it useful to go over how transforms in MONAI work, e.g. going through this tutorial: https://github.com/Project-MONAI/tutorials/blob/master/modules/3d_image_transforms.ipynb and looking through source code for some of these. The heatmap generation would essentially be a transform that converts labels into heatmaps.

masadcv avatar Nov 30 '21 21:11 masadcv

Thanks @masadcv for your help and @Mm24 welcome your contribution!

Nic-Ma avatar Nov 30 '21 23:11 Nic-Ma

Hello, any progress since? @masadcv @mariamonzon

scalyvladimir avatar Apr 01 '24 13:04 scalyvladimir

No progress on my side..

masadcv avatar Apr 01 '24 13:04 masadcv