Skip to content

Improvements to Team assigner & Player tracking. #12#16

Merged
tuura01 merged 14 commits intomainfrom
sam2
Nov 24, 2025
Merged

Improvements to Team assigner & Player tracking. #12#16
tuura01 merged 14 commits intomainfrom
sam2

Conversation

@tuura01
Copy link
Copy Markdown
Collaborator

@tuura01 tuura01 commented Nov 23, 2025

Improvements to Team assigner & Player tracking. #12

Team Assigner:

  • Collect history of past assignments for each player id, in order to majority vote on what team the player belongs to.
  • Cropping of images, by some factor (can be set, by default 0.5) in order to remove information about the background to help the CLIP model with its predictions.
  • Sam2 is used to create masks for the players which are then used to apply a gaussian blur to the background. I have tested various colours as well as turning the background opaque. The blur seems to be performing the best.

Player Tracking:

  • Refining of bboxes via Sam2. Using the bboxes from the yolo model, create a mask for the player and then create a new, tighter bbox around the mask to further eliminate background clutter.

Pre changes:

video_1.2.mp4

Post changes:

video_1_ifstatement.mp4

able to create player masks, however:
- sometimes multiple players in the same mask
- sometimes parts of the court are in the mask
- doesn't seem to have affected performance in a meaningful way
removed kmeans and umap
added cropping of images before clip model
team assignment by tracking past assignments per player id
Copy link
Copy Markdown
Collaborator

@isacpaulsson isacpaulsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for now, sam2 provides small improvement to assignment at a major cost to inference time.
Works and looks good but is slow.

@tuura01 tuura01 merged commit f1e438b into main Nov 24, 2025
@tuura01 tuura01 deleted the sam2 branch November 24, 2025 19:16
@tuura01 tuura01 mentioned this pull request Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants