CoolFace
Modelpublic

Ambiq/compressionkit-ppg-8x-v1.0

sourceHugging Faceotherupdated 2mo agoView on Hugging Face
0likes70downloads
Model Card

compressionkit-ppg-8x-v1.0

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: 8x
  • 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.

MetricValue
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 autocorr0.2859

Time Domain

PRD here is faithfulness (vs the recorded input); see **Fidelity & Robustness** above for the clean-truth and noise-regime view.

MetricMeanMedianP90
PRD vs input — faithfulness (%)5.09792.72745.6243
RMSE0.03060.02650.0439
Cosine Similarity0.99170.99960.9998

Spectral

  • Band Total Relative Error (median): 0.0153

Bitrate

Encoder Precision Parity

Difference from FP32 reconstruction on a disjoint real-data holdout; lower is better.

EncoderP90 PRDWorst PRDStatus
FP160.41%1.82%recommended
INT16X81.38%3.33%recommended
INT83.72%7.03%recommended

Usage

Python (compressionkit runtime)

python
from compressionkit.runtime import RVQCodec

codec = RVQCodec.from_pretrained("Ambiq/compressionkit-ppg-8x-v1.0")

# Encode: float32 signal → RVQ indices
indices = codec.encode(signal)

# Decode: RVQ indices → reconstructed signal
recon = codec.decode(indices)

Local deployment directory

python
codec = RVQCodec("path/to/deploy/")

Files

FileDescription
encoder_int8.tfliteINT8 quantized encoder (on-device)
encoder_float32.tfliteFloat32 encoder for browser/server runtimes
encoder_fp16.tfliteFP16 encoder variant for supported edge runtimes
encoder_int16x8.tfliteINT16x8 encoder variant for supported edge runtimes
encoder.hC header for encoder
encoder.kerasFloat32 Python reference encoder (training/inspection use)
decoder_float32.tfliteFloat32 decoder (server-side evaluation)
decoder_int8.tfliteINT8 decoder (optional, on-device)
decoder.kerasFloat32 Python reference decoder (training/inspection use)
codebook.npzRVQ codebook tables
codebook.hC header for codebook
config.jsonDeployment manifest
sample_stimulus.npzSynthetic test data
demo_recordings.npz10 real, quality-gated browser-demo recordings
demo_recordings_manifest.jsonRecording provenance, license, and quality metadata
quality_scorecard.jsonFull evaluation metrics

Dataset & License

Training data provenance is not recorded in this package; sample data uses synthetic physiokit waveforms only — no patient data is redistributed. Demo recordings: BIDMC PPG and Respiration Dataset 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

bibtex
@software{compressionkit,
  author = {Ambiq AI},
  title = {compressionKIT: Signal Compression for Edge AI},
  url = {https://github.com/AmbiqAI/compressionkit}
}