Sense-X / Co-DETR

[ICCV 2023] DETRs with Collaborative Hybrid Assignments Training
MIT License
968 stars 105 forks source link

KeyError: 'CoDETR is not in the models registry' #66

Open chinabing opened 11 months ago

chinabing commented 11 months ago

$ 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?

TempleX98 commented 11 months ago

You can run pip uninstall mmdet to see if it works

MarouaneMja commented 10 months ago

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