File size: 2,468 Bytes
bbc68ce
 
 
 
 
7c5e605
 
bbc68ce
 
 
 
 
 
 
7c5e605
 
 
 
 
 
bbc68ce
7c5e605
 
bbc68ce
7c5e605
 
 
 
 
 
 
 
 
bbc68ce
7c5e605
 
 
bbc68ce
 
 
7c5e605
 
 
 
bbc68ce
7c5e605
bbc68ce
7c5e605
 
 
 
 
bbc68ce
7c5e605
bbc68ce
7c5e605
 
bbc68ce
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
license: mit
library_name: braindecode
tags:
  - braindecode
  - pytorch
  - safetensors
  - fnirs
  - foundation-model
  - mtrenirs
---

# MtReNIRS pretrained encoder

The pretrained MtReNIRS encoder by Chae et al. (2026), for
[`braindecode.models.MtReNIRS`](https://braindecode.org/stable/generated/braindecode.models.MtReNIRS.html).
`model.safetensors` and `config.json` hold the encoder of `mtrenirs_10s.pt`, which is
`models/weights/mtrenirs_10s.pt` of [microsoft/MtReNIRS](https://github.com/microsoft/MtReNIRS)
at commit [`16c3082`](https://github.com/microsoft/MtReNIRS/tree/16c3082747b689233f123519d2590b88631afb2d),
converted by `convert.py`.

```python
from braindecode.models import MtReNIRS

# raw: MNE Raw of HbO/HbR at 10 Hz with the Standard 10-05 slot positions in loc[:3]
model = MtReNIRS.from_pretrained(
    "braindecode/mtrenirs-pretrained",
    chs_info=raw.info["chs"],
    n_outputs=3,
    n_times=100,
)
features = model(x, return_features=True)["features"]
```

The classification head (`final_layer`) is not part of the release: its input width depends on
the montage, so `from_pretrained` builds it for your `chs_info` and `n_outputs`. Fine-tune or
linear-probe before use.

## Input the weights expect

10 Hz HbO/HbR in 100-sample (10 s) windows, each channel z-scored over its run and clipped at 6,
with channel positions in Standard 10-05 space. The authors'
[model card](https://github.com/microsoft/MtReNIRS/blob/main/MODEL_CARD.md) describes the
intended and out-of-scope uses.

## Changes from the original release

`convert.py` unwraps the checkpoint's `{"config", "model"}` payload (its keys already are
braindecode's) and writes the encoder with `save_pretrained`. No value is changed: the encoder
gives the features of the original file bit for bit on CPU in float32. The original file,
`mtrenirs_10s.pt` (sha256 `0960d02f9437d86f0f1a670eace8905d58b33f3394e58d5c17a6451bbcb9484d`), is
kept in this repository; revision `bbc68ce5` is the mirror without the conversion.

## Licence

MIT, Copyright (c) Microsoft Corporation. `LICENSE.txt` is the source repository's licence file,
unchanged.

## Citation

```bibtex
@article{microsoft2026mtrenirs,
  author  = {Chae, Tony and Avramidis, Kleanthis and Emmanouilidou, Dimitra and Tashev, Ivan J.},
  title   = {{MtReNIRS}: A Self-Supervised Foundation Model for Transferable Neurovascular Representations},
  journal = {arXiv preprint arXiv:2610.36159},
  year    = {2026},
}
```