Real-Time Vehicle Telemetry Anomaly Detection

Scores vehicle telemetry with scikit-learn / XGBoost models served by FastAPI: a point model that sees one event, and a window model that also uses each vehicle's own history. Serving uses ONNX Runtime when enabled.

Connecting to the API…

Models

Loaded once at startup. Metrics come from the held-out test vehicles, which the models never saw during training or threshold tuning.

Loading…

Score one event

Pick a scenario or edit the readings, then send them to POST /predict (point model: this event only, no history).

Anomaly score (0–1); the white marker is the decision threshold.

Live stream: point model vs window model

A synthetic 4-vehicle fleet streams in time order. Every micro-batch is scored twice: by the point model (POST /predict-batch, one event at a time) and by the window model (POST /predict-stream, per-vehicle history features; the browser sends back the state returned by the previous call). Predictions are compared with the generator's hidden ground truth; labels are never sent to the models. Gradual faults (gradual_overheating, battery_degradation) drift away from a vehicle's own baseline and are the cases where history matters. They begin once each vehicle has about 5 simulated minutes of history (roughly stream position 1,200, about 30 seconds at the default batch size).

How to read “false alarms”: a gradual fault is labelled anomalous only once it has drifted ≥ 4 °C or ≥ 0.5 V, so alarms raised while a drift is still building count as false here. Measured offline on 5 full demo streams (20,000 events): 70% of the window model's false alarms came within 150 events before a labelled drift (early warnings), and 26% fell in each vehicle's first 200 events, while its baseline is still forming.

Scores per event (last 300): ━ window model · ━ point model. Dots mark ground-truth anomalies: ● caught by both · ● window only · ● point only · ● missed by both.
Time (UTC)VehicleSpeedRPMTemp °CBattery VAccelPoint scoreWindow scorePointWindowGround truth
Press “Start stream”.

Inference optimization benchmark

Loading…

Streaming pipeline run

Loading…

Evaluation figures