Skip to content

Heatmap generation transforms #3328

Closed

Description

@masadcv

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

Activity

  1. Nic-Ma commented on Nov 14, 2021

    @Nic-Ma
    Contributor

    Hi @masadcv ,

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

    Thanks in advance.

  2. mariamonzon commented on Nov 30, 2021

    @mariamonzon

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

  3. masadcv commented on Nov 30, 2021

    @masadcv
    ContributorAuthor

    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.

  4. Nic-Ma commented on Nov 30, 2021

    @Nic-Ma
    Contributor

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

  5. scalyvladimir commented on Apr 1, 2024

    @scalyvladimir
    Contributor

    Hello, any progress since?
    @masadcv @mariamonzon

  6. masadcv commented on Apr 1, 2024

    @masadcv
    ContributorAuthor

    No progress on my side..

  7. added a commit that references this issue on Nov 25, 2025
    04a89ee
  8. added a commit that references this issue on Jan 6, 2026
    34f93b7
  9. added a commit that references this issue on Feb 25, 2026
    8a825a9
  10. added a commit that references this issue on May 25, 2026
    8990ba4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions