Skip to content

rework of teamassigner to use kmeans clustering - #41

Merged
isacpaulsson merged 6 commits into
mainfrom
team_assigner_kmeans
Dec 8, 2025
Merged

rework of teamassigner to use kmeans clustering#41
isacpaulsson merged 6 commits into
mainfrom
team_assigner_kmeans

Conversation

@isacpaulsson

@isacpaulsson isacpaulsson commented Dec 8, 2025

Copy link
Copy Markdown
Collaborator

Reworked teamassigner to use kmeans clustering instead of clip.

Features are binned hsv values (h:8, s:4, v:4) -> yeilding a vector with 128 features per bounding box and frame.
All features for same player id are averaged into a single feature representation (over time).
This results in one feature vector for each unique player id that is then clustered using kmeans.
rare ids are filtered (need exist for more than 3 frames), single crowd detection can be a massive outlier in color feature space.

success (all three initial test videos succeed):
https://github.com/user-attachments/assets/ca910659-563a-4f92-be3f-f2839ce75f63

failure (one id missclassified) Likely due to ID switch between 7 and 5:
https://github.com/user-attachments/assets/d497cc1d-0438-406e-9209-7adc52ceb3e8

failure (multiple ids missclassified) likely due to frequent id switching during the clip:
https://github.com/user-attachments/assets/422abe88-151f-42be-b20c-82917e103f11

Closes #12
Closes #34

Updated plots and video generation, color is extracted from kmeans for the team clusters and is used when drawing videos and plots.

image

@mahmutosmanovic mahmutosmanovic left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nice work.

@isacpaulsson
isacpaulsson merged commit 5c0efed into main Dec 8, 2025
@isacpaulsson
isacpaulsson deleted the team_assigner_kmeans branch December 8, 2025 15:23
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.

State persists between calls in team assigner Improve reliability of team assigner

2 participants