Abstract Automated sports analytics requires robust methods for identifying player team affiliations. Traditional color-based approaches often struggle with dynamic lighting and low-contrast environments. This paper proposes a deep learning framework using associative embeddings to group players by team identity in real-time. By training a network to minimize distance between teammates' embeddings and maximize distance between opponents', the system achieves over 90% accuracy on unseen basketball games without prior knowledge of jersey colors.
Introduction
In professional sports broadcasting, team discrimination is a prerequisite for advanced analytics such as spatial tracking and possession statistics. Conventional computer vision techniques typically rely on handcrafted color histograms. However, these methods are prone to failure in indoor arenas due to reflections from LED boards, varying court colors, and frequent player occlusions. Furthermore, the need for manual calibration for every new game limits scalability. This research introduces a learning-based grouping strategy that generalizes across different teams and lighting conditions.
Methodology
The proposed system utilizes a modified Image Cascade Network (ICNet) as its backbone to ensure real-time performance (30 FPS). The network is trained to produce two distinct outputs for every pixel: a binary segmentation mask identifying player pixels and a $D$-dimensional embedding vector representing team identity.
The core of the training process involves two specific loss functions:
- Pull Loss ($L_{pull}$): Minimizes the variance of embedding vectors within the same team, effectively pulling teammates together in the embedding space.
- Push Loss ($L_{push}$): Maximizes the distance between the mean embeddings of opposing teams, ensuring clear separation.
During inference, a greedy clustering algorithm groups the predicted embeddings to assign team labels to segmented player pixels.
Results and Discussion
The model was evaluated on a proprietary dataset of 648 high-resolution basketball images from 40 different games. Despite being trained on "coarse" elliptical annotations rather than pixel-perfect masks, the system demonstrated significant robustness.
The associative embedding approach achieved a team assignment accuracy of 91%, significantly outperforming a Bayesian color histogram baseline which only reached 62-63%. Crucially, the model maintained this performance on entirely new arenas and teams, proving its ability to learn the abstract concept of visual consistency within a group rather than just memorizing specific colors.
Conclusion
This work demonstrates that associative embeddings provide a powerful mechanism for zero-shot team discrimination in complex environments. By moving beyond simple color matching to a learned grouping strategy, the system offers a scalable solution for automated sports analysis. Future work will focus on improving the handling of non-player entities like referees and refining performance during extreme player density.
Summary updated