From 2166bc23bcdeb7b974832ea09faf47aa7e19cf15 Mon Sep 17 00:00:00 2001 From: Hardik Dava Date: Mon, 7 Aug 2023 21:19:29 +0200 Subject: [PATCH] ultralytics tracker support added --- supervision/detection/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/supervision/detection/core.py b/supervision/detection/core.py index 825d00c7..392905cd 100644 --- a/supervision/detection/core.py +++ b/supervision/detection/core.py @@ -236,6 +236,9 @@ class Detections: confidence=ultralytics_results.boxes.conf.cpu().numpy(), class_id=ultralytics_results.boxes.cls.cpu().numpy().astype(int), mask=extract_ultralytics_masks(ultralytics_results), + tracker_id=ultralytics_results.boxes.id.int().cpu().numpy() + if ultralytics_results.boxes.id is not None + else None, ) @classmethod