AtomScott/SportsLabKit
소개
A python package for turning sports video into csv files
디자인 및 미디어What you can do
- High-Performance Tracking: In-house implementations of SORT, DeepSORT, ByteTrack, and TeamTrack for object tracking in sports.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalSportsLabKit
Introduction
Meet SportsLabKit: The essential toolkit for advanced sports analytics. Designed for pros and amateurs alike, we convert raw game footage into actionable data.
We're kicking off with soccer and expanding to other sports soon. Need to quantify your game? Make human movement computable with SportsLabKit.
Features
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:
BoundingBoxDataFrameandCoordinatesDataFramefor effortless manipulation and analysis of tracking data.
Tutorials
- Get Started: Your first steps in understanding and setting up SportsLabKit.
- User Guide: A comprehensive guide for effectively using the toolkit in real-world scenarios.
- Core Components: Deep dive into the essential elements that make up SportsLabKit, including tracking algorithms and DataFrame wrappers.
Installation
To install SportsLabKit, simply run:
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:
import sportslabkit as slk
from sportslabkit.mot import SORTTracker
# Initialize your camera and models
cam = slk.Camera(path_to_mp4)
det_model = slk.detection_model.load('YOLOv8x', imgsz=640)
motion_model = slk.motion_model.load('KalmanFilter', dt=1/30, process_noise=10000, measurement_noise=10)
# Configure and execute the tracker
tracker = SORTTracker(detection_model=det_model, motion_model=motion_model)
tracker.track(cam[:100])
res = tracker.to_bbdf()
save_path = "assets/tracking_results.mp4"
res.visualize_frames(cam.video_path, save_path)
# The tracking data is now ready for analysis
The output is a BoundingBoxDataFrame, a multi-level Pandas DataFrame that contains Team ID, Player ID, and various attributes like bounding box dimensions. Each row is indexed by Frame ID for easy analysis. The DataFrame is also customizable, allowing you to adapt Team and Player IDs as needed.

Roadmap
Better CV tools: Implement state of the art tracking methods, add event detection etc.
Unified Data Representation: In the pipeline are event data detection and a single DataFrame structure for both event and trajectory data.
Enhanced Compatibility: Upcoming support for data export to standard formats for easy integration with other tools.
Contributing
See the Contributing Guide for more information.
Contributors
Atom Scott 🚧 |
Ikuma Uchida ✅ |
shunsuke-iwashita 🐛 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Related Papers
See papers that cite SoccerTrack on Google Scholar.
Citation
@inproceedings{scott2022soccertrack,
title={SoccerTrack: A Dataset and Tracking Algorithm for Soccer With Fish-Eye and Drone Videos},
author={Scott, Atom and Uchida, Ikuma and Onishi, Masaki and Kameda, Yoshinari and Fukui, Kazuhiro and Fujii, Keisuke},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={3569--3579},
year={2022}
}
관련 프로젝트 살펴보기
불러오는 중…