foolwood / SiamMask

[CVPR2019] Fast Online Object Tracking and Segmentation: A Unifying Approach
http://www.robots.ox.ac.uk/~qwang/SiamMask
MIT License
3.47k stars 819 forks source link
computer-vision cvpr2019 deep-learning object-tracking pytorch read-time video-object-segmentation visual-tracking

SiamMask

NEW: now including code for both training and inference!

PWC

This is the official implementation with training code for SiamMask (CVPR2019). For technical details, please refer to:

Fast Online Object Tracking and Segmentation: A Unifying Approach
Qiang Wang*, Li Zhang*, Luca Bertinetto*, Weiming Hu, Philip H.S. Torr (* denotes equal contribution)
CVPR 2019
[Paper] [Video] [Project Page]

Bibtex

If you find this code useful, please consider citing:

@inproceedings{wang2019fast,
    title={Fast online object tracking and segmentation: A unifying approach},
    author={Wang, Qiang and Zhang, Li and Bertinetto, Luca and Hu, Weiming and Torr, Philip HS},
    booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
    year={2019}
}

Contents

  1. Environment Setup
  2. Demo
  3. Testing Models
  4. Training Models

Environment setup

This code has been tested on Ubuntu 16.04, Python 3.6, Pytorch 0.4.1, CUDA 9.2, RTX 2080 GPUs

Demo

cd $SiamMask/experiments/siammask_sharp
export PYTHONPATH=$PWD:$PYTHONPATH
python ../../tools/demo.py --resume SiamMask_DAVIS.pth --config config_davis.json

Testing

Results

These are the reproduction results from this repository. All results can be downloaded from our project page.

Tracker VOT2016
EAO / A / R
VOT2018
EAO / A / R
DAVIS2016
J / F
DAVIS2017
J / F
Youtube-VOS
J_s / J_u / F_s / F_u
Speed
SiamMask-box 0.412/0.623/0.233 0.363/0.584/0.300 - / - - / - - / - / - / - 77 FPS
SiamMask 0.433/0.639/0.214 0.380/0.609/0.276 0.713/0.674 0.543/0.585 0.602/0.451/0.582/0.477 56 FPS
SiamMask-LD 0.455/0.634/0.219 0.423/0.615/0.248 - / - - / - - / - / - / - 56 FPS

Note:

Training

Training Data

Download the pre-trained model (174 MB)

(This model was trained on the ImageNet-1k Dataset)

cd $SiamMask/experiments
wget http://www.robots.ox.ac.uk/~qwang/resnet.model
ls | grep siam | xargs -I {} cp resnet.model {}

Training SiamMask base model

Training SiamMask model with the Refine module

Training SiamRPN++ model (unofficial)

License

Licensed under an MIT license.