votchallenge / toolkit

The official VOT Challenge evaluation and analysis toolkit
http://www.votchallenge.net/
GNU General Public License v3.0
153 stars 43 forks source link

fix to issue #91: Variable self._runtime referenced before initialization in vot/tracker/__init__.py #92

Closed imadtoubal closed 1 year ago

imadtoubal commented 1 year ago

Looks like the member variable self._runtime is referenced before being initialized in vot/tracker/__init__.py line 829 resulting in the error:

Traceback (most recent call last):
  File "/usr/mvl2/itdfh/anaconda3/envs/vot/lib/python3.10/site-packages/vot/utilities/cli.py", line 412, in main
    do_evaluate(args)
  File "/usr/mvl2/itdfh/anaconda3/envs/vot/lib/python3.10/site-packages/vot/utilities/cli.py", line 200, in do_evaluate
    run_experiment(experiment, tracker, workspace.dataset, config.force, config.persist)
  File "/usr/mvl2/itdfh/anaconda3/envs/vot/lib/python3.10/site-packages/vot/experiment/__init__.py", line 201, in run_experiment
    experiment.execute(tracker, sequence, force=force, callback=progress)
  File "/usr/mvl2/itdfh/anaconda3/envs/vot/lib/python3.10/site-packages/vot/experiment/multirun.py", line 99, in execute
    with self._get_runtime(tracker, sequence, self._multiobject) as runtime:
  File "/usr/mvl2/itdfh/anaconda3/envs/vot/lib/python3.10/site-packages/vot/experiment/__init__.py", line 109, in _get_runtime
    runtime = MultiObjectTrackerRuntime(runtime)
  File "/usr/mvl2/itdfh/anaconda3/envs/vot/lib/python3.10/site-packages/vot/tracker/__init__.py", line 555, in __init__
    if self._runtime.multiobject:
AttributeError: 'MultiObjectTrackerRuntime' object has no attribute '_runtime'

Changing this line 829 from:

        if self._runtime.multiobject:

to:

        if runtime:

solves the issue.

Have there been any successful uses of a multi-object tracker using this toolkit? Can I see some examples?

lukacu commented 1 year ago

Fine, I will accept the pull request, it is harmless. But note that MultiObjectTrackerRuntime is not really supported in any case (and is not complete) at the moment as it will cause resource problems for many modern trackers. It was only considered as a bridge do old (fast) tracking algorithms that work in single-object mode.