benchmark: record support pruning ablation
Browse files- benchmark_pipeline.py +7 -0
benchmark_pipeline.py
CHANGED
|
@@ -19,6 +19,7 @@ from simam3d_core import (
|
|
| 19 |
classify_fusion_support,
|
| 20 |
default_intrinsics,
|
| 21 |
depth_to_camera_points,
|
|
|
|
| 22 |
fuse_point_views,
|
| 23 |
fusion_metrics,
|
| 24 |
reprojection_consistency,
|
|
@@ -87,6 +88,7 @@ def run_benchmark(
|
|
| 87 |
reprojection_consistency(points=results[0].points, depth=view[0], intrinsics=view[2], extrinsics=view[3])
|
| 88 |
for view in views
|
| 89 |
]
|
|
|
|
| 90 |
rows.append({
|
| 91 |
"size": int(size),
|
| 92 |
"view_count": int(view_count),
|
|
@@ -96,6 +98,11 @@ def run_benchmark(
|
|
| 96 |
"metrics": metrics,
|
| 97 |
"reprojection_consistency": reprojection,
|
| 98 |
"mean_reprojection_mae": float(np.mean([item["mean_absolute_error"] for item in reprojection])),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
})
|
| 100 |
geometry_rows = [_geometry_contract(size) for size in sizes]
|
| 101 |
report = {
|
|
|
|
| 19 |
classify_fusion_support,
|
| 20 |
default_intrinsics,
|
| 21 |
depth_to_camera_points,
|
| 22 |
+
filter_fusion_by_support,
|
| 23 |
fuse_point_views,
|
| 24 |
fusion_metrics,
|
| 25 |
reprojection_consistency,
|
|
|
|
| 88 |
reprojection_consistency(points=results[0].points, depth=view[0], intrinsics=view[2], extrinsics=view[3])
|
| 89 |
for view in views
|
| 90 |
]
|
| 91 |
+
supported = filter_fusion_by_support(results[0], 2)
|
| 92 |
rows.append({
|
| 93 |
"size": int(size),
|
| 94 |
"view_count": int(view_count),
|
|
|
|
| 98 |
"metrics": metrics,
|
| 99 |
"reprojection_consistency": reprojection,
|
| 100 |
"mean_reprojection_mae": float(np.mean([item["mean_absolute_error"] for item in reprojection])),
|
| 101 |
+
"support_pruning_min_views_2": {
|
| 102 |
+
"before_point_count": int(len(results[0].points)),
|
| 103 |
+
"after_point_count": int(len(supported.points)),
|
| 104 |
+
"retained_fraction": float(len(supported.points) / max(len(results[0].points), 1)),
|
| 105 |
+
},
|
| 106 |
})
|
| 107 |
geometry_rows = [_geometry_contract(size) for size in sizes]
|
| 108 |
report = {
|