Phase B2: cross-camera homography ghost predictions (H-PROJ / Path A) - #10
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 B2. Implements the headline cross-camera homography feature: when one camera
sees a person and another doesn't, project the foot point between views to render a
green H-PROJ ghost.
- New app/infrastructure/homography.py: HomographyEstimator accumulates foot-point
correspondences per camera pair, estimates H via cv2.findHomography + RANSAC once
>= min_pairs, re-estimates periodically, projects points, caps the pair buffer.
- World model integration:
- store per-camera foot points on WorldObject (camera_foot_points)
- collect correspondences from objects co-visible on a tick (_collect_correspondences)
- generate_predictions tries Path A (homography, HOMOGRAPHY method) first, falling
back to Path C (world projection) when no homography exists
- wired from the existing HOMOGRAPHY_* Settings
- README: flip homography / H-PROJ from planned to implemented.
- Tests: 8 new (estimator: known-H recovery, identity, directionality, min-pairs,
buffer cap, same-cam ignore; integration: predictions emit HOMOGRAPHY, correspondence
collection for co-visible objects).
Coverage 55%->58%. ruff/mypy clean, 89 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 B2 — the headline feature of the 10× roadmap. Implements cross-camera homography ghost prediction: when one camera sees a person and another doesn't, project the foot point between views to render a green
H-PROJghost. Previously this was entirely absent (nocv2.findHomographyin the pipeline).Changes
app/infrastructure/homography.py—HomographyEstimator: accumulates foot-point correspondences per camera pair, estimatesHviacv2.findHomography+ RANSAC once ≥min_pairs, re-estimates periodically, projects points, and caps the pair buffer (keeps most-recent).WorldObject(camera_foot_points)_collect_correspondencesfeeds the estimator from objects co-visible on a tickgenerate_predictionsnow tries Path A (homography →HOMOGRAPHY) first, falling back to Path C (world projection →WORLD) when no homography exists for the pairHOMOGRAPHY_*SettingsH-PROJfrom 🔭 planned to ✅ implemented (status table, feature rows, AR-overlay table, the deep-dive section header, and the edge-case caveat).Tests (TDD)
8 new in
test_homography.py:H(sub-pixel), identity, directional independence, no-H-until-min-pairs, buffer cap, same-camera ignoredgenerate_predictionsemitsHOMOGRAPHYwhen a homography + foot point exist;_collect_correspondencesfeeds the estimator for a co-visible objectVerification
ruffclean ·mypyclean (17 files) · 89 tests pass (was 81).🤖 Generated with Claude Code