by bertinetto

bertinetto / staple

[CVPR'16] Staple: Complementary Learners for Real-Time Tracking"

217 Stars 110 Forks Last release: Not found MIT License 21 Commits 1 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

NEWS! Check out our CVPR'17 paper+code: training a Correlation Filter end-to-end allows super lightweight networks of 2 layers (600 kB) to achieve state-of-the-art performance at high-speed.

Staple tracker

Code for the method described in the paper Staple: Complementary Learners for Real-Time Tracking, by Luca Bertinetto, Jack Valmadre, Stuart Golodetz, Ondrej Miksik and Philip Torr (University of Oxford) - appeared at CVPR 2016.


For questions about the code or the paper, feel free contact us. You can find more info at the project page:

Please cite ```

@InProceedings{Bertinetto2016CVPR, author = {Bertinetto, Luca and Valmadre, Jack and Golodetz, Stuart and Miksik, Ondrej and Torr, Philip H. S.}, title = {Staple: Complementary Learners for Real-Time Tracking}, booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, month = {June}, year = {2016} } ```


  • The code is mostly in MATLAB, except the workhorse of
    , which is written in C and comes from Piotr Dollar toolbox
  • To use the webcam mode (
    ), install MATLAB's webcam support from


  • runTracker(sequence, start_frame)
    runs the tracker on
  • runTracker_webcam
    starts an interactive webcam demo.
  • runTracker_VOT
    run the tracker within the benchmarks VOT and OTB respectively.



runTracker(sequence, start_frame)
, make sure the directory tree looks like the following:
- staple/
    - runTracker.m
    - thisTracker.m
    - ... 

  • Sequences/
    • ball/
    • bicycle/
    • (any other sequence with the specified format)

Each sequence folder should have the following structure

  • /
      - imgs/
          - 00000000.jpg (must be 8digit, any img format allowed)
          - 00000001.jpg
          - ...
      - groundtruth.txt
    • _frames.txt contains the interval of frames to track
    • groundtruth.txt contains the per frame annotation. The ground truth bounding box can be expressed as a polygon, i.e.
      , or as an axis-aligned bounding box, i.e.


    How can I compile

    have been compiled and tested for Ubuntu, Windows 8 (64 bit) and macOS(Sierra). You can easily recompile the sources in case of need. I have compiled mexResize following the instructions in Martin's old code for DSST. You can find it here - just open the archive and run compilemex.m or compilemex_win.m

    How can I reproduce the exact same results of the paper?

    Checkout the code at the commit tagged

    , other commits and future versions might perform differently. As it is stated in the paper, the performance have been obtained using the last commit of the VOT toolkit available at the time of the paper submission (

    We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.