Debug Viewer#
The debug viewer is a browser tool for root-cause analysis. It pairs a clip’s review MP4 with the Safety Core state, ground-truth positions, behavior- analytics events, and the Safety Core log — all synchronized on one 30 Hz timeline. Scrub the video and every panel jumps to the matching moment.
Use it when a graded score alone can’t explain a failure — see Interpreting the Report for the numbers, this page for the visual drill-down.
The debug page: the review video alongside scrub-synced Safety Core state, ground truth, behavior-analytics events, and detection / tracking panels — all on one timeline. A 3D run is shown; a 2D run keeps the four Phase-1 panels without the three perception panels.#
When to use it#
A clip is FAIL and you need to see what the cameras saw at the mismatch.
A clip has a long reaction lag and you want to watch the state change.
You want to confirm whether a mismatch was a perception problem (nothing detected) or a decision problem (detected but decided wrong).
Step 1: Generate an evidence bundle#
The viewer reads the per-clip evidence CSVs produced by clip_logs. Package a self-contained bundle (per-clip CSVs + manifest + Safety Core log slice + MP4):
docker exec srr python3 -m srr.clip_logs \
--runs-dir /app/runs/multi-test-<TIMESTAMP> --calib /app/calibration.json --zip
# -> runs/multi-test-<TIMESTAMP>.zip
You can either use this .zip (unzip it under the viewer’s data/) or point the viewer directly at a run directory.
Step 2: Launch the viewer#
The viewer ships in the repo at tools/srr-debug-viewer and has no build step or dependencies — just Python 3 and a browser.
# make the run visible to the viewer, then launch
ln -sfn <runs>/multi-test-<TIMESTAMP> \
<repo>/tools/srr-debug-viewer/data/multi-test-<TIMESTAMP>
bash <repo>/tools/srr-debug-viewer/view.sh # serves http://localhost:8765/
view.sh starts python3 -m http.server on port 8765 and opens the landing page. Stop it with Ctrl+C. To use a different port:
bash <repo>/tools/srr-debug-viewer/view.sh 9000
You can drop multiple runs into data/ — the landing page lists them all.
Caveats#
Video codec. VST records HEVC (H.265), which Firefox and most Chromium on Linux don’t decode. If the video shows a permanent spinner, transcode in place with
./transcode_to_h264.sh data/multi-test-<TIMESTAMP>.Single-user debug tool. No auth, no rate limits — it is a local debug tool, not a production dashboard.
Stale cache. After upgrading the viewer, hard-reload the browser (
Ctrl+Shift+R).
Spatial heatmaps (optional)#
For a spatial view of where perception failed, render heatmaps from the same clip_logs CSVs:
docker exec srr python3 /app/scripts/render_perception_heatmap.py \
--runs-dir /app/runs/multi-test-<TIMESTAMP> --calib /app/calibration.json \
--out /app/runs/multi-test-<TIMESTAMP>/perception_heatmaps --density --fov-mask
--density adds occupancy, and --fov-mask clips to the calibrated field of view — useful for confirming that a high forklift detect-fail% is deep-trailer occlusion rather than a detector regression.
Extending the viewer#
The viewer is vanilla JavaScript with no framework. To add columns, panels, pages, or themes, see the in-repo docs under tools/srr-debug-viewer/docs/ (architecture.md, data-schema.md, extending.md, troubleshooting.md). The data contract is srr.clip_logs.
Next steps#
Interpreting the Report — the metrics behind the panels.
Test Scenarios — the test cases you can run.
Quick Start Guide — produce a run to view.