Hyunji

Upload new file

1 +#!/usr/bin/env sh
2 +
3 +# DEFINE
4 +DATA_ROOT_PATH=""
5 +DEVICE="cuda"
6 +
7 +############################## Table 2 #########################################
8 +#### This commands Assumes that you have computed the best models for the architecture
9 +#### or table 1 commands are already run
10 +#### We show commands for k=2,
11 +#### for other values of k just modify the frame_keep_fraction parameter
12 +#### k=2 -> 0.5
13 +#### k=4 -> 0.25
14 +#### k=5 -> 0.2
15 +#### k=10 -> 0.1
16 +################################################################################
17 +
18 +# 3d cnn with 50% frames (k=2), with imputation
19 +python3 -m src.scripts.main -c config/config.py \
20 + --exp_name 3d_cnn_eval_k=2_imputed \
21 + -r /tmp \
22 + --mode test \
23 + --device $DEVICE --wandb.use 0 \
24 + --model.arch.file src/arch/brain_age_3d.py \
25 + --data.root_path "$DATA_ROOT_PATH" \
26 + --data.frame_keep_style ordered --data.frame_keep_fraction 0.5 \
27 + --data.impute fill \
28 + --statefile result/3d_cnn/run_0001/best_model.pt
29 +
30 +# 2d lstm with 50% frames (k=2), without imputation
31 +python3 -m src.scripts.main -c config/config.py \
32 + --exp_name 2d_slice_lstm_eval_k=2 \
33 + -r /tmp \
34 + --mode test \
35 + --device $DEVICE --wandb.use 0 \
36 + --model.arch.file src/arch/brain_age_slice_lstm.py \
37 + --data.root_path "$DATA_ROOT_PATH" \
38 + --data.frame_keep_style ordered --data.frame_keep_fraction 0.5 \
39 + --data.impute drop \
40 + --statefile result/2d_slice_lstm/run_0001/best_model.pt
41 +
42 +# 2d lstm with 50% frames (k=2), with imputation
43 +python3 -m src.scripts.main -c config/config.py \
44 + --exp_name 2d_slice_lstm_eval_k=2_imputed \
45 + -r /tmp \
46 + --mode test \
47 + --device $DEVICE --wandb.use 0 \
48 + --model.arch.file src/arch/brain_age_slice_lstm.py \
49 + --data.root_path "$DATA_ROOT_PATH" \
50 + --data.frame_keep_style ordered --data.frame_keep_fraction 0.5 \
51 + --data.impute fill \
52 + --statefile result/2d_slice_lstm/run_0001/best_model.pt
53 +
54 +# 2D-slice-attention with 50% frames (k=2), without imputation
55 +python3 -m src.scripts.main -c config/config.py \
56 + --exp_name 2d_slice_attention_eval_k=2 \
57 + -r /tmp \
58 + --mode test \
59 + --device $DEVICE --wandb.use 0 \
60 + --model.arch.file src/arch/brain_age_slice_set.py \
61 + --model.arch.attn_dim 32 --model.arch.attn_num_heads 1 \
62 + --model.arch.attn_drop 1 --model.arch.agg_fn "attention" \
63 + --data.root_path "$DATA_ROOT_PATH" \
64 + --data.frame_keep_style ordered --data.frame_keep_fraction 0.5 \
65 + --data.impute drop \
66 + --statefile result/2d_slice_attention/run_0001/best_model.pt
67 +
68 +# 2D-slice-mean with 50% frames (k=2), without imputation
69 +python3 -m src.scripts.main -c config/config.py \
70 + --exp_name 2d_slice_mean_eval_k=2 \
71 + -r /tmp \
72 + --mode test \
73 + --device $DEVICE --wandb.use 0 \
74 + --model.arch.file src/arch/brain_age_slice_set.py \
75 + --model.arch.attn_dim 32 --model.arch.attn_num_heads 1 \
76 + --model.arch.attn_drop 1 --model.arch.agg_fn "mean" \
77 + --data.root_path "$DATA_ROOT_PATH" \
78 + --data.frame_keep_style ordered --data.frame_keep_fraction 0.5 \
79 + --data.impute drop \
80 + --statefile result/2d_slice_attention/run_0001/best_model.pt
81 +
82 +# 2D-slice-max with 50% frames (k=2), without imputation
83 +python3 -m src.scripts.main -c config/config.py \
84 + --exp_name 2d_slice_max_eval_k=2 \
85 + -r /tmp \
86 + --mode test \
87 + --device $DEVICE --wandb.use 0 \
88 + --model.arch.file src/arch/brain_age_slice_set.py \
89 + --model.arch.attn_dim 32 --model.arch.attn_num_heads 1 \
90 + --model.arch.attn_drop 1 --model.arch.agg_fn "max" \
91 + --data.root_path "$DATA_ROOT_PATH" \
92 + --data.frame_keep_style ordered --data.frame_keep_fraction 0.5 \
93 + --data.impute drop \
94 + --statefile result/2d_slice_attention/run_0001/best_model.pt