Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/trackers/io/mot.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ def _distractor_ground_truth_mask(frame_data: _MOTFrameData) -> NDArray[np.bool_
Returns:
Boolean array of shape `(N,)`, `True` for distractor-class rows.
"""
return np.isin(frame_data.classes, _DISTRACTOR_CLASSES)
classes = frame_data.classes
return (
(classes == _DISTRACTOR_CLASSES[0])
| (classes == _DISTRACTOR_CLASSES[1])
| (classes == _DISTRACTOR_CLASSES[2])
| (classes == _DISTRACTOR_CLASSES[3])
)


def _mot_frame_to_detections(frame_data: _MOTFrameData) -> sv.Detections:
Expand Down
Loading