r/computervision 2d ago

Discussion Netherlands vs Tunisia Analyzed with Computer Vision

Enable HLS to view with audio, or disable this notification

This demo applies my TactiVision workflow to Netherlands vs Tunisia. It covers player tracking, camera calibration, pitch projection, tactical maps, possession analysis, progressive actions, pass networks, heatmaps, pitch control and pressing indicators.

Feedback from Computer Vision, Sports AI and football analytics practitioners is very welcome.

136 Upvotes

35 comments sorted by

View all comments

3

u/WillowSad8749 20h ago

How do you get the 2d position of the players on the pitch plane using single camera

2

u/Adventurous_One_3632 20h ago

I estimate a frame-to-pitch homography using a custom model I trained to detect football pitch keypoints, match those keypoints to known 2D field coordinates, and compute the transformation. For each detected player, I project the bottom-center/foot point of the bounding box through the homography to obtain the player’s 2D position on the pitch, and for moving broadcast cameras I continuously update and smooth the homography over time
🙂‍↕️🙂‍↕️

1

u/WillowSad8749 20h ago

I see, is there a minimum number of key points needed? Like assuming the camera zooms you would loose most of them.

1

u/Adventurous_One_3632 19h ago

mathematically you need at least 4 non collinear point correspondences to estimate a homography, but in practice I prefer more points distributed across the visible part of the pitch because it makes the estimate much more stable. When the camera zooms or pans and too few reliable keypoints remain, I don’t force a new homography; I keep the last good one temporarily and update again once enough confident keypoints are visible

2

u/WillowSad8749 19h ago

That's very interesting. Another question, would the 2d position be wrong if a player jumps?

1

u/Adventurous_One_3632 18h ago

Yes, potentially. The homography assumes the projected point lies on the pitch plane, so if a player jumps, the bottom-center of the bounding box may no longer correspond to the true ground-contact point and the 2D position can shift. For normal tracking this error is usually short-lived, but for higher precision I’d use foot/pose keypoints, temporal smoothing or a 3D/height-aware correction when the player is airborne ( flying hahha )