Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about MMCV #16

Closed
rockywind opened this issue Jul 6, 2021 · 9 comments
Closed

Question about MMCV #16

rockywind opened this issue Jul 6, 2021 · 9 comments

Comments

@rockywind
Copy link

When I installed the mmcv-full=1.3.8, the error is below.
Traceback (most recent call last): File "tools/test.py", line 9, in <module> from mmdet3d.apis import single_gpu_test File "/newnfs/zzwu/08_3d_code/imvoxelnet03/mmdet3d/__init__.py", line 26, in <module> f'MMCV=={mmcv.__version__} is used but incompatible. ' \ AssertionError: MMCV==1.3.8 is used but incompatible. Please install mmcv>=1.1.5, <=1.3.0.
When I install the mmcv-full=1.3.1, the error is below.
Traceback (most recent call last): File "tools/test.py", line 9, in <module> from mmdet3d.apis import single_gpu_test File "/newnfs/zzwu/08_3d_code/imvoxelnet03/mmdet3d/__init__.py", line 3, in <module> import mmdet File "/home/CN/zizhang.wu/anaconda3/envs/imvoxelnet03/lib/python3.7/site-packages/mmdet/__init__.py", line 25, in <module> f'MMCV=={mmcv.__version__} is used but incompatible. ' \ AssertionError: MMCV==1.3.1 is used but incompatible. Please install mmcv>=1.3.8, <=1.4.0.

@filaPro
Copy link
Contributor

filaPro commented Jul 6, 2021

Hi @rockywind ,

Thanks for pointing this out. Looks like it is a bug in mmdetection3d for their latest release. I've opened an issue in their repo.

However I don't quite understand how is this connected with imvoxelnet as it is based on a very old version of mmdetection3d? May be I understand the problem. Are you using our installation guide? It is just a copy of original, so you need to make 1 difference. Please try with replacing git clone https://github.com/open-mmlab/mmdetection3d.git with git clone https://github.com/saic-vul/imvoxelnet.git.

@rockywind
Copy link
Author

I follow the https://github.com/saic-vul/imvoxelnet/blob/master/docs/install.md. I installed the mmdetection3d successfully, but when I change to the imvoxelnet directory, it ran failed.
Traceback (most recent call last): File "tools/test.py", line 160, in <module> main() File "tools/test.py", line 111, in main dataset = build_dataset(cfg.data.test) File "/newnfs/zzwu/08_3d_code/mmdetection3d/mmdet3d/datasets/builder.py", line 39, in build_dataset dataset = build_from_cfg(cfg, DATASETS, default_args) File "/home/CN/zizhang.wu/anaconda3/envs/mm_imvoxelnet/lib/python3.7/site-packages/mmcv/utils/registry.py", line 44, in build_from_cfg f'{obj_type} is not in the {registry.name} registry') KeyError: 'KittiMultiViewDataset is not in the dataset registry'

@filaPro
Copy link
Contributor

filaPro commented Jul 6, 2021

What do you meen by installing mmdetection3d? Really you should replace this step with installing imvoxelnet.

@rockywind
Copy link
Author

I installed the mmdetection3d successfully, according to this https://github.com/open-mmlab/mmdetection3d.

@rockywind
Copy link
Author

I have a virtural environment, it can run in the mmdetection3d directory, but it can't run in the imvoxelnet directory.

@filaPro
Copy link
Contributor

filaPro commented Jul 6, 2021

The thing is, you should not install mmdetection3d. Use git clone https://github.com/saic-vul/imvoxelnet.git instead of git clone https://github.com/open-mmlab/mmdetection3d.git.

@rockywind
Copy link
Author

When I ran the script in the imvoxelnet directory, the error is bellow.
(mm_imvoxelnet) zizhang.wu@shaxbw06:/newnfs/zzwu/08_3d_code/imvoxelnet03$ sh eval.sh Traceback (most recent call last): File "tools/test.py", line 13, in <module> from tools.fuse_conv_bn import fuse_module ModuleNotFoundError: No module named 'tools.fuse_conv_bn'

@filaPro
Copy link
Contributor

filaPro commented Jul 6, 2021

So, finally it is very hard to help you with installation :( Please follow our Dockerfile or run exactly the same commands without docker:

pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html

# Install MMCV
pip install mmcv-full==1.2.7+torch1.6.0+cu101 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
pip install mmdet==2.10.0

# Install MMDetection
git clone https://github.com/saic-vul/imvoxelnet.git
cd imvoxelnet
pip install -r requirements/build.txt
pip install --no-cache-dir -e .

# Uninstall pycocotools installed by nuscenes-devkit and reinstall mmpycocotools
pip uninstall pycocotools --no-cache-dir -y
pip install mmpycocotools==12.0.3 --no-cache-dir --force --no-deps

# Install differentiable IoU
cd ..
git clone https://github.com/lilanxiao/Rotated_IoU
cp -r Rotated_IoU/cuda_op imvoxelnet/mmdet3d/ops/rotated_iou
cd imvoxelnet/mmdet3d/ops/rotated_iou/cuda_op
python setup.py install

Note, we don't install mmdetection3d.

@rockywind
Copy link
Author

Thanks a lot for your help! @filaPro
It works for me.
My machine is GTX3090, so the cuda should be "cu111".
pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants