heatmap - OpenAOI/anodet GitHub Wiki
heatmap_images(images: Union[np.ndarray, torch.Tensor], list_of_patch_scores: Union[np.ndarray, torch.Tensor], min_v: Optional[float] = None, max_v: Optional[float] = None, alpha: float = 0.6) -> np.ndarray
Takes array of images and patch_scores to create heatmaps on the images.
Arguments:
-
images
- The images to draw heatmaps on. -
list_of_patch_scores
- The values to use to generate colormap. min_v: max_v: -
alpha
- The opacity of the colormap
Returns:
-
heatmaps
- a array of heatmaps.
heatmap_image(image: Union[np.ndarray, torch.Tensor], norm_patch_scores: Union[np.ndarray, torch.Tensor], alpha: float = 0.6) -> np.ndarray
draws a heatmap over a image using patch_scores to indicate areas of interest.
Arguments:
-
image
- image to draw the colormap on. -
norm_patch_scores
- normalized patch scores -
alpha
- Opacity on the colormap
Returns:
-
heatmap
- Combination of image and colormap.