Co-DETR icon indicating copy to clipboard operation
Co-DETR copied to clipboard

KeyError: 'CoDETR is not in the models registry'

Open chinabing opened this issue 2 years ago • 2 comments

$ sh tools/dist_test_1gpu.sh projects/configs/co_deformable_detr/co_deformable_detr_r50_1x_coco.py path_to_checkpoint --eval bbox

d:\coding\co-detr\mmdet\utils\setup_env.py:39: UserWarning: Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed. f'Setting OMP_NUM_THREADS environment variable for each process ' d:\coding\co-detr\mmdet\utils\setup_env.py:49: UserWarning: Setting MKL_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed. f'Setting MKL_NUM_THREADS environment variable for each process ' loading annotations into memory... Done (t=0.39s) creating index... index created! Traceback (most recent call last): File "tools/test.py", line 276, in main() File "tools/test.py", line 223, in main model = build_detector(cfg.model, test_cfg=cfg.get('test_cfg')) File "d:\coding\co-detr\mmdet\models\builder.py", line 59, in build_detector cfg, default_args=dict(train_cfg=train_cfg, test_cfg=test_cfg)) File "D:\ProgramData\Anaconda3\envs\co-detr2\lib\site-packages\mmcv\utils\registry.py", line 215, in build return self.build_func(*args, **kwargs, registry=self) File "D:\ProgramData\Anaconda3\envs\co-detr2\lib\site-packages\mmcv\cnn\builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "D:\ProgramData\Anaconda3\envs\co-detr2\lib\site-packages\mmcv\utils\registry.py", line 45, in build_from_cfg f'{obj_type} is not in the {registry.name} registry') KeyError: 'CoDETR is not in the models registry'

I have run the command "pip install -v -e . " . But it doesn't work. Could you help me?

chinabing avatar Oct 15 '23 06:10 chinabing

You can run pip uninstall mmdet to see if it works

TempleX98 avatar Oct 15 '23 13:10 TempleX98

Try to add this line from projects import * to the file tools/test.py

MarouaneMja avatar Nov 06 '23 13:11 MarouaneMja