Skip to content

Commit 3cccd8e

Browse files
fix(pre_commit): 🎨 auto format pre-commit hooks
1 parent 6a3c5cd commit 3cccd8e

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

autotune/best_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,4 +253,4 @@
253253
}
254254
}
255255
}
256-
}
256+
}

autotune/guard.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# ------------------------------------------------------------------------
2+
# Trackers
3+
# Copyright (c) 2026 Roboflow. All Rights Reserved.
4+
# Licensed under the Apache License, Version 2.0 [see LICENSE for details]
5+
# ------------------------------------------------------------------------
6+
17
"""Regression guard: ensures no tracker's HOTA drops >0.5% from the stored best."""
28

39
import json

trackers/core/sort/kalman.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,7 @@ def update(self, bbox: NDArray[np.float64]) -> None:
170170
and self._last_observed_bbox is not None
171171
):
172172
bbox_f = bbox.astype(np.float32)
173-
virtual_vel = (
174-
(bbox_f[:4] - self._last_observed_bbox) / was_lost_for
175-
)
173+
virtual_vel = (bbox_f[:4] - self._last_observed_bbox) / was_lost_for
176174
self.state[4, 0] = virtual_vel[0]
177175
self.state[5, 0] = virtual_vel[1]
178176
self.state[6, 0] = virtual_vel[2]

trackers/core/sort/utils.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ def get_alive_trackers(
5050
return alive_trackers
5151

5252

53-
def _compute_diou_matrix(
54-
boxes_a: np.ndarray, boxes_b: np.ndarray
55-
) -> np.ndarray:
53+
def _compute_diou_matrix(boxes_a: np.ndarray, boxes_b: np.ndarray) -> np.ndarray:
5654
"""Compute Distance IoU (DIoU) between two sets of boxes.
5755
5856
DIoU = IoU - d^2 / c^2 where d is the Euclidean distance between box
@@ -74,9 +72,7 @@ def _compute_diou_matrix(
7472
x2_inter = np.minimum(boxes_a[:, 2:3], boxes_b[:, 2:3].T)
7573
y2_inter = np.minimum(boxes_a[:, 3:4], boxes_b[:, 3:4].T)
7674

77-
inter_area = np.maximum(x2_inter - x1_inter, 0) * np.maximum(
78-
y2_inter - y1_inter, 0
79-
)
75+
inter_area = np.maximum(x2_inter - x1_inter, 0) * np.maximum(y2_inter - y1_inter, 0)
8076

8177
# Areas of individual boxes
8278
area_a = (

0 commit comments

Comments
 (0)