Skip to content
This repository was archived by the owner on Sep 25, 2022. It is now read-only.

Commit 174a525

Browse files
author
Sebas
committed
adds
1 parent e009416 commit 174a525

File tree

3 files changed

+224
-6
lines changed

3 files changed

+224
-6
lines changed

README.md

+39-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,43 @@
11
# EEG Classification using Deep and Transfer Learning
22

3-
###### Requirements
3+
#### Requirements
44

5-
* install pytorch
6-
* pip install braindecode
7-
* pip install numpy
8-
* preprocess raw data
5+
Dependencies can be found in:
6+
* requirements.txt
7+
* environment.yml (for conda virt env)
98

10-
\#MasterThesis :bowtie: :tophat:
9+
#### Data:
10+
11+
Download EEG MI datasets from:
12+
* BCI Competition IV 2a: http://www.bbci.de/competition/iv/#dataset2a
13+
* High-Gamma: https://web.gin.g-node.org/robintibor/high-gamma-dataset
14+
15+
#### Create dirs:
16+
17+
In the root of the project:
18+
* Make a directory for the (processed) data: "/data"
19+
* Make a directory for the results: "/results"
20+
21+
#### Data preprocessing:
22+
To preprocess the data got to "/data_loader/process_data/.."
23+
For both datasets there is separate preprocess script.
24+
25+
#### Config the experiment:
26+
In "config.yaml" (in the project root) you can configure the experiment.
27+
* experiment->dataset: [hgd, bciciv2a]
28+
* model->name: [eegnet, deep, shallow]
29+
* experiment->type: [no_tl, loo_tl, ccsa_da]
30+
*no_tl: no transfer learning, just dataset+CNN model
31+
*loo_tl: leave-one-out transfer leaning
32+
*ccsa_da: feature space alignment, siamese network with contrastive loss,
33+
ccsa: classification and contrastive semantic alignment loss
34+
* server->full_cv: True=trains model for all subjects 4-fold (sequentially),
35+
False=trains only model for subject_id and i_valid_fold given.
36+
37+
#### Run experiment:
38+
Run the file "/experiment/run.py" to start the experiment.
39+
Results get put into "/results/" dir.
40+
41+
42+
43+
:bowtie: :tophat:

environment.yml

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: eeg
2+
channels:
3+
- conda-forge
4+
- pytorch
5+
- defaults
6+
dependencies:
7+
- tslearn=0.1.29=py37h1e5eb4f_0
8+
- _tflow_select=2.3.0=mkl
9+
- absl-py=0.7.1=py37_0
10+
- astor=0.7.1=py37_0
11+
- astroid=2.1.0=py37_0
12+
- blas=1.0=mkl
13+
- c-ares=1.15.0=h1de35cc_1
14+
- ca-certificates=2019.1.23=0
15+
- certifi=2019.3.9=py37_0
16+
- cffi=1.12.1=py37hb5b8e2f_0
17+
- freetype=2.9.1=hb4e5f40_0
18+
- gast=0.2.2=py37_0
19+
- grpcio=1.16.1=py37h044775b_1
20+
- h5py=2.9.0=py37h3134771_0
21+
- hdf5=1.10.4=hfa1e0ec_0
22+
- intel-openmp=2019.1=144
23+
- isort=4.3.8=py37_0
24+
- jpeg=9b=he5867d9_2
25+
- keras=2.2.4=0
26+
- keras-applications=1.0.7=py_0
27+
- keras-base=2.2.4=py37_0
28+
- keras-preprocessing=1.0.9=py_0
29+
- lazy-object-proxy=1.3.1=py37h1de35cc_2
30+
- libcxx=4.0.1=hcfea43d_1
31+
- libcxxabi=4.0.1=hcfea43d_1
32+
- libedit=3.1.20181209=hb402a30_0
33+
- libffi=3.2.1=h475c297_4
34+
- libgfortran=3.0.1=h93005f0_2
35+
- libpng=1.6.36=ha441bb4_0
36+
- libprotobuf=3.7.1=hd9629dc_0
37+
- libtiff=4.0.10=hcb84e12_2
38+
- markdown=3.1=py37_0
39+
- mccabe=0.6.1=py37_1
40+
- mkl=2019.1=144
41+
- mkl_fft=1.0.10=py37h5e564d8_0
42+
- mkl_random=1.0.2=py37h27c97d8_0
43+
- mock=2.0.0=py37_0
44+
- ncurses=6.1=h0a44026_1
45+
- ninja=1.8.2=py37h04f5b5a_1
46+
- numpy=1.16.2=py37hacdab7b_0
47+
- numpy-base=1.16.2=py37h6575580_0
48+
- olefile=0.46=py37_0
49+
- openssl=1.1.1b=h1de35cc_1
50+
- pbr=5.1.3=py_0
51+
- pillow=5.4.1=py37hb68e598_0
52+
- pip=19.0.3=py37_0
53+
- protobuf=3.7.1=py37h0a44026_0
54+
- pycparser=2.19=py37_0
55+
- pylint=2.2.2=py37_0
56+
- python=3.7.2=haf84260_0
57+
- pyyaml=5.1=py37h1de35cc_0
58+
- readline=7.0=h1de35cc_5
59+
- scikit-learn=0.20.3=py37h27c97d8_0
60+
- scipy=1.2.1=py37h1410ff5_0
61+
- setuptools=40.8.0=py37_0
62+
- six=1.12.0=py37_0
63+
- sqlite=3.26.0=ha441bb4_0
64+
- tensorboard=1.13.1=py37haf313ee_0
65+
- tensorflow=1.13.1=mkl_py37h70c3834_0
66+
- tensorflow-base=1.13.1=mkl_py37h66b1bf0_0
67+
- tensorflow-estimator=1.13.0=py_0
68+
- termcolor=1.1.0=py37_1
69+
- tk=8.6.8=ha441bb4_0
70+
- werkzeug=0.15.2=py_0
71+
- wheel=0.33.1=py37_0
72+
- wrapt=1.11.1=py37h1de35cc_0
73+
- xz=5.2.4=h1de35cc_4
74+
- yaml=0.1.7=hc338f04_2
75+
- zlib=1.2.11=h1de35cc_3
76+
- zstd=1.3.7=h5bba6e5_0
77+
- pytorch=1.0.1=py3.7_2
78+
- torchvision=0.2.2=py_3
79+
- pip:
80+
- autopep8==1.4.3
81+
- autopy==2.1.0
82+
- bandit==1.5.1
83+
- braindecode==0.4.7
84+
- cycler==0.10.0
85+
- docopt==0.6.2
86+
- gitdb2==2.0.5
87+
- gitpython==2.1.11
88+
- jsonpickle==0.9.6
89+
- kiwisolver==1.0.1
90+
- llvmlite==0.27.1
91+
- mako==1.0.8
92+
- markupsafe==1.1.1
93+
- matplotlib==3.0.3
94+
- mne==0.17.1
95+
- munch==2.3.2
96+
- numba==0.42.1
97+
- pandas==0.24.1
98+
- py-cpuinfo==5.0.0
99+
- pycodestyle==2.5.0
100+
- pydocstyle==3.0.0
101+
- pyflakes==2.1.1
102+
- pylama==7.6.6
103+
- pymongo==3.7.2
104+
- pyparsing==2.3.1
105+
- python-dateutil==2.8.0
106+
- pytz==2018.9
107+
- resampy==0.2.1
108+
- sacred==0.7.4
109+
- smmap2==2.0.5
110+
- snowballstemmer==1.2.1
111+
- stevedore==1.30.1
112+
- torch==1.0.1.post2
113+
- typed-ast==1.4.0
114+

