Skip to content

Latest commit

 

History

History
93 lines (68 loc) · 3.77 KB

INSTALL.md

File metadata and controls

93 lines (68 loc) · 3.77 KB

Installation

This document contains detailed instructions for installing the necessary dependencies for PyTracking. The instrustions have been tested on an Ubuntu 18.04 system. We recommend using the install script if you have not already tried that.

Requirements

Step-by-step instructions

Create and activate a conda environment

conda create --name pytracking python=3.7
conda activate pytracking

Install PyTorch

Install PyTorch 0.4.1 with cuda92.

conda install pytorch=0.4.1 torchvision cuda92 -c pytorch

Note:

Install matplotlib, pandas, opencv and tensorboadX

conda install matplotlib=2.2.2 pandas
pip install opencv-python tensorboardX

Install the coco toolkit

If you want to use COCO dataset for training, install the coco python toolkit. You additionally need to install cython to compile the coco toolkit.

conda install cython
pip install pycocotools

Compile Precise ROI pooling

To compile the Precise ROI pooling module (https://github.com/vacancy/PreciseRoIPooling) for PyTorch 0.4.1, go to the directory "ltr/external/PreciseRoIPooling/pytorch/prroi_pool" and run "travis.sh" script.
You may additionally have to export the path to the cuda installation.

cd ltr/external/PreciseRoIPooling/pytorch/prroi_pool

# Export the path to the cuda installation
PATH=/usr/local/cuda/bin/:$PATH

# Compile Precise ROI Pool
bash travis.sh

In case of issues, we refer to https://github.com/vacancy/PreciseRoIPooling.

Install jpeg4py

In order to use jpeg4py for loading the images instead of OpenCV's imread(), install jpeg4py in the following way,

sudo apt-get install libturbojpeg
pip install jpeg4py 

Note: The first step (sudo apt-get install libturbojpeg) can be optionally ignored, in which case OpenCV's imread() will be used to read the images. However the second step is a must.

In case of issues, we refer to https://github.com/ajkxyz/jpeg4py.

Setup the environment

Create the default environment setting files.

# Environment settings for pytracking. Saved at pytracking/evaluation/local.py
python -c "from pytracking.evaluation.environment import create_default_local_file; create_default_local_file()"

# Environment settings for ltr. Saved at ltr/admin/local.py
python -c "from ltr.admin.environment import create_default_local_file; create_default_local_file()"

You can modify these files to set the paths to datasets, results paths etc.

Download the pre-trained networks

You can download the pre-trained networks from the google drive folder. The networks shoud be saved in the directory set by "network_path" in "pytracking/evaluation/local.py". By default, it is set to pytracking/networks. You can also download the networks using the gdrive_download bash script.

# Download the default network for ATOM
bash pytracking/utils/gdrive_download 1JUB3EucZfBk3rX7M3_q5w_dLBqsT7s-M pytracking/networks/atom_default.pth

# Download the default network for ECO
bash pytracking/utils/gdrive_download 1aWC4waLv_te-BULoy0k-n_zS-ONms21S pytracking/networks/resnet18_vggmconv1.pth