bboxdrawing
bboxdrawing ¶
Module for BoundingBoxes / ObjDetInstanceLabels draw functions
Classes¶
Functions¶
draw_bounding_box_on_image ¶
Draws a bounding box on an image
Parameters:
-
label(ObjDetInstanceLabel) –ObjDetInstanceLabel (bounding box) to draw on the 'image'
-
image(Image) –image to draw the bounding boxes on
-
font_color–font color of the bounding box
Returns:
-
–
image with the bounding box
Source code in niceml/utilities/boundingboxes/bboxdrawing.py
draw_labels_on_image ¶
draw_labels_on_image(
image,
pred_bbox_label_list,
gt_bbox_label_list,
hide_gt=False,
hide_gt_over_thresh=False,
iou_threshold=0.5,
)
Draws multiple bounding boxes of ObjDetInstanceLabels on an image
Parameters:
-
image(Image) –image to draw the bounding boxes on
-
pred_bbox_label_list(List[ObjDetInstanceLabel]) –prediction bounding box label information list
-
gt_bbox_label_list(List[ObjDetInstanceLabel]) –ground truth bounding box label information list
-
hide_gt(bool, default:False) –flag to hide the gt labels
-
hide_gt_over_thresh(bool, default:False) –flag to hide the gt labels for the predicted bounding boxes with an iou >= iou_threshold
-
iou_threshold(float, default:0.5) –iou threshold for label matching
Returns:
-
Image–image with predicted and ground truth bounding boxes