Spaces:
Sleeping
Sleeping
Update tracking.py
Browse files- tracking.py +2 -5
tracking.py
CHANGED
|
@@ -207,10 +207,7 @@ class SimpleTracker:
|
|
| 207 |
|
| 208 |
def _calculate_cost_matrix(self, tracks: List[Track],
|
| 209 |
detections: List[Detection]) -> np.ndarray:
|
| 210 |
-
|
| 211 |
-
Calculate cost matrix with IoU and center distance
|
| 212 |
-
Lower cost = better match
|
| 213 |
-
"""
|
| 214 |
if not tracks or not detections:
|
| 215 |
return np.array([])
|
| 216 |
|
|
@@ -264,4 +261,4 @@ class SimpleTracker:
|
|
| 264 |
def set_match_threshold(self, threshold: float):
|
| 265 |
|
| 266 |
self.match_threshold = max(0.1, min(0.8, threshold))
|
| 267 |
-
|
|
|
|
| 207 |
|
| 208 |
def _calculate_cost_matrix(self, tracks: List[Track],
|
| 209 |
detections: List[Detection]) -> np.ndarray:
|
| 210 |
+
|
|
|
|
|
|
|
|
|
|
| 211 |
if not tracks or not detections:
|
| 212 |
return np.array([])
|
| 213 |
|
|
|
|
| 261 |
def set_match_threshold(self, threshold: float):
|
| 262 |
|
| 263 |
self.match_threshold = max(0.1, min(0.8, threshold))
|
| 264 |
+
|