StrangerZhang / pysot-toolkit

Python Single Object Tracking Evaluation
MIT License
412 stars 68 forks source link

numba.core.errors.TypingError: Failed in nopython mode pipeline #30

Open kuzhang opened 3 years ago

kuzhang commented 3 years ago

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 successret[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.

yangmiemie99 commented 3 years ago

Are you fix this bug?I met the same question.

EEEEEREN commented 3 years ago

奇怪的问题,我一开始跑成功了,Succ图都出来了,再跑突然就报这个错了

XiaoBai-collab commented 3 years ago

@EEEEEREN How can i solve it? Ennnn.. it is too difficult.

EEEEEREN commented 3 years ago

@EEEEEREN How can i solve it? Ennnn.. it is too difficult.

查查你的路径是不是不对,比如数据集、results的路径

XiaoBai-collab commented 3 years ago

@EEEEEREN 检查了数据集的路径,以及test之后保存的text文件的路径,但是还是一直报这个错误。如下: loading OTB100: 100%|█████████████████████████████████████| 100/100 [00:00<00:00, 475.63it/s, Woman] eval success: 0%| | 0/1 [00:00<?, ?it/s]../results/OTB100/SiamFCWithAttention/twinnings.txt eval success: 0%| | 0/1 [00:02<?, ?it/s] multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/home/user/anaconda3/envs/torch/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "../pysot/evaluation/ope_benchmark.py", line 50, in eval_success successret[video.name] = success_overlap(gt_traj, tracker_traj, n_frame) File "/home/user/anaconda3/envs/torch/lib/python3.6/site-packages/numba/core/dispatcher.py", line 420, in _compile_for_args error_rewrite(e, 'typing') File "/home/user/anaconda3/envs/torch/lib/python3.6/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 "/home/user/objectTracking/DLCode/SiamFC-PyTorch-master/pysot-toolkit/bin/eval.py", line 37, in trackers), desc='eval success', total=len(trackers), ncols=100): File "/home/user/anaconda3/envs/torch/lib/python3.6/site-packages/tqdm/std.py", line 1178, in iter for obj in iterable: File "/home/user/anaconda3/envs/torch/lib/python3.6/multiprocessing/pool.py", line 735, 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)

使用的参数是: parser = argparse.ArgumentParser(description='Single Object Tracking Evaluation') parser.add_argument('--dataset_dir', default='../../../data/OTB100',type=str, help='dataset root directory') parser.add_argument('--dataset', default='OTB100', type=str, help='dataset name') parser.add_argument('--tracker_result_dir', default='../results/OTB100/', type=str, help='tracker results root') parser.add_argument('--trackers', default='SiamFC', nargs='+') parser.add_argument('--vis', dest='vis', action='store_true') parser.add_argument('--show_video_level', dest='show_video_level', action='store_true') parser.add_argument('--num', type=int, help='number of processes to eval', default=1) args = parser.parse_args()

bamboopu commented 3 years ago

是路径问题,注意大小写。win下没有严格区分,LINUX需要控制大小写,个别results.txt可以根据报错重新改写大小写名字

zuzi2015 commented 2 years ago

路径是正确的,还是报这个错误,不知道为什么

EEEEEREN commented 2 years ago

路径是正确的,还是报这个错误,不知道为什么

查一查.txt文件 命名是不是统一了 有些算法 各自的txt文件命名不太统一,比如有的是 skate-2 有的是skate_2,大概就这意思

zuzi2015 commented 2 years ago

我挨个检查过了,命名都是正确的,但还是报错

---Original--- From: @.> Date: Thu, Mar 3, 2022 17:21 PM To: @.>; Cc: @.**@.>; Subject: Re: [StrangerZhang/pysot-toolkit] numba.core.errors.TypingError:Failed in nopython mode pipeline (#30)

路径是正确的,还是报这个错误,不知道为什么

查一查.txt文件 命名是不是统一了 有些算法 各自的txt文件命名不太统一,比如有的是 skate-2 有的是skate_2,大概就这意思

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

chenhui2016 commented 2 years ago

我挨个检查过了,命名都是正确的,但还是报错 ---Original--- From: @.> Date: Thu, Mar 3, 2022 17:21 PM To: @.>; Cc: @.**@.>; Subject: Re: [StrangerZhang/pysot-toolkit] numba.core.errors.TypingError:Failed in nopython mode pipeline (#30) 路径是正确的,还是报这个错误,不知道为什么 查一查.txt文件 命名是不是统一了 有些算法 各自的txt文件命名不太统一,比如有的是 skate-2 有的是skate_2,大概就这意思 — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

你把results 里面的txt文件改称报错的那个名称就可以了

YconfigY commented 1 year ago

使用eval.py对在OTB100数据集进行评估时,results文件路径标准格式应该是tracker_dir/trackers/xxx.txt when evaling OTB100 dataset by eval.py, the results files path standard format should be tracker_dir/trackers/xxx.txt.