diff --git a/src/twomartens/masterthesis/debug.py b/src/twomartens/masterthesis/debug.py index b601acd..d5676c7 100644 --- a/src/twomartens/masterthesis/debug.py +++ b/src/twomartens/masterthesis/debug.py @@ -104,14 +104,14 @@ def draw_bbox_figure(image_filename: str, labels: Sequence[np.ndarray], annotation_file_train = f"{coco_path}/annotations/instances_minival2014.json" _, _, _, classes_to_names = get_coco_cat_maps_func(annotation_file_train) - colors = pyplot.cm.hsv(np.linspace(0, 1, len(instances) + 10)).tolist() + colors = pyplot.cm.hsv(np.linspace(0, 1, len(instances))).tolist() os.makedirs(output_path, exist_ok=True) with Image.open(image_filename) as _image: np_image = np.array(_image, dtype=np.uint8) image = Image.fromarray(np_image) figure_filename = f"{output_path}/{os.path.basename(image_filename)}_bboxes_{suffix}.png" drawables = [(colors[i], _instances) for i, _instances in enumerate(instances)] - drawables.append((colors[-9], labels)) + drawables.append(([0.23970412205706326, 1.0, 0.0, 1.0], labels)) _draw_bbox_image(image=image, filename=figure_filename, draw_func=functools.partial(