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

Incompatible version of mmcv and mmdet3d #73

Open
Cindy0725 opened this issue Sep 7, 2023 · 10 comments
Open

Incompatible version of mmcv and mmdet3d #73

Cindy0725 opened this issue Sep 7, 2023 · 10 comments

Comments

@Cindy0725
Copy link

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

Describe the bug
Hello, I am working an Ubuntu machine with cuda version 11.6, pytorch == 1.13.0, and I am trying to install the required packages for imvoxelnet.
Firstly, I followed the docker file to install the corresponding versions of mmcv (1.7.0 which is compatible with my cuda and pytorch version) and mmdet, but when I run "cd imvoxelnet; pip install -r requirements/build.txt; pip install --no-cache-dir -e ." I always get en error for setup mmdet3d. Then I tried with mmcv > 2.0 and the latest versions of mmdet3d, it works but since mmcv2.0 removes a lot of features compared with mmcv1.x, the imvoxelnet code throws a lot of errors.

I think the error may be because the incompatible version between mmcv and mmdet3d.

Environment

  1. Please run python mmdet3d/utils/collect_env.py to collect necessary environment infomation and paste it here.
    That code also doesn't work since mmcv2.0 remove the get_git_hash function from mmcv.utils....
    I am in a conda environment with python 3.8, cuda 11.6 and pytorch 1.13.
@Cindy0725
Copy link
Author

The error message is as follows:
"note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mmdet3d
Running setup.py clean for mmdet3d
Failed to build mmdet3d
ERROR: Could not build wheels for mmdet3d, which is required to install pyproject.toml-based projects"

@filaPro
Copy link
Contributor

filaPro commented Sep 7, 2023

Hi @Cindy0725 ,

But we use mmcv of 1.2.7 not 1.7.0. Can you please try with versions from our Dockerfile? You'll probably need to downgrade cuda and pytorch :(

@Cindy0725
Copy link
Author

Hi @Cindy0725 ,

But we use mmcv of 1.2.7 not 1.7.0. Can you please try with versions from our Dockerfile? You'll probably need to downgrade cuda and pytorch :(

Hi @filaPro, thank you very much for your quick reply. Since I am working on a remote gpu server without sudo access, I cannot downgrade the cuda version. And with cuda11.6 and pytorch1.13, I can't install mmcv-full==1.2.7 successfully.
I have installed pytorch1.13, mmcv-full==1.7.0, mmdet==2.26.0, mmsegmentation==0.30.0 and mmdet3d==1.0.0rc6 manually. It seems that in this case I can import all packages successfully.

But I am encountering another error when testing on SUNRGBD(total) dataset, I run:
python tools/test.py '/home/zhangyicindy/imvoxelnet/configs/imvoxelnet/imvoxelnet_total_sunrgbd_fast.py' '/home/zhangyicindy/imvoxelnet/20211007_105247.pth' --eval 'mAP' --options 'show=True' 'out_dir='/home/zhangyicindy/imvoxelnet/demo/'',
and I got the following error:
KeyError: 'SunRgbdTotalMultiViewDataset is not in the dataset registry'

This is my first time using mmdet, I am not sure this error is due to mmcv/mmdet version, or it's because I didn't process the sunrgbd dataset correctly. Could you please give some hints on this? For data processing, I just downloaded the "sunrgbd_total_infos_val.json" and "sunrgbd_total_infos_train.json" and run "python tools/data_converter/sunrgbd_total.py" Thanks again!

1694159636716(1)

@filaPro
Copy link
Contributor

filaPro commented Sep 8, 2023

The thing is you don't need to install mmdet3d :( You should install imvoxelnet/mmdet3d of version 0.8.0 by pip install --no-cache-dir -e . And it for sure will not work with modern versions of mmcv.

If you are ok to run on SUN RGB-D benchmark with 10 categories I recommend our official implementation in open-mmlab/mmdetection3d codebase. Also "sunrgbd_total_infos_*.json"can be easily modified to their format (that has been changed several times for these years) to run with all 37 categories.

@Cindy0725
Copy link
Author

The thing is you don't need to install mmdet3d :( You should install imvoxelnet/mmdet3d of version 0.8.0 by pip install --no-cache-dir -e . And it for sure will not work with modern versions of mmcv.

If you are ok to run on SUN RGB-D benchmark with 10 categories I recommend our official implementation in open-mmlab/mmdetection3d codebase. Also "sunrgbd_total_infos_*.json"can be easily modified to their format (that has been changed several times for these years) to run with all 37 categories.

Hi @filaPro , I tried to use your official mmdetection3d codebase, and run "python tools/test.py /home/zhangyicindy/mmdetection3d/configs/imvoxelnet/imvoxelnet_2xb4_sunrgbd-3d-10class.py /home/zhangyicindy/mmdetection3d/imvoxelnet_4x2_sunrgbd-3d-10class_20220809_184416-29ca7d2e.pth", but I got the following error:
1694233974209

I processed the sunrgbd dataset exactly following the instruction in mmdetection3d.

@Cindy0725
Copy link
Author

I see there is someone else reflecting similar issues here: open-mmlab/mmdetection3d#2704, it seems that ImvoxelNet in mmdetection3d can't run as the IndoorMetric doesn't have the attribute of ann_file and metric.

@Cindy0725
Copy link
Author

I modified the imvoxelnet mmdetection3d source code, adding ann_file and metric argument for indoormetric class, tools/test.py and train.py work now. Btw there is also bug in visualization hook code (test.py called the wrong visualizer which doesn't implement the add_datasample function), which results in no files saved.
I am also trying to move from 10 categories to 37 categories in total3d. I just need to change the sunrgbd_total_infos_val.json and sunrgbd_total_infos_train.json?

@filaPro
Copy link
Contributor

filaPro commented Sep 10, 2023

Great! May be you can pull request your fixes to mmdetection3d codebase?

I think you need to load these .json files and dump them as .pkl in exactly the same format, like you now generated in mmdetection3d. Just be careful with the rotation angle, as coordinate system was changed. May be just add pi/2 or smth like this, you can fix it by visualization. Also yiu need to override SUNRGBDDataset with 37 class names instead of 10, and in head config also change 10 to 37.

@Pixie8888
Copy link

@Cindy0725 Did you successfully run imvoxelnet on ScanNet using pytorch1.13+cu11.6? I am facing similar issue when using higher version of pytorch.

@TheRunningHorse
Copy link

I modified the imvoxelnet mmdetection3d source code, adding ann_file and metric argument for indoormetric class, tools/test.py and train.py work now. Btw there is also bug in visualization hook code (test.py called the wrong visualizer which doesn't implement the add_datasample function), which results in no files saved. I am also trying to move from 10 categories to 37 categories in total3d. I just need to change the sunrgbd_total_infos_val.json and sunrgbd_total_infos_train.json?

which part of the codes should i modified , i faced the same problem

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

4 participants