Calibration & Ground Truth Alignment
Relevant source files
The following files were used as context for generating this wiki page:
Calibration and Ground Truth Alignment establish the reference baselines and supervised datasets required for camera-free RF perception. Calibration isolates human perturbations from environmental background noise. Ground Truth Alignment synchronizes Channel State Information (CSI) with vision-based landmarks to enable high-accuracy model training.
Sources: plans/phase1-specification/functional-spec.md, plugins/ruview/agents/ruview-training-engineer.md
Environmental Calibration
Environmental calibration establishes baseline measurements for background subtraction. The system records the radio frequency (RF) patterns of an empty environment to identify static components.
Calibration Process
The calibration workflow follows a specific sequence to ensure signal integrity:
- Baseline Capture: You record a 60-second baseline with no human presence in the sensing area.
- Statistical Modeling: The system establishes models for background variation.
- Adaptive Calibration: The system monitors for signal drift or environmental changes and updates baselines automatically.
- Drift Compensation: The system corrects systematic signal drift over time.
Sources: plans/phase1-specification/functional-spec.md:52-70, harness/ruview/src/tools.js:192-205
Calibration Tools
The ruview_calibrate tool manages the room pipeline through the wifi-densepose CLI. It executes the ADR-151 room pipeline using the following steps:
| Step | Purpose |
|---|---|
baseline | Captures initial empty-room RF state. |
enroll | Registers specific subjects or known static objects. |
train-room | Optimizes the model for the specific room geometry. |
room-watch | Activates live monitoring using the calibrated baseline. |
Sources: harness/ruview/src/tools.js:190-210
Ground Truth Alignment
Ground Truth Alignment pairs raw CSI data with vision-based landmarks (MediaPipe) for camera-supervised training. This process is essential for achieving high Percentage of Correct Keypoints (PCK) metrics.
Alignment Logic
The alignment system synchronizes two disparate data streams:
- RF Modality: CSI frames captured from ESP32 nodes at 10-30 Hz.
- Vision Modality: 17 COCO keypoints or dense body part masks captured via MediaPipe.
The align-ground-truth.js script processes these streams to produce a paired dataset in data/paired/. This pairing allows the wifi-densepose-train crate to supervised the translation of 1D CSI signals into 2D spatial representations.
Sources: plugins/ruview/agents/ruview-training-engineer.md:12-16, plans/phase1-specification/functional-spec.md:85-115
Data Flow for Supervised Training
The following diagram illustrates the flow from raw data collection to a paired dataset:
The alignment process ensures that every RF frame corresponds to a specific human pose landmark, allowing the network to learn the RF signature of specific body configurations.
Sources: plans/phase1-specification/functional-spec.md:85-115, plugins/ruview/agents/ruview-training-engineer.md:12-16
Integration and Validation
Calibration and alignment quality directly impact system performance. Camera-supervised training using aligned ground truth reaches 92.9% PCK@20, compared to lower accuracy for camera-free pre-training.
Validation Requirements
After performing calibration or generating new aligned datasets, you must validate the pipeline:
- Run Rust workspace tests to ensure processing consistency (
cargo test --workspace). - Execute the deterministic Python proof (
verify.py) to confirm no behavioral drift in signal sanitization. - Generate a witness bundle (ADR-028) to attest to the calibration and training evidence.
Sources: plugins/ruview/agents/ruview-training-engineer.md:33-40, plans/phase1-specification/functional-spec.md:370-385
Summary
Calibration and alignment provide the foundation for RuView's sensing accuracy. By establishing a statistical baseline for rooms and synchronizing RF data with precise vision landmarks, the system enables high-fidelity human pose estimation without requiring active cameras during production use.