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' #93

Open ibarbecue opened 9 months ago

ibarbecue commented 9 months ago

2

TempleX98 commented 9 months ago

Please try pip install -e . in the co-detr repo.

jaguar1975cn commented 7 months ago

I got the same error, in my case, even after executed pip install -e ., it still had the same error. The solution turned out to be:

pip uninstall projects

It is because the projects/models/co_detr.py is under the same package name projects, and in my environment, I installed projects module from pip, it caused the CoDETR class could not be loaded.

jaguar1975cn commented 5 months ago

You need to make sure your working directory is the root directory of Co-DETR, ie. if you run tree -L 1, you should see:

$ tree -L 1
.
├── configs
├── demo
├── docker
├── docs
├── figures
├── LICENSE
├── mmcv_custom
├── mmdet
├── projects
├── README.md
├── requirements
├── requirements.txt
├── resources
├── setup.cfg
├── setup.py
├── tests
└── tools

On Thu, 4 Apr 2024 at 09:16, Jin Chufeng @.***> wrote:

image.png (view on web) https://github.com/Sense-X/Co-DETR/assets/74719250/39e48646-d9d2-4411-9fcc-570f1f151363 I have a similar question,why there's no module named projects?

— Reply to this email directly, view it on GitHub https://github.com/Sense-X/Co-DETR/issues/93#issuecomment-2036488865, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHRZG6D6CG2CTLI3SPOTUKLY3UD6DAVCNFSM6AAAAAA7RUPPLCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZWGQ4DQOBWGU . You are receiving this because you commented.Message ID: @.***>