You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot instantiate a custom model, Co-DETR given the weights.
After searching, it seems that there is a package named "projects" which prevents python from searching into the mmdetection directory (it is in the PYTHONPATH).
>>> from mmdet.apis import DetInferencer
>>> DetInferencer(weights='/workspace/out/checkpoints/co-detr/co_dino_5scale_r50_lsj_8xb2_1x_coco-69a72d67.pth')
>>> ...
>>> ImportError: Failed to import custom modules from {'allow_failed_imports': False, 'imports': ['projects.CO-DETR.codetr']}, the current sys.path is:
/mmdetection
/workspace
/opt/conda/lib/python310.zip
/opt/conda/lib/python3.10
/opt/conda/lib/python3.10/lib-dynload
/opt/conda/lib/python3.10/site-packages
/opt/conda/lib/python3.10/site-packages/smplx-0.1.28-py3.10.egg
/tmp/tmp1_v1g0zy
You should set `PYTHONPATH` to make `sys.path` include the directory which contains your custom module
>>>
>>>
>>> import projects
>>> projects.__file__
'/opt/conda/lib/python3.10/site-packages/projects/__init__.py'
>>>
My env is a docker image (thanosch/mmtorch:2.1.0-cuda121) with Python 3.10 and the latest version of mm:
mmcv 2.1.0
mmdet 3.2.0
mmengine 0.9.0
mmpose 1.2.0
The text was updated successfully, but these errors were encountered:
I cannot instantiate a custom model, Co-DETR given the weights.
After searching, it seems that there is a package named "projects" which prevents python from searching into the
mmdetection
directory (it is in the PYTHONPATH).My env is a docker image (
thanosch/mmtorch:2.1.0-cuda121
) with Python 3.10 and the latest version of mm:The text was updated successfully, but these errors were encountered: