Home

Awesome

HCAT

Official implementation of the HCAT , including training code and trained models.

Tracker

HCAT download model

In this work, we present an efficient tracking method via a hierarchical cross-attention transformer named HCAT. Our model runs about 195 f ps on GPU, 45 fps on CPU, and 55 fps on the edge AI platform of NVidia Jetson AGX Xavier. Experiments show that our HCAT achieves promising results on LaSOT, GOT-10k,TrackingNet, NFS, OTB100, UAV123, and VOT2020.

framework

FSHCAT

Results

Model**LaSOT<br>AUC(%) ****TrackingNet<br>**AUC(%)GOT-10k<br/>AO (%)Speed-GPU<BR>(fps)Speed-CPU<BR>(fps)Speed-AGX<br>(fps)
Res18_N1_q1657.974.261.32404669
Res18_N2_q1659.176.665.31954555
Res50_N2_q1659.177.967.81152242
Lighttrack_N2_q1659.876.666.31004534
Convnext_tiny_N2_q1663.180.570.11362134

Installation

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

Install dependencies

conda create -n hcat python=3.7
conda activate hcat
conda install -c pytorch pytorch=1.5 torchvision=0.6.1 cudatoolkit=10.2
conda install matplotlib pandas tqdm
pip install opencv-python tb-nightly visdom scikit-image tikzplotlib gdown timm
conda install cython scipy
sudo apt-get install libturbojpeg
pip install pycocotools jpeg4py
pip install wget yacs
pip install shapely==1.6.4.post2
pip install onnx onnxruntime-gpu==1.6.0
# Change directory to <PATH_of_HCAT>
cd HCAT

# 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_HCAT>:$PYTHONPATH

Quick Start

TRAINING

conda activate hcat
cd HCAT/ltr
python run_training.py hcat hcat 
# for ddp
# python run_training_ddp.py hcat hcat --local_rank 4

Convert Model

conda activate hcat
cd HCAT/pysot_toolkit
python pytorch2onnx.py

Evaluation

Getting Help

If you meet problem, please try searching our Github issues, if you can't find solutions, feel free to open a new issue.

Solution: You can just delete from pysot_toolkit.toolkit.utils.region import vot_overlap, vot_float2str in test.py if you don't test VOT2019/18/16. You can also build region by python setup.py build_ext --inplace in pysot_toolkit.

Acknowledgement

This is a modified version of the python framework PyTracking and Transt 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