Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikel Broström committed Jan 31, 2025
1 parent e6873d8 commit 10c4bf1
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions boxmot/trackers/basetracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,13 @@ def wrapper(self, *args, **kwargs):
# Even if dets is empty (e.g., shape (0, 7)), this check will still pass if it's Nx7
if not self._first_dets_processed:
dets = args[0]
if dets.ndim == 2 and dets.shape[1] == 6:
self.is_obb = False
self._first_dets_processed = True
elif dets.ndim == 2 and dets.shape[1] == 7:
self.is_obb = True
self._first_dets_processed = True
if dets is not None:
if dets.ndim == 2 and dets.shape[1] == 6:
self.is_obb = False
self._first_dets_processed = True
elif dets.ndim == 2 and dets.shape[1] == 7:
self.is_obb = True
self._first_dets_processed = True

if not self._first_frame_processed:
img = args[1]
Expand Down Expand Up @@ -191,12 +192,10 @@ def check_inputs(self, dets, img):
assert (
len(dets.shape) == 2
), "Unsupported 'dets' dimensions, valid number of dimensions is two"
if self.is_obb :

if self.is_obb:
assert (
dets.shape[1] == 7
), "Unsupported 'dets' 2nd dimension lenght, valid lenghts is 6 (cx,cy,w,h,angle,conf,cls)"

else :
assert (
dets.shape[1] == 6
Expand Down

0 comments on commit 10c4bf1

Please sign in to comment.