To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

README.md 2.28 KB
Newer Older
Ard Kastrati's avatar
Ard Kastrati committed
1
2
# DL-Project

3
Predicting eye gaze with DL
4
5
6
7
    Projects that we try: CNN, InceptionTime, EEGNet, DeepEye



zpgeng's avatar
zpgeng committed
8
## Model Configuration
okiss's avatar
okiss committed
9
10
Please configure the config.py file correctly before running the main.py file:   
  
okiss's avatar
okiss committed
11
12
13
14
config['data_dir']    : indicates the directory where you stored the data  
config['model']       : indicates the model you want to use, choose between 'cnn', 'eegnet', 'inception', 'xception' or'deepeye'  
config['downsampled'] : True if you want to use 125 data points per second instead of 500. Default is False  
config['split']       : True if you want to run a clustered version of the model, please keep it to False as the clustered version is inneficient  
okiss's avatar
okiss committed
15
16


zpgeng's avatar
zpgeng committed
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
## Parameter Tuning

Please find the files which are related to our model:
	
	- CNN.CNN.py
	- DeepEye.deepeye.py
	- DeepEyeRNN.deepeyeRNN.py
	- EEGNet.eegNet.py
	- InceptionTime.inception.py
	- Xception.xception.py
	- ConvNet.py

You can find the architechture of our models in these files. For `CNN`, `DeepEye`, `DeepEyeRNN`, `InceptionTime`, and `Xception`, you should tune the parameter by looking into the `ConvNet.py` file and adjust the parameters (e.g. `self.nb_filter`) accordingly.

For `EEGNet` model, you should directly look into the `eegNet.py` file and tune the parameters accordingly.

## Running in the Cluster

For [ETH Leonhard](https://scicomp.ethz.ch/wiki/Python_on_Leonhard) users, you can follow these steps:
	
	1. Please use the command `module load gcc/6.3.0 python_gpu/3.8.5 hdf5/1.10.1`before training the model.

	2. Edit the data directory and run directory where you saved the datasets.

	3. Use the following command to run the model: `bsub -n 10 -W 4:00 -o experiment_[your_model] -R "rusage[mem=5000, ngpus_excl_p=1]" python ../main.py`

__Note:__ If you want to run the model locally, you should ensure to have Pytorch, Tensorflow==2.x installed.


## DeepEye3 Tuning (deprecated)
zpgeng's avatar
zpgeng committed
47
48
49
50
51
52
53
54
55
56
57
58

nb_filter: [32, 64]

depth: [9, 12, 20]

kernel_size:[40, 20]

residual_jump: [3, 4]

Large depth causes overfitting, same for the number of filters. Kernel size seems to have tiny affect on validation. Residual jump for 4 (i.e. `depth % (res_jump) == (res_jump - 1)`) is not so good in our task, but I think it would be useful for future tasks.

The best setting is **nb_filter == 32, depth == 9, kernel_size == 40, res_jump == 3**
59