Git Product home page Git Product logo

cf_tracking's Introduction

Introduction

This repository provides C++ implementations for two correlation filter-based trackers. The code implements modified versions of the visual trackers proposed in [1] and [2]:

  • KCFcpp: This tracker is a C++ port of the Matlab implementation of the kernelized correlation filter (KCF) tracker proposed in [1]. Project webpage: http://home.isr.uc.pt/~henriques/circulant/ KCFcpp uses as default scale adaption the 1D scale filter proposed in [2]. In addition, a fixed template size, the subpixel/subcell response peak estimation, and the model update from [3] is used as in the KCF version used by Henriques et al. in the VOT challenge 2014 (http://votchallenge.net/vot2014/). The scale adaption used by Henriques et al. in the VOT challenge 2014 is available as option.
  • DSSTcpp: This tracker is a C++ port of the Matlab implementation of the discriminative scale space tracker (DSST) proposed in [2]. The default settings use a fixed template size and the subpixel/cell response peak estimation as in the KCF version. Project webpage: http://www.cvl.isy.liu.se/en/research/objrec/visualtracking/scalvistrack/index.html

Both implementations use the FHOG features proposed in [4]. More specifically, the FHOG implementation from [5] is used. Both trackers offer the option to use the target loss detection proposed in [6].

Build

Dependencies

  • C++11
  • OpenCV 3.0
  • CMake
  • SSE2-capable CPU

Compilation has been tested on Windows 7 with Visual Studio 2013 Ultimate, on Windows 8.1 with Visual Studio 2013 Community and on Ubuntu 14.04 with g++.

Windows 7

  • Set environment variables according to OpenCV Setup - Environment Variables
  • Launch cmake-gui, create a build folder and configure.
  • Open CfTracking.sln in Visual Studio and compile the projects DSSTcpp and KCFcpp.

Ubuntu 14.04

  • Install OpenCV 3.0 and CMake.
  • Configure and compile:
mkdir <src-dir>/build
cd <src-dir>/build
cmake ../
make -j 8

Usage

  • To track images from a webcam, simply launch DSSTcpp(.exe) or KCFcpp(.exe) and mark an object with a rectangle.
  • To pass a predefined bounding box, use the -b x,y,w,h command line switch. Boxes are expected to use images starting at position 0,0.
  • To track an image sequence or video, copy the contents of <src-dir>/sample/* to your build/release folder and run the batch/sh file. The example launch scripts are brief and explain the trackers' usage. If you run the tracker from Windows cmd, use only one % sign to specify the naming convention of the image sequence.
  • To enable target loss detection, run the tracker with the --para_enable_tracking_loss command line switch.
  • To achieve tracking performance as close to the original Matlab implementations as possible, run the trackers with the --original_version command line switch. While the trackers are implemented closely to their original Matlab implementations, implementation differences do still exist (even with the --original_version switch) and the tracking performance of the C++ implementations may deviate from their original Matlab implementations.
  • To see a full list of available options, run the trackers with --help command line switch.

Commercial Use (US)

The code using linear correlation filters may be affected by a US patent. If you want to use this code commercially in the US please refer to http://www.cs.colostate.edu/~vision/ocof_toolset_2012/index.php for possible patent claims.

Contributors

Luka Cehovin: Equalize FHOG performance on AMD and Intel CPUs

3rdparty libraries used:

References

If you reuse this code for a scientific publication, please cite the related publications (dependent on what parts of the code you reuse):

[1]

@article{henriques2015tracking,
title = {High-Speed Tracking with Kernelized Correlation Filters},
author = {Henriques, J. F. and Caseiro, R. and Martins, P. and Batista, J.},
journal = {Pattern Analysis and Machine Intelligence, IEEE Transactions on},
year = {2015}

[2]

@inproceedings{danelljan2014dsst,
title={Accurate Scale Estimation for Robust Visual Tracking},
author={Danelljan, Martin and H{\"a}ger, Gustav and Khan, Fahad Shahbaz and Felsberg, Michael},
booktitle={Proceedings of the British Machine Vision Conference BMVC},
year={2014}}

[3]

@inproceedings{danelljan2014colorattributes,
title={Adaptive Color Attributes for Real-Time Visual Tracking},
author={Danelljan, Martin and Khan, Fahad Shahbaz and Felsberg, Michael and Weijer, Joost van de},
booktitle={Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2014}}

[4]

@article{lsvm-pami,
title = "Object Detection with Discriminatively Trained Part Based Models",
author = "Felzenszwalb, P. F. and Girshick, R. B. and McAllester, D. and Ramanan, D.",
journal = "IEEE Transactions on Pattern Analysis and Machine Intelligence",
year = "2010", volume = "32", number = "9", pages = "1627--1645"}

[5]

@misc{PMT,
author = {Piotr Doll\'ar},
title = {{P}iotr's {C}omputer {V}ision {M}atlab {T}oolbox ({PMT})},
howpublished = {\url{http://vision.ucsd.edu/~pdollar/toolbox/doc/index.html}}}

[6]

@inproceedings{bolme2010mosse,
author={Bolme, David S. and Beveridge, J. Ross and Draper, Bruce A. and Yui Man Lui},
title={Visual Object Tracking using Adaptive Correlation Filters},
booktitle={Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2010}}

cf_tracking's People

Contributors

klahaag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cf_tracking's Issues

videoio cv 3.0

Hi, I'm trying to run the program, but after a successful compilation I get a window with a choice of capture source. No camera is initialized, and if the initialization occurs, I get a black screen with no frames and messages about the impossibility to grab frames.

As far as I understand, the project must build on opencv 3.0, so my question is what the next version of the operating system and version you opencv was used in this build? Other projects openTLD I compiled fine with opencv 2.4.9 and as far as I understand cv 2 by default don't use videoinput library. I'am try build opencv 3.0 without videoinput, but do not get results.

How big is the integration of the project with opencv 3.0?
Thank you for your attention.

I can not track on image sequence and video (ubuntu16.04)

richal@w:/桌面/trackpython/cf_tracking/build$ ./KCFcpp -b 261,48,39,65 -o results.txt -s sample_sequence_compressed -i /%.05d.jpg
[image2 @ 0x182b840] Could find no file with path 'sample_sequence_compressed/%05d.jpg' and index in the range 0-4
Could not open device/sequence/video!
richal@w:
/桌面/trackpython/cf_tracking/build$ ./DSSTcpp -b 261,48,39,65 -o results.txt -s sample_sequence_compressed -i /%.05d.jpg
[image2 @ 0x2889380] Could find no file with path 'sample_sequence_compressed/%05d.jpg' and index in the range 0-4

That is my fault,thans very much.

Don't know how to track an image sequence

Hi, I am using a mac OS X system and successfully used Cmake to get a Xcode Project. However, after compiling I only got two .exe file. Both KCF and DSST are amazing. I read about how to run the sample sequence but still got no clue. I can't find the batch/sh file anyway. I suppose this is a silly question and I will be very appreciate if you are willing to help.

Thank you for your time!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.