neodroidvision.utilities.visualisation.bounding_box_visualisation.draw_bounding_boxes_on_image_array

neodroidvision.utilities.visualisation.bounding_box_visualisation.draw_bounding_boxes_on_image_array(image, boxes, labels: Optional[Iterable] = None, *, color: Optional[ColorEnum] = None, thickness: Union[int, float] = 2, mode: PilModesEnum = PilModesEnum.RGBA) None[source]

Draws bounding boxes on image (numpy array).

Args: :param image: a numpy array object. :param boxes: a 2 dimensional numpy array of [N, 4]: (y_min, x_min, y_max, x_max).

The coordinates are in normalized format between [0, 1].

Parameters
  • color – color to draw bounding box.

  • thickness – line thickness. Default value is 4.

  • labels – list of list of strings. a list of strings for each bounding box. The reason to pass a list of strings for a bounding box is that it might contain multiple labels.

  • mode

Raises: ValueError: if boxes is not a [N, 4] array