Feature Extraction
Transformers
Safetensors
cardiostate_jepa
cardiac
ecg
ppg
pcg
foundation-model
jepa
custom_code
Instructions to use hamzashafiq/CardioState-Jepa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hamzashafiq/CardioState-Jepa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="hamzashafiq/CardioState-Jepa", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hamzashafiq/CardioState-Jepa", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| license: cc-by-nc-4.0 | |
| tags: | |
| - cardiac | |
| - ecg | |
| - ppg | |
| - pcg | |
| - foundation-model | |
| - jepa | |
| library_name: transformers | |
| pipeline_tag: feature-extraction | |
| # CardioState-JEPA (shared cardiac encoder) | |
| A single **shared encoder** for ECG, PPG, and PCG, trained with a delay-aware cross-modal | |
| joint-embedding predictive architecture. This repo hosts the frozen encoder used for the | |
| downstream results; it maps a waveform to a pooled **cardiac code**. | |
| ## Usage | |
| ```python | |
| from transformers import AutoModel | |
| import torch | |
| model = AutoModel.from_pretrained("<user>/CardioState-Jepa", trust_remote_code=True).eval() | |
| ppg = torch.randn(2, 1, 1250) # [batch, 1 ch, 10 s @ 125 Hz] | |
| with torch.no_grad(): | |
| out = model(ppg, modality="ppg", fs=125.0) | |
| print(out.pooler_output.shape) # (2, 768) cardiac code | |
| ``` | |
| `modality` is one of `"ecg"` (12 leads @ 500 Hz), `"ppg"` (1 ch @ 125 Hz), or | |
| `"pcg"` (1 ch @ 4000 Hz); pass the matching `fs`. | |
| # Paper | |
| **CardioState-JEPA: Delay-Aware Cross-Modal Learning of a Shared Cardiac Representation** | |
| Hamza Shafiq, Hung Manh Pham, Bin Zhu, Pan Zhou, Jun Hu, and Aaqib Saeed. | |
| arXiv:2608.12944, 2026. | |
| - Paper: https://arxiv.org/abs/2608.12944 | |
| - Hugging Face Papers: https://huggingface.co/papers/2608.12944 | |
| --- | |
| # Citation | |
| If you use CardioState-JEPA in your research, please cite: | |
| ```bibtex | |
| @misc{shafiq2026cardiostatejepa, | |
| title = {CardioState-JEPA: Delay-Aware Cross-Modal Learning of a Shared Cardiac Representation}, | |
| author = {Shafiq, Hamza and Pham, Hung Manh and Zhu, Bin and Zhou, Pan and Hu, Jun and Saeed, Aaqib}, | |
| year = {2026}, | |
| eprint = {2608.12944}, | |
| archivePrefix = {arXiv}, | |
| primaryClass = {cs.LG} | |
| } | |
| ``` | |