|
Download README.md from heartwise/DeepECG-SSL_Ancestry: direct link, hf CLI and curl.
- Browser
- Download file 2.8 kB
-
https://huggingface.co/heartwise/DeepECG-SSL_Ancestry/resolve/main/README.md
- Command line
-
hf download hf://heartwise/DeepECG-SSL_Ancestry/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/heartwise/DeepECG-SSL_Ancestry/resolve/main/README.md
2.8 kB
| tags: | |
| - ecg | |
| - electrocardiogram | |
| - genetics | |
| - ancestry | |
| # The licence is a data-access question, not a code question: the fold heads are derived from | |
| # participant recordings held under separate agreements. Set this before the repository is made | |
| # public, or make the repository private and decide later. | |
| license: other | |
| license_name: to-be-determined | |
| extra_gated_prompt: >- | |
| These weights are derived from participant ECG recordings held under data-access agreements. | |
| Access is granted per project. State your institution and the approved use. | |
| # DeepECG-SSL ancestry -- five-fold ensemble | |
| Predicts **P(non-European genetic ancestry)** from a 12-lead ECG. One logit through a sigmoid: | |
| `p(European) = 1 - score`. Five disjoint cross-validation folds, averaged. | |
| Work in progress and unpublished. Quantitative performance, validation results and the cohorts | |
| involved are deliberately not described here; they are reported in the accompanying manuscript | |
| once it is published. Request access if you need to evaluate the model before then. | |
| ## Layout | |
| ``` | |
| raw/fold_{1..5}/bs_128/checkpoint_best.pt the five fine-tuned heads | |
| reference/ frozen tables the pipeline compares against | |
| MODEL_PROVENANCE.txt md5 of every checkpoint, and what produced it | |
| CHECKSUMS.txt md5 + sha256 of every file here | |
| ``` | |
| The backbone is **not** in this repository. It is `base_ssl.pt` in the public, pinned | |
| `heartwise/wcr_77_classes` snapshot -- verified byte-identical (sha256 | |
| `39985e904bfcc4e3fa58f3e631d84598c7228bfa821a3279109dc2e05f54383c`) to the backbone these folds | |
| were fine-tuned from. Repinning that repository means re-checking that hash: a different | |
| backbone does not fail, it silently changes every score. | |
| ## Use | |
| ```bash | |
| pip install -r requirements.ancestry.txt # DeepECG_Docker, branch DeepECG-Ancestry | |
| export MODELS_ROOT=/path/to/this/snapshot | |
| export REFERENCE_DIR=/path/to/this/snapshot/reference | |
| export SSL_CKPT=/path/to/base_ssl.pt # or let the manifest fetch it | |
| python -m ancestry weights # confirms what resolved from where | |
| ``` | |
| Input is 12-lead, 2500 samples at 250 Hz, **millivolts**, lead-major. The loader refuses | |
| microvolts and raw ADC counts, because wrong units do not raise -- they give meaningless scores. | |
| ## Limits | |
| - The label is binary European / non-European from genome-inferred ancestry. It is not | |
| self-declared race and must not be used as one. | |
| - Calibration depends on cohort prevalence. Recalibrate before any thresholded use. | |
| - Accuracy is not uniform across non-European groups. | |
| - Site effects can dominate in cohorts recorded on different hardware. | |
| - **Not a clinical device.** No outcome, diagnosis or treatment decision should rest on it. | |