Skip to content

nickshao/PlayerTracker

Repository files navigation

PlayerTracker: Neural Basketball Assistant

Final Project of Applied Deep Learning 2017 in NTU.

Track the movements of NBA players and map them onto a tactic board.

System Pipeline

0. Preprocessing :

Extract frames from NBA highlight video taking advantage of ffmpeg.
p.s. In warrior_vs_jazz/ directory

1. Object Detection :

Use YOLO or Faster-rcnn to detect players in each frame.
p.s. In yolo/ directory

2. Team Classifier :

Tandform each bounding box into histogram vector and label three bounding box to classify players' corresponding teams.
p.s. In player_classify/ directory

3. Mapping between video and tatic board :

Utilize court line to map frame to tatic board.
p.s. In mapping/ directory

4. Player Tracking :

For each frame, use their former or latter frame to delete rebundant point and do track smoothing.
p.s. In index2court/ directory

5. Postprocessing :

Convert frames into video with ffmpeg.
p.s. warroirs_vs_jazz.mp4


Train

sh train.sh

Test

cd index2court/
python3.6 player_track_warriors.py

p.s. Output frames will store in index2court/game_out2/.


Demo

Original image:

Step1 : Object detection (YOLO)

Step2 : Team Classifier

Step3 : Mapping
1, Line detection and DBSCAN:

2, Warped Frame:

Step4 : Player Tracking

Step5 : Postprocessing

Final Compare :


Dependency

  • cython
  • google
  • protobuf
  • cv2
  • ffmpeg
  • matplotlib
  • numpy
  • pandas
  • pickle
  • python3.6
  • sklearn

Contributors:

Team : ADL 躺分仔


Reference

[1] S. Ren, K. He, R. Girshick, and J. Sun. Faster r-cnn: To- wards real-time object detection with region proposal net- works.

[2] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You Only Look Once: Unified, Real-Time Object Detection.

[3] Evan Cheshire, Cibele Halasz, and Jose Krause Perin. Player Tracking and Analysis of Basketball Plays.

About

To Implement player tracker on video.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •