Home

Awesome

TransT-M - High-performance Transformer Tracking

Official implementation of the TransT-M, including training code and trained models. Models

Installation

This document contains detailed instructions for installing the necessary dependencied for TransT-M. The instructions have been tested on Ubuntu 18.04 system.

Install dependencies

conda create -n transt python=3.7
conda activate transt
conda install -c pytorch pytorch=1.5 torchvision
conda install matplotlib pandas tqdm
pip install opencv-python tb-nightly visdom scikit-image tikzplotlib gdown
conda install cython scipy
pip install pycocotools jpeg4py
pip install wget
pip install shapely==1.6.4.post2
# Change directory to <PATH_of_TransT>
cd TransT-M

# 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.

export PYTHONPATH=<path_of_TransT>:$PYTHONPATH

Quick Start

TRAINING

  1. Train the base model of TransT-M
conda activate transt
cd TransT-M/ltr
python -m torch.distributed.launch --nproc_per_node 8 run_training_multigpu.py transt transt
  1. Train the iou head of TransT-M, you should set a new workspace_dir in local.py and modify the settings.transt_path in transt_iou.py to the path of a trained base transt model
python -m torch.distributed.launch --nproc_per_node 8 run_training_multigpu.py transt transt_iou
  1. Train the segmentation branch of TransT-M, you should set a new workspace_dir in local.py and modify the settings.transt_path in transt_iou_seg.py to the path of a trained transt_iou model
python -m torch.distributed.launch --nproc_per_node 8 run_training_multigpu.py transt transt_iou_seg

Evaluation

Acknowledgement

This is a modified version of the python framework PyTracking based on Pytorch, also borrowing from PySOT and GOT-10k Python Toolkit. We would like to thank their authors for providing great frameworks and toolkits.

Contact