Moved GT colour to green

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-09-16 12:24:58 +02:00
parent d16edef94b
commit 220e0927e0

View File

@ -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(