π GPU Backend Changelog
Significant changes to the AI pipeline, version by version.
Since v46 (AprilβMay 2026)β
Phase 6 β Insight engineβ
- New
src/insights/package (candidates, scorer, ranker, templates) generates ranked tennis insights. src/pipeline/phase6_outputs.py::_emit_insightswrites a standaloneinsights.jsonartifact (registered asinsights_json) and embeds the same payload under an"insights"key in the canonical analysis JSON (analysis_export.py).
Pipeline refactor β vendor isolation + staged orchestratorβ
- Active orchestration moved to
src/pipeline/game_processor.py::process_video(sport, ...), composing stage classes insrc/stages/{ball_tracking,surface,events,physics}/. - Serverless runtime is vendor-isolated behind
src.serverless(is_serverless_mode()/start_serverless());main.pyis the single entry point and auto-detects serverless vs local (no separaterunpod_handler.py). - Phase 6 MPS hardening + auto-batch.
Multi-sport scaffolding (deferred)β
- Kept the stage strategy shape, but the shipped product is tennis-only; no non-tennis configs are kept in git.
v46 β 5-Phase Accuracy Overhaul (2026-04-10)β
Commit: fix: 5-phase accuracy overhaul for analysis pipeline
The biggest analysis quality update since launch. Touches game_processor.py, action_detector.py, analysis_export.py, and common.py.
Phase 1: Court coordinates rewriteβ
-
Before: All court positions were normalized (0β1) over a reference image. Conversion to physical units was inconsistent.
-
After: All positions are now in meters, using ITF regulation dimensions (10.97m Γ 23.77m). The coordinate system is clearly documented:
x = 0β left sideline,x = 10.97β right sideliney = 0β far baseline,y = 23.77β near baseline,y = 11.885β net
-
Impact:
ball_trajectory.court_x,court_y,bounces[].x,bounces[].y,shots[].landing.position,shots[].player.hit_positionβ all now in meters. The oldMETERS_PER_UNITconstant has been removed.
Phase 2: Speed & physicsβ
- Before: Speed was calculated with an incorrect
METERS_PER_UNIT = 0.005constant that produced unrealistic numbers. - After: Speed is derived from physical court coordinates and frame timing, clamped to a 263 km/h physical maximum (fastest recorded tennis serve).
- Consistency score formula rewritten: 70% speed coefficient-of-variation + 30% depth distribution uniformity, clamped to
[0, 100].
Phase 3: Ball trajectory interpolationβ
- Before: Linear interpolation between detected frames.
- After: Parabolic (quadratic) interpolation using least-squares fit over sliding windows. Outlier filtering removes physically impossible jumps.
Phase 4: Bounce detectionβ
- Before: CatBoost bounce detection with 10-frame dedup window.
- After:
- Dedup window widened to 15 frames
- Agreement weighting between CatBoost prediction and trajectory direction-change features
- Court-boundary validation β bounces outside the court surface are discarded
bounces[].xandbounces[].ynow populated from the ball trajectory at the bounce frame
Phase 5: Shot classifier fixβ
- Before: ONNX model path was wrong β all shots were silently classified as
"unknown". - After: Path fixed.
classification.typenow correctly returns"forehand","backhand","serve","volley", or"unknown"(only when genuinely ambiguous). is_serveandserve_frame_idxnow exported to the analysis JSON.- Shots are sorted chronologically by
timestamp_ms. camera_viewfield added per shot.
Schema impactβ
The analysis JSON schema is still 1.5.0 (no structural changes), but the data quality is dramatically different:
- Fields that were previously always
nullor"unknown"are now populated - Coordinate values are in a different unit (meters vs. normalized)
- Speed values are realistic (was seeing 500+ km/h, now capped at 263)
:::warning Client-side migration
If your Flutter app was parsing the old normalized coordinates, you need to update: all court_x, court_y, and position fields are now in meters. See Analysis JSON Schema.
:::
v45 and earlierβ
Prior changelog not tracked in docs. See git log in the acesense-gpu-backend repo for full history.
π― Relatedβ
- π Analysis JSON Schema β field-by-field reference
- π€ GPU Backend Overview β pipeline architecture
- π§ GPU Backend Setup β local dev