-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheeg_level_windows_cpu.bat
More file actions
341 lines (314 loc) · 11.5 KB
/
eeg_level_windows_cpu.bat
File metadata and controls
341 lines (314 loc) · 11.5 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
@echo off
REM Windows Batch Script for EEG analysis
REM Save this file with .bat extension
REM Set environment variables
set OMP_NUM_THREADS=1
REM Define variables
set dataset_dir=test_data\Sandor\EDF
set data_format=edf
set sampling_rate=0
set result_dir=test_data\Sandor\results
set already_format_channel_order=no
set already_average_montage=no
set allow_missing_channels=no
set leave_one_hemisphere_out=no
set polarity=-1
set rewrite_results=no
REM Create results directory if it doesn't exist
if not exist %result_dir% mkdir %result_dir%
echo Starting EEG analysis processes...
REM Normal: (1) Continuous 1-second step event-level prediction
echo Running NORMAL event-level prediction...
python finetune_classification.py ^
--predict ^
--model base_patch200_200 ^
--task_model checkpoints\NORMAL.pth ^
--abs_pos_emb ^
--dataset NORMAL ^
--data_format %data_format% ^
--sampling_rate %sampling_rate% ^
--already_format_channel_order %already_format_channel_order% ^
--already_average_montage %already_average_montage% ^
--allow_missing_channels %allow_missing_channels% ^
--leave_one_hemisphere_out %leave_one_hemisphere_out% ^
--polarity %polarity% ^
--eval_sub_dir %dataset_dir% ^
--eval_results_dir %result_dir%\pred_NORMAL_1sStep ^
--prediction_slipping_step_second 1 ^
--device cpu ^
--distributed False ^
--rewrite_results %rewrite_results%
REM Normal: (2) EEG_level prediction
echo Running NORMAL EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset NORMAL ^
--task_model checkpoints\NORMAL_EEGlevel.pth ^
--test_csv_dir test_data\Sandor\pred_NORMAL_1sStep ^
--result_dir test_data\Sandor ^
--device cpu
REM Slowing: (1) Continuous 1-second step event-level prediction
echo Running SLOWING event-level prediction...
python finetune_classification.py ^
--predict ^
--model base_patch200_200 ^
--task_model checkpoints\SLOWING.pth ^
--abs_pos_emb ^
--dataset SLOWING ^
--data_format %data_format% ^
--sampling_rate %sampling_rate% ^
--already_format_channel_order %already_format_channel_order% ^
--already_average_montage %already_average_montage% ^
--allow_missing_channels %allow_missing_channels% ^
--leave_one_hemisphere_out %leave_one_hemisphere_out% ^
--polarity %polarity% ^
--eval_sub_dir %dataset_dir% ^
--eval_results_dir %result_dir%\pred_SLOWING_1sStep ^
--prediction_slipping_step_second 1 ^
--device cpu ^
--distributed False ^
--rewrite_results %rewrite_results%
REM Slowing: (2) EEG_level prediction - FOC_SLOWING
echo Running FOC_SLOWING EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset FOC_SLOWING ^
--task_model checkpoints\FOC_SLOWING_EEGlevel.pth ^
--test_csv_dir %result_dir%\pred_SLOWING_1sStep ^
--result_dir %result_dir% ^
--device cpu
REM Slowing: (2) EEG_level prediction - GEN_SLOWING
echo Running GEN_SLOWING EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset GEN_SLOWING ^
--task_model checkpoints\GEN_SLOWING_EEGlevel.pth ^
--test_csv_dir %result_dir%\pred_SLOWING_1sStep ^
--result_dir %result_dir% ^
--device cpu
REM BS: (1) Continuous 1-second step event-level prediction
echo Running BS event-level prediction...
python finetune_classification.py ^
--predict ^
--model base_patch200_200 ^
--task_model checkpoints\BS.pth ^
--abs_pos_emb ^
--dataset BS ^
--data_format %data_format% ^
--sampling_rate %sampling_rate% ^
--already_format_channel_order %already_format_channel_order% ^
--already_average_montage %already_average_montage% ^
--allow_missing_channels %allow_missing_channels% ^
--leave_one_hemisphere_out %leave_one_hemisphere_out% ^
--polarity %polarity% ^
--eval_sub_dir %dataset_dir% ^
--eval_results_dir %result_dir%\pred_BS_1sStep ^
--prediction_slipping_step_second 1 ^
--device cpu ^
--distributed False ^
--rewrite_results %rewrite_results%
REM BS: (2) EEG_level prediction
echo Running BS EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset BS ^
--task_model checkpoints\BS_EEGlevel.pth ^
--test_csv_dir %result_dir%\pred_BS_1sStep ^
--result_dir %result_dir% ^
--device cpu
REM FOC GEN SPIKES: (1) Continuous 1-second step event-level prediction
echo Running FOC GEN SPIKES event-level prediction...
python finetune_classification.py ^
--predict ^
--model base_patch200_200 ^
--task_model checkpoints\FOCGENSPIKES.pth ^
--abs_pos_emb ^
--dataset FOC_GEN_SPIKES ^
--data_format %data_format% ^
--sampling_rate %sampling_rate% ^
--already_format_channel_order %already_format_channel_order% ^
--already_average_montage %already_average_montage% ^
--allow_missing_channels %allow_missing_channels% ^
--leave_one_hemisphere_out %leave_one_hemisphere_out% ^
--polarity %polarity% ^
--eval_sub_dir %dataset_dir% ^
--eval_results_dir %result_dir%\pred_FOCGENSPIKES_1sStep ^
--prediction_slipping_step_second 1 ^
--device cpu ^
--distributed False ^
--rewrite_results %rewrite_results%
REM FOC GEN SPIKES: (2) EEG_level prediction - FOC_SPIKES
echo Running FOC_SPIKES EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset FOC_SPIKES ^
--task_model checkpoints\FOC_SPIKES_EEGlevel.pth ^
--test_csv_dir %result_dir%\pred_FOCGENSPIKES_1sStep ^
--result_dir %result_dir% ^
--device cpu
REM FOC GEN SPIKES: (2) EEG_level prediction - GEN_SPIKES
echo Running GEN_SPIKES EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset GEN_SPIKES ^
--task_model checkpoints\GEN_SPIKES_EEGlevel.pth ^
--test_csv_dir %result_dir%\pred_FOCGENSPIKES_1sStep ^
--result_dir %result_dir% ^
--device cpu
REM Spike: (1) Continuous 1-second step event-level prediction
echo Running SPIKES event-level prediction...
python finetune_classification.py ^
--predict ^
--model base_patch200_200 ^
--task_model checkpoints\SPIKES.pth ^
--abs_pos_emb ^
--dataset SPIKES ^
--data_format %data_format% ^
--sampling_rate %sampling_rate% ^
--already_format_channel_order %already_format_channel_order% ^
--already_average_montage %already_average_montage% ^
--allow_missing_channels %allow_missing_channels% ^
--leave_one_hemisphere_out %leave_one_hemisphere_out% ^
--polarity %polarity% ^
--eval_sub_dir %dataset_dir% ^
--eval_results_dir %result_dir%\pred_SPIKES_1sStep ^
--prediction_slipping_step_second 1 ^
--device cpu ^
--distributed False ^
--rewrite_results %rewrite_results%
REM Spike: (2) EEG_level prediction
echo Running SPIKES EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset SPIKES ^
--task_model checkpoints\SPIKES_EEGlevel.pth ^
--test_csv_dir %result_dir%\pred_SPIKES_1sStep ^
--result_dir %result_dir% ^
--align_spike_detection_and_location ^
--device cpu
REM IIIC: (1) Continuous 1-second step event-level prediction
echo Running IIIC event-level prediction...
python finetune_classification.py ^
--predict ^
--model base_patch200_200 ^
--task_model checkpoints\IIIC.pth ^
--abs_pos_emb ^
--dataset IIIC ^
--data_format %data_format% ^
--sampling_rate %sampling_rate% ^
--already_format_channel_order %already_format_channel_order% ^
--already_average_montage %already_average_montage% ^
--allow_missing_channels %allow_missing_channels% ^
--leave_one_hemisphere_out %leave_one_hemisphere_out% ^
--polarity %polarity% ^
--eval_sub_dir %dataset_dir% ^
--eval_results_dir %result_dir%\pred_IIIC_1sStep ^
--prediction_slipping_step_second 1 ^
--device cpu ^
--distributed False ^
--rewrite_results %rewrite_results%
REM IIIC: (2) EEG_level prediction - SEIZURE
echo Running SEIZURE EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset SEIZURE ^
--task_model checkpoints\SEIZURE_EEGlevel.pth ^
--test_csv_dir %result_dir%\pred_IIIC_1sStep ^
--result_dir %result_dir% ^
--device cpu
REM IIIC: (2) EEG_level prediction - LPD
echo Running LPD EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset LPD ^
--task_model checkpoints\LPD_EEGlevel.pth ^
--test_csv_dir %result_dir%\pred_IIIC_1sStep ^
--result_dir %result_dir% ^
--device cpu
REM IIIC: (2) EEG_level prediction - GPD
echo Running GPD EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset GPD ^
--task_model checkpoints\GPD_EEGlevel.pth ^
--test_csv_dir %result_dir%\pred_IIIC_1sStep ^
--result_dir %result_dir% ^
--device cpu
REM IIIC: (2) EEG_level prediction - LRDA
echo Running LRDA EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset LRDA ^
--task_model checkpoints\LRDA_EEGlevel.pth ^
--test_csv_dir %result_dir%\pred_IIIC_1sStep ^
--result_dir %result_dir% ^
--device cpu
REM IIIC: (2) EEG_level prediction - GRDA
echo Running GRDA EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset GRDA ^
--task_model checkpoints\GRDA_EEGlevel.pth ^
--test_csv_dir %result_dir%\pred_IIIC_1sStep ^
--result_dir %result_dir% ^
--device cpu
REM Sleep 5 stage: (1) Continuous 1-second step event-level prediction
echo Running SLEEPPSG event-level prediction...
python finetune_classification.py ^
--predict ^
--model base_patch200_200 ^
--task_model checkpoints\SLEEPPSG.pth ^
--abs_pos_emb ^
--dataset SLEEPPSG ^
--data_format %data_format% ^
--sampling_rate %sampling_rate% ^
--already_format_channel_order %already_format_channel_order% ^
--already_average_montage %already_average_montage% ^
--allow_missing_channels %allow_missing_channels% ^
--leave_one_hemisphere_out %leave_one_hemisphere_out% ^
--polarity %polarity% ^
--eval_sub_dir %dataset_dir% ^
--eval_results_dir %result_dir%\pred_SLEEPPSG_1sStep ^
--prediction_slipping_step_second 1 ^
--device cpu ^
--distributed False ^
--rewrite_results %rewrite_results%
REM Sleep 5 stage: (2) EEG_level prediction
echo Running SLEEPPSG EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset SLEEPPSG ^
--test_csv_dir %result_dir%\pred_SLEEPPSG_1sStep ^
--result_dir %result_dir% ^
--device cpu
REM Sleep 3 stage: (1) Continuous 1-second step event-level prediction
echo Running SLEEP3stages event-level prediction...
python finetune_classification.py ^
--predict ^
--model base_patch200_200 ^
--task_model checkpoints\SLEEP.pth ^
--abs_pos_emb ^
--dataset MGBSLEEP3stages ^
--data_format %data_format% ^
--sampling_rate %sampling_rate% ^
--already_format_channel_order %already_format_channel_order% ^
--already_average_montage %already_average_montage% ^
--allow_missing_channels %allow_missing_channels% ^
--leave_one_hemisphere_out %leave_one_hemisphere_out% ^
--polarity %polarity% ^
--eval_sub_dir %dataset_dir% ^
--eval_results_dir %result_dir%\pred_SLEEP3stages_1sStep ^
--prediction_slipping_step_second 1 ^
--device cpu ^
--distributed False ^
--rewrite_results %rewrite_results%
REM Sleep 3 stage: (2) EEG_level prediction
echo Running SLEEP3stages EEG-level prediction...
python EEG_level_head.py ^
--mode predict ^
--dataset SLEEP3stages ^
--test_csv_dir %result_dir%\pred_SLEEP3stages_1sStep ^
--result_dir %result_dir% ^
--device cpu
echo All EEG analysis processes completed!
pause