Coder Social home page Coder Social logo

baucheng / balltracking Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cvlab-epfl/balltracking

0.0 2.0 0.0 10.17 MB

Tracking of the ball and the players in team sports

License: GNU General Public License v3.0

MATLAB 75.07% C 5.09% Makefile 0.57% C++ 19.26%

balltracking's Introduction

Description

This is a code for simultaneous tracking of the ball and the players in team sports.

For more details about the algorithm used, please refer to and consider citing the following paper:

@article{maksai2015players,
  title={What Players do with the Ball: A Physically Constrained Interaction Modeling},
  author={Maksai, Andrii and Wang, Xinchao and Fua, Pascal},
  journal={arXiv preprint arXiv:1511.06181},
  year={2015}
}

Provided is the ground truth data from the publicly available APIDIS dataset, along with detections obtained by us. If you plan on using any part of this dataset, please refer to and consider citing the following paper:

@inproceedings{de2008distributed,
  title={Distributed video acquisition and annotation for sport-event summarization},
  author={De Vleeschouwer, Christophe and Chen, Fan and Delannay, Damien and Parisot, Christophe and Chaudy, Christophe and Martrou, Eric and Cavallaro, Andrea and others},
  booktitle={NEM summit 2008:: Towards Future Media Internet},
  year={2008}
}

Building and Dependencies

For running the whole code, you need to be able to compile c++ code and run matlab files.

For the optimization, you should have Gurobi installed. Modify code/Actions/Compile_and_setup.m to write the path to the Gurobi distribution and license file on your system.

For running the K-shortest-paths optimization, you need Boost library installed. Modify code/KSP/Makefile to write the path to the Boost library on your system.

Just run main.m file in matlab to run everything.

Configuration

As system is designed to run with multiple sports, it has many configurations. An example of configuration file for the APIDIS dataset is given in the configs/apidis.m folder. It contains a reasonable setup for basketball. We plan to add another example for soccer in the future.

If you want to use your own configuration file, modify the name of the configuration file used at the top of the main.m.

The config file contains the necessary explanations. Top of the file contains settings that are expected to be changed more often.

Data format

People detections file have the format of Probability Occupancy Map (POM). For each frame T, for each discretized (X, Y) location on the ground, file T.pom contains a line: Y * GX + X 0 Y * GX + X P

First number is the encoding of the location on the ground plane. Second number is the height. Third number is the encoding of the location in 3D, and for people coinsides with the first one. Fourth number is the output of the detector, ranging between 0 and 1.

Ball detections and ball ground truth have the following format: First line of the file contains the number of the detections across all frames. Each of the following lines is formatted as follows: Frame number X Y Z P S

P is the detector output, and is expected to be 1 for the ground truth. S is the state of the ball (see configs/apidis.m for explanation on how states are encoded). For the detection file, S is expected to be 0.

Troubleshooting

If the system uses too much memory, try decreasing the limit on the size of the graph and size of the optimization problem, both defined at the end of the config file.

balltracking's People

Contributors

maksay avatar

Watchers

 avatar paper2code - bot 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.