tianweiy / CenterPoint

MIT License
1.88k stars 455 forks source link

KeyError: 'CenterHead is not in the head registry' #370

Open darrenearl opened 1 year ago

darrenearl commented 1 year ago

(centerpoint) exinova@exinova-B560M-AORUS-PRO-AX:/media/exinova/ssd/CenterPoint-master_py$ python tools/train.py configs/nusc/pp/nusc_centerpoint_pp_02voxel_two_pfn_10sweep.py 2022-12-15 16:35:21,463 - INFO - Distributed training: False 2022-12-15 16:35:21,463 - INFO - torch.backends.cudnn.benchmark: False 2022-12-15 16:35:21,484 - INFO - Finish RPN Initialization Traceback (most recent call last): File "tools/train.py", line 168, in main() File "tools/train.py", line 141, in main model = build_detector(cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg) File "/media/exinova/ssd/CenterPoint-master_py/Det3D/det3d/models/builder.py", line 53, in build_detector return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg)) File "/media/exinova/ssd/CenterPoint-master_py/Det3D/det3d/models/builder.py", line 21, in build return build_from_cfg(cfg, registry, default_args) File "/media/exinova/ssd/CenterPoint-master_py/Det3D/det3d/utils/registry.py", line 82, in build_from_cfg return obj_cls(**args) File "/media/exinova/ssd/CenterPoint-master_py/Det3D/det3d/models/detectors/point_pillars.py", line 18, in init reader, backbone, neck, bbox_head, train_cfg, test_cfg, pretrained File "/media/exinova/ssd/CenterPoint-master_py/Det3D/det3d/models/detectors/single_stage.py", line 25, in init self.bbox_head = builder.build_head(bbox_head) File "/media/exinova/ssd/CenterPoint-master_py/Det3D/det3d/models/builder.py", line 45, in build_head return build(cfg, HEADS) File "/media/exinova/ssd/CenterPoint-master_py/Det3D/det3d/models/builder.py", line 21, in build return build_from_cfg(cfg, registry, default_args) File "/media/exinova/ssd/CenterPoint-master_py/Det3D/det3d/utils/registry.py", line 70, in build_from_cfg "{} is not in the {} registry".format(obj_type, registry.name) KeyError: 'CenterHead is not in the head registry'

what is wrong about this ? do anyone knowns?

tianweiy commented 1 year ago

it seems you are using the Det3D repo instead of the current one

"/media/exinova/ssd/CenterPoint-master_py/Det3D/det3d/models/detectors/point_pillars.py""

darrenearl commented 1 year ago

it seems you are using the Det3D repo instead of the current one

"/media/exinova/ssd/CenterPoint-master_py/Det3D/det3d/models/detectors/point_pillars.py""

but when i uninstall det3d, error also happend:

(centerpoint) exinova@exinova-B560M-AORUS-PRO-AX:/media/exinova/ssd/CenterPoint-master_py$ python tools/train.py configs/nusc/pp/nusc_centerpoint_pp_02voxel_two_pfn_10sweep.py Traceback (most recent call last): File "tools/train.py", line 14, in from det3d.datasets import build_dataset ModuleNotFoundError: No module named 'det3d'

tianweiy commented 1 year ago

add centerpoint's path to pythonpath