alibaba-damo-academy / self-supervised-anatomical-embedding-v2

MIT License
53 stars 5 forks source link

Compatibility issues #4

Closed nifla2000 closed 10 months ago

nifla2000 commented 10 months ago

When I try to run the demo code (tools/demo.py) I always encounter compatibility issues with mmcv package. When I try to install mmcv-full there is always a build error. Can anyone help in figuring out the reason?

viggin commented 10 months ago

Yes, mmcv compatibility is a pain in the ass... I cannot remember how I got it right. The CUDA version and pytorch version all need to be correct. When you install mmcv, if it did not take a long time to build, you got it wrong. Simply using pip install mmcv-full is not OK, you may need something like pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.4.0/index.html. If you still got errors, try Google it.

aa1234241 commented 10 months ago

When I try to run the demo code (tools/demo.py) I always encounter compatibility issues with mmcv package. When I try to install mmcv-full there is always a build error. Can anyone help in figuring out the reason?

Hi, could you share your system environment like CUDA version, torch version. For CUDA 10.2 and pytorch 1.9 you could try this: pip install openmim mim install mmengine mim install mmcv-full==1.4.7 mim install mmdet==2.20 git clone https://github.com/alibaba-damo-academy/self-supervised-anatomical-embedding-v2.git cd SAM python -m pip install -e . This works for me.

If you have a newer GPU like 40 series, the working package version: CUDA=11.7 Pytorch=1.13.0 mmdetection=2.28.0 mmcv-full=1.7.1

nifla2000 commented 10 months ago

Thanks for helping. I figured out the issue and now it is working fine. I even tried this in Google Colab with CUDA=10.2, pytorch=1.11.0, mmdetection=2.20 and mmcv-full=1.5.0. It worked perfectly!