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

xxx.split('/')[-1] may lead to bug when you run eval.py in Windows #267

Closed
luoshipeng opened this issue Dec 21, 2019 · 3 comments
Closed
Labels
bug Something isn't working good first issue Good for newcomers merged small

Comments

@luoshipeng
Copy link

luoshipeng commented Dec 21, 2019

When i first run eval.py just like the Quick Start said:

python ../../tools/eval.py
--tracker_path ./results \ # result path
--dataset VOT2016 \ # dataset name
--num 1 \ # number thread to eval
--tracker_prefix 'model' # tracker_name
(ps: the argument should be model not 'model', there is no ' ')

i got an error:
loading VOT2016: 100%|███████████████████████████████████████| 60/60 [00:01<00:00, 49.93it/s, wiper]
eval ar: 100%|████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.97it/s]
eval eao: 0%| | 0/1 [00:00<?, ?it/s]multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Users\---\.conda\envs\pysot\lib\multiprocessing\pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "F:\---\pysot-master\toolkit\evaluation\eao_benchmark.py", line 47, in eval
eao = self._calculate_eao(tracker_name, self.tags)
File "F:\---\pysot-master\toolkit\evaluation\eao_benchmark.py", line 111, in _calculate_eao
max_len = max([len(x) for x in all_overlaps])
ValueError: max() arg is an empty sequence
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "../../tools/eval.py", line 147, in
main()
File "../../tools/eval.py", line 129, in main
trackers), desc='eval eao', total=len(trackers), ncols=100):
File "C:\Users\---\.conda\envs\pysot\lib\site-packages\tqdm\std.py", line 1102, in iter
for obj in iterable:
File "C:\Users\---\.conda\envs\pysot\lib\multiprocessing\pool.py", line 748, in next
raise value
ValueError: max() arg is an empty sequence
eval eao: 0%| | 0/1 [00:00<?, ?it/s]

Finally, i found the cause of this bug.
trackers = [x.split('/')[-1] for x in trackers] in File "../../tools/eval.py", line 37, in main()
This code split tracker name incorrectly. the return value is 'results\VOT2016\model' while correct value should be 'model'.

Conclusion:
This code should change "x.split('/')" to "x.split('\')" when you use Windows. Besides, i've not met any other bug caused by this, but i'm not sure that whether the other place uses x.split('/') may lead to bug or not.

@ZhiyuanChen ZhiyuanChen added bug Something isn't working good first issue Good for newcomers small labels Dec 21, 2019
@ZhiyuanChen
Copy link
Collaborator

Looks like you have figured out how to resolve this issue.
You are more than welcome to fix it and submit a pull request.

@ZhiyuanChen
Copy link
Collaborator

#362

@woshiwwwppp
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers merged small
Projects
None yet
Development

No branches or pull requests

3 participants