Whats New?
Meet SportsLabKit: The essential toolkit for advanced sports analytics. Designed for pros and amateurs alike, we convert raw game footage into actionable data.
Highlights
Core Capabilities
- **High-Performance Tracking**: In-house implementations of SORT, DeepSORT, ByteTrack, and TeamTrack for object tracking in sports.
Flexibility
- **Plug-and-Play Architecture**: Swap out detection and ReID models on the fly. Supported models include YOLOv8 and torch-ReID.
Usability
- **2D Pitch Calibration**: Translate bounding boxes to 2D pitch coordinates.
- **DataFrame Wrappers**: `BoundingBoxDataFrame` and `CoordinatesDataFrame` for effortless manipulation and analysis of tracking data.
Tutorials
- [**Get Started**](./notebooks/01_get_started): Your first steps in understanding and setting up SportsLabKit.
- [**User Guide**](./notebooks/02_user_guide): A comprehensive guide for effectively using the toolkit in real-world scenarios.
- [**Core Components**](./notebooks/03_core_components/): Deep dive into the essential elements that make up SportsLabKit, including tracking algorithms and DataFrame wrappers.
Installation
To install SportsLabKit, simply run:
bash
pip install SportsLabKit
> **Note**: We're in active development, so expect updates and changes.
Example Usage
To get started with tracking your first game, follow this simple example:
python
import sportslabkit as slk
Initialize your camera and models
cam = slk.Camera(path_to_mp4)
det_model = slk.detection_model.load('YOLOv8x')
motion_model = slk.motion_model.load('KalmanFilter')
Configure and execute the tracker
tracker = slk.mot.SORTTracker(detection_model=det_model, motion_model=motion_model)
bbdf = tracker.track(cam)
The tracking data is now ready for analysis