deepmreye 2.0.0
Browse files- README.md +94 -0
- basis.npz +3 -0
- decoder.npz +3 -0
- evaluation.json +0 -0
README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: lgpl-3.0
|
| 3 |
+
library_name: deepmreye
|
| 4 |
+
tags:
|
| 5 |
+
- fmri
|
| 6 |
+
- neuroimaging
|
| 7 |
+
- eye-tracking
|
| 8 |
+
- gaze
|
| 9 |
+
datasets:
|
| 10 |
+
- DeepMReye/eyeballs
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# DeepMReye 2.0
|
| 14 |
+
|
| 15 |
+
Decode eye gaze from fMRI without an eye tracker. The model reads gaze from
|
| 16 |
+
the eyeballs in a BOLD run: a frozen linear basis fitted on **2,060
|
| 17 |
+
unlabelled participants from 652 OpenNeuro datasets** by canonical
|
| 18 |
+
correlation between the left and right orbit, and a ridge readout fitted on
|
| 19 |
+
**337 gaze-labelled participants from 9 datasets**.
|
| 20 |
+
|
| 21 |
+
```bash
|
| 22 |
+
pip install git+https://github.com/DeepMReye/DeepMReye.git@deepmreye-unsupervised
|
| 23 |
+
deepmreye decode sub-01_task-movie_bold.nii.gz -o gaze/
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
```python
|
| 27 |
+
import deepmreye
|
| 28 |
+
result = deepmreye.decode("sub-01_task-movie_bold.nii.gz")
|
| 29 |
+
result["gaze"] # [T, 10, 2]: ten gaze samples per volume, x then y
|
| 30 |
+
result["confidence"] # agreement of the two eyes' decodings
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
## Files
|
| 34 |
+
|
| 35 |
+
| file | what |
|
| 36 |
+
|---|---|
|
| 37 |
+
| `decoder.npz` | the decoder (basis at 32 pairs, +-1 TR of context, ridge readout); `Decoder.pretrained()` |
|
| 38 |
+
| `basis.npz` | the basis at 256 pairs, for training your own readout and for evaluation |
|
| 39 |
+
| `evaluation.json` | every number of the evaluation below |
|
| 40 |
+
|
| 41 |
+
## Output
|
| 42 |
+
|
| 43 |
+
Ten gaze samples per volume (sample j covers [(t + j/10) TR, (t + (j+1)/10) TR)),
|
| 44 |
+
x then y, x to the right and y **downwards** (screen coordinates). Units are the
|
| 45 |
+
training datasets' standard deviations: gaze was z-scored per dataset before the
|
| 46 |
+
readout was fitted, because screen size and viewing distance differ between
|
| 47 |
+
studies. For degrees, calibrate on a few participants with an eye tracker
|
| 48 |
+
(`deepmreye calibrate`), which fits one gain and offset per axis.
|
| 49 |
+
|
| 50 |
+
## Evaluation
|
| 51 |
+
|
| 52 |
+
Leave-one-dataset-out: the readout is refitted on eight labelled datasets and
|
| 53 |
+
scored on every participant of the ninth. Pearson r between decoded and measured
|
| 54 |
+
gaze per participant (mean of x and y), median over a dataset's participants,
|
| 55 |
+
then over datasets.
|
| 56 |
+
|
| 57 |
+
| | median over datasets | mean over datasets |
|
| 58 |
+
|---|---|---|
|
| 59 |
+
| sub-TR (10 samples per volume) | 0.771 | 0.721 |
|
| 60 |
+
| per TR | 0.835 | 0.777 |
|
| 61 |
+
|
| 62 |
+
Per dataset (sub-TR / per TR):
|
| 63 |
+
|
| 64 |
+
| dataset | n | sub-TR | per TR |
|
| 65 |
+
|---|---|---|---|
|
| 66 |
+
| `dsL01_guided_fixations` | 170 | 0.771 | 0.787 |
|
| 67 |
+
| `dsL02_pursuit` | 9 | 0.920 | 0.930 |
|
| 68 |
+
| `dsL03_pursuit` | 24 | 0.776 | 0.810 |
|
| 69 |
+
| `dsL04_pursuit` | 34 | 0.851 | 0.863 |
|
| 70 |
+
| `dsL05_free_viewing` | 27 | 0.803 | 0.839 |
|
| 71 |
+
| `dsL06_sequences` | 6 | 0.667 | 0.731 |
|
| 72 |
+
| `dsL07_deepmreye_calib` | 15 | 0.743 | 0.835 |
|
| 73 |
+
| `dsL08_studyforrest_movie` | 14 | 0.285 | 0.351 |
|
| 74 |
+
| `dsL11_backtothefuture` | 37 | 0.672 | 0.845 |
|
| 75 |
+
|
| 76 |
+
The labelled datasets are the `dsL*` folders of
|
| 77 |
+
[DeepMReye/eyeballs](https://huggingface.co/datasets/DeepMReye/eyeballs). No
|
| 78 |
+
participant of them, nor any run of the OpenNeuro accessions three of them were
|
| 79 |
+
taken from, is in the basis's corpus.
|
| 80 |
+
|
| 81 |
+
## Confidence
|
| 82 |
+
|
| 83 |
+
The readout is linear, so applying it to each orbit alone gives two decodings
|
| 84 |
+
whose average is the real one. Their agreement ranks a dataset's participants by
|
| 85 |
+
how well they decode, without labels (`Decoder.confidence`). It does not compare
|
| 86 |
+
datasets, and does not flag single volumes.
|
| 87 |
+
|
| 88 |
+
## Limits
|
| 89 |
+
|
| 90 |
+
- The eyes must be inside the field of view and the registration must hold:
|
| 91 |
+
check the QA image (`deepmreye decode --qa`).
|
| 92 |
+
- Gaze is decoded relative to each participant's own gaze distribution; absolute
|
| 93 |
+
position needs calibration.
|
| 94 |
+
- Built 2026-10-14 from deepmreye 2.0.0.
|
basis.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f8b705483ac0f46b29c579c7f0f2d050f88cbac42b90636facbd812025748613
|
| 3 |
+
size 13641449
|
decoder.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87afc0cfce5c03dfef4cc82a3e988ded8f2b408e9e1299cfa27b2894a21300da
|
| 3 |
+
size 1787708
|
evaluation.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|