mikel-brostrom / boxmot

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

AssertionError: Unsupported 'dets' input type '<class 'ultralytics.engine.results.Boxes'>', valid format is np.ndarray #1177

Closed lyxyuren closed 1 year ago

lyxyuren commented 1 year ago

Search before asking

Question

I've encountered an issue characterized by the following error message: AssertionError: Unsupported 'dets' input type '<class 'ultralytics.engine.results.Boxes'>', valid format is np.ndarray This error arises when invoking the deep_ocsort.py script at line 366. The script anticipates a NumPy array as input for the detection parameter dets, but instead, it's receiving an instance of ultralytics.engine.results.Boxes.

The command-line arguments I used were:

--source test.mp4 --tracking-method deepocsort --yolo-model yolov8n.pt --classes 0 --save-mot --reid-model lmbn_n_cuhk03_d.pt Has anyone else faced this issue? Could you please suggest a solution to resolve this? Any guidance would be greatly appreciated. Thank you!

lyxyuren commented 1 year ago

There was a same issue.

lyxyuren commented 1 year ago

There was same issue

lyxyuren commented 1 year ago

To solve the issue, just create a new environment, and install pytorch and torchvision. And pip install -r requirements.txt. When running track.py file, the code will install ultralytics automatically (The correct version). Do not use your previously installed ultralytics, this can cause issues!