1 rri_metrics
rri_metrics
Oracle RRI metrics, ordinal labels, and VIN logging utilities.
RRI is computed from point-mesh error before and after adding a candidate view. The directional components are accuracy (point to mesh) and completeness (mesh to point); their scalarized sum is used by the current oracle implementation. For target-aware labels, callers crop points and mesh to the matched target and must mark empty or ambiguous crops invalid rather than assigning low RRI.
CORAL utilities convert continuous RRI-derived supervision into ordered bins for VIN-style one-step scoring. Ordinal predictions are ranking/calibration signals, not geometry metrics by themselves.
1.1 Classes
| Name | Description |
|---|---|
| CoralLayer | CORAL output layer with shared weights and per-threshold biases. |
| RootEvalPointCloud | Root oracle evaluation point cloud plus lineage metadata. |
| RriEvaluationPointCloudSource | Source used for the current/root point cloud in oracle RRI labels. |
| RriRewardMode | Reward used to rank rollout candidates from oracle distance diagnostics. |
| LabelHistogram | Accumulate label counts for ordinal classes. |
| Loss | Loss suffixes composed with Stage as {stage}/{loss}. |
| Metric | Metric suffixes composed with Stage as {stage}/{metric}. |
| RriErrorStats | Accumulate bias/variance statistics for RRI regression errors. |
| VinMetrics | Container for VIN metrics computed from candidate rankings. |
| VinMetricsConfig | Configuration for VIN torchmetrics bundles. |
| TargetRolloutMetricSummary | Selected-trajectory target-RRI and endpoint metric summary. |
| RriOrdinalBinner | RRI → ordinal label mapping (CORAL-compatible). |
| DistanceAggregation | Supported reduction modes for distance tensors. |
| DistanceBreakdown | Directional distance components used to form Chamfer-style metrics. |
| RriResult | Batch of per-candidate RRI outcomes and distance diagnostics. |
1.2 Functions
| Name | Description |
|---|---|
| coral_expected_from_logits | Compute expected ordinal value from CORAL logits. |
| coral_logits_to_prob | Convert CORAL logits to a proper class distribution. |
| coral_loss | Compute CORAL loss (sum of binary cross-entropies over thresholds). |
| coral_random_loss | Expected CORAL loss for a random classifier. |
| build_root_eval_pointcloud | Build the root oracle evaluation point cloud for a rollout snippet. |
| canonical_fuse_points | Return finite points after deterministic voxel fusion and point capping. |
| observed_prefix_frame_indices | Return camera/depth frames observed at or before the rollout root time. |
| loss_key | Compose a logging key using the stage prefix. |
| metric_key | Compose a logging key using the stage prefix. |
| topk_accuracy_from_probs | Compute top-k accuracy from class probabilities. |
| chamfer_point_mesh | Compute accuracy, completeness, and bidirectional Chamfer for P<->M. |
| chamfer_point_mesh_batched | Chamfer-like point↔︎mesh distance per example (fully vectorised). |
| endpoint_log_gain | Compute endpoint log target-error gain. |
| endpoint_target_gain | Compute endpoint target-error gain J_e^(H). |
| finite_horizon_target_return | Compute additive selected target-RRI return G_t^(H). |
| selected_target_reward | Return the selected-step reward used for rollout/Q_H return. |
| selected_target_rri | Return the selected-step target RRI from one metric mapping. |
| summarize_target_rollout_metrics | Compute G_t^(H), endpoint gain, and log-gain for one trajectory. |
| target_point_mesh_error_after | Return selected-step target point-mesh error after adding the view. |
| target_point_mesh_error_before | Return selected-step target point-mesh error before adding the view. |
| ordinal_labels_to_levels | Convert ordinal labels to CORAL level targets. |