Downloading and installing the COCO API and detectron library (OS shell commands)

We will then download and  install the Python dependencies as shown in the following code block:

# COCO API download and install
# COCOAPI=/path/to/clone/cocoapi
git clone https://github.com/cocodataset/cocoapi.git $COCOAPI
cd $COCOAPI/PythonAPI
make install

# Detectron library download and install
# DETECTRON=/path/to/clone/detectron git clone https://github.com/facebookresearch/detectron $DETECTRON
cd $DETECTRON/lib && make

Alternatively, we can download and use the Docker image of the environment (requires Nvidia GPU support):

# DOCKER image build
cd $DETECTRON/docker docker build -t detectron:c2-cuda9-cudnn7.
nvidia-docker run --rm -it detectron:c2-cuda9-cudnn7 python2 tests/test_batch_permutation_op.py
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset