Project-MONAI / MONAI

AI Toolkit for Healthcare Imaging
https://monai.io/
Apache License 2.0
5.51k stars 1.01k forks source link

Heatmap generation transforms #3328

Open masadcv opened 2 years ago

masadcv commented 2 years ago

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
Nic-Ma commented 2 years ago

Hi @masadcv ,

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

Thanks in advance.

mariamonzon commented 2 years ago

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

masadcv commented 2 years ago

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.

Nic-Ma commented 2 years ago

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

scalyvladimir commented 3 months ago

Hello, any progress since? @masadcv @mariamonzon

masadcv commented 3 months ago

No progress on my side..