I am fairly new to Object Detection and I'm trying to install Detectron2 on colab. My Pytorch version is 1.12 whereas Cuda version is 11.2. I referred the website https://detectron2.readthedocs.io/en/latest/tutorials/install.html to find the most appropriate installation command but I can't understand which one to go for since neither the pytorch version nor the Cuda version is available there.
Asked
Active
Viewed 1,515 times
1
-
you can build detectron2 from source – kkgarg Aug 15 '22 at 20:48
2 Answers
0
You have to create a Python environment e.g. from Conda and download all the compatible packages.
-
How do you know that this is the problem? OP didn't share their code. – ryanwebjackson May 25 '23 at 13:20
0
This is how they install detectron2 in the official colab tutorial:
!python -m pip install pyyaml==5.1
import sys, os, distutils.core
# Note: This is a faster way to install detectron2 in Colab,
but it does not include all functionalities.
# See https://detectron2.readthedocs.io/tutorials/install.html
for full installation instructions
!git clone 'https://github.com/facebookresearch/detectron2'
dist = distutils.core.run_setup("./detectron2/setup.py")
!python -m pip install {' '.join([f"'{x}'" for x in dist.install_requires])}
sys.path.insert(0, os.path.abspath('./detectron2'))
# Properly install detectron2. (Please do not install twice in both ways)
# !python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
You can find the whole notebook here: https://colab.research.google.com/drive/16jcaJoc6bCFAQ96jDe2HwtXj7BMD_-m5#scrollTo=FsePPpwZSmqt

billo
- 134
- 1
- 6