I would like to create a heatmap that is overlaid on RGB imagery.
The map is the result of some attention mapping and has the same height and width as the camera image but only one channel consisting of values between 0 and 1, corresponding to probabilities. Is there a natural way to use this map to highlight areas on the camera images in a heatmap-like fasion prior to saving the image via torch.save_image() ?
Yes, the current code uses a single image, since Image.blend and the transformations won’t take a batch of images. Usually the number of images you would like to visualize isn’t that large, so that it shouldn’t be a problem.
If you are working with CUDA tensors, just push them to the CPU first using tensor = tensor.to('cpu').