ArtLabss / tennis-tracking

Open-source Monocular Python HawkEye for Tennis
https://www.artlabs.tech
The Unlicense
392 stars 95 forks source link

How did you decide on x,y and velocity of ball to predict bounces? #11

Closed nyck33 closed 2 years ago

nyck33 commented 2 years ago

To predict bounce points machine learning library for time series sktime was used. Specifically, TimeSeriesForestClassifier was trained on 3 variables: x, y coordinates of the ball and V for velocity (V2-V1/t2-t1). Additional context Add any other context or screenshots about the feature request here.

I want to try to improve the predictive accuracy but don't want to reinvent the wheel if you can share some info on what you tried and how you decided on these three factors.

shukkkur commented 2 years ago

@nyck33 Hey, thanks for opening the issue! Yep, predicting bounces sure took us a while. So, assuming we have x,y coordinates stored in lists from the prediction.py script

186   x = int(circles[0][0][0])
187   y = int(circles[0][0][1])

We tried different methods:

That's generally all the methods we have tried. If there is anything else you would like to know, let us know!

nyck33 commented 2 years ago

I tried a Kalman filter using that first plot you have up but that led nowhere. Over 80% is already pretty impressive but thanks for the clarification.

nyck33 commented 2 years ago

@shukkkur This guy https://github.com/taikoma predicted bounce location using SVM and I believe it was trajectory. He had a blog post on https://qiita.com/ (in Japanese) which I was looking for and can't find anymore.
But I remember his demo video was with the camera more behind the court (not so much from above like broadcast) and it was of a serve from the other side and he had nailed the location. I only mention this because although I am not as good at ML as you guys, I have a background in tennis coaching so want to extend what you have for a coaching app but ideally having 90 to 95% of the bounces.

nyck33 commented 2 years ago

@shukkkur have you seen this: https://arxiv.org/abs/2008.04524

shukkkur commented 2 years ago

@shukkkur have you seen this: https://arxiv.org/abs/2008.04524

No, I haven't. Thank you for sharing. Will make sure to have a look at it.

shukkkur commented 2 years ago

@shukkkur This guy https://github.com/taikoma predicted bounce location using SVM and I believe it was trajectory. He had a blog post on https://qiita.com/ (in Japanese) which I was looking for and can't find anymore. But I remember his demo video was with the camera more behind the court (not so much from above like broadcast) and it was of a serve from the other side and he had nailed the location. I only mention this because although I am not as good at ML as you guys, I have a background in tennis coaching so want to extend what you have for a coaching app but ideally having 90 to 95% of the bounces.

I am not good at ML either, just an intern that doesn't understand half of what he does) wow 90-95% is really something. Good Luck with that!