mikel-brostrom / boxmot

BoxMOT: pluggable SOTA tracking modules for segmentation, object detection and pose estimation models
GNU Affero General Public License v3.0
6.71k stars 1.71k forks source link

Unable to pass `embs` to tarcker #1555

Closed jayong-sv closed 3 months ago

jayong-sv commented 3 months ago

Search before asking

Yolo Tracking Component

Tracking

Bug

https://github.com/mikel-brostrom/boxmot/blob/e359bbb9c793b75a131fc82a71410d9acf599b0c/boxmot/utils/__init__.py#L39-L43 https://github.com/mikel-brostrom/boxmot/blob/e359bbb9c793b75a131fc82a71410d9acf599b0c/boxmot/trackers/botsort/bot_sort.py#L235-L236

I would like to pass embs from the external feature extractor to update function, but PerClassDecorator does not pass embs to update function. There should be args[2] for embs, but now only passes args[0], args[1] which are img and detections. So embs for update function is always None, which is unable to use external feature extractor.

+) also, PerClassDecorator only works for args, not for kwargs.

Environment

boxmot==10.0.75

Minimal Reproducible Example

from boxmot.tracker_zoo import create_tracker
import numpy as np

model = create_tracker(
      'botsort',
      tracker_config=config_path,
      reid_weights=Path('osnet_x0_25_msmt17.pt'),
      device='cpu',
      half=False,
      per_class=False
)

embs = np.random.rand(5, 512)
outputs = model.update(
    dets,
    img0,
    embs # but embs for update function is always None
)
mikel-brostrom commented 3 months ago

Thank you for reporting this bug @jayong-sv. Working on it!

mikel-brostrom commented 3 months ago

This is fixed in release 10.0.77 🚀

jayong-sv commented 3 months ago

@mikel-brostrom Thank you for addressing the issue so quickly!