xsponenta Claude Opus 4.7 commited on
Commit
2df06c6
·
1 Parent(s): b1c3ec5

Vertex view-projection refinement: snap 3D corners to 2D gestalt evidence

Browse files

For each predicted 3D vertex V:
1. Project V into every registered COLMAP view via its P matrix.
2. Find the nearest gestalt corner-class pixel (apex / eave_end_point /
flashing_end_point) within 15 px in each view.
3. If at least 2 views have a match, DLT-triangulate a new 3D position
from the matched 2D corner pixels.
4. Sanity-check: refined position must lie within 0.5 m of V and
reproject with mean error <= 10 px.
5. If both checks pass, replace V with the refined position.

This is precision refinement of vertex *positions* — topology (edges)
is unchanged, no new geometry is introduced. Directly targets corner_f1
(currently 0.517 vs leader ~0.65+) by snapping model approximations
to exact gestalt corner detections that already drove training.

Reuses validated machinery: mvs_utils.collect_views + project_world_to_image
+ triangulate_dlt + mean_reprojection_error. Falls back to the input on
any error so the pipeline cannot regress structurally.

Local 100-sample A/B (paired, fixed seed):
baseline: 0.3770
+ orphan only: 0.3800 (+0.003, t=0.98)
+ refine only: 0.3839 (+0.007, t=1.42, 22 big wins vs 13 big losses)
+ both: 0.3856 (+0.009, t=1.69) <-- this commit

Refine runs BEFORE orphan cleanup so vertex movements complete first,
then orphan pass removes any vertices whose edges were dropped earlier
by hybrid_merge. Local A/B showed combined effect is partially additive
(refine +0.007, orphan +0.003, combined +0.009).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

3 files changed +224 -6
Files changed (3)
local_eval.py+34-2
script.py+18-4
vertex_refine.pyAdded+172