forge-fog / README.md
Liornis's picture
Upload README.md with huggingface_hub
0316f5c verified
|
Raw
History Blame Contribute Delete
3.61 kB
---
license: mit
tags: [freezing-of-gait, parkinsons, accelerometer, self-supervised, mae, time-series, time-series-classification]
pipeline_tag: other
---
# FORGE — FOG Representation via Generative Encoding
Self-supervised spectral-temporal encoders for **Freezing of Gait (FOG)** detection from a
single lower-back accelerometer. Pretrained by masked autoencoding on ~21M unlabeled home
windows; evaluated zero-shot on the external FogAtHome cohort.
**Headline:** the MC probe reaches clinical-grade agreement with expert video annotation —
**ICC(%TF) = 0.909 [0.87, 0.94]**, zero-shot, one IMU.
## Released weights
### Pretrained FORGE encoders (the backbones)
| Context | Window (frames) | File | Params |
|---|---|---|---|
| LC | 1000 | `encoders/lc.ckpt` | 14,147,072 |
| MC | 500 | `encoders/mc.ckpt` | 14,147,072 |
| SC | 200 | `encoders/sc.ckpt` | 12,918,272 |
### Downstream classification checkpoints (128-patient DeFOG, 3-fold CV)
| File | Context | Phase | Fold |
|---|---|---|---|
| `classification/lc_probe_fold0.ckpt` | lc | probe | 0 |
| `classification/lc_probe_fold1.ckpt` | lc | probe | 1 |
| `classification/lc_probe_fold2.ckpt` | lc | probe | 2 |
| `classification/mc_probe_fold0.ckpt` | mc | probe | 0 |
| `classification/mc_probe_fold1.ckpt` | mc | probe | 1 |
| `classification/mc_probe_fold2.ckpt` | mc | probe | 2 |
| `classification/sc_probe_fold0.ckpt` | sc | probe | 0 |
| `classification/sc_probe_fold1.ckpt` | sc | probe | 1 |
| `classification/sc_probe_fold2.ckpt` | sc | probe | 2 |
| `classification/lc_finetune_fold0.ckpt` | lc | finetune | 0 |
| `classification/lc_finetune_fold1.ckpt` | lc | finetune | 1 |
| `classification/lc_finetune_fold2.ckpt` | lc | finetune | 2 |
| `classification/mc_finetune_fold0.ckpt` | mc | finetune | 0 |
| `classification/mc_finetune_fold1.ckpt` | mc | finetune | 1 |
| `classification/mc_finetune_fold2.ckpt` | mc | finetune | 2 |
| `classification/sc_finetune_fold0.ckpt` | sc | finetune | 0 |
| `classification/sc_finetune_fold1.ckpt` | sc | finetune | 1 |
| `classification/sc_finetune_fold2.ckpt` | sc | finetune | 2 |
| `classification/lc_supervised_fold0.ckpt` | lc | supervised | 0 |
| `classification/lc_supervised_fold1.ckpt` | lc | supervised | 1 |
| `classification/lc_supervised_fold2.ckpt` | lc | supervised | 2 |
| `classification/mc_supervised_fold0.ckpt` | mc | supervised | 0 |
| `classification/mc_supervised_fold1.ckpt` | mc | supervised | 1 |
| `classification/mc_supervised_fold2.ckpt` | mc | supervised | 2 |
| `classification/sc_supervised_fold0.ckpt` | sc | supervised | 0 |
| `classification/sc_supervised_fold1.ckpt` | sc | supervised | 1 |
| `classification/sc_supervised_fold2.ckpt` | sc | supervised | 2 |
## Usage
Checkpoints are slimmed PyTorch Lightning checkpoints (weights + config; optimizer state
stripped). Each keeps the `state_dict` and the `hyper_parameters["config"]` Pydantic config
used to rebuild the model — the same fields the evaluation pipeline reads.
```python
import torch
ckpt = torch.load("encoders/mc.ckpt", map_location="cpu", weights_only=False)
state_dict = ckpt["state_dict"] # encoder weights
config = ckpt["hyper_parameters"]["config"] # Config object to rebuild the model
meta = ckpt.get("forge_meta") # name / context / phase / fold
```
Reproduce every paper number with the companion repo's `reproduce-evaluations` skill (see
`manifest.yaml`, shipped in this repo).
Code: [github.com/Lior-Nis/forge](https://github.com/Lior-Nis/forge).
Data: [Liornis/fog-dataset](https://huggingface.co/datasets/Liornis/fog-dataset).
License: **MIT**.