neodroidvision.utilities.visualisation.bounding_box_visualisation.visualize_boxes_and_labels_on_image_array

neodroidvision.utilities.visualisation.bounding_box_visualisation.visualize_boxes_and_labels_on_image_array(image, bounding_boxes: Sequence[BoundingBoxSpec], use_normalized_coordinates=True, max_boxes_to_draw=20, min_score_thresh=0.5, line_thickness=2)[source]

Overlay labeled boxes on an image with formatted scores and label names.

This function groups boxes that correspond to the same location and creates a display string for each detection and overlays these on the image. Note that this function modifies the image in place, and returns that same image.

Args: image: uint8 numpy array with shape (img_height, img_width, 3) boxes: a numpy array of shape [N, 4] classes: a numpy array of shape [N]. Note that class indices are 1-based, and match the keys in the label map. scores: a numpy array of shape [N] or None. If scores=None, then this function assumes that the boxes to be plotted are groundtruth boxes and plot all boxes as black with no classes or scores. category_index: a dict containing category dictionaries (each holding category index id and category name name) keyed by category indices. instance_masks: a numpy array of shape [N, image_height, image_width] with values ranging between 0 and 1, can be None. instance_boundaries: a numpy array of shape [N, image_height, image_width] with values ranging between 0 and 1, can be None. keypoints: a numpy array of shape [N, num_keypoints, 2], can be None use_normalized_coordinates: whether boxes is to be interpreted as normalized coordinates or not. max_boxes_to_draw: maximum number of boxes to visualize. If None, draw all boxes. min_score_thresh: minimum score threshold for a box to be visualized agnostic_mode: boolean (default: False) controlling whether to evaluate in class-agnostic mode or not. This mode will display scores but ignore classes. line_thickness: integer (default: 2) controlling line width of the boxes. groundtruth_box_visualization_color: box color for visualizing groundtruth boxes skip_scores: whether to skip score when drawing a single detection skip_labels: whether to skip label when drawing a single detection

Returns: uint8 numpy array with shape (img_height, img_width, 3) with overlaid boxes. :param image: :type image: :param use_normalized_coordinates: :type use_normalized_coordinates: :param max_boxes_to_draw: :type max_boxes_to_draw: :param min_score_thresh: :type min_score_thresh: :param line_thickness: :type line_thickness: :param bounding_boxes: