Skip to content

BrotherJing/RNN_tabletennis

Repository files navigation

RNN_tabletennis

LSTM ball trajectory prediction. Original idea from Applying Deep Learning to Basketball Trajectories

More detail in the jupyter notebook.

Installation

  1. Install tensorflow for running the python interface.

  2. Following tensorflow-cmake to build tensorflow shared library, for running the c++ interface.

  3. Train, or download our model.

Training data Models
coords.csv export-graph_125.pb
coords_30.csv export-graph_30.pb
  1. Build the C++ interface (Optional).
cd src
mkdir build && cd build
cmake ..
make

You have to modify some path in the CMakeList.txt file in order to build.

Usage

Train the model:

python main.py

Convert to .pb format:

python write_pb.py

Test the model:

python test_on_pb.py #or use the jupyter notebook

Visualization

Input data

Input Data

Trajectory prediction with 30 input data points

Trajectory Prediction

Trajectory prediction with only 4 input data points

Trajectory Prediction 2

Training Loss

Weights Evolution

About

LSTM ball trajectory prediction

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published