Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'DeepOcSort' object has no attribute 'reset' #1772

Open
1 task done
Keqi19 opened this issue Dec 17, 2024 · 5 comments
Open
1 task done

AttributeError: 'DeepOcSort' object has no attribute 'reset' #1772

Keqi19 opened this issue Dec 17, 2024 · 5 comments
Labels
question Further information is requested

Comments

@Keqi19
Copy link

Keqi19 commented Dec 17, 2024

Search before asking

  • I have searched the Yolo Tracking issues and found no similar bug report.

Question

AttributeError: 'DeepOcSort' object has no attribute 'reset'

@Keqi19 Keqi19 added the question Further information is requested label Dec 17, 2024
@max-unfinity
Copy link

max-unfinity commented Dec 18, 2024

The same.
Run with args:

"args": [
                "--yolo-model",
                "yolov10n",
                "--reid-model",
                "osnet_x1_0_msmt17.pt",
                "--tracking-method",
                "bytetrack",
                "--source",
                "../data/bdd100k/images/track/val/b1c9c847-3bda4659",
                "--device",
                "cuda",
                "--save",
            ]

Traceback:

  File "tracking/track.py", line 186, in <module>
    run(opt)
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "tracking/track.py", line 114, in run
    for r in results:
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 35, in generator_context
    response = gen.send(None)
  File "/usr/local/lib/python3.10/dist-packages/ultralytics/engine/predictor.py", line 262, in stream_inference
    self.run_callbacks("on_predict_postprocess_end")
  File "/usr/local/lib/python3.10/dist-packages/ultralytics/engine/predictor.py", line 399, in run_callbacks
    callback(self)
  File "/usr/local/lib/python3.10/dist-packages/ultralytics/trackers/track.py", line 74, in on_predict_postprocess_end
    tracker.reset()
AttributeError: 'ByteTrack' object has no attribute 'reset'

Version:

  • ultralytics==8.3.18 (the latest version doesn't work too)

UPD:
@Keqi19 BoxMOT requires custom ultralytics package. So we need to install it:

pip uninstall ultralytics -y
pip install --upgrade pip setuptools wheel
pip install git+https://github.com/mikel-brostrom/ultralytics.git

@max-unfinity
Copy link

BoxMOT requires custom ultralytics package. So we need to install it:

pip uninstall ultralytics -y
pip install --upgrade pip setuptools wheel
pip install git+https://github.com/mikel-brostrom/ultralytics.git

@type055-renhai
Copy link

我也遇到了这个bug,我重新创了个虚拟环境,把python解释器从3.9换到3.12就没问题了,应该是至少要3.10版本的才行

@Keqi19
Copy link
Author

Keqi19 commented Dec 20, 2024

我也遇到了这个bug,我重新创了个虚拟环境,把python解释器从3.9换到3.12就没问题了,应该是至少要3.10版本的才行

换成3.12之后,报这个错:
Traceback (most recent call last):
File "F:\lab-2\models\boxmot-master\tracking\track.py", line 186, in
run(opt)
File "D:\Anaconda3\envs\boxmot-py3.12\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "F:\lab-2\models\boxmot-master\tracking\track.py", line 114, in run
for r in results:
^^^^^^^
File "D:\Anaconda3\envs\boxmot-py3.12\Lib\site-packages\torch\utils_contextlib.py", line 35, in generator_context
response = gen.send(None)
^^^^^^^^^^^^^^
File "D:\Anaconda3\envs\boxmot-py3.12\Lib\site-packages\ultralytics\engine\predictor.py", line 267, in stream_inference
self.run_callbacks("on_predict_postprocess_end")
File "D:\Anaconda3\envs\boxmot-py3.12\Lib\site-packages\ultralytics\engine\predictor.py", line 404, in run_callbacks
callback(self)
File "D:\Anaconda3\envs\boxmot-py3.12\Lib\site-packages\ultralytics\trackers\track.py", line 74, in on_predict_postprocess_end
tracker.reset()
^^^^^^^^^^^^^
AttributeError: 'DeepOcSort' object has no attribute 'reset'

Process finished with exit code 1

@Keqi19
Copy link
Author

Keqi19 commented Dec 20, 2024

pip install git+https://github.com/mikel-brostrom/ultralytics.git
What version of ultralytics is it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants