Working artifact / CPU-only / reproducible
PHYSICAL PROCESS
DATA ENGINE
An end-to-end pipeline that turns raw video and synchronised sensor telemetry of a physical process into labelled, exportable training data — with a small agentic loop that writes and validates the pipeline, and compute accounting throughout. A working artifact, not a deck.
The run / measured
Every number on this page is read from the run's own output at load time. The clip is 30 s of synthetic-but-physical process data; the vision stage never sees the ground truth.
Accuracy is agreement with the simulator's ground truth; coherence and coverage are model-free. Throughput is wall-clock on an Apple M5 Pro, single CPU process.
The process / what is being watched
A motor-driven rotor with a wearing bearing. Three coupled physics — mechanics, tribology, thermal — so degradation shows up in several channels at once rather than in a single hand-waved health score. The drive has a real torque-speed curve, so rising friction genuinely costs speed and raises torque, current and heat.
The rendered input. The marker carries rotation; the assembly wobbles more as the bearing wears. Vision recovers both from pixels alone.
| channel | fresh | failed |
|---|---|---|
| rotation rate | 38.9 rad/s | 25.2 rad/s |
| bearing temperature | 22 °C | 72 °C |
| vibration RMS | 0.35 | 5.3 |
| motor torque / current | 0.81 N·m | 2.64 N·m |
| latent wear | 0.00 | 1.00 |
Simulator ground truth over one clip. The pipeline sees only the video and the telemetry CSV.
The pipeline / six stages
Each stage is a small single-purpose module returning a typed result, orchestrated by one pipeline and driven by a Typer CLI. The extraction thresholds it uses are the values the agent tunes.
Simulate
Forward-integrates the coupled physics and renders video, telemetry and ground truth. simulate.py
Vision
Per-frame rotation rate and vibration amplitude from the marker and disk jitter. No learned model. video.py
Fusion
Aligns video against telemetry and blends four normalised penalties into one health index. fusion.py
Labels
Windows the fused stream into training units and thresholds them into the three physical states. labeling.py
Agent
Proposes a validated JSON patch to the extraction config, re-runs, and keeps what improves the objective. agent.py
Export
Prometheus text, JSON/JSONL dataset, model-ready npz, HTML report, and an optional ONNX path. export_*.py
Health & labels / over the clip
Four signals, each min-max normalised so their shapes are comparable, with the labelled state band underneath. The health index is a weighted blend of speed loss, temperature rise, vibration rise and current rise — hand-weighted and documented, not learned.
Hover the chart for the value at any instant.
Confusion, ground truth × predicted
Agentic curation / the config it wrote
Each iteration runs the pipeline, validates the output, asks the backend for a JSON patch to the extraction config, and applies it only if the objective improves. An invalid patch is rejected by schema validation and recorded. Two backends share the identical contract: any OpenAI-compatible endpoint, or a deterministic offline proposer so the demo always runs.
| iter | objective | result | rationale | patch |
|---|---|---|---|---|
| Loading… | ||||
The loop took label accuracy from 0.895 to 0.982 by reading its own confusion matrix and lowering the thresholds that were letting end-of-life windows read as merely anomalous. It is not decoration.
Export contract / dual and swappable
A Prometheus-style text exposition for teams with a monitoring stack, and structured JSON for model serialisation — produced side by side from the same run. ONNX is explicitly conditional, never assumed.
metrics.prom
Prometheus text exposition. Also servable at /metrics.
ppe_frames_processed_total 900
ppe_video_fps 4138.061864
ppe_label_windows{class="nominal"} 18
ppe_label_windows{class="anomalous"} 17
ppe_label_windows{class="end_of_life"} 22
ppe_validation_accuracy 0.982456
ppe_validation_objective 0.989474
ppe_compute_gpu_backend{backend="none"} 1
ppe_agent_tokens_total{kind="input"} 1329
dataset.jsonl
One training record per labelled window: the label, its confidence, and the fused features.
{"id": 0, "t_start": 0.0, "t_end": 2.0,
"n_samples": 100, "label": "nominal",
"confidence": 1.0, "features": {
"omega_mean": 38.59, "temp_max": 27.31,
"vib_max": 0.686, "health_mean": 0.951}}
features.npz
Model-ready matrix and label vector, with feature names and window ids.
X (57, 13) float64 y (57,) int64 feature_names (13,) str window_ids (57,) int64
onnx_status.json
Optional path. The linear classifier always trains; only serialisation is conditional.
{"exported": false,
"reason": "onnx not installed"}
Compute accounting / data about the data
Reported per run, with the honesty rules baked into the code: a projected figure is never reported as a measurement, the GPU backend is detected rather than assumed, and token counts are marked estimated unless the API returned real usage.
| item | value |
|---|---|
| Loading… | |
Limits / what this is not
- The input is synthetic. The simulator is the default data source so the demo is reproducible and offline. The vision/fusion/label/export contract accepts a recorded video plus telemetry unchanged — but no claim is made about performance on real footage.
- Ground truth is simulated. Window accuracy is measured against the simulator's own latent wear: a fair benchmark for the pipeline, not for real-world generalisation.
- Vision is deliberately simple — colour thresholding and blob tracking. That is a choice (inspectable, cheap, CPU-only), not a limitation discovered late.
- The health index is hand-weighted, not learned.
- The clip is 30 seconds. Throughput and projected-GPU figures are extrapolations from it.
- The default agent backend is an offline rule proposer. The LLM path is implemented and shares the same contract, but is exercised only when an endpoint is configured.