This is a generic framework for siamese tracking. Follow the instructions to embed your ideas to this code easily.
- We provide pre-processed
VID
,YTB
,GOT10K
,COCO
,DET
andLASOT
. You can download it from GoogleDrive or BaiduDrive. - BaiduDrive extracted code
bnd9
- Some data can only be downloaded from GoogleDrive since uploading size limitation of BaiduDrive.
Our code will download pretrained model from GoogleDrive automatically. If failed, please download from OneDrive, GoogleDrive or BaiduDrive, and put them to pretrain
directory.
sh install_fc.sh or sh install_rpn.sh
Modify path_to/toolkit
in lib/core/get_eao.m
to your vot-toolkit path.
Modify yaml files in experiment/train/
according to your needs.
This script will excute train
-epoch-test
-hyper-parameter tuning
automatically to save your time.
python siamese_tracking/onekey_fc.py
or
python siamese_tracking/onekey.py
The tuning toolkit will not stop unless you do. So we provide scripts to watch its process. 600-1000 groups and 1000-3000 groups for SiamFC and SiamRPN respectively is a good choice from my experience.
sh lib/utils/watch_tpe.sh or sh lib/utils/watch_tpe_fc.sh
- We provide a demo to generate training pairs. You can modify it to process any data you want.
- Different training data and mix-up ratio will affect final performance. You can modify
WITCH_USE
in yaml files ofexperiment/train/
to find witch data is better for your task. Also, modifyUSE
in yaml files to try different mix-up ratio. High quality training data is beneficial to training.GOT10K
andLASOT
are recommended.
We provide ResNet
, Inception
and ResNext
in codes. However, there are many other choices like DenseNet
, NasNet
. I got an email from a reader who said that DenseNet can get better results in my framework.
Add your backbone in lib/models/backbone.py
. Pretraining backbone on Imagenet is always good to training.
Cross-correlation is the key operation in both SiamFC and SiamRPN. There may be optima way to replace it. For example, cosine distance
and normalized L2 distance
is better for SiamFC from my experience.
Add your strategy in lib/models/connect.py
.
We use the simplest loss function in training. You can try more optimal loss function like focal loss
.
Add your loss function in lib/models/siamfc.py
or lib/models/siamrpn.py
===============================================================================
Further discussion or questions about code please email [email protected]
.
Let's learn to progress together.