otx.api.utils.vis_utils#

This module implements activation map.

Functions

dump_frames(saved_frames, output, ...)

Saves images/videos with predictions from saved_frames to output folder with proper names.

get_actmap(saliency_map, output_res)

Get activation map (heatmap) from saliency map.

get_input_names_list(input_path, capture)

Lists the filenames of all inputs for demo.

otx.api.utils.vis_utils.dump_frames(saved_frames: list, output: str, input_path: str | int, capture)[source]#

Saves images/videos with predictions from saved_frames to output folder with proper names.

otx.api.utils.vis_utils.get_actmap(saliency_map: ndarray, output_res: tuple | list) ndarray[source]#

Get activation map (heatmap) from saliency map.

It will return activation map from saliency map

Parameters:
  • saliency_map (np.ndarray) – Saliency map with pixel values from 0-255

  • output_res (Union[tuple, list]) – Output resolution

Returns:

[H, W, 3] colormap, more red means more salient

Return type:

saliency_map (np.ndarray)

otx.api.utils.vis_utils.get_input_names_list(input_path: str | int, capture)[source]#

Lists the filenames of all inputs for demo.