Facebooks Detectron2 installation on Ubuntu

Facebook AI Research's (FAIR) discovery of the Detectron2 which helps in object detection having Mask R-CNN is created in Python as a part of DL framework.

We will go through steps of installing Facebook detectron2 in ubuntu machine with GPUs attahced. Follow below steps after logging in as a root

1.     Install Python > 3.6
#add-apt-repository ppa:jonathonf/python-3.6
#apt-get update
#apt-get install python3.6

Check python version with #python –v command

2.     Install tensorflow 1.14
#pip install tensorflow==1.14

3.     Install PyTorch > 1.3
#pip install torch==1.4.0+cu92 torchvision==0.5.0+cu92 -f
https://download.pytorch.org/whl/torch_stable.html

4.     Install CUDA 9.2 and cuBLAS patch
In Ubuntu, Go to Softwares and updates
è Additional Drivers. Install 414 or 386 drivers of NVIDIA CUDA. Then you need to install CUDA dependancies
#apt-get install freeglut3 freeglut3-dev libxi-dev libxmu-dev

Go to
CUDA Zone and download proper drivers (around 1.8 GB) and some patch (if any). Run the file with instructions displayed. Once you run the file, Say “NO” to    “Install NVIDIA Accelerated Graphics Driver for Linux” (Because we already did that in first paragraph)

Setup the environment variables
#vim /etc/profile.d/cuda.sh
And add following lines
     export PATH=$PATH:/usr/local/cuda/bin

     export CUDADIR=/usr/local/cuda
Also create the file cuda.conf and add “sudo ldconfig”
#vim /etc/ld.so.conf.d/cuda.conf

5.     Install GCC > 4.9
Install GCC by follwing commands
#apt update
#apt install build-essential
#apt-get install manpages-dev
Now you can check GCC version by #gcc –version

6.     Build detectron2 from source
After having the above dependencies you can install detectron2 from source by running
#pip install 'git+https://github.com/facebookresearch/detectron2.git'

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Tensorflow Tutorials & Guide

About TensorFlow TensorFlow™ is an open source software library for high...

Anaconda Documentation

Anaconda Enterprise Anaconda Enterprise is an enterprise-ready, secure and scalable data...

FAQ for KERAS

Keras is an open source neural network library written in Python. It is capable of running on top...

How to connect to my GPU Instance?

Please follow below procedure for connecting to your GPU Instance - Step 1 - Download &...

How to map host port to the docker container port

Published ports By default, when you create a container, it does not publish any of its ports to...

Powered by WHMCompleteSolution