Skip to content

Add isolated footage augmentation experiment for InPlay - #34

Draft
MaxLinCode wants to merge 2 commits into
codex/camera-invariancefrom
codex/data-augmentation
Draft

MaxLinCode wants to merge 2 commits into
codex/camera-invariancefrom
codex/data-augmentation

Conversation

@MaxLinCode

@MaxLinCode MaxLinCode commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Implements the footage augmentation plan as an isolated source workflow:

  • Adds horizontal-flip, lighting-color, h264-low (CRF 32), and h264-control (CRF 16) transforms in src/workflow/augmentation.py. Variants get their own source IDs and artifact roots; the parent video, calibration, tracks, poses, and annotations are only read.
  • Mirrors calibration landmarks/lines and swaps their left/right names for flip, composing the homography with an image reflection and a court-x sign flip.
  • Adds python -m src.workflow augment list|create.
  • Adds tools/build_footage_augmentation.py to render variants, rerun BoT-SORT + RTMPose, and write extended source-local rally annotations and arm configs.
  • Adds experiments/temporal_selector/footage_augmentation_experiment.py, a paired baseline/augmented harness with shared chronological windows, class weights, source draw stream, and optimizer steps. Validation, decoder calibration, and held-out scoring use originals only.
  • Adds verification, training orchestration, packaging, and comparison-report tools.

Pilot result

Seven 30 fps sources, four camera-held-out folds, seed 1729, 25 epochs. The baseline macro interval F1 is identical across arms (0.6673 with full_motion, 0.7816 with full_audio_zscore_motion).

Arm View Baseline Augmented Delta Cameras improved
horizontal-flip full_motion 0.6673 0.7777 +0.1104 3/4
horizontal-flip full_audio_zscore_motion 0.7816 0.8090 +0.0274 3/4
h264-control full_motion 0.6673 0.7559 +0.0885 3/4
h264-low full_motion 0.6673 0.7129 +0.0456 1/4
lighting-color full_motion 0.6673 0.6946 +0.0272 1/4
lighting-color full_audio_zscore_motion 0.7816 0.7175 -0.0641 1/4

Horizontal flip is the only consistent winner: it improves three of four held-out cameras under both feature views, and under full_motion it cuts boundary MAE from 18.84 to 13.33 frames, signed start error from 15.05 to 4.13 frames, and false splits from 4.25 to 3.50. Lighting and H.264 quality are not reliable arms. The current best recorded model (macro interval F1 0.7705, full_audio_zscore_motion) is slightly below the audio-recipe flip arm (0.8090), but that is a cross-runner comparison; the controlled delta is +0.0274.

Full tables and interpretation are in docs/plans/inplay-data-augmentation.md.

Validation

  • 32 focused tests pass; ruff E4,E7,E9,F is clean; git diff --check passes.
  • 28 variants verified: each has source identity, transformed calibration, provenance, person tracks, and RTMPose poses; all four arm configs contain 7 originals + 7 variants.
  • All seven parent videos remain byte-identical to the annotated manifest.
  • Flip invariants: court x residual versus negated parent median 0.0015 m, court y median 0.0026 m, foot x mirror median 0.025 px.
  • Audio and video media properties are preserved for every arm (same frame count, FPS, dimensions, and AAC stream).

Notes

Variant footage, observations, checkpoints, and metrics stay in ignored local/remote experiment storage. The tracked change is the workflow and experiment code, the plan results, and tests.

Implement the footage augmentation plan as an isolated source workflow:
register mirrored, lighting, and H.264 variants under new source IDs and
artifact roots; rerun person tracking and RTMPose player extraction; write
extended source-local rally annotations; and train paired baseline/augmented
arms with fixed windows, class weights, and optimizer steps.

Record the seven-source, four-camera pilot: horizontal flip improves macro
interval F1 from 0.6673 to 0.7777 with full_motion and from 0.7816 to 0.8090
with full_audio_zscore_motion, improving three of four held-out cameras.
Lighting and compression are not reliable arms.
@MaxLinCode MaxLinCode changed the title Plan footage augmentation for InPlay Add isolated footage augmentation experiment for InPlay Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant