xsponenta Claude Opus 4.7 commited on
Commit ·
dec2057
1
Parent(s): 2d9a7cb
Add per-sample diagnostic prints (no behavior change)
Browse filesLogs per sample: colmap point count, fused point count, triangulation
track output sizes, final predicted vertex/edge count, pipeline status
(ok / fuse_failed / track_failed / predict_failed).
submission.json output is byte-identical to the prior commit — only
stdout changes. Score should reproduce the 0.4584 baseline; if not,
the rollback wasn't clean.
Once we have HF Space logs we can correlate input signal strength with
output size and identify which scenes are systematically failing,
targeting the next experiment with evidence instead of guesses.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
script.py
CHANGED
|
@@ -382,33 +382,61 @@ if __name__ == "__main__":
|
|
| 382 |
for sample in tqdm(dataset[subset_name], desc=subset_name):
|
| 383 |
order_id = sample["order_id"]
|
| 384 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 385 |
# Fuse + sample
|
| 386 |
fused = fuse_and_sample(sample, cfg, rng)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 387 |
if fused is None:
|
| 388 |
pred_v, pred_e = empty_solution()
|
|
|
|
| 389 |
else:
|
| 390 |
try:
|
| 391 |
pred_v, pred_e = predict_sample(fused, model, device)
|
| 392 |
if torch.cuda.is_available():
|
| 393 |
torch.cuda.empty_cache()
|
| 394 |
-
|
| 395 |
# Apply handcrafted triangulation tracking to catch missing corners/edges
|
| 396 |
try:
|
| 397 |
from triangulation import predict_wireframe_tracks
|
| 398 |
# Use min_views=3 for highly precise, conservative geometric tracks
|
| 399 |
track_v, track_e = predict_wireframe_tracks(sample, min_views=3)
|
| 400 |
-
|
|
|
|
|
|
|
| 401 |
pred_v, pred_e = hybrid_merge(pred_v, pred_e, track_v, track_e, merge_radius=0.8)
|
| 402 |
except Exception as track_e_err:
|
| 403 |
print(f" Track ensemble failed for {order_id}: {track_e_err}")
|
| 404 |
-
|
|
|
|
| 405 |
except Exception as e:
|
| 406 |
import traceback
|
| 407 |
print(f" Predict failed for {order_id}:\n{traceback.format_exc()}")
|
| 408 |
pred_v, pred_e = empty_solution()
|
|
|
|
| 409 |
if torch.cuda.is_available():
|
| 410 |
torch.cuda.empty_cache()
|
| 411 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 412 |
solution.append({
|
| 413 |
"order_id": order_id,
|
| 414 |
"wf_vertices": pred_v.tolist() if isinstance(pred_v, np.ndarray) else pred_v,
|
|
|
|
| 382 |
for sample in tqdm(dataset[subset_name], desc=subset_name):
|
| 383 |
order_id = sample["order_id"]
|
| 384 |
|
| 385 |
+
# Diagnostic: input signal strength. No behavior change.
|
| 386 |
+
n_colmap_pts = -1
|
| 387 |
+
try:
|
| 388 |
+
from hoho2025.example_solutions import convert_entry_to_human_readable
|
| 389 |
+
_good = convert_entry_to_human_readable(sample)
|
| 390 |
+
_rec = _good.get('colmap') or _good.get('colmap_binary')
|
| 391 |
+
if _rec is not None:
|
| 392 |
+
n_colmap_pts = len(_rec.points3D)
|
| 393 |
+
except Exception:
|
| 394 |
+
pass
|
| 395 |
+
|
| 396 |
# Fuse + sample
|
| 397 |
fused = fuse_and_sample(sample, cfg, rng)
|
| 398 |
+
n_fused_pts = len(fused["xyz_norm"]) if fused is not None else 0
|
| 399 |
+
track_v_count, track_e_count = 0, 0
|
| 400 |
+
pred_status = "ok"
|
| 401 |
+
|
| 402 |
if fused is None:
|
| 403 |
pred_v, pred_e = empty_solution()
|
| 404 |
+
pred_status = "fuse_failed"
|
| 405 |
else:
|
| 406 |
try:
|
| 407 |
pred_v, pred_e = predict_sample(fused, model, device)
|
| 408 |
if torch.cuda.is_available():
|
| 409 |
torch.cuda.empty_cache()
|
| 410 |
+
|
| 411 |
# Apply handcrafted triangulation tracking to catch missing corners/edges
|
| 412 |
try:
|
| 413 |
from triangulation import predict_wireframe_tracks
|
| 414 |
# Use min_views=3 for highly precise, conservative geometric tracks
|
| 415 |
track_v, track_e = predict_wireframe_tracks(sample, min_views=3)
|
| 416 |
+
track_v_count = len(track_v) if track_v is not None else 0
|
| 417 |
+
track_e_count = len(track_e) if track_e is not None else 0
|
| 418 |
+
|
| 419 |
pred_v, pred_e = hybrid_merge(pred_v, pred_e, track_v, track_e, merge_radius=0.8)
|
| 420 |
except Exception as track_e_err:
|
| 421 |
print(f" Track ensemble failed for {order_id}: {track_e_err}")
|
| 422 |
+
pred_status = "track_failed"
|
| 423 |
+
|
| 424 |
except Exception as e:
|
| 425 |
import traceback
|
| 426 |
print(f" Predict failed for {order_id}:\n{traceback.format_exc()}")
|
| 427 |
pred_v, pred_e = empty_solution()
|
| 428 |
+
pred_status = "predict_failed"
|
| 429 |
if torch.cuda.is_available():
|
| 430 |
torch.cuda.empty_cache()
|
| 431 |
|
| 432 |
+
n_pred_v = len(pred_v) if hasattr(pred_v, '__len__') else 0
|
| 433 |
+
n_pred_e = len(pred_e) if hasattr(pred_e, '__len__') else 0
|
| 434 |
+
print(
|
| 435 |
+
f"[DIAG] order_id={order_id} colmap={n_colmap_pts} fused={n_fused_pts} "
|
| 436 |
+
f"track_v={track_v_count} track_e={track_e_count} "
|
| 437 |
+
f"pred_v={n_pred_v} pred_e={n_pred_e} status={pred_status}"
|
| 438 |
+
)
|
| 439 |
+
|
| 440 |
solution.append({
|
| 441 |
"order_id": order_id,
|
| 442 |
"wf_vertices": pred_v.tolist() if isinstance(pred_v, np.ndarray) else pred_v,
|