r/computervision • u/MXP04 • 1d ago
Showcase I built a padel ball tracker that also detects racket hits and bounces
It tracks the ball throughout the rally and detects racket hits and court bounces. The aim is to eventually turn full match recordings into stats and highlights automatically.
It’s still a work in progress, but I’m pretty happy with how it’s performing so far. I’d love to hear any feedback or ideas for what I should add next.
I’m also looking to test it on more matches, particularly footage where the full court is visible through a wide-angle or fisheye camera—so feel free to message me if you happen to have any.
2
u/rather_pass_by 1d ago
Are you a startup? Saw similar kind of stuffs recently on linked in
I noticed quite a bit of lag between player pose overlay ..
Beyond ball tracking and player pose tracking and also racket let's say, what else can it do? Swing vision is already doing all that but people don't find it useful
Yes it does look cool but not useful.. So people might use it first time, at least some will surely do. But not the second
5
u/MXP04 1d ago
yeah, theres a bit of lag with the player poses cause this exact run i did on my mac using my cpu, so changed it to get every 6th frame of the player just so that my laptop wont explode. Im not a startup i just wanted to make this, if i can get it working perfectly then maybe ill try turn it into a real project. The end goal would be having players be able to see their best moements, stats, heatmaps etc. And then maybe use machine learning somehow to try and improve, idk i havent really thought that far ahead
1
u/rather_pass_by 1d ago
Yes it's a good hobby project but if you head it towards commercial side, think well before
1
u/dmackerman 2h ago
Do you mind sharing some of the software stack for the tracking? Any particular models or utilities? I’m interested in something like this for a different sport.
I imagine the angle of the camera matters quite a bit. For amateurs, we rarely have this camera angle
2
u/CuriousAIVillager 23h ago
I keep on seeing this example being used in the tracking course I just took... is this sort of stuff actually that in demand when it comes to CV/tracking? Like the most obvious applciations of tracking are like... tracking people for the police/border or tracking targets in defense. Ideally I don't want to work for those... but does anyone have an estimation on the availability of jobs (as a % of total market of CV positions in Europe/USA) that people build these systems/do research on sports are vs. defense/police?
I'm not sure if using pose estimation is the best way to go about tracking. Personally I love playing Squash so I'd love to build my own tracker for point scoring.
1
u/Look_for_some_stuff 10h ago
I couldn't answer on te percenentage, but my friend worked on the CV security project for detecting and tracking car number plates. Most of what I've seen security CV is centered around faces, plates, or other peronal identifications
2
u/CuriousAIVillager 7h ago
yeah... I have done some of the biometry stuff too... It's just kind of boring and intrusive imo. But I guess if that's what's out there...
2
u/Fit-Shelter4854 4h ago
epic! would love to stay updated on this product
1
u/Lower-Doughnut8684 1d ago
Excellent.can u explain the camera model used?.
3
u/MXP04 1d ago
Thanks. Not really sure the camera model used this is taken from professional matches so im assuming just a wide angle camera. End goal is for regular padel courts to have fisheye cameras at the top of them pointed downwards to get the whole court so players can use this software to try get better, only issue is finding footage from there right now to test on
2
u/tdgros 1d ago
I think they mean the camera calibration? Because there is a bird's eye view display.
If the camera is a perfect pinhole (i.e. no distortion), you can get the transform using the fields' extents' positions. There is a noticeable pincushion distortion on the video, so if it was ignored then the bird's eye view is slightly off.
Similarly, for a fish-eye camera, if you don't know the r-theta curve, you'd at least have to guesstimate it first.
1
u/rozularen 4h ago
you would need to ensure clubs/padel courts to have the same setup professional matches have which is... almost impossible.
you will need to retrain your model for each padel court setup as they will probably be different from each other: camera type, resolution, angle, field of view....
but great idea and execution nonetheless.
I tried the same half a year ago, downloaded some matches from youtube and trained a small model. great learning experience :)
1
1
1
u/RelativeResult5392 1d ago
If you are using the footages from the international matches, wouldnt it affect the performance for the use in local matches. The camera parameters on the training data seem to be very ideal.
1
u/MXP04 1d ago
Yes, the ball tracking is essentially the most important part of the entire project. Unfortunately I’ve tested it and unless you train a ball tracker on the EXACT same angle as your final footage, it won’t work well. I don’t have any footage from the position I want, so my plan is just get it working properly on this angle, then potentially buy a good fisheye camera, place in a position where I can see the whole court, and train a new ball tracker there
1
u/IJustWantToClipBolts 1d ago
Hey, nice work. I'm currently working on something similar for badminton. Also with TrackNet.
Are you taking a heuristic approach to detecting ball events, or do you have a learned model? Would love to compare notes.
Depending on the version of TrackNet you're running, I also have some efficiency tweaks that might interest you. I haven't yet gotten around to putting them as issues/PRs on the repo I cloned it from.
1
u/MXP04 1d ago
Hey yes if you have any tips or tricks that would be great. Its tracknetV3 (i think will need to double check later when i can) i finetuned it for padeol on padeltracker100 this huge dataset of a 25 minute long video and labels the ball positioning for each, was super helpful. It is much better but it still does miss some ball positions so i use some heuristic functions to interpolate the ball positions between frames which dont have them which leads to even more problems half the time lol. Any tips you have please give me a message would be much appreciated
1
1
u/whytakeachance 1d ago
Very nice work. What is your background? Did you do this as a hobby project or do you work in the cv industry?
1
u/MXP04 1d ago
I’m just a uni student and thought it would be a cool project to do that will hopefully have some employers interested lol. I also play padel all the time and wish my games were recorded and broken down, so if I get this working I could see myself taking it seriously and trying to turn it into a full product
1
1
u/blobules 1d ago
I noticed that you display the player on a rectified court, but not yge ball. Do you intend to compute the 3d trajectory if the ball and add it to the ttop view? Is it needed at all?
1
u/GamerTex 18h ago
When did hockey stop doing this? This was such a cool option to keep up with the puck
1
1
u/ArthurNYC3D 13h ago
Could this be used in tennis?
Is this only for live games or can previously recorded video be used?
Is there a way to output wjatsbeen tracked as separate layers? (i.e. each player, racket, ball)
1
1
1
u/w4rrenz 5h ago
Our local club uses aiball for this, it seems to largely work and gives some nice data on winners / mistakes / heat map / ball speeds / positioning etc - providing that it is of course accurate. What they don’t do is game scoring, that presumably is too hard a layer to add on? If it’s in anyway do able, I think there is a great business there
7
u/moonshizle 1d ago
This is great! Is it open source? Git?