Phase B3: pixel-extrapolation ghosts (EXTRAP / Path B) - #11
Closed
mandarwagh9 wants to merge 1 commit into
Closed
mandarwagh9 wants to merge 1 commit into
mandarwagh9 wants to merge 1 commit into
Conversation
Phase B3 — the third and final ghost-prediction path. When a camera loses a person it was previously tracking (but the world object is still alive via another camera), dead-reckon a red EXTRAP ghost from this camera's last-known pixel position along its pixel velocity, capped by an adaptive budget. - world model: refine the prediction skip from "ever seen by this camera" to "seen within a live window" (~2 frames), so a camera that LOST a target becomes eligible for a ghost. generate_predictions now tries Path A (homography) -> Path B (extrapolation) -> Path C (world projection). - _try_extrapolation_prediction: slide last pixel by velocity * time * fps, capped at min(250, 80 + 40*t) px; zero-velocity stays put; no pixel history -> None. - README: flip EXTRAP / red ghost from planned to implemented; all 3 paths now active. - Tests: 6 new (no-history None, moves in velocity direction, budget cap, zero-velocity stays, integration emits EXTRAP for a lost camera, live camera skipped). Coverage 58%. ruff/mypy clean, 95 tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
Superseded — all commits from this phase landed on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Phase B3 — the third and final ghost-prediction path. When a camera loses a person it was previously tracking (but the world object is still alive via another camera), dead-reckon a red
EXTRAPghost from that camera's last-known pixel position along its pixel velocity, capped by an adaptive budget. All three ghost paths (green/orange/red) are now live.Changes
generate_predictionsnow tries Path A (homography) → Path B (extrapolation) → Path C (world projection)._try_extrapolation_prediction— slides the last pixel byvelocity × time × fps, capped atmin(250, 80 + 40·t)px; zero-velocity stays put; no pixel history →None(falls through).EXTRAP/ red ghost from 🔭 planned to ✅ implemented (status table, ghost-predictions row, AR-overlay table + paragraph, edge-case caveat). All three paths now documented as active.Tests (TDD)
6 new in
test_extrapolation.py: no-history →None, moves in velocity direction, displacement capped by budget, zero-velocity stays at last pixel, integration emitsEXTRAPOLATIONfor a lost camera, and a live camera is skipped (no ghost).Verification
ruffclean ·mypyclean (17 files) · 95 tests pass (was 89).🤖 Generated with Claude Code