-
Notifications
You must be signed in to change notification settings - Fork 1
/
extract_mri.py
66 lines (65 loc) · 1.68 KB
/
extract_mri.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import argparse
import glob
from utils import load_pickle,disc_pr
import numpy as np
# def _exp1(data_dir):
# main_dir = glob.glob(data_dir + '/*/*')
# w2vec_dict = load_pickle('../stimuli/word2vec.pkl')
# for fl in main_dir:
# data = load_pickle(fl)
#
# for key, value in data.items():
#
#
#
#
# def _exp2(data_dir):
# main_dir = glob.glob(data_dir + '/*/*')
#
# for fl in main_dir:
# data = load_pickle(fl)
# k, v = data.popitem()
# print(v)
# sys.exit()
# np.zeros((len(data), len(v)))
#
# for key, value in data.items():
#
# disc_pr()
#
#
# def _exp3(data_dir):
# main_dir = glob.glob(data_dir + '/*/*')
#
# for fl in main_dir:
# data = load_pickle(fl)
# k, v = data.popitem()
# print(v)
# sys.exit()
# np.zeros((len(data), len(v)))
#
# for key, value in data.items():
#
# disc_pr()
#
#
# if __name__ == '__main__':
#
# parser = argparse.ArgumentParser()
# parser.add_argument('-i','-data_dir',dest="data_dir",required=True)
# args = parser.parse_args()
# # print("I am reading the files from the directory ",args.data_dir)
# #print(data_dir.split['/'])
# assert (args.data_dir).strip().split('/')[1] == 'data_processed', 'You should rename your data_directory to data_processed'
#
# exp = int((args.data_dir).split('/')[-1][-1])
# assert 'exp' in (args.data_dir).split('/')[-1]
#
# if exp == 1:
# _exp1(args.data_dir)
# elif exp == 2:
# _exp2(args.data_dir)
# elif exp == 3:
# _exp3(args.data_dir)
# else :
# raise ValueError("Illegal value for data folder .Select from{1,2,3}")