kron-ppg-age
streaming age estimator from PPG signals
2 min readupdated
The kron-ppg-age model estimates a person's chronological age in real time using raw photoplethysmography (PPG) data (an optical pulse measurement method). The architecture is based on the causal KronLSTM encoder, which processes the signal in 0.2-second batches and carries memory across chunks. The model weighs just 24 MB in ONNX format with 5.85 million parameters and can run directly on smartphones or smartwatches. It will be useful for biometric application developers and pulse signal researchers.
Key features
- Compactness: the ONNX graph weighs 24 MB, and the total parameter count is 5.85M.
- Streaming: real-time PPG processing in 5-second chunks with state transfer.
- Accuracy: mean absolute error (MAE) on the test dataset is 6.38 years.
- Training: pre-training for 160k steps and an MLP head on a frozen encoder.
What you can do
- Mobile apps: running streaming age analysis on smartphones or watches.
- Biometric analysis: research of PPG data from a finger or wrist (with preliminary calibration).
- Tracker creation: developing real-time pulse wave monitoring systems.
Example
import json, numpy as np, onnxruntime as ort
meta = json.load(open("onnx/stream.json"))
sess = ort.InferenceSession("onnx/stream.onnx")
feeds = {i.name: np.zeros([1 if isinstance(d, str) else d for d in i.shape],
np.bool_ if i.type == "tensor(bool)" else np.float32)
for i in sess.get_inputs()}
def step(chunk):
feeds["samples"] = chunk[None].astype(np.float32)
feeds["valid"] = np.ones((1, 25), np.bool_)
out = dict(zip([o.name for o in sess.get_outputs()], sess.run(None, feeds)))
for k, v in out.items():
if k.endswith("_next"):
feeds[k[:-5]] = v
return float(out["age"][0])Read more
DetailsMetrics: Test MAE 6.38 years (r = 0.84), compared to 11.74 for age median.
Requirements: 24 MB ONNX graph, 25 Hz input (0.5–8 Hz filtering needed).
Limitations: estimates chronological age, not health; requires calibration on the wrist.










Comments