-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathpipeline
executable file
·41 lines (33 loc) · 1.06 KB
/
pipeline
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
#!/bin/sh
# directory of project folder
DIR="/Users/yijun/panc"
DATADIR="${DIR}/data"
CODEDIR="${DIR}/repo"
# which fold to experiment, set it to 0 / 1/ 2/ 3
cur_fold=0
# settings same as in fixed-point
FOLDS=4
LOW_RANGE=-100
HIGH_RANGE=240
ORGAN_NUMBER=1
MARGIN=20
# to build a uniform dimension for input of NN
ZMAX=160
YMAX=256
XMAX=192
# parameters of training
epoch=10
init_lr=1e-5
# model to test
model_test=unet_fd${cur_fold}_Z_ep${epoch}_lr${init_lr}
# if want to view visualization of model's prediction slice by slice, set vis to true
vis=false
# ---------------- programs -------------------
# slice the 3d volumn to 2d slices
python slice.py ${DATADIR} ${ORGAN_NUMBER} ${FOLDS} ${LOW_RANGE} ${HIGH_RANGE}
# create data for training
python data.py ${DATADIR} ${cur_fold} Z ${ZMAX} ${YMAX} ${XMAX} ${MARGIN} ${ORGAN_NUMBER} ${LOW_RANGE} ${HIGH_RANGE}
# train the model
python unet.py ${DATADIR} ${cur_fold} Z ${epoch} ${init_lr}
# test the model
python testvis.py ${DATADIR} ${model_test} ${cur_fold} Z ${ZMAX} ${YMAX} ${XMAX} ${HIGH_RANGE} ${LOW_RANGE} ${MARGIN} ${vis}