bowang-lab / MedSAM

Segment Anything in Medical Images
https://www.nature.com/articles/s41467-024-44824-z
Apache License 2.0
3.03k stars 419 forks source link

Undefined symbol when using app.py in MedSAM2 #321

Closed ImageBlue closed 1 month ago

ImageBlue commented 1 month ago

I'm running app.py in MedSAM2 in WSL. The environment is Ubuntu 20.04, Python 3.10, CUDA 12.3 and Pytorch 2.3.1. After uploading a video and running process, I draw box for a prompt and click Segment, then the application raises ImportError: /MedSAM2/sam2/_C.so: undefined symbol: _ZN3c1015SmallVectorBaseIjE8grow_podEPKvmm. The symbol _ZN3c1015SmallVectorBaseIjE8grow_podEPKvmm in /sam2/_C.so seems to be not defined.

JCXiongCompany commented 1 month ago

Have you resolved it?

JunMa11 commented 1 month ago

@ImageBlue could you please check whether SAM2 is successfully installed by running their notebooks?

ImageBlue commented 1 month ago

@JunMa11 I have run the command pip install -e . and it showed Successfully installed SAM-2-1.0

ImageBlue commented 1 month ago

python setup.py build_ext --inplace worked for me. Run the above command after building the model.