WangYueFt / detr3d

MIT License
744 stars 139 forks source link

Detr3D is not in the models registry #42

Open guillemdelgado opened 2 years ago

guillemdelgado commented 2 years ago

Hello,

Im trying to run the train.py file with the detr3d_res101_gridmask.py configuration but Im not able to build the Detr3D model using mmdetection3d. Do I have to do anything extra in order to allow mmdet3d to build Detr3d? Here is my error:

Traceback (most recent call last): File "/opt/conda/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/opt/conda/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/root/.vscode-server/extensions/ms-python.python-2022.6.3/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module> cli.main() File "/root/.vscode-server/extensions/ms-python.python-2022.6.3/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main run() File "/root/.vscode-server/extensions/ms-python.python-2022.6.3/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285, in run_file runpy.run_path(target_as_str, run_name=compat.force_str("__main__")) File "/opt/conda/lib/python3.7/runpy.py", line 263, in run_path pkg_name=pkg_name, script_name=fname) File "/opt/conda/lib/python3.7/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/opt/conda/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Development_detr3d/tools/train.py", line 250, in <module> main() File "/Development_detr3d/tools/train.py", line 209, in main test_cfg=cfg.get('test_cfg')) File "/Development_detr3d/mmdetection3d/mmdet3d/models/builder.py", line 84, in build_model return build_detector(cfg, train_cfg=train_cfg, test_cfg=test_cfg) File "/Development_detr3d/mmdetection3d/mmdet3d/models/builder.py", line 58, in build_detector cfg, default_args=dict(train_cfg=train_cfg, test_cfg=test_cfg)) File "/opt/conda/lib/python3.7/site-packages/mmcv/utils/registry.py", line 212, in build return self.build_func(*args, **kwargs, registry=self) File "/opt/conda/lib/python3.7/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "/opt/conda/lib/python3.7/site-packages/mmcv/utils/registry.py", line 45, in build_from_cfg f'{obj_type} is not in the {registry.name} registry') KeyError: 'Detr3D is not in the models registry'

a1600012888 commented 2 years ago

I feel like it is simimliar issue you mentioned here: https://github.com/WangYueFt/detr3d/issues/38#issuecomment-1148406183

hongyujinhongyu commented 1 year ago

I am facing the same issue('Detr3D is not in the models registry'), solution in 38#issuecomment did not help to fix it. Anyone get other ideas?

MAI-KOKO commented 5 months ago

I am facing the same issue('Detr3D is not in the models registry'), solution in 38#issuecomment did not help to fix it. Anyone get other ideas?

You can try: import sys sys.path.insert(0, '/home/mcf/3D_Net/detr3d/') plg_lib = importlib.import_module(_module_path) It solved my problem.