bevfusion
bevfusion copied to clipboard
Visualization error
I try to visualize the results but it occur the error as below. How could I solve with this issue?
My command :
!torchpack dist-run -np 1 python tools/visualize.py configs/nuscenes/det/transfusion/secfpn/camera+lidar/swint_v0p075/convfuser.yaml --mode pred --checkpoint pretrained/bevfusion-det.pth --bbox-score 0.5 --out-dir vis_results
The error :
Traceback (most recent call last):
File "/content/bevfusion/tools/visualize.py", line 166, in <module>
main()
File "/content/bevfusion/tools/visualize.py", line 88, in main
outputs = model(**data)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/parallel/distributed.py", line 1156, in forward
output = self._run_ddp_forward(*inputs, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/mmcv/parallel/distributed.py", line 165, in _run_ddp_forward
return module_to_run(*inputs[0], **kwargs[0]) # type: ignore
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/mmcv/runner/fp16_utils.py", line 119, in new_func
return old_func(*args, **kwargs)
File "/content/bevfusion/mmdet3d/models/fusion_models/bevfusion.py", line 253, in forward
outputs = self.forward_single(
File "/usr/local/lib/python3.10/dist-packages/mmcv/runner/fp16_utils.py", line 119, in new_func
return old_func(*args, **kwargs)
File "/content/bevfusion/mmdet3d/models/fusion_models/bevfusion.py", line 301, in forward_single
feature = self.extract_camera_features(
File "/content/bevfusion/mmdet3d/models/fusion_models/bevfusion.py", line 133, in extract_camera_features
x = self.encoders["camera"]["vtransform"](
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/content/bevfusion/mmdet3d/models/vtransforms/depth_lss.py", line 100, in forward
x = super().forward(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/mmcv/runner/fp16_utils.py", line 208, in new_func
return old_func(*args, **kwargs)
File "/content/bevfusion/mmdet3d/models/vtransforms/base.py", line 350, in forward
x = self.get_cam_feats(img, depth, mats_dict)
File "/usr/local/lib/python3.10/dist-packages/mmcv/runner/fp16_utils.py", line 208, in new_func
return old_func(*args, **kwargs)
TypeError: DepthLSSTransform.get_cam_feats() takes 3 positional arguments but 4 were given
I am also experiencing this error, how did you fix it?
Hello, I encountered a similar issue. Any solution? Please see the error output below. Thanks
File "tools/visualize.py", line 168, in
I got the same error.
I resolved it by the following: -- compare the code between test.py and visualize.py -- since test.py works, check what is in test.py that is missing in visualize.py -- one such missing code snippet relates to wrap_fp16_model -- modify visualize.py accordingly to be the same as test.py
This is the same as #532, this should help: solution