cpauger.visualize ================= .. py:module:: cpauger.visualize Functions --------- .. autoapisummary:: cpauger.visualize.visualize_bboxes cpauger.visualize.random_color cpauger.visualize.draw_bbox_and_polygons Module Contents --------------- .. py:function:: visualize_bboxes(annotation_file: str, image_dir: str, output_dir: str) -> None Visualize bbox(es) of objects in image(s) when given coco annotation file :param annotation_file: Coco annotation file path :type annotation_file: str, Path :param image_dir: Directory where images to visualize are located :type image_dir: str :param output_dir: Directory to store the output of visualization :type output_dir: str Returns: None .. py:function:: random_color() -> Tuple[int, int, int] Generate random RGB color values .. py:function:: draw_bbox_and_polygons(annotation_path: str, img_dir: Union[str, None] = None, visualize_dir: str = 'visualize_bbox_and_polygons', imgpaths_list: Union[str, None] = None) -> None Visualize the bbox(es) and segmentation mask(s) of objects in image(s) :param annotation_path: Coco annotation path for image(s). :type annotation_path: str :param img_dir: Directory of images. This is required when imgpaths_list is not provided in which case all images in img_dir will be visualize. :type img_dir: str, optional :param visualize_dir: Directory to store output of visualization. Defaults to "visualize_bbox_and_polygons". :type visualize_dir: str, optional :param imgpaths_list: List of images to visualize. Required when img_dir is not povided. Use when only a subset of images are to visualize rather than all images in the img_dir. Defaults to None. :type imgpaths_list: str, optional Returns: None