objectscope.utils
Functions
|
|
|
|
|
|
|
|
|
Visualize the bbox(es) and segmentation mask(s) of objects in image(s) |
|
Module Contents
- objectscope.utils.launch_tensorboard(logdir, port_num=None)
- objectscope.utils.run_optimize_model(model_name_or_path, output_dir, device='cpu', provider='CPUExecutionProvider', precision='int4')
- objectscope.utils.compute_statistics(img_paths: list)
- objectscope.utils.predict_bbox(image, model_path)
- objectscope.utils.draw_bbox_and_polygons(image, bboxes, scores, class_names=None, score_thresh=0.3, polygons=None) PIL.Image
Visualize the bbox(es) and segmentation mask(s) of objects in image(s)
- Parameters:
image (Image) – PIL Image to draw bbox and segmentation on.
bboxes (List) – List of boundary boxes.
scores (List) – Confidence score to use for filtering and drawing on image.
class_names (List) – Name(s) of objects for each bbox and polygon.
score_thresh (float, optional) – Threshold to filter out low-confidence detections. Defaults to 0.3.
polygons (List, optional) – List of segmentation masks. Defaults to None.
Returns: PIL Image with drawn bbox and segmentation mask.
- objectscope.utils.save_class_metadata(train_data_name, save_metadata_as)