Closed sonukiller closed 10 months ago
As I understand mmdetection3d doesn't support instance or panoptic segmentation visualization. You can inherit from Det3DLocalVisualizer
and colorize point clouds by yourself.
According to this, I have added below in the config file.
vis_backends = [dict(type='LocalVisBackend')]
visualizer = dict(
type='Det3DLocalVisualizer', vis_backends=vis_backends, name='visualizer')
Then I am getting
Traceback (most recent call last):
File "/workspace/tools/test.py", line 148, in <module>
main()
File "/workspace/tools/test.py", line 144, 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 207, in after_test_iter
self._visualizer.add_datasample(
File "/opt/conda/lib/python3.10/site-packages/mmengine/dist/utils.py", line 366, in wrapper
return func(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/mmdet3d/visualization/local_visualizer.py", line 891, in add_datasample
self._draw_pts_sem_seg(data_input['points'],
File "/opt/conda/lib/python3.10/site-packages/mmdet3d/visualization/local_visualizer.py", line 733, in _draw_pts_sem_seg
pts_sem_seg = tensor2ndarray(pts_seg.pts_semantic_mask)
AttributeError: 'PointData' object has no attribute 'pts_semantic_mask'
Do you know the solution?
I mean, you need to inherit from Det3DLocalVisualizer
and a little bit modify its code for instance segmentation task.
To see the prediction results for S3DIS, I kept
--show
and--task="lidar_det"
while running test.py, but I am getting the following error:TypeError: Visualizer.add_datasample() got an unexpected keyword argument 'vis_task' in <mmdet3d.engine.hooks.visualization_hook.Det3DVisualizationHook object at 0x7fecccbe2680>
Do you know the solution?