optical.visualizer.utils

__author__: HashTagML license: MIT Created: Thursday, 8th April 2021

Functions

add_name_strip(img, name)

Adds name to image at the top.

check_df_cols(df_cols, req_cols)

Verifies whether input dataframe contains required columns or not.

check_num_imgs(images_dir)

Checks number of images in given directory

check_save_path(save_path[, name])

Validates output path, creates one if it does exist.

get_class_color_map(class_map)

Maps categories in the dataset with random colors.

plot_boxes(img, bboxes[, scores, class_map, ...])

Plots bounding boxes annotations on the images.

render_grid_mpl(drawn_imgs, image_names, ...)

Uses matplotlib to render image grid.

render_grid_mpy(drawn_imgs, image_names, ...)

Renders batch of images as a video.

render_grid_pil(drawn_imgs, image_names, ...)

Uses matplotlib to render image grid.

Classes

Resizer([expected_size])

Rescale the image in a sample to a given size.