compressionkit-ppg-8x
A PPG signal compression codec using Residual Vector Quantization (RVQ), optimized for edge and wearable devices.
Model Details
- Modality: PPG
- Sample Rate: 64 Hz
- Compression Ratio: 8.0x
- Quantization: INT8
- RVQ Levels: 4
- Codebook Size: 256 entries ร 16D
- Encoder Input:
[None, 1, 320, 1] - Encoder Output:
[None, 1, 40, 16]
Quality Metrics
Fidelity & Robustness
Both fidelity yardsticks are reported so the codec is judged fairly: faithfulness is PRD vs the recorded (still-noisy) input, while truth fidelity is PRD vs clean ground truth. Lower is better.
| Metric | Value |
|---|---|
| Truth PRD vs clean (%) | 2.66 |
| Truth PRD at native noise (%) | 34.43 |
| Faithful PRD vs input (%) | 5.10 |
| PRD degradation slope (PRD%/dB) | 4.39 |
| PRD at 0 dB SNR (%) | 75.99 |
| PRD at -6 dB SNR (%) | 104.80 |
| Pure-noise imprint autocorr | 0.2859 |
Time Domain
PRD here is faithfulness (vs the recorded input); see Fidelity & Robustness above for the clean-truth and noise-regime view.
| Metric | Mean | Median | P90 |
|---|---|---|---|
| PRD vs input โ faithfulness (%) | 5.0979 | 2.7274 | 5.6243 |
| RMSE | 0.0306 | 0.0265 | 0.0439 |
| Cosine Similarity | 0.9917 | 0.9996 | 0.9998 |
Spectral
- Band Total Relative Error (median): 0.0153
Bitrate
Usage
Python (compressionkit runtime)
from compressionkit.runtime import RVQCodec
codec = RVQCodec.from_pretrained("Ambiq/compressionkit-ppg-8x")
# Encode: float32 signal โ RVQ indices
indices = codec.encode(signal)
# Decode: RVQ indices โ reconstructed signal
recon = codec.decode(indices)
Local deployment directory
codec = RVQCodec("path/to/deploy/")
Files
| File | Description |
|---|---|
encoder_int8.tflite |
INT8 quantized encoder (on-device) |
encoder.h |
C header for encoder |
decoder_float32.tflite |
Float32 decoder (server-side evaluation) |
decoder_int8.tflite |
INT8 decoder (optional, on-device) |
codebook.npz |
RVQ codebook tables |
codebook.h |
C header for codebook |
config.json |
Deployment manifest |
sample_stimulus.npz |
Synthetic test data |
quality_scorecard.json |
Full evaluation metrics |
Dataset & License
Training data: BIDMC + BUT PPG + PPG-DaLiA + WESAD (all open, no restricted-access dependency). Sample data uses synthetic physiokit waveforms only โ no patient data is redistributed.
Model weights are released under the Ambiq Model Weights License โ deployment is restricted to Ambiq silicon devices. See LICENSE-MODEL-WEIGHTS.md for full terms.
Citation
@software{compressionkit,
author = {Ambiq AI},
title = {compressionKIT: Signal Compression for Edge AI},
url = {https://github.com/AmbiqAI/compressionkit}
}
- Downloads last month
- 48