MONAI
MONAI copied to clipboard
Heatmap generation transforms
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
Hi @masadcv ,
Thanks for your feature request, sounds interesting. Would you like to contribute a PR for this transform directly?
Thanks in advance.
I would like to contribute on this specific topic, but I am unexperience contributing to monay, so It will take some time
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.
Thanks @masadcv for your help and @Mm24 welcome your contribution!
Hello, any progress since? @masadcv @mariamonzon
No progress on my side..