You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A RuntimeError is thrown during visualization with no predictions.
Discussion
I'd like to know how this error should be handled. As a check for None predicted labels is already done, I assume that the behavior on zero predictions should be the same. See below in Bug fix.
Reproduction
Use a model which does not predict labels on a test run.
File "/workspace/mmdetection3d/tools/test.py", line 260, in <module>
main()
File "/workspace/mmdetection3d/tools/test.py", line 230, in main
outputs = single_gpu_test(model, data_loader, args.show, args.show_dir)
File "/workspace/mmdetection3d/mmdet3d/apis/test.py", line 48, in single_gpu_test
model.module.show_results(
File "/workspace/mmdetection3d/mmdet3d/models/detectors/base.py", line 120, in show_results
show_result(
File "/workspace/mmdetection3d/mmdet3d/core/visualizer/show_result.py", line 110, in show_result
0, 255, size=(pred_labels.max() + 1, 3)) / 256
RuntimeError: max(): Expected reduction dim to be specified for input.numel() == 0. Specify the reduction dim with the 'dim' argument.
Bug fix
As mentioned in #1461, we could add pred_labels.numel() == 0 check in line
Describe the bug
A
RuntimeError
is thrown during visualization with no predictions.Discussion
I'd like to know how this error should be handled. As a check for
None
predicted labels is already done, I assume that the behavior on zero predictions should be the same. See below in Bug fix.Reproduction
Use a model which does not predict labels on a test run.
Environment
python mmdet3d/utils/collect_env.py
to collect necessary environment information and paste it here.Error traceback
Bug fix
As mentioned in #1461, we could add
pred_labels.numel() == 0
check in linemmdetection3d/mmdet3d/core/visualizer/show_result.py
Line 106 in 073f353
here to start visualization without available predictions. I can open a pull request to do so.
The text was updated successfully, but these errors were encountered: