AssertionError: img_path is not in data_sample
Closed this issue · 3 comments
I input command:
python tools/test.py configs/oneformer3d_1xb4_scannet.py checkpoints/oneformer3d_1xb4_scannet.pth --show --show-dir ./results -- task mono_det
then I get error:
Traceback (most recent call last):
File "/home/oneformer3d/tools/test.py", line 149, in
main()
File "/home/oneformer3d/tools/test.py", line 145, in main
runner.test()
File "/opt/conda/lib/python3.10/site-packages/mmengine/runner/runner.py", line 1767, in test
metrics = self.test_loop.run() # type: ignore
File "/opt/conda/lib/python3.10/site-packages/mmengine/runner/loops.py", line 435, in run
self.run_iter(idx, data_batch)
File "/opt/conda/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/mmengine/runner/loops.py", line 456, in run_iter
self.runner.call_hook(
File "/opt/conda/lib/python3.10/site-packages/mmengine/runner/runner.py", line 1783, in call_hook
getattr(hook, fn_name)(self, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/mmdet3d/engine/hooks/visualization_hook.py", line 170, in after_test_iter
assert 'img_path' in data_sample,
AssertionError: img_path is not in data_sample
I don't know how to fix it.
Hi @1163710216 ,
Our code is not ready for mmdetection3d visualization. You can just save gt and predicted masks manually and open them in meshlab.
Hello, I just want to run the test model to get a performance indicator without visualization. How can I avoid the img_path error?
Hello, I just want to run the test model to get a performance indicator without visualization. How can I avoid the img_path error?
Please provide the command you running and the whole log with error. Without visualization we provide the correct test command in our readme.