Git Product home page Git Product logo

structured-graph-tracker's Introduction

Structural Graph Tracker

This code implements a method for tracking multiple object in videos using structural information encoded in graphs and particle filters.

Copyright (c) 2016, Henrique Morimitsu, University of Sao Paulo, Sao Paulo, Brazil

Contact: [email protected]

License

This code is released under the BSD 3-clause license (see license.txt)

Citing Structural Graph Tracker

If you consider this code useful for your research, please consider citing:

@article{morimitsu2016exploring,
    author = {Henrique Morimitsu and Isabelle Bloch and Roberto M. Cesar-Jr.},
    title = {Exploring Structure for Long-Term Tracking of Multiple Objects in Sports Videos},
    journal = {Computer Vision and Image Understanding},
    year = {2016},
    doi = {http://dx.doi.org/10.1016/j.cviu.2016.12.003},
}

Requirements

Python: https://www.python.org/

Numpy: http://www.numpy.org/

OpenCV: http://opencv.org/

OpenCV must be installed with ffmpeg support in order to open videos.

This code was implemented and tested using Python 3.4 with OpenCV 3.0.0 but it should also work with Python 2.X and OpenCV 2.4.X

Usage

The code is divided into two parts: tracking the objects and analyzing the results. Most tracking parameters can be changed by modifying the files config.ini and pf.ini

Tracking

Before starting the tracking, you should update the file config.ini with your configurations. Mainly, be sure that the following parameters point to the correct files:

  • input_video
  • initial_annotations

You can also change the values directly on the terminal by specifying parameter flags. In order to know the modifiable parameters, run the command:

python Main.py -h

If the configuration is correct, then the tracking can be starter by running:

python Main.py

You can stop the execution at any time by pressing the ESC key. The tracking results will be saved on the folder specified in the output_annotation_dir variable defined in config.ini.

Analyzing results

You can compare the produced tracking results with a ground truth using the TrackingEvaluator.py code. See more details about the computed measurements in the comments section of file TrackingEvaluator.py.

In order to evaluate the results for the tt sample video, you should run the command:

python TrackingEvaluator.py outputAnnotations/ttd2_sample/ sequences/gt_ann/ttd2/ 2 2

Again, you can obtain more information about the parameters by simply calling the code without parameters:

python TrackingEvaluator.py

You can also hide/show the final header of the printed results and choose to print or not the individual results for each frame by changing the flag variables is_print_final_header and is_print_list directly on the source code of TrackingEvaluator.py.

It is also possible to visualize the tracking results using the ResultsVisualizator.py code. In order to visualize the ttd2_sample results, you can run the following command:

python ResultsVisualizator.py sequences/ttd2.mp4 0 outputAnnotations/ttd2_sample/ Sample

If you want to visualize multiple results simultaneously, simply add more parameters, like:

python ResultsVisualizator.py sequences/ttd2.mp4 0 outputAnnotations/ttd2_sample/ Sample sequences/gt_ann/ttd2/ GT

As always, you can obtain more information about the parameters by simply calling the code without parameters:

python ResultsVisualizator.py

structured-graph-tracker's People

Contributors

hmorimitsu avatar

Watchers

 avatar  avatar

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.