requirements.txt

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
absl-py==0.7.1
2+
astor==0.7.1
3+
astroid==2.2.5
4+
autopep8==1.4.3
5+
autopy==2.1.0
6+
bandit==1.5.1
7+
Braindecode==0.4.7
8+
certifi==2019.3.9
9+
cffi==1.12.1
10+
cycler==0.10.0
11+
docopt==0.6.2
12+
gast==0.2.2
13+
gitdb2==2.0.5
14+
GitPython==2.1.11
15+
grpcio==1.16.1
16+
h5py==2.9.0
17+
isort==4.3.8
18+
jsonpickle==0.9.6
19+
Keras==2.2.4
20+
Keras-Applications==1.0.7
21+
Keras-Preprocessing==1.0.9
22+
kiwisolver==1.0.1
23+
lazy-object-proxy==1.3.1
24+
llvmlite==0.27.1
25+
Mako==1.0.8
26+
Markdown==3.1
27+
MarkupSafe==1.1.1
28+
matplotlib==3.0.3
29+
mccabe==0.6.1
30+
mkl-fft==1.0.10
31+
mkl-random==1.0.2
32+
mne==0.17.1
33+
mock==2.0.0
34+
munch==2.3.2
35+
numba==0.42.1
36+
numpy==1.16.2
37+
olefile==0.46
38+
pandas==0.24.1
39+
pbr==5.1.3
40+
Pillow==5.4.1
41+
protobuf==3.7.1
42+
py-cpuinfo==5.0.0
43+
pycodestyle==2.5.0
44+
pycparser==2.19
45+
pydocstyle==3.0.0
46+
pyflakes==2.1.1
47+
pylama==7.6.6
48+
pylint==2.3.1
49+
pymongo==3.7.2
50+
pyparsing==2.3.1
51+
python-dateutil==2.8.0
52+
pytz==2018.9
53+
PyYAML==5.1
54+
resampy==0.2.1
55+
sacred==0.7.4
56+
scikit-learn==0.20.3
57+
scipy==1.2.1
58+
six==1.12.0
59+
smmap2==2.0.5
60+
snowballstemmer==1.2.1
61+
stevedore==1.30.1
62+
tensorboard==1.13.1
63+
tensorflow==1.13.1
64+
tensorflow-estimator==1.13.0
65+
termcolor==1.1.0
66+
torch==1.0.1.post2
67+
torchvision==0.2.2
68+
tslearn==0.1.29
69+
typed-ast==1.4.0
70+
Werkzeug==0.15.2
71+
wrapt==1.11.1

0 commit comments

Comments
 (0)