TGSR
This is the official implementation with training code for “Trajectory Guided Robust Visual Object Tracking with Selective Remedy”.
Introduction
In the paper, we propose a generic, fast and flexible approach to improve the robustness of Siamese trackers with two light-load novel modules: Trajectory Guidance Module (TGM) and Selective Refinement Module (SRM). Specifically, TGM encourages to pay a soft attention on possible target location based on short-term historical trajectory. SRM selectively remedies the tracking results at the risk of failure with little impact on the speed. The proposed algorithm can be easily establish upon state-of-the-art Siamese trackers and obtains better performance on seven benchmarks with high real-time tracking speed.
Installation
Get the code by git clone https://github.com/TJUMMG/TGSR.git
.
Alternatively, you can download the zip TGSR.zip
in Baidupan, keyword: 9tu5. TGSR.zip
has already included raw results, models and pkl results.
You can use the following command to build your environment.
conda create -n verify python=3.7
conda activate verify
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch
pip install -r requirements.txt
python setup.py build_ext --inplace
git clone https://github.com/vacancy/PreciseRoIPooling.git
Please refer to PySOT_INSTALL.md and PreciseRoIPooling_README.md to solve the installation problem.
Result
raw result file in Baidupan, keyword: 9tu5
Dataset | Evaluation | SiamRPN++ | SiamRPN++_TG | SiamRPN++_SR | SiamRPN++_TGSR |
---|---|---|---|---|---|
VOT2016 | EAO | 0.464 | 0.480 | 0.486 | 0.493 |
VOT2018 | EAO | 0.415 | 0.435 | 0.422 | 0.440 |
VOT2019 | EAO | 0.287 | 0.292 | 0.290 | 0.295 |
OTB100 | AUC | 0.696 | 0.698 | 0.697 | 0.698 |
Pre | 0.905 | 0.909 | 0.907 | 0.914 | |
DTB | AUC | 0.614 | 0.615 | 0.616 | 0.624 |
Pre | 0.800 | 0.804 | 0.803 | 0.814 | |
NFS30 | AUC | 0.507 | 0.509 | 0.518 | 0.520 |
Pre | 0.598 | 0.600 | 0.612 | 0.614 | |
LaSOT | AUC | 0.497 | 0.502 | 0.498 | 0.502 |
NormPre | 0.571 | 0.577 | 0.573 | 0.578 | |
Pre | 0.490 | 0.495 | 0.491 | 0.496 |
Usage
Modify the path
-
modify the path in the python script (e.g.,
./tools/test_SiamRPN++_VOT.py
)sys.path.append('/media/HardDisk_new/wh/TGSR/') # path to TGSR os.system("cd /media/HardDisk_new/wh/TGSR/tools/") # path to current folder
-
modify the dataset path (e.g.,
dataset_root
in./tools/test_SiamRPN++_VOT.py
)dataset_root = os.path.join('/media/HardDisk_new/DataSet/test/', args.dataset) # path to your pysot dataset
Test & Eval
-
download models in Baidupan, keyword: 9tu5
experiments.zip
: the model of SiamRPN++ and SiamMask, should be unzipped to./experiments
-
download the TGSR models in Baidupan, keyword: 9tu5
snapshot_test.zip
: the model of TGSR, should be unzipped to./snapshot_test
-
run the command
python ./tools/test_SiamRPN++_VOT.py --dataset VOT2016
-
evaluate the tracker performance
python ./tools/eval.py --dataset VOT2016
Train
-
run the
./pioneer/traj_predict_train.py
to train TPN -
run the
./pioneer/IoU_train.py
to train IPN -
run the
./pioneer/Refine_train.py
to train BRN
Eval ALTL
-
download the pkl result in Baidupan, keyword: 9tu5
research.zip
: the model of TGSR, should be unzipped to./poineer/research/
-
run the command and get the Average Longest Tracking Length (ALTL) of SiamRPN++_TGSR on the VOT2016
python ./pioneer/research/eval_tool.py