Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- sleep-staging
|
| 5 |
+
- wav2sleep
|
| 6 |
+
- polysomnography
|
| 7 |
+
- time-series
|
| 8 |
+
- pytorch
|
| 9 |
+
library_name: wav2sleep
|
| 10 |
+
pipeline_tag: other
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# wav2sleep-eog
|
| 14 |
+
|
| 15 |
+
EOG-based sleep staging (5-class: Wake, N1, N2, N3, REM)
|
| 16 |
+
|
| 17 |
+
## Model Description
|
| 18 |
+
|
| 19 |
+
This is a **wav2sleep** model for automatic sleep stage classification from electrooculography (EOG).
|
| 20 |
+
wav2sleep is a unified multi-modal deep learning approach that can process various combinations
|
| 21 |
+
of physiological signals for sleep staging.
|
| 22 |
+
|
| 23 |
+
- **Paper**: [wav2sleep: A Unified Multi-Modal Approach to Sleep Stage Classification](https://arxiv.org/abs/2411.04644)
|
| 24 |
+
- **Repository**: [GitHub](https://github.com/joncarter1/wav2sleep)
|
| 25 |
+
- **Conference**: ML4H 2024
|
| 26 |
+
|
| 27 |
+
## Model Details
|
| 28 |
+
|
| 29 |
+
| Property | Value |
|
| 30 |
+
|----------|-------|
|
| 31 |
+
| **Input Signals** | EOG-L, EOG-R |
|
| 32 |
+
| **Output Classes** | 5 |
|
| 33 |
+
| **Architecture** | Non-causal (bidirectional) |
|
| 34 |
+
|
| 35 |
+
### Signal Specifications
|
| 36 |
+
|
| 37 |
+
| Signal | Samples per 30s epoch |
|
| 38 |
+
|--------|----------------------|
|
| 39 |
+
| ECG, PPG | 1,024 |
|
| 40 |
+
| ABD, THX | 256 |
|
| 41 |
+
| EOG-L, EOG-R | 4,096 |
|
| 42 |
+
|
| 43 |
+
## Usage
|
| 44 |
+
|
| 45 |
+
```python
|
| 46 |
+
from wav2sleep import load_model
|
| 47 |
+
|
| 48 |
+
# Load model from Hugging Face Hub
|
| 49 |
+
model = load_model("hf://joncarter/wav2sleep-eog")
|
| 50 |
+
|
| 51 |
+
# Or load from local checkpoint
|
| 52 |
+
model = load_model("/path/to/checkpoint")
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
For inference on new data:
|
| 56 |
+
|
| 57 |
+
```python
|
| 58 |
+
from wav2sleep import load_model, predict_on_folder
|
| 59 |
+
|
| 60 |
+
model = load_model("hf://joncarter/wav2sleep-eog")
|
| 61 |
+
predict_on_folder(
|
| 62 |
+
input_folder="/path/to/edf_files",
|
| 63 |
+
output_folder="/path/to/predictions",
|
| 64 |
+
model=model,
|
| 65 |
+
)
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
## Training Data
|
| 69 |
+
|
| 70 |
+
The model was trained on polysomnography data from multiple publicly available datasets
|
| 71 |
+
managed by the National Sleep Research Resource (NSRR), including SHHS and MESA.
|
| 72 |
+
|
| 73 |
+
## Citation
|
| 74 |
+
|
| 75 |
+
```bibtex
|
| 76 |
+
@misc{carter2024wav2sleep,
|
| 77 |
+
title={wav2sleep: A Unified Multi-Modal Approach to Sleep Stage Classification from Physiological Signals},
|
| 78 |
+
author={Jonathan F. Carter and Lionel Tarassenko},
|
| 79 |
+
year={2024},
|
| 80 |
+
eprint={2411.04644},
|
| 81 |
+
archivePrefix={arXiv},
|
| 82 |
+
primaryClass={cs.LG},
|
| 83 |
+
}
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## License
|
| 87 |
+
|
| 88 |
+
MIT
|