跳转至

HOI-align review HTML standard

All future HOI-align video review pages must use scripts/experiments/hoi_align_review_report.py. Experiment-specific scripts compute metrics from the final HOI-align result.pt, attach a relative MP4 path, write JSON/CSV, and then call write_hoi_review_html(...). Do not copy the HTML, CSS, thresholds, or field-order logic into experiment scripts.

Required per-case row schema

  • case_id
  • video_src, relative to the HTML directory
  • contact_mean_cm
  • iou_mean
  • penetration_max_depth_cm
  • articulation_motion_error
  • articulation_motion_unit, currently required to be degree
  • object_orientation_error_deg
  • object_location_error_cm
  • object_dimension_error_cm

Missing fields, duplicate cases, non-degree articulation, missing videos, or a stored aggregate inconsistent with the rows must raise an error.

Fixed presentation

  • Top: one light-background aggregate table with all seven metrics.
  • Per case, row 1: Contact mean, IoU mean, Penetration.
  • Per case, row 2: Articulation, Rotation, Translation, Dimension.
  • Only final HOI-align metrics are shown; no V41R baseline or delta is embedded.
  • Articulation color thresholds: <5 deg green, 5-10 deg yellow, >10 deg red.
  • If penetration is not valid for the evaluated mesh representation, call the renderer with penetration_valid=False, provide a precise note, and display N/A instead of a misleading numeric zero.

Invocation from an experiment script

from hoi_align_review_report import aggregate_hoi_review_rows, write_hoi_review_html

aggregate = aggregate_hoi_review_rows(rows)
write_hoi_review_html(
    path=html_output,
    metrics_path=metrics_path,
    title=title,
    summary_key="full20",
    cache_tag=cache_tag,
    penetration_valid=penetration_valid,
    penetration_note=penetration_note,
)

The current default integration is scripts/experiments/evaluate_d3dhoi_hoi_results.py; it evaluates every final result.pt, writes JSON/CSV, renders HOI MP4s, and invokes the standard renderer.

Run review generation and tests with the shared arthoi4d environment:

/DATA/intern/hoi4d/miniconda3/envs/arthoi4d/bin/python -m pytest -q \
  tests/reconstruction/optimization/test_hoi_align_review_report.py

Do not use a separate test-only Python environment for this workflow.