From e7c0799e014b0a4a20ceb72aa09f2a7926dc64f5 Mon Sep 17 00:00:00 2001 From: Francesco Paissan <46992226+fpaissan@users.noreply.github.com> Date: Tue, 5 Dec 2023 21:13:13 +0100 Subject: [PATCH] Update yolo.py (#67) * Update yolo.py * fix linters --- micromind/utils/yolo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/micromind/utils/yolo.py b/micromind/utils/yolo.py index 95c2435..3ef1a44 100644 --- a/micromind/utils/yolo.py +++ b/micromind/utils/yolo.py @@ -10,7 +10,6 @@ from collections import defaultdict from pathlib import Path -import cv2 import numpy as np import torch import torchvision @@ -579,6 +578,8 @@ def draw_bounding_boxes_and_save( ------- None """ + import cv2 # here to avoid extra dependecy + color_dict = { label: tuple( (((i + 1) * 50) % 256, ((i + 1) * 100) % 256, ((i + 1) * 150) % 256)