--- library_name: braindecode license: mit tags: - braindecode - eeg - motor-imagery - foundation-model --- # MIRepNet Braindecode-format re-host of the official MIRepNet checkpoint released by Liu et al. The checkpoint can be loaded directly through Braindecode's standard Hugging Face integration: ```python from braindecode.models import MIRepNet model = MIRepNet.from_pretrained("braindecode/mirepnet-pretrained") # Fine-tuning for another task replaces the released three-class head. model = MIRepNet.from_pretrained( "braindecode/mirepnet-pretrained", n_outputs=4, ) ``` ## Released configuration - 45 channels in the order stored in `mirepnet_channels.json` - 1,000 samples at 250 Hz - 256-dimensional embedding - 6 Transformer blocks with 8 heads - 3-output supervised pretraining head The paper's 8--30 Hz filtering, resampling, channel-template preparation, and Euclidean alignment are preprocessing steps and are not performed by the model. ## Provenance and conversion - Official code: https://github.com/staraink/MIRepNet at revision `edb80d7605f75ba8b72b417a124cc9db07385f72` - Official checkpoint: https://huggingface.co/starself/MIRepNet at revision `9bac0439c0d3e9ffdb40ca675d61a51b439a446e` - Source file: `MIRepNet.pth`, SHA-256 `432288958007e344a5a84a9ffe9d0e5e5c0cb616aef86c85522375a3f4da9aaf` All 109 downstream tensors were converted. The 34 pretraining-only tensors (`mask_token`, `decoder.*`, and the upstream `embedding.chan_embed.weight`, which is not used by the released forward pass) were intentionally omitted. Against the official implementation, maximum absolute error was `2.38e-7` for pooled features and `1.19e-7` for logits. The conversion is reproducible with `convert_mirepnet_checkpoint.py`. The source code and checkpoint are distributed under the MIT License. The original copyright notice is preserved in `LICENSE`. ## Limitations The official repository does not document the semantic ordering of the three pretraining-head outputs. Replace the head with `n_outputs=...` and fine-tune it for downstream use unless that label mapping has been independently verified. Dataset licenses are separate from the checkpoint's MIT license. ## Citation ```bibtex @article{LIU2026115966, title = {MIRepNet: A pipeline and pre-trained model for EEG-based motor imagery classification}, journal = {Knowledge-Based Systems}, volume = {343}, pages = {115966}, year = {2026}, issn = {0950-7051}, doi = {10.1016/j.knosys.2026.115966}, url = {https://www.sciencedirect.com/science/article/pii/S0950705126006921}, author = {Dingkun Liu and Zhu Chen and Jingwei Luo and Shijie Lian and Yuheng Chen and Shaojie Hou and Xiaolian Zhu and Dongrui Wu} } ```