Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 3.35 KB

train.md

File metadata and controls

69 lines (47 loc) · 3.35 KB

Train

This is a generic framework for siamese tracking. Follow the instructions to embed your ideas to this code easily.

Data preparation

  • We provide pre-processed VID, YTB, GOT10K, COCO, DET and LASOT. 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.

Pretrained model preparation

Our code will download pretrained model from GoogleDrive automatically. If failed, please download from OneDrive, GoogleDrive or BaiduDrive, and put them to pretrain directory.

Conda preparation

sh install_fc.sh or sh install_rpn.sh

Toolkit preparation

Modify path_to/toolkit in lib/core/get_eao.m to your vot-toolkit path.

Setting preparation

Modify yaml files in experiment/train/ according to your needs.

One-key Running

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

Watch tuning process

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

Implement your ideas on our code

Data optimization

  • 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 of experiment/train/ to find witch data is better for your task. Also, modify USE in yaml files to try different mix-up ratio. High quality training data is beneficial to training. GOT10K and LASOT are recommended.

Backbone optimization

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 optimization

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.

Loss optimization

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.