diff --git a/examples.py b/examples.py index cccef33..5948057 100644 --- a/examples.py +++ b/examples.py @@ -86,11 +86,11 @@ def evaluate_detection_example(): mask_shape = (480, 640) # Creating fake data - gt_bbox_1 = BBox(10, 10, 10, 10, 0) - pred_bbox_1 = BBox(10, 10, 10, 10, 0) + gt_bbox_1 = BBox(10, 10, 10, 10, 0, 1) + pred_bbox_1 = BBox(10, 10, 10, 10, 0, 1) - gt_bbox_2 = BBox(110, 110, 320, 280, 1) - pred_bbox_2 = BBox(70, 50, 240, 220, 1) + gt_bbox_2 = BBox(110, 110, 320, 280, 1, 1) + pred_bbox_2 = BBox(70, 50, 240, 220, 1, 1) # Creating data suplier iterator # It is not necessary here, but it's useful if you want to yield data diff --git a/lapixdl/evaluation/visualize.py b/lapixdl/evaluation/visualize.py index e1a9a36..45caae4 100644 --- a/lapixdl/evaluation/visualize.py +++ b/lapixdl/evaluation/visualize.py @@ -82,6 +82,8 @@ def show_segmentations( cmap_colors = __get_colors(cmap) + assert len(cmap_colors) >= len(class_names), "The color map length must be greater or equal the length of the class names." + rows = len(results) fig, axes = plt.subplots(rows, 3) if rows == 1: @@ -140,6 +142,8 @@ def show_detections(results: List[Result[List[BBox]]], cmap_colors = __get_colors(cmap) + assert len(cmap_colors) >= len(class_names), "The color map length must be greater or equal the length of the class names." + rows = len(results) fig, axes = plt.subplots(rows, 3) if rows == 1: diff --git a/setup.py b/setup.py index ea3e4a5..249746a 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='lapixdl', packages=find_packages(exclude=['tests']), - version='0.7.12', + version='0.7.13', description='Utils for Computer Vision Deep Learning research', long_description=long_description,