main.py 1.43 KB
Newer Older
1
2
from config import general_params as params
import time
3
4
5
6
7
from CNN import CNN
from utils import IOHelper
from DeepEye import deepEye
from InceptionTime import inception
from EEGNet import eegNet
8

9
10
def main():
    start_time = time.time()
11
    try:
12
13
14
        trainX, trainY = IOHelper.get_data(verbose=True)
        testX = 0
        testY = 0
15
16
17
    except:
        return

18
19
    if params['model'] == 'CNN-1':
        print("Started running CNN-1. If you want to run other methods please choose another model in the config.py file.")
20
        CNN.run(trainX, trainY)
21
22
23
24
25
26
27
28
29
30
31
32
33

    elif params['model'] == 'InceptionTime':
        print("Started running InceptionTime. If you want to run other methods please choose another model in the config.py file.")
        inception.run(root_dir=params["root_dir"], trainX=trainX, trainY=trainY, testX=testX, testY=testY, verbose=True)

    elif params['model'] == 'EEGNet':
        print("Started running EEGNet. If you want to run other methods please choose another model in the config.py file.")
        eegNet.run(trainX, trainY)

    elif params['model'] == 'DeepEye':
        print("Started running DeepEye. If you want to run other methods please choose another model in the config.py file.")
        deepEye.train(trainX, trainY)

34
    else:
Ard Kastrati's avatar
Ard Kastrati committed
35
        print('Cannot start the program. Please choose one model in the config.py file')
36
37
38
39
40

    print("--- Runtime: %s seconds ---" % (time.time() - start_time))

if __name__=='__main__':
    main()