Kkuntal990 commited on
Commit
a2f663c
·
verified ·
1 Parent(s): 9331eb2

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +63 -0
  2. config.json +18 -0
  3. model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: braindecode
3
+ tags:
4
+ - eeg
5
+ - brain-signal-processing
6
+ - foundation-model
7
+ license: bsd-3-clause
8
+ ---
9
+
10
+ # EEGPT Pretrained Model
11
+
12
+ Pretrained EEGPT encoder weights for EEG signal processing from [EEGPT: Pretrained Transformer for Universal and Reliable Representation of EEG Signals](https://proceedings.neurips.cc/paper_files/paper/2024/file/4540d267eeec4e5dbd9dae9448f0b739-Paper-Conference.pdf).
13
+
14
+ This model was pretrained on a large-scale EEG dataset using masked dual self-supervised learning.
15
+
16
+ ## Model Details
17
+
18
+ - **Architecture:** Transformer-based encoder with 8 layers
19
+ - **Embedding dimension:** 512
20
+ - **Number of attention heads:** 8
21
+ - **Patch size:** 64
22
+ - **Parameters:** ~10M
23
+
24
+ ## Usage
25
+
26
+ ```python
27
+ from braindecode.models import EEGPT
28
+ import mne
29
+
30
+ # Create channel info (example with 22 channels)
31
+ ch_names = ["Fz", "FC3", "FC1", "FCz", "FC2", "FC4", "C5", "C3", "C1", "Cz",
32
+ "C2", "C4", "C6", "CP3", "CP1", "CPz", "CP2", "CP4", "P1", "Pz", "P2", "POz"]
33
+ ch_types = ["eeg"] * len(ch_names)
34
+ info = mne.create_info(ch_names=ch_names, sfreq=250., ch_types=ch_types)
35
+
36
+ # Load pretrained model
37
+ model = EEGPT.from_pretrained(
38
+ "braindecode/eegpt-pretrained",
39
+ n_outputs=4, # number of classes for your task
40
+ n_chans=22,
41
+ n_times=1024,
42
+ chs_info=info["chs"],
43
+ sfreq=250.0
44
+ )
45
+
46
+ # Use for downstream tasks
47
+ # model can now be fine-tuned on your specific EEG classification task
48
+ ```
49
+
50
+ ## Citation
51
+
52
+ ```bibtex
53
+ @inproceedings{tang2024eegpt,
54
+ title={EEGPT: Pretrained Transformer for Universal and Reliable Representation of EEG Signals},
55
+ author={Tang, Xiwen and others},
56
+ booktitle={Advances in Neural Information Processing Systems},
57
+ year={2024}
58
+ }
59
+ ```
60
+
61
+ ## License
62
+
63
+ BSD-3-Clause (braindecode)
config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "EEGPT"
4
+ ],
5
+ "model_type": "eegpt",
6
+ "embed_dim": 512,
7
+ "embed_num": 4,
8
+ "depth": 8,
9
+ "num_heads": 8,
10
+ "patch_size": 64,
11
+ "patch_stride": 32,
12
+ "mlp_ratio": 4.0,
13
+ "qkv_bias": true,
14
+ "drop_prob": 0.0,
15
+ "attn_drop_rate": 0.0,
16
+ "drop_path_rate": 0.0,
17
+ "init_std": 0.02
18
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddff4d9a60f8afb7647537bc586c9b97fe18f4955b92ffb123b2dc868e4e7908
3
+ size 101157984