VisionHeatmaps.jl

Documentation for VisionHeatmaps.jl.

Installation

To install this package and its dependencies, open the Julia REPL and run

]add VisionHeatmaps

API

VisionHeatmaps.heatmapFunction
heatmap(x::AbstractArray)
heatmap(x::AbstractArray, pipeline)
heatmap(x::AbstractArray, image)
heatmap(x::AbstractArray, image, pipeline)

Visualize 4D arrays as heatmaps, assuming the WHCN convention for input array dimensions (width, height, color channels, batch dimension).

source
heatmap(expl::Explanation)
heatmap(expl::Explanation, pipeline)
heatmap(expl::Explanation, image)   
heatmap(expl::Explanation, image, pipeline)

Visualize Explanation from XAIBase as a vision heatmap. Assumes WHCN convention (width, height, channels, batch dimension) for explanation.val. This will use the default heatmapping style for the given type of explanation.

source
heatmap(input::AbstractArray, analyzer::AbstractXAIMethod)
heatmap(input::AbstractArray, analyzer::AbstractXAIMethod, image)

Compute an Explanation for a given input using the XAI method analyzer and visualize it as a vision heatmap. This will use the default heatmapping style for the given type of explanation.

source

Color-channel reduction

Manipulating array dimensions

VisionHeatmaps.FlipImageType
FlipImage()

Permutes the width and height dimensions of an array. Assumes width and height are the leading directions in the array.

source

Outlier removal

VisionHeatmaps.PercentileClipType
PercentileClip()
PercentileClip(lower, upper)

Clip values outside of the specified percentiles of values. Bounds default to 0.001 and 0.999 (99.9% percentiles).

source

Colormaps

Turn numerical arrays to images by applying color schemes:

VisionHeatmaps.ExtremaColormapType
ExtremaColormap(name::Symbol)
ExtremaColormap(name::Symbol, colorscheme)

Apply a sequential colorscheme from ColorSchemes.jl, turning an array of values into an image. Defaults to :batlow.

source
VisionHeatmaps.CenteredColormapType
CenteredColormap(name::Symbol)
CenteredColormap(name::Symbol, colorscheme)

Apply a divergent colorscheme from ColorSchemes.jl, turning an array of values into an image. Defaults to :berlin.

source

Resizing

VisionHeatmaps.ResizeToImageType
ResizeToImage()
ResizeToImage(method)

Resize the heatmap to match the image dimensions. In some cases, this is needed for overlays. Defaults to Lanczos(1) from Interpolations.jl.

source

Image overlays