Closed nyck33 closed 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:
We thought of extracting the local minimum and maximum will give the bounces points.
red points - bounces
After plotting the bounces, the graphs show that bounces are close to local min and max, however it can't give us accurate results .
Then we tried to look into points where change in ball's velocity happens.
black points - bounces
Turned out not helpful either.
Looking at the previous graphs a certain pattern can be observed. Therefore, we tried to apply sklearn models. However, it couldn't capture the underlying pattern.
df['x'].shift(1)....df['x'].shift(20)
- for 20 features
that's why we decided to use time series which captures the relationship between preceding and following ball's x,y
coordinates. We experimented with sktime time series classification methods such as TimeSeriesForestClassifier()
and KNeighborsTimeSeriesClassifier()
and with different number of features
Univariate Classification - predicting using just:
TimeSeriesForestClassifier()
with x
,y
and V
features. That's generally all the methods we have tried. If there is anything else you would like to know, let us know!
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.
@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.
@shukkkur have you seen this: https://arxiv.org/abs/2008.04524
@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 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!
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.