Revert plane_wireframe ensemble: massive regression to 0.2412
Browse filesCommit 3a43227 added plane_wireframe.predict_wireframe_planes to the ensemble
and the leaderboard score collapsed from 0.4584 to 0.2412 (corner_f1 halved,
edge_iou halved, even hss_q95 dropped from 0.724 to 0.367 — meaning every
sample got worse, not just a subset). The uniform percentile-wise drop rules
out a crash on a subset; plane_wireframe was systematically polluting every
prediction. Most likely cause: its plane-intersection segments are produced
in the same world frame but in regions far from real geometry, then appended
as new vertices/edges by hybrid_merge(radius=0.8) on every sample.
Restoring script.py to the proven 0.4584 state (commit 56f1ec6 contents).
plane_wireframe.py is left in the tree but unused, consistent with the prior
state. Lesson: code that is fully implemented but never wired in by the
original developer should be treated as suspect.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
@@ -8,16 +8,14 @@ os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
|
|
| 8 |
import subprocess
|
| 9 |
import sys
|
| 10 |
|
| 11 |
-
def install_if_missing(package
|
| 12 |
try:
|
| 13 |
__import__(package.split("==")[0])
|
| 14 |
except ImportError:
|
| 15 |
-
subprocess.check_call([sys.executable, "-m", "pip", "install",
|
| 16 |
|
| 17 |
install_if_missing("scipy")
|
| 18 |
install_if_missing("pandas")
|
| 19 |
-
install_if_missing("open3d")
|
| 20 |
-
install_if_missing("skspatial", pip_name="scikit-spatial")
|
| 21 |
|
| 22 |
from pathlib import Path
|
| 23 |
from tqdm import tqdm
|
|
@@ -399,24 +397,10 @@ if __name__ == "__main__":
|
|
| 399 |
from triangulation import predict_wireframe_tracks
|
| 400 |
# Use min_views=3 for highly precise, conservative geometric tracks
|
| 401 |
track_v, track_e = predict_wireframe_tracks(sample, min_views=3)
|
| 402 |
-
|
| 403 |
pred_v, pred_e = hybrid_merge(pred_v, pred_e, track_v, track_e, merge_radius=0.8)
|
| 404 |
except Exception as track_e_err:
|
| 405 |
print(f" Track ensemble failed for {order_id}: {track_e_err}")
|
| 406 |
-
|
| 407 |
-
# Apply plane-intersection wireframe: RANSAC roof planes from the
|
| 408 |
-
# COLMAP cloud, intersect them to recover ridge/eave edges the
|
| 409 |
-
# learned model may miss. Recall-focused, geometry-only signal.
|
| 410 |
-
# hybrid_merge keeps it append-only at merge_radius=0.8.
|
| 411 |
-
try:
|
| 412 |
-
from plane_wireframe import predict_wireframe_planes
|
| 413 |
-
plane_v, plane_e = predict_wireframe_planes(sample)
|
| 414 |
-
if len(plane_v) > 0 and len(plane_e) > 0:
|
| 415 |
-
pred_v, pred_e = hybrid_merge(
|
| 416 |
-
pred_v, pred_e, plane_v, plane_e, merge_radius=0.8,
|
| 417 |
-
)
|
| 418 |
-
except Exception as plane_err:
|
| 419 |
-
print(f" Plane ensemble failed for {order_id}: {plane_err}")
|
| 420 |
|
| 421 |
except Exception as e:
|
| 422 |
import traceback
|
|
|
|
| 8 |
import subprocess
|
| 9 |
import sys
|
| 10 |
|
| 11 |
+
def install_if_missing(package):
|
| 12 |
try:
|
| 13 |
__import__(package.split("==")[0])
|
| 14 |
except ImportError:
|
| 15 |
+
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
|
| 16 |
|
| 17 |
install_if_missing("scipy")
|
| 18 |
install_if_missing("pandas")
|
|
|
|
|
|
|
| 19 |
|
| 20 |
from pathlib import Path
|
| 21 |
from tqdm import tqdm
|
|
|
|
| 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
|