Sense-X / Co-DETR

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

DetrTransformerEncoder:__init__()got an unexpected keyword argument’with_cp’ #81

Closed Yvette1993 closed 10 months ago

Yvette1993 commented 10 months ago

Hi, Thank for your great jobs. When I run the dist_train.sh for the co_dino_5scale_swin_large_1x_coco.py model got an TypeError:CoDETR:CoDINOHead:CoDinoTransformer:DeterTransformerEncoder:init() got an unexpected keyword argument ‘with_cp’. But I don’t meet the error when run co_deformable_detr_model. Please help me, thank you.

Yvette1993 commented 10 months ago

I found the issue, Thank you

xiaoxiaobina commented 8 months ago

I meet the same problem, How did you solve it?

JPassionQ commented 6 months ago

So how did you solve it?

uitamaki commented 6 months ago

@xiaoxiaobina @JPassionQ Please make sure you are using mmdet included in Co-DETR rather than installing it from PyPI, as Co-DETR has made some modifications to the mmdet code, and you may encounter similar issues if you use mmdet installed from PyPI. You can try uninstalling mmdet and adding the following code to tools/train.py:

import sys
sys.path.append('/path/to/Co-DETR/')
JPassionQ commented 6 months ago

@uitamaki Thanks very much. I've found that it was because something wrong with my config file. But still thank you!

Emperor124 commented 1 month ago

非常感谢。我发现这是因为我的配置文件有问题。但还是谢谢你!

How do you modify the configuration file?thanks