strangerzhang / pysot-toolkit Goto Github PK
View Code? Open in Web Editor NEWPython Single Object Tracking Evaluation
License: MIT License
Python Single Object Tracking Evaluation
License: MIT License
python bin/eval.py
from pysot.datasets import VOTDataset, OTBDataset, UAVDataset, LaSOTDataset, NFSDataset, VOTLTDataset
ImportError: cannot import name 'VOTDataset' from 'pysot.datasets' (/home/tttt/pysot/pysot/datasets/init.py) ?
I look for option to change path.
In "Get Tracking Results of Your Own Tracker" part, the tracking results are saved in pred_bboxes, what's next? How to save these results, and in what format?
Thanks
Hi there,
Thanks for this great toolkit, any plan to support VOT2019 any time soon.
I currently downloaded the json file from
https://drive.google.com/drive/folders/10cfXjwQQBQeu48XMf2xc_W1LucpistPI
and tweak your code a bit to correct the path issue. However, got following error at the stage of eval eao. Any suggestion is greatly appreciated in advance.
The detailed error message:
Connected to pydev debugger (build 193.6494.30)
loading VOT2019: 100%|██████████████████████████████████| 60/60 [00:00<00:00, 68.92it/s, zebrafish1]
eval ar: 100%|████████████████████████████████████████████████████████| 6/6 [00:29<00:00, 5.99s/it]
eval eao: 0%| | 0/6 [00:00<?, ?it/s]multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/condaenv/lib/python/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/path/to/pysot-toolkit/pysot/evaluation/eao_benchmark.py", line 43, in eval
eao = self._calculate_eao(tracker_name, self.tags)
File "/path/to/pysot-toolkit/pysot/evaluation/eao_benchmark.py", line 153, in _calculate_eao
weight[self.low-1:self.high-1+1] = 1
AttributeError: 'EAOBenchmark' object has no attribute 'low'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/path/to/pysot-toolkit/bin/eval.py", line 204, in
trackers), desc='eval eao', total=len(trackers), ncols=100):
File "/condaenv/lib/python/site-packages/tqdm/_tqdm.py", line 1005, in iter
for obj in iterable:
File "/condaenv/lib/python/multiprocessing/pool.py", line 735, in next
raise value
AttributeError: 'EAOBenchmark' object has no attribute 'low'
I met such error when I run 'eval.py',how can I solve it?
Thanks!
python bin/eval.py --dataset_dir /home/zy/dataset/OTB100 --dataset OTB100 --tracker_result_dir /home/zy/code/pysot-toolkit/tracker/ --trackers SiamRPN++ C-COT DaSiamRPN ECO --num 4 --show_video_level --vis
loading OTB100: 100%|█████████████████████████████████████| 100/100 [00:00<00:00, 300.43it/s, Board]
eval success: 0%| | 0/4 [00:00<?, ?it/s]/home/zy/code/pysot-toolkit/tracker/SiamRPN++/basketball.txt
/home/zy/code/pysot-toolkit/tracker/C-COT/basketball.txt
/home/zy/code/pysot-toolkit/tracker/DaSiamRPN/basketball.txt
/home/zy/code/pysot-toolkit/tracker/ECO/basketball.txt
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/zy/anaconda3/lib/python3.5/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "./pysot/evaluation/ope_benchmark.py", line 50, in eval_success
success_ret_[video.name] = success_overlap(gt_traj, tracker_traj, n_frame)
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/dispatcher.py", line 349, in _compile_for_args
error_rewrite(e, 'typing')
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/dispatcher.py", line 316, in error_rewrite
reraise(type(e), e, None)
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/six.py", line 658, in reraise
raise value.with_traceback(tb)
numba.errors.TypingError: Failed at nopython (nopython frontend)
Internal error at <numba.typeinfer.ArgConstraint object at 0x7f88e1d2fb38>:
--%<----------------------------------------------------------------------------
Traceback (most recent call last):
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/errors.py", line 577, in new_error_context
yield
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/typeinfer.py", line 199, in call
assert ty.is_precise()
AssertionError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/typeinfer.py", line 142, in propagate
constraint(typeinfer)
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/typeinfer.py", line 200, in call
typeinfer.add_type(self.dst, ty, loc=self.loc)
File "/home/zy/anaconda3/lib/python3.5/contextlib.py", line 77, in exit
self.gen.throw(type, value, traceback)
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/errors.py", line 585, in new_error_context
six.reraise(type(newerr), newerr, tb)
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/six.py", line 659, in reraise
raise value
numba.errors.InternalError:
[1] During: typing of argument at ./pysot/utils/statistics.py (104)
--%<----------------------------------------------------------------------------
File "pysot/utils/statistics.py", line 104:
def success_overlap(gt_bb, result_bb, n_frame):
thresholds_overlap = np.arange(0, 1.05, 0.05)
^
This error may have been caused by the following argument(s):
This is not usually a problem with Numba itself but instead often caused by
the use of unsupported features or an issue in resolving types.
To see Python/NumPy features supported by the latest release of Numba visit:
http://numba.pydata.org/numba-doc/dev/reference/pysupported.html
and
http://numba.pydata.org/numba-doc/dev/reference/numpysupported.html
For more information about typing errors and how to debug them visit:
http://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#my-code-doesn-t-compile
If you think your code should work with Numba, please report the error message
and traceback, along with a minimal reproducer at:
https://github.com/numba/numba/issues/new
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "bin/eval.py", line 40, in
trackers), desc='eval success', total=len(trackers), ncols=100):
File "/home/zy/anaconda3/lib/python3.5/site-packages/tqdm/_tqdm.py", line 1022, in iter
for obj in iterable:
File "/home/zy/anaconda3/lib/python3.5/multiprocessing/pool.py", line 695, in next
raise value
numba.errors.TypingError: Failed at nopython (nopython frontend)
Internal error at <numba.typeinfer.ArgConstraint object at 0x7f88e1d2fb38>:
--%<----------------------------------------------------------------------------
Traceback (most recent call last):
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/errors.py", line 577, in new_error_context
yield
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/typeinfer.py", line 199, in call
assert ty.is_precise()
AssertionError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/typeinfer.py", line 142, in propagate
constraint(typeinfer)
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/typeinfer.py", line 200, in call
typeinfer.add_type(self.dst, ty, loc=self.loc)
File "/home/zy/anaconda3/lib/python3.5/contextlib.py", line 77, in exit
self.gen.throw(type, value, traceback)
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/errors.py", line 585, in new_error_context
six.reraise(type(newerr), newerr, tb)
File "/home/zy/anaconda3/lib/python3.5/site-packages/numba/six.py", line 659, in reraise
raise value
numba.errors.InternalError:
[1] During: typing of argument at ./pysot/utils/statistics.py (104)
--%<----------------------------------------------------------------------------
File "pysot/utils/statistics.py", line 104:
def success_overlap(gt_bb, result_bb, n_frame):
thresholds_overlap = np.arange(0, 1.05, 0.05)
^
This error may have been caused by the following argument(s):
This is not usually a problem with Numba itself but instead often caused by
the use of unsupported features or an issue in resolving types.
To see Python/NumPy features supported by the latest release of Numba visit:
http://numba.pydata.org/numba-doc/dev/reference/pysupported.html
and
http://numba.pydata.org/numba-doc/dev/reference/numpysupported.html
For more information about typing errors and how to debug them visit:
http://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#my-code-doesn-t-compile
If you think your code should work with Numba, please report the error message
and traceback, along with a minimal reproducer at:
https://github.com/numba/numba/issues/new
已经安装了latex,但还是报错了,请问是什么原因造成的呢?
以下是部分错误报告:
Here is the full report generated by latex:
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(/home/mo/.cache/matplotlib/tex.cache/605ab5cb88e476a4ef8fa458b494e5ef.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/type1cm/type1cm.sty)
(/usr/share/texmf/tex/latex/cm-super/type1ec.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/t1cmr.fd))
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/helvet.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/utf8.def
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.dfu)
(/usr/share/texlive/texmf-dist/tex/latex/base/ot1enc.dfu)
(/usr/share/texlive/texmf-dist/tex/latex/base/omsenc.dfu)))
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
Package geometry Warning: Over-specification in h'-direction.
width' (5058.9pt) is ignored.
Package geometry Warning: Over-specification in v'-direction.
height' (5058.9pt) is ignored.
) (/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.dfu)))
(./605ab5cb88e476a4ef8fa458b494e5ef.aux)
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd)
geometry driver: auto-detecting
geometry detected driver: dvips
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1phv.fd)
! Missing $ inserted.
$
l.19 {\sffamily [0.475] DCF_
HOG}
No pages of output.
Transcript written on 605ab5cb88e476a4ef8fa458b494e5ef.log.
请问谁有其他跟踪算法转换后适配pysot-toolkit的原始结果啊,我找了很多但是和pysot-toolkit并不适配
Notice that the pysot-toolkit only supports VOT before 2019. It's a little out of time.
Thanks for the author's efforts. Could you please tell me what I should do if I evaluate the algorithm performance on a new dataset similar to UAV123? Can you provide a Json file generated code. thank you!!
Thanks for your good work!
Runnig this project ,I can get 'Success' and 'Precision', but doesn't show the graph.
It displays :
/home/pysot-toolkit/pysot/visualization/draw_success_precision.py:9: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (
matplotlib.pyplot.figure
) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParamfigure.max_open_warning
).
fig, ax = plt.subplots()
/home/pysot-toolkit/pysot/visualization/draw_success_precision.py:47: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (matplotlib.pyplot.figure
) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParamfigure.max_open_warning
).
fig, ax = plt.subplots()
I have installed latex, but it doesn't diaply too.How can I solve the prolem?
Looking forward to your reply!
"NOTE we not use gmm to generate low, high, peak value" ------in pysot-oolkit/pysot/evaluation/eao_benchmark.py
The result evaluated by the tookit is not so correct, because the values of "low"、“high "、"peak" is fixed, but it should be auto computed by KDE(GMM) , I will appreciate it if the author can update the compute code.
作者你好,感谢你的toolkit,极大地方便了我的工作。
在使用过程中发现个小bug:由于draw_utils中COLOR ,LINE_STYLE的个数只有10,所以tracker数量超过10个时,draw_success_precision.py中以下内容:
plt.plot(thresholds, np.mean(value, axis=0), color=COLOR[idx], linestyle=LINE_STYLE[idx], label=label, linewidth=2)
会报索引超出界限,建议修改为
plt.plot(thresholds, np.mean(value, axis=0), color=COLOR[idx % 10], linestyle=LINE_STYLE[divmod(idx, 10)[0]], label=label, linewidth=2)
我在工程中看到一个文件夹保存有一些主流跟踪器在OTB2015上测试的结果,请问作者有这些跟踪器在OTB2013上测试的结果吗?能提供一下?万分感谢!
i have run these code
python bin/eval.py
--dataset_dir /path/to/dataset/root \ # dataset path
--dataset OTB100 \ # dataset name(OTB100, UAV123, NFS, LaSOT)
--tracker_result_dir /path/to/tracker/dir \ # tracker dir
--trackers SiamRPN++ C-COT DaSiamRPN ECO \ # tracker names
--num 4 \ # evaluation thread
--show_video_level \ # wether to show video results
--vis # draw graph
Hi Dear
got10k is a benchmark platform for tracking , it contains various dataset readers ,OOP tracker implementations and result collected leaderboard .
however ,it lack of visual Evaluation toolkit
How about if send pull request to got10k?
i can get the results like precision and rubost but i can not get the picture , do i need to run draw_eao.py in visualization or i just need to run eva.py and install latex
ValueError: keyword grid_b is not recognized; valid keywords are ['size', 'width', 'color', 'tickdir', 'pad', 'labelsize', 'labelcolor', 'zorder', 'gridOn', 'tick1On', 'tick2On', 'label1On', 'label2On', 'length', 'direction', 'left', 'bottom', 'right', 'top', 'labelleft', 'labelbottom', 'labelright', 'labeltop', 'labelrotation', 'grid_agg_filter', 'grid_alpha', 'grid_animated', 'grid_antialiased', 'grid_clip_box', 'grid_clip_on', 'grid_clip_path', 'grid_color', 'grid_dash_capstyle', 'grid_dash_joinstyle', 'grid_dashes', 'grid_data', 'grid_drawstyle', 'grid_figure', 'grid_fillstyle', 'grid_gapcolor', 'grid_gid', 'grid_in_layout', 'grid_label', 'grid_linestyle', 'grid_linewidth', 'grid_marker', 'grid_markeredgecolor', 'grid_markeredgewidth', 'grid_markerfacecolor', 'grid_markerfacecoloralt', 'grid_markersize', 'grid_markevery', 'grid_mouseover', 'grid_path_effects', 'grid_picker', 'grid_pickradius', 'grid_rasterized', 'grid_sketch_params', 'grid_snap', 'grid_solid_capstyle', 'grid_solid_joinstyle', 'grid_transform', 'grid_url', 'grid_visible', 'grid_xdata', 'grid_ydata', 'grid_zorder', 'grid_aa', 'grid_c', 'grid_ds', 'grid_ls', 'grid_lw', 'grid_mec', 'grid_mew', 'grid_mfc', 'grid_mfcalt', 'grid_ms']
The original groundtruth_rect.txt
file for video Tiger1
contains 354 frames, but OTB100.json
hosted on baidu pan contains only 349 frames for it. Is there an update to the original annotations?
As a sanity check, using ground truth files as tracking results and evaluating against them should supposedly yield perfect scores. However, the code actually gives a success score of 0.952 (=20/21) instead of 1.000. Is this expected behavior?
hi Zhang,
for idx, (img, gt_bbox) in enumerate(video):
the 'img' is BGR format?
While I try to run the eval.py following the instructions, it gives me the numba core errors as bellow:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/dlp/anaconda3/envs/pysot-toolkit/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "./pysot/evaluation/ope_benchmark.py", line 50, in eval_success
success_ret_[video.name] = success_overlap(gt_traj, tracker_traj, n_frame)
File "/home/dlp/anaconda3/envs/pysot-toolkit/lib/python3.7/site-packages/numba/core/dispatcher.py", line 420, in _compile_for_args
error_rewrite(e, 'typing')
File "/home/dlp/anaconda3/envs/pysot-toolkit/lib/python3.7/site-packages/numba/core/dispatcher.py", line 361, in error_rewrite
raise e.with_traceback(None)
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
non-precise type array(pyobject, 0d, C)
During: typing of argument at ./pysot/utils/statistics.py (104)
File "pysot/utils/statistics.py", line 104:
def success_overlap(gt_bb, result_bb, n_frame):
thresholds_overlap = np.arange(0, 1.05, 0.05)
^
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "bin/eval.py", line 40, in
trackers), desc='eval success', total=len(trackers), ncols=100):
File "/home/dlp/.local/lib/python3.7/site-packages/tqdm/_tqdm.py", line 1032, in iter
for obj in iterable:
File "/home/dlp/anaconda3/envs/pysot-toolkit/lib/python3.7/multiprocessing/pool.py", line 748, in next
raise value
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
non-precise type array(pyobject, 0d, C)
During: typing of argument at ./pysot/utils/statistics.py (104)
File "pysot/utils/statistics.py", line 104:
def success_overlap(gt_bb, result_bb, n_frame):
thresholds_overlap = np.arange(0, 1.05, 0.05)
^
Any idea why is this happens? Appreciate your help.
Thanks for your excellent works. I want to know when will you release the .txt tracking result files?
sorry to bother,
i got a error when run the code.
''Traceback (most recent call last):
File "eval.py", line 40, in
trackers), desc='eval success', total=len(trackers), ncols=100):
File "/home/yongwu/anaconda3/envs/mx/lib/python3.7/site-packages/tqdm/std.py", line 1081, in iter
for obj in iterable:
File "/home/yongwu/anaconda3/envs/mx/lib/python3.7/multiprocessing/pool.py", line 748, in next
raise value
ValueError: could not convert string to float: '198\t214\t34\t81'
"
首先感谢这么棒的工作!
我运行eval.py跑otb100,结果跑出来了,但是success_precision的图没有画出来,报错FileNotFoundError: [WinError 2] 系统找不到指定的文件。pycharm有提示Package requirements 'glob','opencv-python' are not satisfied,不知道是不是这个问题,我应该怎么解决呢?
I used the official vot-toolkit code and get the low, high and peak of VOT2016 are 108, 168 and 371 separately.
你好,请问如何在LaSOT上画出属性雷达图呢,
我添加了这行代码
draw_eao(success_ret)
之后报错:
raise ValueError("x and y must have same first dimension, but "
ValueError: x and y must have same first dimension, but have shapes (8,) and (281, 21)
In the part of Download Dataset, the correct name of Google netdisk is Google Drive, instead of Google Driver. Actually, this problem is so small that it doesn't influence us to understand the meaning.
您好!
我是上海交通大学的一名学生,最近在跑SiamRPN++的代码,根据github(https://github.com/STVIR/pysot/blob/master/TRAIN.md)上提供的代码,遇到了如下问题,还希望您能给予帮助:
hello
when I executed this "python setup.py build_ext --inplace",there appeared an error:"error: Error executing cmd /u /c "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 && set"
can u tell me solution
我运行这句python setup.py build_ext --inplace命令时,出现了错误error: Error executing cmd /u /c "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 && set。
I noticed that the converted *.txt results are coming out. Is it still on the schedule?
I run 'eval.py' and it shows following error:
Traceback (most recent call last):
File "bin/eval.py", line 12, in
from pysot.evaluation import OPEBenchmark, AccuracyRobustnessBenchmark, EAOBenchmark, F1Benchmark
File ".\pysot\evaluation_init_.py", line 1, in
from .ar_benchmark import AccuracyRobustnessBenchmark
File ".\pysot\evaluation\ar_benchmark.py", line 107
row += f'{Fore.RED}{accuracy_str}{Style.RESET_ALL}|'
^
SyntaxError: invalid syntax
could anyone help me? pls. Is it related to python verison?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.