Sense-X / Co-DETR

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

Issue with Environment (mmdet) #76

Open FrancoisPorcher opened 10 months ago

FrancoisPorcher commented 10 months ago

Dear Co-DETR team,

I have the following issue with "mmdet":

I ran this command:

bash tools/dist_test.sh projects/configs/co_deformable_detr/co_dino_5scale_vit_large_lvis.py /private/home/francoisporcher/WeakSupSeg/francois-semi-supervised/Co-DETR/checkpoints/co_dino_5scale_vit_large_lvis.pth 2 --eval bbox

And get the following error:

image

Could you please explain what environment you use and how you set it up?

The commands I used are:

conda create --name codetr python=3.10 -y; conda activate codetr; conda install -y pytorch=1.11.0 torchvision torchaudio cudatoolkit=11.5 -c pytorch -c nvidia pip install mmcv-full==1.5.0 -f https://download.openmmlab.com/mmcv/dist/cu115/torch1.11.0/index.html

I did not install mmdet myself, as you advised, but it seems that it does not work for me.

Thanks!!

FrancoisPorcher commented 10 months ago

Also pip install terminal tables does not solve the issue because then there are other libraries (pycocotools, six, etc..)

TempleX98 commented 10 months ago

Please try pip install -r requirements.txt

FrancoisPorcher commented 10 months ago

It does not work..

I still get the error:

Traceback (most recent call last): Traceback (most recent call last): File "/private/home/francoisporcher/WeakSupSeg/francois-semi-supervised/Co-DETR/tools/test.py", line 15, in File "/private/home/francoisporcher/WeakSupSeg/francois-semi-supervised/Co-DETR/tools/test.py", line 15, in from mmdet.apis import multi_gpu_test, single_gpu_test ModuleNotFoundError : from mmdet.apis import multi_gpu_test, single_gpu_testNo module named 'mmdet'

The sequence of commands I ran is:

conda create --name codetr python=3.10 -y; conda activate codetr; conda install -y pytorch=1.11.0 torchvision torchaudio cudatoolkit=11.5 -c pytorch -c nvidia

Then install the requirements pip install -r requirements.txt

pip install mmcv-full==1.5.0 -f https://download.openmmlab.com/mmcv/dist/cu115/torch1.11.0/index.html

Then:

bash tools/dist_test.sh projects/configs/co_deformable_detr/co_dino_5scale_vit_large_lvis.py /private/home/francoisporcher/WeakSupSeg/francois-semi-supervised/Co-DETR/checkpoints/co_dino_5scale_vit_large_lvis.pth 2 --eval bbox

TempleX98 commented 10 months ago

I have never met this issue. Maybe you can install mmdet by pip install -v -e . to see if it works.

FrancoisPorcher commented 10 months ago

So I tried these commands (all ran from the Co-DETR/ folder, right?):

conda create --name codetr python=3.10 -y; conda activate codetr; conda install -y pytorch=1.11.0 torchvision torchaudio cudatoolkit=11.5 -c pytorch -c nvidia

pip install -r requirements.txt

pip install mmcv-full==1.5.0 -f https://download.openmmlab.com/mmcv/dist/cu115/torch1.11.0/index.html

pip install -v -e .

And I get this error:

image

I tried pip install fair scale, but then its the library fvcore (also called by mmdet), which leads me to think that its mmdet the problem but I am not sure. What do you think?

If it's not too much to ask, could you please try to create the same virtual environment on conda to check? Thanks!

Code-of-Liujie commented 5 months ago

The same question, speechless

Code-of-Liujie commented 5 months ago

image The bug cannot be solved at all. What is the reason that delays my day?

MihaiDavid05 commented 1 month ago

Hello, @Code-of-Liujie, @FrancoisPorcher .

I was able to make it work.

  1. git clone https://github.com/Sense-X/Co-DETR.git
  2. conda create --name codetr python=3.8 -y
  3. conda activate codetr
  4. pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113 (mandatory to install it with pip)
  5. pip install mmcv-full==1.5.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.html
  6. pip install -r requirements.txt
  7. pip install yapf==0.40.1 (this is beacuse of this error)