ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

Pytracking installation on Linux

2021-04-22 20:34:02  阅读:530  来源: 互联网

标签:installation https default pytracking conda install Linux Pytracking networks


Linux(Ubuntu )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

  • Conda installation with Python 3.7. If not already installed, install from https://www.anaconda.com/distribution/.
  • Nvidia GPU.

Step-by-step instructions

Create and activate a conda environment(使用克隆功能会更快更好地创建一个新环境)

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

Install PyTorch
Install PyTorch with cuda10.(推荐使用cuda 11 for RTX3090 GPU)

#conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c conda-forge
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge

Note:

Install matplotlib, pandas, tqdm, opencv, scikit-image, visdom, tikzplotlib, gdown, and tensorboad

conda install matplotlib pandas tqdm
pip install opencv-python visdom tb-nightly scikit-image tikzplotlib gdown

Install the coco and lvis toolkits

conda install cython
pip install pycocotools
pip install lvis

Install ninja-build for Precise ROI pooling

To compile the Precise ROI pooling module (https://github.com/vacancy/PreciseRoIPooling), you may additionally have to install ninja-build.

sudo apt-get install ninja-build

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

Install spatial-correlation-sampler (only required for KYS tracker)

pip install spatial-correlation-sampler

In case of issues, we refer to https://github.com/ClementPinard/Pytorch-Correlation-extension.

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.
python -c用法

# 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 gdown python package.

# Download the default network for DiMP-50 and DiMP-18
gdown https://drive.google.com/uc\?id\=1qgachgqks2UGjKx-GdO1qylBDdB1f9KN -O pytracking/networks/dimp50.pth
gdown https://drive.google.com/uc\?id\=1MAjrRJDCbL0DSjUKFyDkUuYS1-cYBNjk -O pytracking/networks/dimp18.pth

# Download the default network for ATOM
gdown https://drive.google.com/uc\?id\=1VNyr-Ds0khjM0zaq6lU-xfY74-iWxBvU -O pytracking/networks/atom_default.pth

# Download the default network for ECO
gdown https://drive.google.com/uc\?id\=1aWC4waLv_te-BULoy0k-n_zS-ONms21S -O pytracking/networks/resnet18_vggmconv1.pth

标签:installation,https,default,pytracking,conda,install,Linux,Pytracking,networks
来源: https://blog.csdn.net/My_Communication/article/details/116029465

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有