fenaux / soccer-applications

GNU General Public License v3.0
61 stars 4 forks source link

This is excellent! #2

Open ms82119 opened 1 week ago

ms82119 commented 1 week ago

Hey @fenaux I just wanted to let you know how much I appreciate you posting this solution to resolving the ball trajectory on the radar view. It's really excellent. I think it's really clever, and really clear how you step through the process in the notebook. And it works great!

I was not familiar with those techniques until you shared them here. Now I'm starting to look into the paths of the players, since they are also susceptible to the drift induced by the noisy keypoints. I'm looking to find a way to smooth those out too. As you can see from the screenshot, the ball bath is very clean (orange), and I feel some of the same techniques can be used to clean up the player paths (blue and pink).

image

fenaux commented 1 week ago

Hi @ms82119

Thanks for your kind comment. Yes you are right, Kalman smoothing should work for the player's path too. As the player's dynamic is smoother than the ball's one, a model with constant acceleration should work.

But let me share some thoughts here. The "noise" in paths has two components :

Looking at your picture I have one question : angles in the ball path should indicate an action of a player. Here we have angles and no player's path. Is it because you did not plot all the player's ?

ms82119 commented 1 week ago

Yes @fenaux you are right that I'm not plotting all the player paths in that first image, every time the ball takes a sharp movement/angle we would expect to see a player nearby. In fact this is one of the things I'm thinking more about now, as I can see that sometimes with the smoothed ball movement, and the independently smoothed player movement it can lead to some situations where the player and ball don't appear that close to each other in the radar view, as you can see in these three example screenshots. One shows the ball/player paths before I smoothed them, one with just the ball path smoothed (using your process), and the other with the player smoothed too, but either way there is still a fairly big distance between player 17 and the ball on the radar view. There are a few reasons for this.

I'll upload the code I came up with to do the player path smoothing, it seems to work pretty well, but could no doubt be better as it doesn't really do anything explicit with the homography errors. Btw, the video clip I am using for my work is called 08fd33_4.mp4 (i think i got it from some other example on YT or maybe Kaggle).

Would be great to get your thoughts on this.

image image image

fenaux commented 1 week ago

Thanks for your contributions. I will try to process this video when it is possible to find time.

For the problem you mention (that will be more important when a player controls the ball with head and if he jumps !!)

for partial occlusion I would first see what kalmann smoothing achieve

but probably camera pan and tilt smoothing should be the priority.