Closed wofeifeileni closed 9 months ago
You can follow PETRv2 to prepare the seg label. Make sure the coordinate defination is consistent (using lidar coordinate in mmdet3d 1.0, the xy defination in mmdet3d is different).
【petrv2 BEVseg.py, petr3d Seg. py, petr_head_seg.py】 were placed in the corresponding location under the StreamPETR project, and when running the training command, the following error occurred:
Traceback (most recent call last):
File "tools/train.py", line 263, in
So how can I add it to the registry
Got it, thank you.
收到了。谢谢。
请问增加分割任务是否进一步提升了性能?
@wofeifeileni When i try to add the segmentation task from PETRv2 to StreamPETR, i put【petrv2_ BEVseg.py, petr3d_Seg. py, petr_head_seg.py】 in the corresponding location under the StreamPETR project, i also add 【from .petr3d_seg import Petr3D_seg】in 【StreamPETR/projects/mmdet3d_plugin/models/detectors/init.py】,add 【from .petr_head_seg import PETRHead_seg】in 【StreamPETR/projects/mmdet3d_plugin/models/dense_heads/init.py】, but when running the training command, the following error occurred
Traceback (most recent call last): File "/home/cxh/anaconda3/envs/streampetrobse/lib/python3.8/site-packages/mmcv/utils/registry.py", line 69, in build_from_cfg return obj_cls(**args) File "/home/cxh/StreamPETR/projects/mmdet3d_plugin/models/dense_heads/petr_head_seg.py", line 319, in init self.positional_encoding = build_positional_encoding( File "/home/cxh/anaconda3/envs/streampetrobse/lib/python3.8/site-packages/mmcv/cnn/bricks/transformer.py", line 40, in build_positional_encoding return build_from_cfg(cfg, POSITIONAL_ENCODING, default_args) File "/home/cxh/anaconda3/envs/streampetrobse/lib/python3.8/site-packages/mmcv/utils/registry.py", line 61, in build_from_cfg raise KeyError( KeyError: 'SinePositionalEncoding3D is not in the position encoding registry'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/cxh/anaconda3/envs/streampetrobse/lib/python3.8/site-packages/mmcv/utils/registry.py", line 69, in build_from_cfg return obj_cls(*args) File "/home/cxh/StreamPETR/projects/mmdet3d_plugin/models/detectors/petr3d_seg.py", line 55, in init super(Petr3D_seg, self).init(pts_voxel_layer, pts_voxel_encoder, File "/home/cxh/mmdetection3d/mmdet3d/models/detectors/mvx_two_stage.py", line 62, in init self.pts_bbox_head = builder.build_head(pts_bbox_head) File "/home/cxh/mmdetection3d/mmdet3d/models/builder.py", line 68, in build_head return MMDET_HEADS.build(cfg) File "/home/cxh/anaconda3/envs/streampetrobse/lib/python3.8/site-packages/mmcv/utils/registry.py", line 237, in build return self.build_func(args, **kwargs, registry=self) File "/home/cxh/anaconda3/envs/streampetrobse/lib/python3.8/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "/home/cxh/anaconda3/envs/streampetrobse/lib/python3.8/site-packages/mmcv/utils/registry.py", line 72, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') KeyError: "PETRHead_seg: 'SinePositionalEncoding3D is not in the position encoding registry'"
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "tools/train.py", line 263, in main() File "tools/train.py", line 212, in main model = build_model( File "/home/cxh/mmdetection3d/mmdet3d/models/builder.py", line 122, in build_model return build_detector(cfg, train_cfg=train_cfg, test_cfg=test_cfg) File "/home/cxh/mmdetection3d/mmdet3d/models/builder.py", line 95, in build_detector return MMDET_DETECTORS.build( File "/home/cxh/anaconda3/envs/streampetrobse/lib/python3.8/site-packages/mmcv/utils/registry.py", line 237, in build return self.build_func(*args, **kwargs, registry=self) File "/home/cxh/anaconda3/envs/streampetrobse/lib/python3.8/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "/home/cxh/anaconda3/envs/streampetrobse/lib/python3.8/site-packages/mmcv/utils/registry.py", line 72, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') KeyError: 'Petr3D_seg: "PETRHead_seg: 'SinePositionalEncoding3D is not in the position encoding registry'"' ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 27143) of binary: /home/cxh/anaconda3/envs/streampetrobse/bin/python ERROR:torch.distributed.elastic.agent.server.local_elastic_agent:[default] Worker group failed INFO:torch.distributed.elastic.agent.server.api:[default] Worker group FAILED. 3/3 attempts left; will restart worker group INFO:torch.distributed.elastic.agent.server.api:[default] Stopping worker group INFO:torch.distributed.elastic.agent.server.api:[default] Rendezvous'ing worker group INFO:torch.distributed.elastic.agent.server.api:[default] Rendezvous complete for workers. Result: restart_count=1 master_addr=127.0.0.1 master_port=29508 group_rank=0 group_world_size=1 local_ranks=[0] role_ranks=[0] global_ranks=[0] role_world_sizes=[1] global_world_sizes=[1]
INFO:torch.distributed.elastic.agent.server.api:[default] Starting worker group INFO:torch.distributed.elastic.multiprocessing:Setting worker0 reply file to: /tmp/torchelastic_p5ihn_in/none_xinnk_5z/attempt_1/0/error.json projects.mmdet3d_plugin how to deal with it???looking forward to your reply
Hi, I would like to add the segmentation task from PETRv2 to StreamPETR (not to further improve performance, but to implement this task within the StreamPETR framework). Where should I start? Can you provide some suggestions? Thank you in advance.