facebookresearch / CutLER

Code release for "Cut and Learn for Unsupervised Object Detection and Instance Segmentation" and "VideoCutLER: Surprisingly Simple Unsupervised Video Instance Segmentation"
Other
913 stars 90 forks source link

Error when running videocutler demo #52

Closed bjoved00 closed 9 months ago

bjoved00 commented 10 months ago

I'm trying to run the videocutler demo. I have run the maskcut and the cutler demos succesfully. However, when running the videocutler demo I get the following error:


Traceback (most recent call last):
  File "demo_video/demo.py", line 27, in <module>
    from mask2former import add_maskformer2_config
  File "/home/bea/CutLER-main/videocutler/demo_video/../mask2former/__init__.py", line 3, in <module>
    from . import modeling
  File "/home/bea/CutLER-main/videocutler/demo_video/../mask2former/modeling/__init__.py", line 4, in <module>
    from .pixel_decoder.msdeformattn import MSDeformAttnPixelDecoder
  File "/home/bea/CutLER-main/videocutler/demo_video/../mask2former/modeling/pixel_decoder/msdeformattn.py", line 19, in <module>
    from .ops.modules import MSDeformAttn
  File "/home/bea/CutLER-main/videocutler/demo_video/../mask2former/modeling/pixel_decoder/ops/modules/__init__.py", line 12, in <module>
    from .ms_deform_attn import MSDeformAttn
  File "/home/bea/CutLER-main/videocutler/demo_video/../mask2former/modeling/pixel_decoder/ops/modules/ms_deform_attn.py", line 24, in <module>
    from ..functions import MSDeformAttnFunction
  File "/home/bea/CutLER-main/videocutler/demo_video/../mask2former/modeling/pixel_decoder/ops/functions/__init__.py", line 12, in <module>
    from .ms_deform_attn_func import MSDeformAttnFunction
  File "/home/bea/CutLER-main/videocutler/demo_video/../mask2former/modeling/pixel_decoder/ops/functions/ms_deform_attn_func.py", line 22, in <module>
    import MultiScaleDeformableAttention as MSDA
ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory

I am running this in a conda env with: Python 3.8 PyTorch 1.9 Cuda 10.2

I'm not very sure about my CUDA version, but I believe that I installed that one.

frank-xwang commented 10 months ago

Hey, did you follow our INSTALL.md to install necessary VideoCutLER packages? VideoCutLER needs to use MultiScaleDeformableAttention and requires you to install additional packages.

bjoved00 commented 10 months ago

Yes, I followed the instructions. When I run (having run "pip install -r videocutler/requirements.txt" before):

cd videocutler/mask2former/modeling/pixel_decoder/ops
sh make.sh

I get the following output:

Installed /home/bea/miniconda3/envs/videocuter/lib/python3.8/site-packages/MultiScaleDeformableAttention-1.0-py3.8-linux-x86_64.egg
Processing dependencies for MultiScaleDeformableAttention==1.0
Finished processing dependencies for MultiScaleDeformableAttention==1.0

But I still get the same error when trying to run the demo.

frank-xwang commented 10 months ago

Hi, this error appears to be a known issue, often due to an incorrect PyTorch installation. You can find relevant discussions and potential fixes on Stack Overflow and PyTorch Forums. Try reinstalling PyTorch, ensuring compatibility with your CUDA version. It's also a good idea to check Mask2Former and Detectron2's codebases for specific installation requirements and post your questions there, as our frameworks build upon theirs without altering their libraries.

frank-xwang commented 9 months ago

Closing for now. Please feel free to reopen it if you have further questions.