dbolya / yolact

A simple, fully convolutional model for real-time instance segmentation.
MIT License
4.97k stars 1.32k forks source link

Setup yolact++ in google colab #823

Open MatThHeuss opened 11 months ago

MatThHeuss commented 11 months ago

I'm trying to run yolact++ on google colab, but I'm always getting the following error when trying to build DCNv2:

/content/yolact/external/DCNv2/src/cuda/dcn_v2_cuda.cu:7:10: fatal error: THC/THC.h: No such file or directory
    7 | #include <THC/THC.h>
      |          ^~~~~~~~~~~
compilation terminated.
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1

I'm following these steps:

!git clone https://github.com/dbolya/yolact.git
!cd yolact
!pip install cython
!pip install opencv-python pillow pycocotools matplotlib
!pip install torchvision==0.12.0
!pip install torch==2.0.1
cd /content/yolact/external/DCNv2
!python setup.py build develop
murilogds commented 11 months ago

I'm having the exactly same issue!

jjongdals commented 10 months ago

Did you solved this issue?

MatThHeuss commented 10 months ago

unfortunately not ;(

ShSi1001 commented 10 months ago

i encountered the same issue, how did u solve it

BismaMutiargo commented 9 months ago

still not resolved?

nesi73 commented 9 months ago

same issue

xqh-code commented 9 months ago

I'm trying to run yolact++ on google colab, but I'm always getting the following error when trying to build DCNv2:

/content/yolact/external/DCNv2/src/cuda/dcn_v2_cuda.cu:7:10: fatal error: THC/THC.h: No such file or directory
    7 | #include <THC/THC.h>
      |          ^~~~~~~~~~~
compilation terminated.
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1

I'm following these steps:

!git clone https://github.com/dbolya/yolact.git
!cd yolact
!pip install cython
!pip install opencv-python pillow pycocotools matplotlib
!pip install torchvision==0.12.0
!pip install torch==2.0.1
cd /content/yolact/external/DCNv2
!python setup.py build develop

I think it's a torch version mismatch.

nesi73 commented 9 months ago

I'm trying to run yolact++ on google colab, but I'm always getting the following error when trying to build DCNv2:

/content/yolact/external/DCNv2/src/cuda/dcn_v2_cuda.cu:7:10: fatal error: THC/THC.h: No such file or directory
    7 | #include <THC/THC.h>
      |          ^~~~~~~~~~~
compilation terminated.
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1

I'm following these steps:

!git clone https://github.com/dbolya/yolact.git
!cd yolact
!pip install cython
!pip install opencv-python pillow pycocotools matplotlib
!pip install torchvision==0.12.0
!pip install torch==2.0.1
cd /content/yolact/external/DCNv2
!python setup.py build develop

I think it's a torch version mismatch.

torch version: 1.11.0+cu113 torchvision version: 0.12.0+cu113 python version: Python 3.7.13 In this case I have stable versions of torch and torchvision on my system, as mentioned in -> [(https://github.com/pytorch/vision#installation)]

timothyckl commented 8 months ago

For anyone else facing this issue, try downgrading your packages

pip install torch==1.4.0
pip install  torchvision==0.5.0 
Grace-yafei commented 7 months ago

For anyone else facing this issue, try downgrading your packages

pip install torch==1.4.0
pip install  torchvision==0.5.0 

It's useful for me! thank you very much!

letessarini commented 6 months ago

For anyone else facing this issue, try downgrading your packages

pip install torch==1.4.0
pip install  torchvision==0.5.0 

I tried this and got this error: Error

And the error 'command '/usr/local/cuda/bin/nvcc' failed with exit code 1' continues

Did anyone solve it?