mikel-brostrom / boxmot

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

AttributeError: 'DeepOCSort' object has no attribute 'reset' #1594

Closed petem24 closed 2 weeks ago

petem24 commented 3 weeks ago

Search before asking

Yolo Tracking Component

Tracking

Bug

python tracking/track.py --source crash.mp4

Downloading https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt to '/home/peter/Documents/repos/boxmot/tracking/weights/yolov8n.pt'... 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6.25M/6.25M [00:00<00:00, 23.2MB/s]

2024-08-27 15:42:31.952 | INFO | boxmot.utils.torch_utils:select_device:52 - Yolo Tracking v10.0.78 🚀 Python-3.11.9 torch-2.2.2+cu121 CUDA:0 (NVIDIA GeForce RTX 3060 Ti, 7972MiB) 2024-08-27 15:42:31.989 | SUCCESS | boxmot.appearance.reid_model_factory:load_pretrained_weights:183 - Loaded pretrained weights from /home/peter/Documents/repos/boxmot/tracking/weights/osnet_x0_25_msmt17.pt Traceback (most recent call last): File "/home/peter/Documents/repos/boxmot/tracking/track.py", line 172, in run(opt) File "/home/peter/Documents/repos/boxmot/.venv/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/home/peter/Documents/repos/boxmot/tracking/track.py", line 101, in run for r in results: File "/home/peter/Documents/repos/boxmot/.venv/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 35, in generator_context response = gen.send(None) ^^^^^^^^^^^^^^ File "/home/peter/Documents/repos/boxmot/.venv/lib/python3.11/site-packages/ultralytics/engine/predictor.py", line 265, in stream_inference self.run_callbacks("on_predict_postprocess_end") File "/home/peter/Documents/repos/boxmot/.venv/lib/python3.11/site-packages/ultralytics/engine/predictor.py", line 402, in run_callbacks callback(self) File "/home/peter/Documents/repos/boxmot/.venv/lib/python3.11/site-packages/ultralytics/trackers/track.py", line 74, in on_predict_postprocess_end tracker.reset() ^^^^^^^^^^^^^ AttributeError: 'DeepOCSort' object has no attribute 'reset'

Environment

Commit 7d79be7a2f4f6dd0821df915716620045b1b0eb6 Python 3.11.9 All installed inside of venv

Minimal Reproducible Example

poetry install --with yolo poetry shell pip install boxmot

python tracking/track.py --source crash.mp4

mikel-brostrom commented 2 weeks ago

This shouldn't be an issue when installing as specified under README 😄. Notice you have to install the custom Ultralytics package that this repo is pointing to