Skip to content

Commit 77bf71b

Browse files
committed
fix box_iou_batch import
1 parent a26d38b commit 77bf71b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "trackers"
3-
version = "2.0.1"
3+
version = "2.0.2rc0"
44
description = "A unified library for object tracking featuring clean room re-implementations of leading multi-object tracking algorithms"
55
readme = "README.md"
66
authors = [
@@ -37,7 +37,7 @@ dependencies = [
3737
"aiofiles>=24.1.0",
3838
"aiohttp>=3.11.16",
3939
"numpy>=2.0.2",
40-
"supervision>=0.26.0rc7",
40+
"supervision>=0.26.1",
4141
"tqdm>=4.67.1",
4242
"validators>=0.34.0",
4343
"scipy>=1.13.1",

trackers/utils/sort_utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import numpy as np
55
import supervision as sv
6-
from supervision.detection.utils import box_iou_batch
76

87
from trackers.core.deepsort.kalman_box_tracker import DeepSORTKalmanBoxTracker
98
from trackers.core.sort.kalman_box_tracker import SORTKalmanBoxTracker
@@ -63,7 +62,7 @@ def get_iou_matrix(
6362
predicted_boxes = np.zeros((len(trackers), 4), dtype=np.float32)
6463

6564
if len(trackers) > 0 and len(detection_boxes) > 0:
66-
iou_matrix = box_iou_batch(predicted_boxes, detection_boxes)
65+
iou_matrix = sv.box_iou_batch(predicted_boxes, detection_boxes)
6766
else:
6867
iou_matrix = np.zeros((len(trackers), len(detection_boxes)), dtype=np.float32)
6968

@@ -109,7 +108,7 @@ def update_detections_with_track_ids(
109108
predicted_boxes = np.zeros((len(trackers), 4), dtype=np.float32)
110109

111110
if len(trackers) > 0 and len(detection_boxes) > 0:
112-
iou_matrix_final = box_iou_batch(predicted_boxes, detection_boxes)
111+
iou_matrix_final = sv.box_iou_batch(predicted_boxes, detection_boxes)
113112

114113
row_indices, col_indices = np.where(iou_matrix_final > minimum_iou_threshold)
115114
sorted_pairs = sorted(

0 commit comments

Comments
 (0)