Co-DETR icon indicating copy to clipboard operation
Co-DETR copied to clipboard

Issue with Environment (mmdet)

Open FrancoisPorcher opened this issue 1 year ago • 8 comments

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 avatar Oct 24 '23 18:10 FrancoisPorcher

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

FrancoisPorcher avatar Oct 24 '23 18:10 FrancoisPorcher

Please try pip install -r requirements.txt

TempleX98 avatar Oct 25 '23 04:10 TempleX98

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

FrancoisPorcher avatar Oct 25 '23 14:10 FrancoisPorcher

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

TempleX98 avatar Oct 25 '23 14:10 TempleX98

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!

FrancoisPorcher avatar Oct 25 '23 19:10 FrancoisPorcher

The same question, speechless

Code-of-Liujie avatar Mar 20 '24 07:03 Code-of-Liujie

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

Code-of-Liujie avatar Mar 20 '24 13:03 Code-of-Liujie

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)

MihaiDavid05 avatar Jul 24 '24 10:07 MihaiDavid05