Skip to content

Commit

Permalink
fix when embeddings are fed externally
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikel Broström committed Sep 25, 2024
1 parent 549ad8b commit 7cd17ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions boxmot/trackers/botsort/botsort.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def update(self, dets: np.ndarray, img: np.ndarray, embs: np.ndarray = None) ->
if self.with_reid and embs is None:
features_high = self.model.get_features(dets_first[:, 0:4], img)
else:
features_high = embs_first if embs is not None else []
features_high = embs_first if embs_first is not None else []

# Create detections
detections = self._create_detections(dets_first, features_high)
Expand Down Expand Up @@ -131,7 +131,7 @@ def _split_detections(self, dets, embs):
dets_second = dets[second_mask]
first_mask = confs > self.track_high_thresh
dets_first = dets[first_mask]
embs_first = embs[first_mask]
embs_first = embs[first_mask] if embs is not None else None
return dets, dets_first, embs_first, dets_second

def _create_detections(self, dets_first, features_high):
Expand Down

0 comments on commit 7cd17ec

Please sign in to comment.