Ambiq/compressionkit-ecg-32x-v1.0
compressionkit-ecg-32x-v1.0
A ECG signal compression codec using Residual Vector Quantization (RVQ), optimized for edge and wearable devices.
Model Details
- Modality: ECG
- Sample Rate: 256 Hz
- Compression Ratio: 32x
- Quantization: INT8
- RVQ Levels: 2
- Codebook Size: 256 entries × 16D
- Encoder Input:
[None, 1, 512, 1] - Encoder Output:
[None, 1, 32, 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.
Time Domain
PRD here is faithfulness (vs the recorded input); see **Fidelity & Robustness** above for the clean-truth and noise-regime view.
Spectral
- Band Total Relative Error (median): 0.1852
Bitrate
- Codec CR (uniform): 32.0x
- Codec CR (learned prior): 59.87x
Encoder Precision Parity
Difference from FP32 reconstruction on a disjoint real-data holdout; lower is better.
Usage
Python (compressionkit runtime)
from compressionkit.runtime import RVQCodec
codec = RVQCodec.from_pretrained("Ambiq/compressionkit-ecg-32x-v1.0")
# 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
Dataset & License
Training data: PTB-XL (CC BY 4.0). Sample data may include excerpts under the original license terms. Demo recordings: MIT-BIH Arrhythmia Database v1.0.0 (source); real, quality-gated excerpts are released under ODC-By-1.0. https://opendatacommons.org/licenses/by/1-0/
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}
}