Coder Social home page Coder Social logo

roller_hockey_player_tracker's Introduction

Roller Hockey player tracker

A player tracker for Roller hockey games.

Example

โš ๏ธ only tested with fixed high-resolution camera.

Installation

Requirements:

  • python3
  • ffmpeg for clip and frames extraction
  • youtube-dl to download the video
  • matplotlib to display the trajectories
  • opencv-contrib-python for some image processing tools
  • torch, torchvision for player detection and other neural network things
  • sklearn for other machine learning tools
  • numpy, tqdm

Processing a clip

First you need to create a project:

python -m rhtrack.project https://www.youtube.com/watch\?v\=SOME_ID PROJECT_NAME

Then you can process a clip, say a 8 seconds clip starting at 32:22:

python -m rhtrack.clip --start=00:32:22 --duration=8 --num-workers=5 \
    --project=PROJECT_NAME clip-1

This will create trajectories chunks to label with player names.

Open the file PROJECT_NAME/clip-1/trajectories/players.txt :

0: player_name
1: player_name
...

Each index corresponds to an image in PROJECT_NAME/clip-1/trajectories/.

Open the image to identify the player and replace player_name on the corresponding line with the name of the player.

Leave empty (i.e. just remove player_name) if you don't want this trajectory in the final video.

Once you're done, run:

python -m rhtrack.render --project=PROJECT_NAME clip-1

which will create the video: PROJECT_NAME/clip-1/output.mp4.

roller_hockey_player_tracker's People

Contributors

tbluche 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.