🛠️ fix idx error in annotate
This commit is contained in:
parent
420dae9e70
commit
b2f6520b87
|
|
@ -57,7 +57,7 @@ class BoxAnnotator:
|
|||
font = cv2.FONT_HERSHEY_SIMPLEX
|
||||
for i, (xyxy, confidence, class_id, tracker_id) in enumerate(detections):
|
||||
x1, y1, x2, y2 = xyxy.astype(int)
|
||||
idx = class_id if not None else i
|
||||
idx = class_id if class_id is not None else i
|
||||
color = (
|
||||
self.color.by_idx(idx)
|
||||
if isinstance(self.color, ColorPalette)
|
||||
|
|
|
|||
Loading…
Reference in New Issue