feat: Add SciSports EPTS tracking data serializer#495
feat: Add SciSports EPTS tracking data serializer#495DriesDeprest wants to merge 9 commits intoPySport:masterfrom
Conversation
- Fix ball_channel_map in reader.py to include all ball-related sensors (position, height-estimator, state) - Update epts_common.py to use correct ball_z_estimate key instead of ball_z - Ball Z coordinate now parsed from height-estimator sensor (z-estimate channel) - Z coordinate range: 0.11m - 19.89m (realistic for football) - All ball coordinates (X, Y, Z) now working correctly with coordinate swapping - Backward compatible: all existing Metrica EPTS tests still pass - Tests: 11/11 Metrica EPTS, 1/1 Metrica CSV, 5/5 Metrica Events, 2/2 SciSports EPTS
- Extract 100 frames before/after each key moment: - First half start (frames 89218-89418) - First half end (frames 113960-114160) - Second half start (frames 139305-139505) - Match end (frames 217463-217663) - Reduced file size from 47MB to 223KB (213x smaller) - Updated test expectations for reduced dataset - All tests passing with 501 frames (301 period 1, 200 period 2)
|
@DriesDeprest just some initial observations:
Additionally, do we know what these values mean in the meta data? They seem to indicate at least ball status, but since it's in the meta data it's confusing me. Is there a away we can use this to set |
|
@DriesDeprest a completely different question. I just sourced some SciSports tracking data, but it's JSON format. Do you happen to have any knowledge on the different formats they have? |
|
Thanks @UnravelSports! All feedback has been addressed: ✅ 1. Timestamp Reset per Period Already working correctly in shared EPTS reader - timestamps reset to ✅ 2. Player Position Type Mapping Implemented _map_player_type() in metadata.py:
Added test confirming 2 goalkeepers correctly identified. ✅ 3. Ball Status from BallChannelRef Implemented ball state parsing using "alive" channel:
Added test confirming 435 alive + 66 dead = 501 total frames. 🏗️ Architecture Improvement Moved common EPTS functions to epts_common.py for better code reuse 📋 Different Data Formats No knowledge of SciSports JSON format. Current implementation handles 🧪 Tests: 18/18 EPTS tests passed All changes include comprehensive test verification. |
Summary
This PR adds support for loading SciSports EPTS (Electronic Performance Tracking System) tracking data into Kloppy.
Changes
Provider.SCISPORTSenum valuescisports_eptsserializer module with deserializer and metadata parserSciSportsCoordinateSystemfor proper coordinate transformationepts_common.pymodule for reuse between Metrica and SciSportsscisports.load_tracking()functionTechnical Details
Testing
All tests pass:
Files Changed
kloppy/infra/serializers/tracking/scisports_epts/kloppy/infra/serializers/tracking/epts_common.pykloppy/domain/models/common.pykloppy/scisports.py,kloppy/_providers/scisports.pykloppy/tests/test_scisports_epts.pydocs/user-guide/loading-data/scisports.ipynbkloppy/tests/files/scisports_epts_*.xml/txt