IDEA-Research / MaskDINO

[CVPR 2023] Official implementation of the paper "Mask DINO: Towards A Unified Transformer-based Framework for Object Detection and Segmentation"
Apache License 2.0
1.2k stars 108 forks source link

how to install maskdino at colab or kaggle notebook? #80

Closed abebe9849 closed 1 year ago

abebe9849 commented 1 year ago
git clone git@github.com:facebookresearch/MaskDINO.git
cd MaskDINO
pip install -r requirements.txt
cd maskdino/modeling/pixel_decoder/ops
sh make.sh
cd /kaggle/working

then

creating 'dist/MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg
creating /opt/conda/lib/python3.7/site-packages/MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg
Extracting MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg to /opt/conda/lib/python3.7/site-packages
Adding MultiScaleDeformableAttention 1.0 to easy-install.pth file

Installed /opt/conda/lib/python3.7/site-packages/MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg
Processing dependencies for MultiScaleDeformableAttention==1.0
Finished processing dependencies for MultiScaleDeformableAttention==1.0
/kaggle/working

but

from maskdino.maskdino import add_maskdino_config
-->
ModuleNotFoundError                       Traceback (most recent call last)
/kaggle/working/maskdino/maskdino/modeling/pixel_decoder/ops/functions/ms_deform_attn_func.py in <module>
     21 try:
---> 22     import MultiScaleDeformableAttention as MSDA
     23 except ModuleNotFoundError as e:

ModuleNotFoundError: No module named 'MultiScaleDeformableAttention'
FengLi-ust commented 1 year ago

Maybe your Cuda deformable attention is not successfully installed.

abebe9849 commented 1 year ago

import os os.environ['CUDA_HOME'] = '/usr/local/cuda'

solve this problem thanks!