diff --git a/config15/test_all_class.txt b/config15/test_all_class.txt new file mode 100755 index 0000000..f55a35c --- /dev/null +++ b/config15/test_all_class.txt @@ -0,0 +1,90 @@ +[data] +data_root = [/home/guotwang/data/brats_docker_data/pre_process] +data_names = config/test_names.txt +modality_postfix = [Flair, T1, T1c, T2] + +[network1ax] +net_type = MSNet +net_name = MSNet_WT32 +downsample_twice = True +data_shape = [19, 180, 160, 4] +label_shape = [11, 180, 160, 1] +class_num = 2 +model_file = model/msnet_wt32_10000.ckpt + +[network1sg] +net_type = MSNet +net_name = MSNet_WT32sg +downsample_twice = True +data_shape = [19, 160, 180, 4] +label_shape = [11, 160, 180, 1] +class_num = 2 +model_file = model/msnet_wt32sg_5000.ckpt + +[network1cr] +net_type = MSNet +net_name = MSNet_WT32cr +downsample_twice = True +data_shape = [19, 160, 160, 4] +label_shape = [11, 160, 160, 1] +class_num = 2 +model_file = model/msnet_wt32cr_5000.ckpt + + +[network2ax] +net_type = MSNet +net_name = MSNet_TC32 +downsample_twice = True +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +class_num = 2 +model_file = model/msnet_tc32_20000.ckpt + +[network2sg] +net_type = MSNet +net_name = MSNet_TC32sg +downsample_twice = True +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +class_num = 2 +model_file = model/msnet_tc32sg_5000.ckpt + +[network2cr] +net_type = MSNet +net_name = MSNet_TC32cr +downsample_twice = True +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +class_num = 2 +model_file = model/msnet_tc32cr_5000.ckpt + +[network3ax] +net_type = MSNet +net_name = MSNet_EN32 +downsample_twice = False +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +class_num = 3 +model_file = model/msnet_en32_20000.ckpt + +[network3sg] +net_type = MSNet +net_name = MSNet_EN32sg +downsample_twice = False +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +class_num = 3 +model_file = model/msnet_en32sg_5000.ckpt + +[network3cr] +net_type = MSNet +net_name = MSNet_EN32cr +downsample_twice = False +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +class_num = 3 +model_file = model/msnet_en32cr_5000.ckpt + +[testing] +test_slice_direction = all +save_folder = result_all diff --git a/config15/test_names.txt b/config15/test_names.txt new file mode 100644 index 0000000..4d53103 --- /dev/null +++ b/config15/test_names.txt @@ -0,0 +1,50 @@ +HGG_brats_tcia_pat417_0001 +HGG_brats_tcia_pat205_0001 +HGG_brats_tcia_pat455_0001 +HGG_brats_tcia_pat374_0356 +HGG_brats_tcia_pat473_0001 +HGG_brats_tcia_pat277_0001 +HGG_brats_tcia_pat396_0117 +LGG_brats_tcia_pat299_0001 +HGG_brats_tcia_pat332_0001 +HGG_brats_tcia_pat178_0002 +HGG_brats_tcia_pat199_0001 +HGG_brats_tcia_pat170_0002 +HGG_brats_tcia_pat156_0001 +HGG_brats_tcia_pat447_0313 +HGG_brats_tcia_pat198_0283 +HGG_brats_tcia_pat105_0001 +HGG_brats_2013_pat0002_1 +HGG_brats_tcia_pat406_0001 +LGG_brats_tcia_pat393_0001 +HGG_brats_tcia_pat274_0001 +LGG_brats_tcia_pat141_0001 +HGG_brats_tcia_pat138_0001 +LGG_brats_2013_pat0006_1 +HGG_brats_tcia_pat314_0001 +LGG_brats_2013_pat0014_1 +HGG_brats_tcia_pat447_0122 +HGG_brats_tcia_pat372_0001 +HGG_brats_tcia_pat230_0637 +HGG_brats_tcia_pat247_0001 +HGG_brats_tcia_pat171_0780 +LGG_brats_tcia_pat351_0001 +HGG_brats_tcia_pat399_0527 +HGG_brats_tcia_pat193_0002 +HGG_brats_tcia_pat374_0557 +HGG_brats_2013_pat0024_1 +HGG_brats_tcia_pat374_0909 +HGG_brats_tcia_pat278_0001 +HGG_brats_tcia_pat180_0001 +HGG_brats_tcia_pat399_0595 +HGG_brats_tcia_pat396_0217 +HGG_brats_tcia_pat257_0001 +HGG_brats_tcia_pat157_0001 +HGG_brats_tcia_pat165_0001 +HGG_brats_2013_pat0022_1 +HGG_brats_tcia_pat444_0001 +HGG_brats_tcia_pat399_0002 +HGG_brats_tcia_pat399_0156 +LGG_brats_tcia_pat428_0001 +HGG_brats_tcia_pat171_0950 +HGG_brats_tcia_pat399_0479 diff --git a/config15/test_wt.txt b/config15/test_wt.txt new file mode 100755 index 0000000..6dd616b --- /dev/null +++ b/config15/test_wt.txt @@ -0,0 +1,35 @@ +[data] +data_root = [data/Brats17ValidationData_renamed] +data_names = + +[network1ax] +net_type = MSNet +net_name = MSNet_WT32 +downsample_twice = True +data_shape = [19, 180, 160, 4] +label_shape = [11, 180, 160, 1] +class_num = 2 +model_file = model_pretrain/msnet_wt32_20000.ckpt + +[network1sg] +net_type = MSNet +net_name = MSNet_WT32sg +downsample_twice = True +data_shape = [19, 160, 180, 4] +label_shape = [11, 160, 180, 1] +class_num = 2 +model_file = model_pretrain/msnet_wt32sg_20000.ckpt + +[network1cr] +net_type = MSNet +net_name = MSNet_WT32cr +downsample_twice = True +data_shape = [19, 160, 160, 4] +label_shape = [11, 160, 160, 1] +class_num = 2 +model_file = model_pretrain/msnet_wt32cr_20000.ckpt + +[testing] +test_slice_direction = all +whole_tumor_only = True +save_folder = results_wt diff --git a/config15/train_en_ax.txt b/config15/train_en_ax.txt new file mode 100755 index 0000000..7769393 --- /dev/null +++ b/config15/train_en_ax.txt @@ -0,0 +1,32 @@ +[data] +data_root = [/home/guotwang/data/brats_docker_data/pre_process] +data_names = config/train_names_all_lggx3.txt +modality_postfix = [Flair, T1, T1c, T2] +label_postfix = OT +with_ground_truth = True +batch_size = 5 +data_shape = [19, 64, 64, 4] +label_shape = [11, 64, 64, 1] +label_convert_source = [0, 1, 2, 3, 4] +label_convert_target = [0, 1, 0, 0, 2] +batch_slice_direction = axial +train_with_roi_patch = True +label_roi_mask = [1,3,4] +roi_patch_margin = 5 + +[network] +net_type = MSNet +net_name = MSNet_EN32 +downsample_twice = False +class_num = 3 + +[training] +learning_rate = 1e-3 +decay = 1e-7 +maximal_iteration = 20000 +snapshot_iteration = 5000 +start_iteration = 0 +test_iteration = 100 +test_step = 10 +model_pre_trained = +model_save_prefix = model/msnet_en32 diff --git a/config15/train_en_cr.txt b/config15/train_en_cr.txt new file mode 100755 index 0000000..e4be81e --- /dev/null +++ b/config15/train_en_cr.txt @@ -0,0 +1,32 @@ +[data] +data_root = [/home/guotwang/data/brats_docker_data/pre_process] +data_names = config/train_names_all_lggx3.txt +modality_postfix = [Flair, T1, T1c, T2] +label_postfix = OT +with_ground_truth = True +batch_size = 5 +data_shape = [19, 64, 64, 4] +label_shape = [11, 64, 64, 1] +label_convert_source = [0, 1, 2, 3, 4] +label_convert_target = [0, 1, 0, 0, 2] +batch_slice_direction = coronal +train_with_roi_patch = True +label_roi_mask = [1,3,4] +roi_patch_margin = 5 + +[network] +net_type = MSNet +net_name = MSNet_EN32cr +downsample_twice = False +class_num = 3 + +[training] +learning_rate = 1e-3 +decay = 1e-7 +maximal_iteration = 5000 +snapshot_iteration = 5000 +start_iteration = 1 +test_iteration = 100 +test_step = 10 +model_pre_trained = model/msnet_en32cr_init +model_save_prefix = model/msnet_en32cr \ No newline at end of file diff --git a/config15/train_en_sg.txt b/config15/train_en_sg.txt new file mode 100755 index 0000000..25fff42 --- /dev/null +++ b/config15/train_en_sg.txt @@ -0,0 +1,32 @@ +[data] +data_root = [/home/guotwang/data/brats_docker_data/pre_process] +data_names = config/train_names_all_lggx3.txt +modality_postfix = [Flair, T1, T1c, T2] +label_postfix = OT +with_ground_truth = True +batch_size = 5 +data_shape = [19, 64, 64, 4] +label_shape = [11, 64, 64, 1] +label_convert_source = [0, 1, 2, 3, 4] +label_convert_target = [0, 1, 0, 0, 2] +batch_slice_direction = sagittal +train_with_roi_patch = True +label_roi_mask = [1,3,4] +roi_patch_margin = 5 + +[network] +net_type = MSNet +net_name = MSNet_EN32sg +downsample_twice = False +class_num = 3 + +[training] +learning_rate = 1e-3 +decay = 1e-7 +maximal_iteration = 5000 +snapshot_iteration = 5000 +start_iteration = 1 +test_iteration = 100 +test_step = 10 +model_pre_trained = model/msnet_en32sg_init +model_save_prefix = model/msnet_en32sg \ No newline at end of file diff --git a/config15/train_names.txt b/config15/train_names.txt new file mode 100644 index 0000000..d80eba0 --- /dev/null +++ b/config15/train_names.txt @@ -0,0 +1,224 @@ +HGG_brats_tcia_pat399_0369 +HGG_brats_tcia_pat448_0001 +HGG_brats_tcia_pat396_0294 +HGG_brats_tcia_pat335_0001 +HGG_brats_tcia_pat208_0001 +HGG_brats_tcia_pat230_0511 +HGG_brats_tcia_pat309_0243 +HGG_brats_tcia_pat242_0001 +HGG_brats_tcia_pat190_0001 +HGG_brats_tcia_pat290_0669 +HGG_brats_2013_pat0011_1 +HGG_brats_tcia_pat171_0387 +HGG_brats_tcia_pat439_0333 +HGG_brats_tcia_pat217_0001 +HGG_brats_2013_pat0015_1 +HGG_brats_tcia_pat290_0001 +LGG_brats_tcia_pat420_0001 +HGG_brats_tcia_pat260_0244 +HGG_brats_tcia_pat463_0001 +HGG_brats_tcia_pat153_0002 +HGG_brats_tcia_pat343_0001 +HGG_brats_tcia_pat260_0317 +HGG_brats_2013_pat0004_1 +HGG_brats_tcia_pat411_0001 +HGG_brats_tcia_pat226_0001 +HGG_brats_tcia_pat471_0001 +HGG_brats_tcia_pat280_0001 +HGG_brats_tcia_pat201_0001 +HGG_brats_tcia_pat396_0176 +HGG_brats_tcia_pat153_0294 +HGG_brats_tcia_pat439_0263 +HGG_brats_tcia_pat186_0001 +LGG_brats_2013_pat0013_1 +HGG_brats_tcia_pat375_0001 +HGG_brats_tcia_pat211_0001 +HGG_brats_tcia_pat309_0001 +LGG_brats_tcia_pat254_0001 +HGG_brats_tcia_pat200_0210 +LGG_brats_tcia_pat493_0001 +HGG_brats_tcia_pat491_0001 +LGG_brats_tcia_pat282_0001 +HGG_brats_tcia_pat444_0077 +LGG_brats_tcia_pat202_0001 +HGG_brats_tcia_pat469_0001 +HGG_brats_tcia_pat309_0120 +HGG_brats_tcia_pat192_0001 +HGG_brats_tcia_pat439_0001 +HGG_brats_2013_pat0012_1 +HGG_brats_tcia_pat374_1165 +HGG_brats_tcia_pat118_0001 +HGG_brats_tcia_pat409_0001 +LGG_brats_tcia_pat101_0001 +HGG_brats_tcia_pat444_0038 +HGG_brats_tcia_pat396_0139 +HGG_brats_tcia_pat280_0003 +HGG_brats_tcia_pat370_0001 +HGG_brats_tcia_pat437_0001 +LGG_brats_2013_pat0012_1 +HGG_brats_tcia_pat417_0019 +HGG_brats_tcia_pat153_0165 +HGG_brats_tcia_pat120_0001 +LGG_brats_tcia_pat109_0001 +HGG_brats_tcia_pat133_0001 +HGG_brats_tcia_pat153_0109 +HGG_brats_tcia_pat221_0001 +LGG_brats_2013_pat0011_1 +HGG_brats_tcia_pat374_1426 +LGG_brats_tcia_pat470_0001 +HGG_brats_tcia_pat265_0001 +HGG_brats_tcia_pat479_0001 +LGG_brats_tcia_pat449_0001 +HGG_brats_2013_pat0026_1 +HGG_brats_tcia_pat230_0710 +HGG_brats_tcia_pat338_0001 +HGG_brats_2013_pat0025_1 +HGG_brats_tcia_pat222_0122 +HGG_brats_tcia_pat290_0412 +LGG_brats_tcia_pat255_0001 +LGG_brats_2013_pat0015_1 +LGG_brats_tcia_pat354_0001 +HGG_brats_tcia_pat468_0001 +HGG_brats_tcia_pat260_0129 +HGG_brats_tcia_pat321_0001 +LGG_brats_tcia_pat249_0001 +HGG_brats_tcia_pat361_0001 +HGG_brats_tcia_pat396_0001 +HGG_brats_tcia_pat444_0104 +HGG_brats_tcia_pat478_0001 +HGG_brats_tcia_pat173_0001 +HGG_brats_tcia_pat231_0001 +LGG_brats_tcia_pat408_0001 +HGG_brats_tcia_pat149_0001 +HGG_brats_tcia_pat171_1126 +HGG_brats_tcia_pat499_0001 +HGG_brats_tcia_pat424_0001 +HGG_brats_tcia_pat171_0001 +HGG_brats_tcia_pat283_0001 +LGG_brats_tcia_pat307_0001 +HGG_brats_2013_pat0006_1 +HGG_brats_tcia_pat401_0001 +HGG_brats_tcia_pat396_0105 +LGG_brats_tcia_pat241_0001 +HGG_brats_tcia_pat113_0001 +HGG_brats_2013_pat0001_1 +HGG_brats_tcia_pat370_0383 +HGG_brats_tcia_pat429_0001 +HGG_brats_tcia_pat430_0001 +HGG_brats_tcia_pat390_0001 +LGG_brats_2013_pat0004_1 +HGG_brats_tcia_pat153_0277 +HGG_brats_tcia_pat147_0001 +HGG_brats_tcia_pat444_0033 +HGG_brats_tcia_pat153_0181 +HGG_brats_tcia_pat460_0001 +HGG_brats_tcia_pat374_0801 +HGG_brats_tcia_pat179_0001 +HGG_brats_tcia_pat198_0001 +HGG_brats_tcia_pat171_0618 +HGG_brats_tcia_pat235_0001 +HGG_brats_2013_pat0003_1 +HGG_brats_tcia_pat370_1354 +LGG_brats_tcia_pat483_0001 +HGG_brats_tcia_pat290_0580 +HGG_brats_tcia_pat370_0907 +LGG_brats_tcia_pat266_0001 +HGG_brats_2013_pat0009_1 +LGG_brats_2013_pat0002_1 +HGG_brats_tcia_pat425_0001 +HGG_brats_tcia_pat399_0815 +HGG_brats_2013_pat0005_1 +LGG_brats_tcia_pat466_0001 +HGG_brats_tcia_pat226_0090 +HGG_brats_tcia_pat309_0320 +HGG_brats_tcia_pat171_1231 +LGG_brats_tcia_pat387_0001 +HGG_brats_tcia_pat368_0001 +HGG_brats_2013_pat0013_1 +HGG_brats_tcia_pat162_0001 +LGG_brats_tcia_pat177_0001 +HGG_brats_tcia_pat399_0217 +HGG_brats_tcia_pat328_0001 +HGG_brats_2013_pat0007_1 +LGG_brats_tcia_pat346_0001 +HGG_brats_tcia_pat370_0569 +HGG_brats_tcia_pat392_0340 +HGG_brats_tcia_pat432_0001 +HGG_brats_tcia_pat184_0001 +HGG_brats_tcia_pat258_0001 +HGG_brats_tcia_pat234_0001 +LGG_brats_2013_pat0001_1 +HGG_brats_tcia_pat314_0290 +HGG_brats_tcia_pat394_0001 +HGG_brats_tcia_pat309_0203 +LGG_brats_tcia_pat325_0001 +HGG_brats_tcia_pat377_0640 +LGG_brats_tcia_pat103_0001 +HGG_brats_tcia_pat135_0001 +LGG_brats_tcia_pat410_0001 +HGG_brats_tcia_pat296_0001 +HGG_brats_tcia_pat260_0001 +LGG_brats_tcia_pat152_0001 +HGG_brats_tcia_pat378_0001 +HGG_brats_tcia_pat498_0001 +HGG_brats_tcia_pat260_0152 +LGG_brats_tcia_pat312_0001 +HGG_brats_tcia_pat183_0001 +HGG_brats_tcia_pat314_0016 +LGG_brats_tcia_pat261_0001 +HGG_brats_tcia_pat218_0001 +HGG_brats_tcia_pat260_0075 +HGG_brats_tcia_pat300_0001 +HGG_brats_tcia_pat117_0001 +HGG_brats_tcia_pat167_0001 +LGG_brats_tcia_pat330_0001 +HGG_brats_tcia_pat322_0001 +HGG_brats_tcia_pat164_0001 +HGG_brats_tcia_pat331_0001 +HGG_brats_2013_pat0008_1 +HGG_brats_tcia_pat111_0001 +LGG_brats_tcia_pat130_0001 +HGG_brats_2013_pat0027_1 +HGG_brats_tcia_pat171_0200 +LGG_brats_tcia_pat451_0001 +HGG_brats_tcia_pat314_0150 +HGG_brats_tcia_pat370_1470 +LGG_brats_tcia_pat480_0001 +LGG_brats_tcia_pat413_0001 +LGG_brats_tcia_pat442_0001 +HGG_brats_2013_pat0010_1 +HGG_brats_tcia_pat168_0001 +HGG_brats_tcia_pat404_0001 +HGG_brats_tcia_pat131_0001 +LGG_brats_tcia_pat490_0001 +HGG_brats_tcia_pat447_0199 +HGG_brats_tcia_pat412_0001 +LGG_brats_2013_pat0008_1 +HGG_brats_tcia_pat290_0305 +HGG_brats_tcia_pat374_1627 +LGG_brats_tcia_pat298_0001 +HGG_brats_tcia_pat439_0360 +LGG_brats_tcia_pat276_0001 +HGG_brats_tcia_pat419_0001 +HGG_brats_2013_pat0014_1 +HGG_brats_tcia_pat150_0001 +HGG_brats_tcia_pat203_0001 +HGG_brats_tcia_pat370_1126 +HGG_brats_tcia_pat230_0481 +HGG_brats_tcia_pat319_0001 +HGG_brats_tcia_pat399_0417 +HGG_brats_tcia_pat374_0001 +HGG_brats_tcia_pat391_0002 +HGG_brats_tcia_pat309_0462 +HGG_brats_tcia_pat222_0304 +HGG_brats_tcia_pat121_0001 +HGG_brats_tcia_pat151_0001 +HGG_brats_tcia_pat124_0003 +HGG_brats_tcia_pat377_0001 +LGG_brats_tcia_pat402_0001 +HGG_brats_tcia_pat230_0199 +LGG_brats_tcia_pat175_0001 +LGG_brats_tcia_pat462_0001 +HGG_brats_tcia_pat399_0290 +HGG_brats_tcia_pat474_0001 +HGG_brats_tcia_pat436_0001 diff --git a/config15/train_names_all.txt b/config15/train_names_all.txt new file mode 100755 index 0000000..f7bcb8f --- /dev/null +++ b/config15/train_names_all.txt @@ -0,0 +1,274 @@ +HGG_brats_tcia_pat399_0369 +HGG_brats_tcia_pat448_0001 +HGG_brats_tcia_pat396_0294 +HGG_brats_tcia_pat335_0001 +HGG_brats_tcia_pat208_0001 +HGG_brats_tcia_pat230_0511 +HGG_brats_tcia_pat309_0243 +HGG_brats_tcia_pat242_0001 +HGG_brats_tcia_pat190_0001 +HGG_brats_tcia_pat290_0669 +HGG_brats_2013_pat0011_1 +HGG_brats_tcia_pat171_0387 +HGG_brats_tcia_pat439_0333 +HGG_brats_tcia_pat217_0001 +HGG_brats_2013_pat0015_1 +HGG_brats_tcia_pat290_0001 +LGG_brats_tcia_pat420_0001 +HGG_brats_tcia_pat260_0244 +HGG_brats_tcia_pat463_0001 +HGG_brats_tcia_pat153_0002 +HGG_brats_tcia_pat343_0001 +HGG_brats_tcia_pat260_0317 +HGG_brats_2013_pat0004_1 +HGG_brats_tcia_pat411_0001 +HGG_brats_tcia_pat226_0001 +HGG_brats_tcia_pat471_0001 +HGG_brats_tcia_pat280_0001 +HGG_brats_tcia_pat201_0001 +HGG_brats_tcia_pat396_0176 +HGG_brats_tcia_pat153_0294 +HGG_brats_tcia_pat439_0263 +HGG_brats_tcia_pat186_0001 +LGG_brats_2013_pat0013_1 +HGG_brats_tcia_pat375_0001 +HGG_brats_tcia_pat211_0001 +HGG_brats_tcia_pat309_0001 +LGG_brats_tcia_pat254_0001 +HGG_brats_tcia_pat200_0210 +LGG_brats_tcia_pat493_0001 +HGG_brats_tcia_pat491_0001 +LGG_brats_tcia_pat282_0001 +HGG_brats_tcia_pat444_0077 +LGG_brats_tcia_pat202_0001 +HGG_brats_tcia_pat469_0001 +HGG_brats_tcia_pat309_0120 +HGG_brats_tcia_pat192_0001 +HGG_brats_tcia_pat439_0001 +HGG_brats_2013_pat0012_1 +HGG_brats_tcia_pat374_1165 +HGG_brats_tcia_pat118_0001 +HGG_brats_tcia_pat409_0001 +LGG_brats_tcia_pat101_0001 +HGG_brats_tcia_pat444_0038 +HGG_brats_tcia_pat396_0139 +HGG_brats_tcia_pat280_0003 +HGG_brats_tcia_pat370_0001 +HGG_brats_tcia_pat437_0001 +LGG_brats_2013_pat0012_1 +HGG_brats_tcia_pat417_0019 +HGG_brats_tcia_pat153_0165 +HGG_brats_tcia_pat120_0001 +LGG_brats_tcia_pat109_0001 +HGG_brats_tcia_pat133_0001 +HGG_brats_tcia_pat153_0109 +HGG_brats_tcia_pat221_0001 +LGG_brats_2013_pat0011_1 +HGG_brats_tcia_pat374_1426 +LGG_brats_tcia_pat470_0001 +HGG_brats_tcia_pat265_0001 +HGG_brats_tcia_pat479_0001 +LGG_brats_tcia_pat449_0001 +HGG_brats_2013_pat0026_1 +HGG_brats_tcia_pat230_0710 +HGG_brats_tcia_pat338_0001 +HGG_brats_2013_pat0025_1 +HGG_brats_tcia_pat222_0122 +HGG_brats_tcia_pat290_0412 +LGG_brats_tcia_pat255_0001 +LGG_brats_2013_pat0015_1 +LGG_brats_tcia_pat354_0001 +HGG_brats_tcia_pat468_0001 +HGG_brats_tcia_pat260_0129 +HGG_brats_tcia_pat321_0001 +LGG_brats_tcia_pat249_0001 +HGG_brats_tcia_pat361_0001 +HGG_brats_tcia_pat396_0001 +HGG_brats_tcia_pat444_0104 +HGG_brats_tcia_pat478_0001 +HGG_brats_tcia_pat173_0001 +HGG_brats_tcia_pat231_0001 +LGG_brats_tcia_pat408_0001 +HGG_brats_tcia_pat149_0001 +HGG_brats_tcia_pat171_1126 +HGG_brats_tcia_pat499_0001 +HGG_brats_tcia_pat424_0001 +HGG_brats_tcia_pat171_0001 +HGG_brats_tcia_pat283_0001 +LGG_brats_tcia_pat307_0001 +HGG_brats_2013_pat0006_1 +HGG_brats_tcia_pat401_0001 +HGG_brats_tcia_pat396_0105 +LGG_brats_tcia_pat241_0001 +HGG_brats_tcia_pat113_0001 +HGG_brats_2013_pat0001_1 +HGG_brats_tcia_pat370_0383 +HGG_brats_tcia_pat429_0001 +HGG_brats_tcia_pat430_0001 +HGG_brats_tcia_pat390_0001 +LGG_brats_2013_pat0004_1 +HGG_brats_tcia_pat153_0277 +HGG_brats_tcia_pat147_0001 +HGG_brats_tcia_pat444_0033 +HGG_brats_tcia_pat153_0181 +HGG_brats_tcia_pat460_0001 +HGG_brats_tcia_pat374_0801 +HGG_brats_tcia_pat179_0001 +HGG_brats_tcia_pat198_0001 +HGG_brats_tcia_pat171_0618 +HGG_brats_tcia_pat235_0001 +HGG_brats_2013_pat0003_1 +HGG_brats_tcia_pat370_1354 +LGG_brats_tcia_pat483_0001 +HGG_brats_tcia_pat290_0580 +HGG_brats_tcia_pat370_0907 +LGG_brats_tcia_pat266_0001 +HGG_brats_2013_pat0009_1 +LGG_brats_2013_pat0002_1 +HGG_brats_tcia_pat425_0001 +HGG_brats_tcia_pat399_0815 +HGG_brats_2013_pat0005_1 +LGG_brats_tcia_pat466_0001 +HGG_brats_tcia_pat226_0090 +HGG_brats_tcia_pat309_0320 +HGG_brats_tcia_pat171_1231 +LGG_brats_tcia_pat387_0001 +HGG_brats_tcia_pat368_0001 +HGG_brats_2013_pat0013_1 +HGG_brats_tcia_pat162_0001 +LGG_brats_tcia_pat177_0001 +HGG_brats_tcia_pat399_0217 +HGG_brats_tcia_pat328_0001 +HGG_brats_2013_pat0007_1 +LGG_brats_tcia_pat346_0001 +HGG_brats_tcia_pat370_0569 +HGG_brats_tcia_pat392_0340 +HGG_brats_tcia_pat432_0001 +HGG_brats_tcia_pat184_0001 +HGG_brats_tcia_pat258_0001 +HGG_brats_tcia_pat234_0001 +LGG_brats_2013_pat0001_1 +HGG_brats_tcia_pat314_0290 +HGG_brats_tcia_pat394_0001 +HGG_brats_tcia_pat309_0203 +LGG_brats_tcia_pat325_0001 +HGG_brats_tcia_pat377_0640 +LGG_brats_tcia_pat103_0001 +HGG_brats_tcia_pat135_0001 +LGG_brats_tcia_pat410_0001 +HGG_brats_tcia_pat296_0001 +HGG_brats_tcia_pat260_0001 +LGG_brats_tcia_pat152_0001 +HGG_brats_tcia_pat378_0001 +HGG_brats_tcia_pat498_0001 +HGG_brats_tcia_pat260_0152 +LGG_brats_tcia_pat312_0001 +HGG_brats_tcia_pat183_0001 +HGG_brats_tcia_pat314_0016 +LGG_brats_tcia_pat261_0001 +HGG_brats_tcia_pat218_0001 +HGG_brats_tcia_pat260_0075 +HGG_brats_tcia_pat300_0001 +HGG_brats_tcia_pat117_0001 +HGG_brats_tcia_pat167_0001 +LGG_brats_tcia_pat330_0001 +HGG_brats_tcia_pat322_0001 +HGG_brats_tcia_pat164_0001 +HGG_brats_tcia_pat331_0001 +HGG_brats_2013_pat0008_1 +HGG_brats_tcia_pat111_0001 +LGG_brats_tcia_pat130_0001 +HGG_brats_2013_pat0027_1 +HGG_brats_tcia_pat171_0200 +LGG_brats_tcia_pat451_0001 +HGG_brats_tcia_pat314_0150 +HGG_brats_tcia_pat370_1470 +LGG_brats_tcia_pat480_0001 +LGG_brats_tcia_pat413_0001 +LGG_brats_tcia_pat442_0001 +HGG_brats_2013_pat0010_1 +HGG_brats_tcia_pat168_0001 +HGG_brats_tcia_pat404_0001 +HGG_brats_tcia_pat131_0001 +LGG_brats_tcia_pat490_0001 +HGG_brats_tcia_pat447_0199 +HGG_brats_tcia_pat412_0001 +LGG_brats_2013_pat0008_1 +HGG_brats_tcia_pat290_0305 +HGG_brats_tcia_pat374_1627 +LGG_brats_tcia_pat298_0001 +HGG_brats_tcia_pat439_0360 +LGG_brats_tcia_pat276_0001 +HGG_brats_tcia_pat419_0001 +HGG_brats_2013_pat0014_1 +HGG_brats_tcia_pat150_0001 +HGG_brats_tcia_pat203_0001 +HGG_brats_tcia_pat370_1126 +HGG_brats_tcia_pat230_0481 +HGG_brats_tcia_pat319_0001 +HGG_brats_tcia_pat399_0417 +HGG_brats_tcia_pat374_0001 +HGG_brats_tcia_pat391_0002 +HGG_brats_tcia_pat309_0462 +HGG_brats_tcia_pat222_0304 +HGG_brats_tcia_pat121_0001 +HGG_brats_tcia_pat151_0001 +HGG_brats_tcia_pat124_0003 +HGG_brats_tcia_pat377_0001 +LGG_brats_tcia_pat402_0001 +HGG_brats_tcia_pat230_0199 +LGG_brats_tcia_pat175_0001 +LGG_brats_tcia_pat462_0001 +HGG_brats_tcia_pat399_0290 +HGG_brats_tcia_pat474_0001 +HGG_brats_tcia_pat436_0001 +HGG_brats_tcia_pat417_0001 +HGG_brats_tcia_pat205_0001 +HGG_brats_tcia_pat455_0001 +HGG_brats_tcia_pat374_0356 +HGG_brats_tcia_pat473_0001 +HGG_brats_tcia_pat277_0001 +HGG_brats_tcia_pat396_0117 +LGG_brats_tcia_pat299_0001 +HGG_brats_tcia_pat332_0001 +HGG_brats_tcia_pat178_0002 +HGG_brats_tcia_pat199_0001 +HGG_brats_tcia_pat170_0002 +HGG_brats_tcia_pat156_0001 +HGG_brats_tcia_pat447_0313 +HGG_brats_tcia_pat198_0283 +HGG_brats_tcia_pat105_0001 +HGG_brats_2013_pat0002_1 +HGG_brats_tcia_pat406_0001 +LGG_brats_tcia_pat393_0001 +HGG_brats_tcia_pat274_0001 +LGG_brats_tcia_pat141_0001 +HGG_brats_tcia_pat138_0001 +LGG_brats_2013_pat0006_1 +HGG_brats_tcia_pat314_0001 +LGG_brats_2013_pat0014_1 +HGG_brats_tcia_pat447_0122 +HGG_brats_tcia_pat372_0001 +HGG_brats_tcia_pat230_0637 +HGG_brats_tcia_pat247_0001 +HGG_brats_tcia_pat171_0780 +LGG_brats_tcia_pat351_0001 +HGG_brats_tcia_pat399_0527 +HGG_brats_tcia_pat193_0002 +HGG_brats_tcia_pat374_0557 +HGG_brats_2013_pat0024_1 +HGG_brats_tcia_pat374_0909 +HGG_brats_tcia_pat278_0001 +HGG_brats_tcia_pat180_0001 +HGG_brats_tcia_pat399_0595 +HGG_brats_tcia_pat396_0217 +HGG_brats_tcia_pat257_0001 +HGG_brats_tcia_pat157_0001 +HGG_brats_tcia_pat165_0001 +HGG_brats_2013_pat0022_1 +HGG_brats_tcia_pat444_0001 +HGG_brats_tcia_pat399_0002 +HGG_brats_tcia_pat399_0156 +LGG_brats_tcia_pat428_0001 +HGG_brats_tcia_pat171_0950 +HGG_brats_tcia_pat399_0479 \ No newline at end of file diff --git a/config15/train_names_all_lggx3.txt b/config15/train_names_all_lggx3.txt new file mode 100755 index 0000000..3b72c0f --- /dev/null +++ b/config15/train_names_all_lggx3.txt @@ -0,0 +1,3 @@ +HGG_brats_2013_pat0001_1 HGG_brats_2013_pat0002_1 HGG_brats_2013_pat0003_1 HGG_brats_2013_pat0004_1 HGG_brats_2013_pat0005_1 HGG_brats_2013_pat0006_1 HGG_brats_2013_pat0007_1 HGG_brats_2013_pat0008_1 HGG_brats_2013_pat0009_1 HGG_brats_2013_pat0010_1 HGG_brats_2013_pat0011_1 HGG_brats_2013_pat0012_1 HGG_brats_2013_pat0013_1 HGG_brats_2013_pat0014_1 HGG_brats_2013_pat0015_1 HGG_brats_2013_pat0022_1 HGG_brats_2013_pat0024_1 HGG_brats_2013_pat0025_1 HGG_brats_2013_pat0026_1 HGG_brats_2013_pat0027_1 HGG_brats_tcia_pat105_0001 HGG_brats_tcia_pat111_0001 HGG_brats_tcia_pat113_0001 HGG_brats_tcia_pat117_0001 HGG_brats_tcia_pat118_0001 HGG_brats_tcia_pat120_0001 HGG_brats_tcia_pat121_0001 HGG_brats_tcia_pat124_0003 HGG_brats_tcia_pat131_0001 HGG_brats_tcia_pat133_0001 HGG_brats_tcia_pat135_0001 HGG_brats_tcia_pat138_0001 HGG_brats_tcia_pat147_0001 HGG_brats_tcia_pat149_0001 HGG_brats_tcia_pat150_0001 HGG_brats_tcia_pat151_0001 HGG_brats_tcia_pat153_0002 HGG_brats_tcia_pat153_0109 HGG_brats_tcia_pat153_0165 HGG_brats_tcia_pat153_0181 HGG_brats_tcia_pat153_0277 HGG_brats_tcia_pat153_0294 HGG_brats_tcia_pat156_0001 HGG_brats_tcia_pat157_0001 HGG_brats_tcia_pat162_0001 HGG_brats_tcia_pat164_0001 HGG_brats_tcia_pat165_0001 HGG_brats_tcia_pat167_0001 HGG_brats_tcia_pat168_0001 HGG_brats_tcia_pat170_0002 HGG_brats_tcia_pat171_0001 HGG_brats_tcia_pat171_0200 HGG_brats_tcia_pat171_0387 HGG_brats_tcia_pat171_0618 HGG_brats_tcia_pat171_0780 HGG_brats_tcia_pat171_0950 HGG_brats_tcia_pat171_1126 HGG_brats_tcia_pat171_1231 HGG_brats_tcia_pat173_0001 HGG_brats_tcia_pat178_0002 HGG_brats_tcia_pat179_0001 HGG_brats_tcia_pat180_0001 HGG_brats_tcia_pat183_0001 HGG_brats_tcia_pat184_0001 HGG_brats_tcia_pat186_0001 HGG_brats_tcia_pat190_0001 HGG_brats_tcia_pat192_0001 HGG_brats_tcia_pat193_0002 HGG_brats_tcia_pat198_0001 HGG_brats_tcia_pat198_0283 HGG_brats_tcia_pat199_0001 HGG_brats_tcia_pat200_0210 HGG_brats_tcia_pat201_0001 HGG_brats_tcia_pat203_0001 HGG_brats_tcia_pat205_0001 HGG_brats_tcia_pat208_0001 HGG_brats_tcia_pat211_0001 HGG_brats_tcia_pat217_0001 HGG_brats_tcia_pat218_0001 HGG_brats_tcia_pat221_0001 HGG_brats_tcia_pat222_0122 HGG_brats_tcia_pat222_0304 HGG_brats_tcia_pat226_0001 HGG_brats_tcia_pat226_0090 HGG_brats_tcia_pat230_0199 HGG_brats_tcia_pat230_0481 HGG_brats_tcia_pat230_0511 HGG_brats_tcia_pat230_0637 HGG_brats_tcia_pat230_0710 HGG_brats_tcia_pat231_0001 HGG_brats_tcia_pat234_0001 HGG_brats_tcia_pat235_0001 HGG_brats_tcia_pat242_0001 HGG_brats_tcia_pat247_0001 HGG_brats_tcia_pat257_0001 HGG_brats_tcia_pat258_0001 HGG_brats_tcia_pat260_0001 HGG_brats_tcia_pat260_0075 HGG_brats_tcia_pat260_0129 HGG_brats_tcia_pat260_0152 HGG_brats_tcia_pat260_0244 HGG_brats_tcia_pat260_0317 HGG_brats_tcia_pat265_0001 HGG_brats_tcia_pat274_0001 HGG_brats_tcia_pat277_0001 HGG_brats_tcia_pat278_0001 HGG_brats_tcia_pat280_0001 HGG_brats_tcia_pat280_0003 HGG_brats_tcia_pat283_0001 HGG_brats_tcia_pat290_0001 HGG_brats_tcia_pat290_0305 HGG_brats_tcia_pat290_0412 HGG_brats_tcia_pat290_0580 HGG_brats_tcia_pat290_0669 HGG_brats_tcia_pat296_0001 HGG_brats_tcia_pat300_0001 HGG_brats_tcia_pat309_0001 HGG_brats_tcia_pat309_0120 HGG_brats_tcia_pat309_0203 HGG_brats_tcia_pat309_0243 HGG_brats_tcia_pat309_0320 HGG_brats_tcia_pat309_0462 HGG_brats_tcia_pat314_0001 HGG_brats_tcia_pat314_0016 HGG_brats_tcia_pat314_0150 HGG_brats_tcia_pat314_0290 HGG_brats_tcia_pat319_0001 HGG_brats_tcia_pat321_0001 HGG_brats_tcia_pat322_0001 HGG_brats_tcia_pat328_0001 HGG_brats_tcia_pat331_0001 HGG_brats_tcia_pat332_0001 HGG_brats_tcia_pat335_0001 HGG_brats_tcia_pat338_0001 HGG_brats_tcia_pat343_0001 HGG_brats_tcia_pat361_0001 HGG_brats_tcia_pat368_0001 HGG_brats_tcia_pat370_0001 HGG_brats_tcia_pat370_0383 HGG_brats_tcia_pat370_0569 HGG_brats_tcia_pat370_0907 HGG_brats_tcia_pat370_1126 HGG_brats_tcia_pat370_1354 HGG_brats_tcia_pat370_1470 HGG_brats_tcia_pat372_0001 HGG_brats_tcia_pat374_0001 HGG_brats_tcia_pat374_0356 HGG_brats_tcia_pat374_0557 HGG_brats_tcia_pat374_0801 HGG_brats_tcia_pat374_0909 HGG_brats_tcia_pat374_1165 HGG_brats_tcia_pat374_1426 HGG_brats_tcia_pat374_1627 HGG_brats_tcia_pat375_0001 HGG_brats_tcia_pat377_0001 HGG_brats_tcia_pat377_0640 HGG_brats_tcia_pat378_0001 HGG_brats_tcia_pat390_0001 HGG_brats_tcia_pat391_0002 HGG_brats_tcia_pat392_0340 HGG_brats_tcia_pat394_0001 HGG_brats_tcia_pat396_0001 HGG_brats_tcia_pat396_0105 HGG_brats_tcia_pat396_0117 HGG_brats_tcia_pat396_0139 HGG_brats_tcia_pat396_0176 HGG_brats_tcia_pat396_0217 HGG_brats_tcia_pat396_0294 HGG_brats_tcia_pat399_0002 HGG_brats_tcia_pat399_0156 HGG_brats_tcia_pat399_0217 HGG_brats_tcia_pat399_0290 HGG_brats_tcia_pat399_0369 HGG_brats_tcia_pat399_0417 HGG_brats_tcia_pat399_0479 HGG_brats_tcia_pat399_0527 HGG_brats_tcia_pat399_0595 HGG_brats_tcia_pat399_0815 HGG_brats_tcia_pat401_0001 HGG_brats_tcia_pat404_0001 HGG_brats_tcia_pat406_0001 HGG_brats_tcia_pat409_0001 HGG_brats_tcia_pat411_0001 HGG_brats_tcia_pat412_0001 HGG_brats_tcia_pat417_0001 HGG_brats_tcia_pat417_0019 HGG_brats_tcia_pat419_0001 HGG_brats_tcia_pat424_0001 HGG_brats_tcia_pat425_0001 HGG_brats_tcia_pat429_0001 HGG_brats_tcia_pat430_0001 HGG_brats_tcia_pat432_0001 HGG_brats_tcia_pat436_0001 HGG_brats_tcia_pat437_0001 HGG_brats_tcia_pat439_0001 HGG_brats_tcia_pat439_0263 HGG_brats_tcia_pat439_0333 HGG_brats_tcia_pat439_0360 HGG_brats_tcia_pat444_0001 HGG_brats_tcia_pat444_0033 HGG_brats_tcia_pat444_0038 HGG_brats_tcia_pat444_0077 HGG_brats_tcia_pat444_0104 HGG_brats_tcia_pat447_0122 HGG_brats_tcia_pat447_0199 HGG_brats_tcia_pat447_0313 HGG_brats_tcia_pat448_0001 HGG_brats_tcia_pat455_0001 HGG_brats_tcia_pat460_0001 HGG_brats_tcia_pat463_0001 HGG_brats_tcia_pat468_0001 HGG_brats_tcia_pat469_0001 HGG_brats_tcia_pat471_0001 HGG_brats_tcia_pat473_0001 HGG_brats_tcia_pat474_0001 HGG_brats_tcia_pat478_0001 HGG_brats_tcia_pat479_0001 HGG_brats_tcia_pat491_0001 HGG_brats_tcia_pat498_0001 HGG_brats_tcia_pat499_0001 LGG_brats_2013_pat0001_1 LGG_brats_2013_pat0002_1 LGG_brats_2013_pat0004_1 LGG_brats_2013_pat0006_1 LGG_brats_2013_pat0008_1 LGG_brats_2013_pat0011_1 LGG_brats_2013_pat0012_1 LGG_brats_2013_pat0013_1 LGG_brats_2013_pat0014_1 LGG_brats_2013_pat0015_1 LGG_brats_tcia_pat101_0001 LGG_brats_tcia_pat103_0001 LGG_brats_tcia_pat109_0001 LGG_brats_tcia_pat130_0001 LGG_brats_tcia_pat141_0001 LGG_brats_tcia_pat152_0001 LGG_brats_tcia_pat175_0001 LGG_brats_tcia_pat177_0001 LGG_brats_tcia_pat202_0001 LGG_brats_tcia_pat241_0001 LGG_brats_tcia_pat249_0001 LGG_brats_tcia_pat254_0001 LGG_brats_tcia_pat255_0001 LGG_brats_tcia_pat261_0001 LGG_brats_tcia_pat266_0001 LGG_brats_tcia_pat276_0001 LGG_brats_tcia_pat282_0001 LGG_brats_tcia_pat298_0001 LGG_brats_tcia_pat299_0001 LGG_brats_tcia_pat307_0001 LGG_brats_tcia_pat312_0001 LGG_brats_tcia_pat325_0001 LGG_brats_tcia_pat330_0001 LGG_brats_tcia_pat346_0001 LGG_brats_tcia_pat351_0001 LGG_brats_tcia_pat354_0001 LGG_brats_tcia_pat387_0001 LGG_brats_tcia_pat393_0001 LGG_brats_tcia_pat402_0001 LGG_brats_tcia_pat408_0001 LGG_brats_tcia_pat410_0001 LGG_brats_tcia_pat413_0001 LGG_brats_tcia_pat420_0001 LGG_brats_tcia_pat428_0001 LGG_brats_tcia_pat442_0001 LGG_brats_tcia_pat449_0001 LGG_brats_tcia_pat451_0001 LGG_brats_tcia_pat462_0001 LGG_brats_tcia_pat466_0001 LGG_brats_tcia_pat470_0001 LGG_brats_tcia_pat480_0001 LGG_brats_tcia_pat483_0001 LGG_brats_tcia_pat490_0001 LGG_brats_tcia_pat493_0001 +LGG_brats_2013_pat0001_1 LGG_brats_2013_pat0002_1 LGG_brats_2013_pat0004_1 LGG_brats_2013_pat0006_1 LGG_brats_2013_pat0008_1 LGG_brats_2013_pat0011_1 LGG_brats_2013_pat0012_1 LGG_brats_2013_pat0013_1 LGG_brats_2013_pat0014_1 LGG_brats_2013_pat0015_1 LGG_brats_tcia_pat101_0001 LGG_brats_tcia_pat103_0001 LGG_brats_tcia_pat109_0001 LGG_brats_tcia_pat130_0001 LGG_brats_tcia_pat141_0001 LGG_brats_tcia_pat152_0001 LGG_brats_tcia_pat175_0001 LGG_brats_tcia_pat177_0001 LGG_brats_tcia_pat202_0001 LGG_brats_tcia_pat241_0001 LGG_brats_tcia_pat249_0001 LGG_brats_tcia_pat254_0001 LGG_brats_tcia_pat255_0001 LGG_brats_tcia_pat261_0001 LGG_brats_tcia_pat266_0001 LGG_brats_tcia_pat276_0001 LGG_brats_tcia_pat282_0001 LGG_brats_tcia_pat298_0001 LGG_brats_tcia_pat299_0001 LGG_brats_tcia_pat307_0001 LGG_brats_tcia_pat312_0001 LGG_brats_tcia_pat325_0001 LGG_brats_tcia_pat330_0001 LGG_brats_tcia_pat346_0001 LGG_brats_tcia_pat351_0001 LGG_brats_tcia_pat354_0001 LGG_brats_tcia_pat387_0001 LGG_brats_tcia_pat393_0001 LGG_brats_tcia_pat402_0001 LGG_brats_tcia_pat408_0001 LGG_brats_tcia_pat410_0001 LGG_brats_tcia_pat413_0001 LGG_brats_tcia_pat420_0001 LGG_brats_tcia_pat428_0001 LGG_brats_tcia_pat442_0001 LGG_brats_tcia_pat449_0001 LGG_brats_tcia_pat451_0001 LGG_brats_tcia_pat462_0001 LGG_brats_tcia_pat466_0001 LGG_brats_tcia_pat470_0001 LGG_brats_tcia_pat480_0001 LGG_brats_tcia_pat483_0001 LGG_brats_tcia_pat490_0001 LGG_brats_tcia_pat493_0001 +LGG_brats_2013_pat0001_1 LGG_brats_2013_pat0002_1 LGG_brats_2013_pat0004_1 LGG_brats_2013_pat0006_1 LGG_brats_2013_pat0008_1 LGG_brats_2013_pat0011_1 LGG_brats_2013_pat0012_1 LGG_brats_2013_pat0013_1 LGG_brats_2013_pat0014_1 LGG_brats_2013_pat0015_1 LGG_brats_tcia_pat101_0001 LGG_brats_tcia_pat103_0001 LGG_brats_tcia_pat109_0001 LGG_brats_tcia_pat130_0001 LGG_brats_tcia_pat141_0001 LGG_brats_tcia_pat152_0001 LGG_brats_tcia_pat175_0001 LGG_brats_tcia_pat177_0001 LGG_brats_tcia_pat202_0001 LGG_brats_tcia_pat241_0001 LGG_brats_tcia_pat249_0001 LGG_brats_tcia_pat254_0001 LGG_brats_tcia_pat255_0001 LGG_brats_tcia_pat261_0001 LGG_brats_tcia_pat266_0001 LGG_brats_tcia_pat276_0001 LGG_brats_tcia_pat282_0001 LGG_brats_tcia_pat298_0001 LGG_brats_tcia_pat299_0001 LGG_brats_tcia_pat307_0001 LGG_brats_tcia_pat312_0001 LGG_brats_tcia_pat325_0001 LGG_brats_tcia_pat330_0001 LGG_brats_tcia_pat346_0001 LGG_brats_tcia_pat351_0001 LGG_brats_tcia_pat354_0001 LGG_brats_tcia_pat387_0001 LGG_brats_tcia_pat393_0001 LGG_brats_tcia_pat402_0001 LGG_brats_tcia_pat408_0001 LGG_brats_tcia_pat410_0001 LGG_brats_tcia_pat413_0001 LGG_brats_tcia_pat420_0001 LGG_brats_tcia_pat428_0001 LGG_brats_tcia_pat442_0001 LGG_brats_tcia_pat449_0001 LGG_brats_tcia_pat451_0001 LGG_brats_tcia_pat462_0001 LGG_brats_tcia_pat466_0001 LGG_brats_tcia_pat470_0001 LGG_brats_tcia_pat480_0001 LGG_brats_tcia_pat483_0001 LGG_brats_tcia_pat490_0001 LGG_brats_tcia_pat493_0001 \ No newline at end of file diff --git a/config15/train_tc_ax.txt b/config15/train_tc_ax.txt new file mode 100755 index 0000000..74ee70a --- /dev/null +++ b/config15/train_tc_ax.txt @@ -0,0 +1,32 @@ +[data] +data_root = [/home/guotwang/data/brats_docker_data/pre_process] +data_names = config/train_names_all_lggx3.txt +modality_postfix = [Flair, T1, T1c, T2] +label_postfix = OT +with_ground_truth = True +batch_size = 5 +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +label_convert_source = [0, 1, 2, 3, 4] +label_convert_target = [0, 1, 0, 1, 1] +batch_slice_direction = axial +train_with_roi_patch = True +label_roi_mask = [1,2,3,4] +roi_patch_margin = 5 + +[network] +net_type = MSNet +net_name = MSNet_TC32 +downsample_twice = True +class_num = 2 + +[training] +learning_rate = 1e-3 +decay = 1e-7 +maximal_iteration = 20000 +snapshot_iteration = 5000 +start_iteration = 0 +test_iteration = 100 +test_step = 10 +model_pre_trained = +model_save_prefix = model/msnet_tc32 \ No newline at end of file diff --git a/config15/train_tc_cr.txt b/config15/train_tc_cr.txt new file mode 100755 index 0000000..55782b4 --- /dev/null +++ b/config15/train_tc_cr.txt @@ -0,0 +1,32 @@ +[data] +data_root = [/home/guotwang/data/brats_docker_data/pre_process] +data_names = config/train_names_all_lggx3.txt +modality_postfix = [Flair, T1, T1c, T2] +label_postfix = OT +with_ground_truth = True +batch_size = 5 +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +label_convert_source = [0, 1, 2, 3, 4] +label_convert_target = [0, 1, 0, 1, 1] +batch_slice_direction = coronal +train_with_roi_patch = True +label_roi_mask = [1,2,3,4] +roi_patch_margin = 5 + +[network] +net_type = MSNet +net_name = MSNet_TC32cr +downsample_twice = True +class_num = 2 + +[training] +learning_rate = 1e-3 +decay = 1e-7 +maximal_iteration = 5000 +snapshot_iteration = 5000 +start_iteration = 1 +test_iteration = 100 +test_step = 10 +model_pre_trained = model/msnet_tc32cr_init +model_save_prefix = model/msnet_tc32cr \ No newline at end of file diff --git a/config15/train_tc_sg.txt b/config15/train_tc_sg.txt new file mode 100755 index 0000000..5e5b3eb --- /dev/null +++ b/config15/train_tc_sg.txt @@ -0,0 +1,32 @@ +[data] +data_root = [/home/guotwang/data/brats_docker_data/pre_process] +data_names = config/train_names_all_lggx3.txt +modality_postfix = [Flair, T1, T1c, T2] +label_postfix = OT +with_ground_truth = True +batch_size = 5 +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +label_convert_source = [0, 1, 2, 3, 4] +label_convert_target = [0, 1, 0, 1, 1] +batch_slice_direction = sagittal +train_with_roi_patch = True +label_roi_mask = [1,2,3,4] +roi_patch_margin = 5 + +[network] +net_type = MSNet +net_name = MSNet_TC32sg +downsample_twice = True +class_num = 2 + +[training] +learning_rate = 1e-3 +decay = 1e-7 +maximal_iteration = 5000 +snapshot_iteration = 5000 +start_iteration = 1 +test_iteration = 100 +test_step = 10 +model_pre_trained = model/msnet_tc32sg_init +model_save_prefix = model/msnet_tc32sg \ No newline at end of file diff --git a/config15/train_wt_ax.txt b/config15/train_wt_ax.txt new file mode 100755 index 0000000..0415f54 --- /dev/null +++ b/config15/train_wt_ax.txt @@ -0,0 +1,32 @@ +[data] +data_root = [/home/guotwang/data/brats_docker_data/pre_process] +data_names = config/train_names_all.txt +modality_postfix = [Flair, T1, T1c, T2] +label_postfix = OT +with_ground_truth = True +batch_size = 5 +data_shape = [19, 144, 144, 4] +label_shape = [11, 144, 144, 1] +label_convert_source = [0, 1, 2, 3, 4] +label_convert_target = [0, 1, 1, 1, 1] +batch_slice_direction = axial +train_with_roi_patch = False +label_roi_mask = +roi_patch_margin = + +[network] +net_type = MSNet +net_name = MSNet_WT32 +downsample_twice = True +class_num = 2 + +[training] +learning_rate = 1e-3 +decay = 1e-7 +maximal_iteration = 20000 +snapshot_iteration = 5000 +start_iteration = 0 +test_iteration = 100 +test_step = 10 +model_pre_trained = +model_save_prefix = model/msnet_wt32 \ No newline at end of file diff --git a/config15/train_wt_cr.txt b/config15/train_wt_cr.txt new file mode 100755 index 0000000..22ef56c --- /dev/null +++ b/config15/train_wt_cr.txt @@ -0,0 +1,32 @@ +[data] +data_root = [/home/guotwang/data/brats_docker_data/pre_process] +data_names = config/train_names_all.txt +modality_postfix = [Flair, T1, T1c, T2] +label_postfix = OT +with_ground_truth = True +batch_size = 5 +data_shape = [19, 144, 144, 4] +label_shape = [11, 144, 144, 1] +label_convert_source = [0, 1, 2, 3, 4] +label_convert_target = [0, 1, 1, 1, 1] +batch_slice_direction = coronal +train_with_roi_patch = False +label_roi_mask = +roi_patch_margin = + +[network] +net_type = MSNet +net_name = MSNet_WT32cr +downsample_twice = True +class_num = 2 + +[training] +learning_rate = 1e-3 +decay = 1e-7 +maximal_iteration = 5000 +snapshot_iteration = 1000 +start_iteration = 1 +test_iteration = 100 +test_step = 10 +model_pre_trained = model/msnet_wt32cr_init +model_save_prefix = model/msnet_wt32cr diff --git a/config15/train_wt_sg.txt b/config15/train_wt_sg.txt new file mode 100755 index 0000000..2970c8e --- /dev/null +++ b/config15/train_wt_sg.txt @@ -0,0 +1,32 @@ +[data] +data_root = [/home/guotwang/data/brats_docker_data/pre_process] +data_names = config/train_names_all.txt +modality_postfix = [Flair, T1, T1c, T2] +label_postfix = OT +with_ground_truth = True +batch_size = 5 +data_shape = [19, 144, 144, 4] +label_shape = [11, 144, 144, 1] +label_convert_source = [0, 1, 2, 3, 4] +label_convert_target = [0, 1, 1, 1, 1] +batch_slice_direction = sagittal +train_with_roi_patch = False +label_roi_mask = +roi_patch_margin = + +[network] +net_type = MSNet +net_name = MSNet_WT32sg +downsample_twice = True +class_num = 2 + +[training] +learning_rate = 1e-3 +decay = 1e-7 +maximal_iteration = 5000 +snapshot_iteration = 5000 +start_iteration = 1 +test_iteration = 100 +test_step = 10 +model_pre_trained = model/msnet_wt32sg_init +model_save_prefix = model/msnet_wt32sg \ No newline at end of file diff --git a/convert_brats_image.py b/convert_brats_image.py new file mode 100644 index 0000000..26b7e27 --- /dev/null +++ b/convert_brats_image.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +from __future__ import absolute_import, print_function +import os +import numpy as np +import SimpleITK as sitk +from util.parse_config import parse_config + +def convert_brats15_data(input_folder, output_folder, modalities): + """ + Copy the brats dataset to a single folder, and convert .mha files into .nii.gz files + inputs: + input_folder: the root folder of brats data, e.g. */BRATS2015_Training + output_folder: the folder where the converted files will be writen + modalities: modalities of files, e.g., ['Flair', 'T1c', 'T1', 'OT'] + """ + sub_folders = ['HGG', 'LGG'] + if(not os.path.isdir(output_folder)): + os.mkdir(output_folder) + for sub_folder in sub_folders: + sub_dir = input_folder + '/' + sub_folder + patients = os.listdir(sub_dir) + for patient in patients: + if 'brats' in patient: + patient_dir = sub_dir + '/' + patient + scan_dirs = os.listdir(patient_dir) + for mod in modalities: + for scan_dir in scan_dirs: + if mod + '.' in scan_dir: + input_name = patient_dir + '/' + scan_dir + '/' + scan_dir + ".mha" + img = sitk.ReadImage(input_name) + save_name = "{0:}/{1:}_{2:}_{3:}.nii.gz".format(output_folder, sub_folder, patient, mod) + sitk.WriteImage(img, save_name) + +if __name__ == "__main__": + brats15_data_root = "/mnt/shared/guotai/data/BRATS2015_Training" + data_save_root = "/home/guotai/data/brats_docker_data/origin" + modalities = ['Flair', 'T1c', 'T1', 'T2', 'OT'] + convert_brats15_data(brats15_data_root, data_save_root, modalities) diff --git a/evaluation.py b/evaluation.py index ee11daa..ca3e6b3 100644 --- a/evaluation.py +++ b/evaluation.py @@ -12,7 +12,7 @@ def dice_of_brats_data_set(s_folder, g_folder, patient_names_file, type_idx): dice_all_data = [] for i in range(len(patient_names)): s_name = os.path.join(s_folder, patient_names[i] + '.nii.gz') - g_name = os.path.join(g_folder, patient_names[i] + '_seg.nii.gz') + g_name = os.path.join(g_folder, patient_names[i] + '.nii.gz') s_volume = load_nifty_volume_as_array(s_name) g_volume = load_nifty_volume_as_array(g_name) dice_one_volume = [] @@ -25,16 +25,16 @@ def dice_of_brats_data_set(s_folder, g_folder, patient_names_file, type_idx): temp_dice = binary_dice3d(s_volume > 0, g_volume > 0) dice_one_volume = [temp_dice] else: - for label in [1, 2, 4]: # dice of each class + for label in [1, 2, 3, 4]: # dice of each class temp_dice = binary_dice3d(s_volume == label, g_volume == label) dice_one_volume.append(temp_dice) dice_all_data.append(dice_one_volume) return dice_all_data if __name__ == '__main__': - s_folder = 'results' - g_folder = 'data/Brats17TrainingData_crop_renamed' - patient_names_file = 'config/test_names_example.txt' + s_folder = 'result' + g_folder = '/home/guotai/data/brats_docker_data/pre_process' + patient_names_file = 'config_part/test_names.txt' test_types = ['whole','core', 'all'] for type_idx in range(3): dice = dice_of_brats_data_set(s_folder, g_folder, patient_names_file, type_idx) @@ -47,7 +47,7 @@ def dice_of_brats_data_set(s_folder, g_folder, patient_names_file, type_idx): np.savetxt(s_folder + '/dice_{0:}_std.txt'.format(test_type), dice_std) print('tissue type', test_type) if(test_type == 'all'): - print('tissue label', [1, 2, 4]) + print('tissue label', [1, 2, 3, 4]) print('dice mean ', dice_mean) print('dice std ', dice_std) diff --git a/model15/checkpoint b/model15/checkpoint new file mode 100644 index 0000000..1e8947c --- /dev/null +++ b/model15/checkpoint @@ -0,0 +1,6 @@ +model_checkpoint_path: "msnet_wt32cr_5000.ckpt" +all_model_checkpoint_paths: "msnet_wt32cr_1000.ckpt" +all_model_checkpoint_paths: "msnet_wt32cr_2000.ckpt" +all_model_checkpoint_paths: "msnet_wt32cr_3000.ckpt" +all_model_checkpoint_paths: "msnet_wt32cr_4000.ckpt" +all_model_checkpoint_paths: "msnet_wt32cr_5000.ckpt" diff --git a/model15/msnet_en32_20000.ckpt.data-00000-of-00001 b/model15/msnet_en32_20000.ckpt.data-00000-of-00001 new file mode 100644 index 0000000..fc2cf9b Binary files /dev/null and b/model15/msnet_en32_20000.ckpt.data-00000-of-00001 differ diff --git a/model15/msnet_en32_20000.ckpt.index b/model15/msnet_en32_20000.ckpt.index new file mode 100644 index 0000000..4ab40d5 Binary files /dev/null and b/model15/msnet_en32_20000.ckpt.index differ diff --git a/model15/msnet_en32_20000.ckpt.meta b/model15/msnet_en32_20000.ckpt.meta new file mode 100644 index 0000000..bd23a46 Binary files /dev/null and b/model15/msnet_en32_20000.ckpt.meta differ diff --git a/model15/msnet_en32cr_5000.ckpt.data-00000-of-00001 b/model15/msnet_en32cr_5000.ckpt.data-00000-of-00001 new file mode 100644 index 0000000..086cfbf Binary files /dev/null and b/model15/msnet_en32cr_5000.ckpt.data-00000-of-00001 differ diff --git a/model15/msnet_en32cr_5000.ckpt.index b/model15/msnet_en32cr_5000.ckpt.index new file mode 100644 index 0000000..c7c81e0 Binary files /dev/null and b/model15/msnet_en32cr_5000.ckpt.index differ diff --git a/model15/msnet_en32cr_5000.ckpt.meta b/model15/msnet_en32cr_5000.ckpt.meta new file mode 100644 index 0000000..409a1b0 Binary files /dev/null and b/model15/msnet_en32cr_5000.ckpt.meta differ diff --git a/model15/msnet_en32sg_5000.ckpt.data-00000-of-00001 b/model15/msnet_en32sg_5000.ckpt.data-00000-of-00001 new file mode 100644 index 0000000..b506282 Binary files /dev/null and b/model15/msnet_en32sg_5000.ckpt.data-00000-of-00001 differ diff --git a/model15/msnet_en32sg_5000.ckpt.index b/model15/msnet_en32sg_5000.ckpt.index new file mode 100644 index 0000000..06b24be Binary files /dev/null and b/model15/msnet_en32sg_5000.ckpt.index differ diff --git a/model15/msnet_en32sg_5000.ckpt.meta b/model15/msnet_en32sg_5000.ckpt.meta new file mode 100644 index 0000000..000d3dc Binary files /dev/null and b/model15/msnet_en32sg_5000.ckpt.meta differ diff --git a/model15/msnet_tc32_20000.ckpt.data-00000-of-00001 b/model15/msnet_tc32_20000.ckpt.data-00000-of-00001 new file mode 100644 index 0000000..9ad4105 Binary files /dev/null and b/model15/msnet_tc32_20000.ckpt.data-00000-of-00001 differ diff --git a/model15/msnet_tc32_20000.ckpt.index b/model15/msnet_tc32_20000.ckpt.index new file mode 100644 index 0000000..af496e4 Binary files /dev/null and b/model15/msnet_tc32_20000.ckpt.index differ diff --git a/model15/msnet_tc32_20000.ckpt.meta b/model15/msnet_tc32_20000.ckpt.meta new file mode 100644 index 0000000..59154f1 Binary files /dev/null and b/model15/msnet_tc32_20000.ckpt.meta differ diff --git a/model15/msnet_tc32cr_5000.ckpt.data-00000-of-00001 b/model15/msnet_tc32cr_5000.ckpt.data-00000-of-00001 new file mode 100644 index 0000000..8e83b57 Binary files /dev/null and b/model15/msnet_tc32cr_5000.ckpt.data-00000-of-00001 differ diff --git a/model15/msnet_tc32cr_5000.ckpt.index b/model15/msnet_tc32cr_5000.ckpt.index new file mode 100644 index 0000000..67136b3 Binary files /dev/null and b/model15/msnet_tc32cr_5000.ckpt.index differ diff --git a/model15/msnet_tc32cr_5000.ckpt.meta b/model15/msnet_tc32cr_5000.ckpt.meta new file mode 100644 index 0000000..0f7b44e Binary files /dev/null and b/model15/msnet_tc32cr_5000.ckpt.meta differ diff --git a/model15/msnet_tc32sg_5000.ckpt.data-00000-of-00001 b/model15/msnet_tc32sg_5000.ckpt.data-00000-of-00001 new file mode 100644 index 0000000..33b1c01 Binary files /dev/null and b/model15/msnet_tc32sg_5000.ckpt.data-00000-of-00001 differ diff --git a/model15/msnet_tc32sg_5000.ckpt.index b/model15/msnet_tc32sg_5000.ckpt.index new file mode 100644 index 0000000..3943670 Binary files /dev/null and b/model15/msnet_tc32sg_5000.ckpt.index differ diff --git a/model15/msnet_tc32sg_5000.ckpt.meta b/model15/msnet_tc32sg_5000.ckpt.meta new file mode 100644 index 0000000..c497b01 Binary files /dev/null and b/model15/msnet_tc32sg_5000.ckpt.meta differ diff --git a/model15/msnet_wt32_10000.ckpt.data-00000-of-00001 b/model15/msnet_wt32_10000.ckpt.data-00000-of-00001 new file mode 100644 index 0000000..1daf635 Binary files /dev/null and b/model15/msnet_wt32_10000.ckpt.data-00000-of-00001 differ diff --git a/model15/msnet_wt32_10000.ckpt.index b/model15/msnet_wt32_10000.ckpt.index new file mode 100644 index 0000000..55ce24a Binary files /dev/null and b/model15/msnet_wt32_10000.ckpt.index differ diff --git a/model15/msnet_wt32_10000.ckpt.meta b/model15/msnet_wt32_10000.ckpt.meta new file mode 100644 index 0000000..51bb7f2 Binary files /dev/null and b/model15/msnet_wt32_10000.ckpt.meta differ diff --git a/model15/msnet_wt32cr_5000.ckpt.data-00000-of-00001 b/model15/msnet_wt32cr_5000.ckpt.data-00000-of-00001 new file mode 100644 index 0000000..2cb6e77 Binary files /dev/null and b/model15/msnet_wt32cr_5000.ckpt.data-00000-of-00001 differ diff --git a/model15/msnet_wt32cr_5000.ckpt.index b/model15/msnet_wt32cr_5000.ckpt.index new file mode 100644 index 0000000..01e43dd Binary files /dev/null and b/model15/msnet_wt32cr_5000.ckpt.index differ diff --git a/model15/msnet_wt32cr_5000.ckpt.meta b/model15/msnet_wt32cr_5000.ckpt.meta new file mode 100644 index 0000000..e14eaa3 Binary files /dev/null and b/model15/msnet_wt32cr_5000.ckpt.meta differ diff --git a/model15/msnet_wt32sg_5000.ckpt.data-00000-of-00001 b/model15/msnet_wt32sg_5000.ckpt.data-00000-of-00001 new file mode 100644 index 0000000..adab7f5 Binary files /dev/null and b/model15/msnet_wt32sg_5000.ckpt.data-00000-of-00001 differ diff --git a/model15/msnet_wt32sg_5000.ckpt.index b/model15/msnet_wt32sg_5000.ckpt.index new file mode 100644 index 0000000..1d53743 Binary files /dev/null and b/model15/msnet_wt32sg_5000.ckpt.index differ diff --git a/model15/msnet_wt32sg_5000.ckpt.meta b/model15/msnet_wt32sg_5000.ckpt.meta new file mode 100644 index 0000000..ec5ac2c Binary files /dev/null and b/model15/msnet_wt32sg_5000.ckpt.meta differ diff --git a/pre_process.py b/pre_process.py index 8d64287..973fb3e 100644 --- a/pre_process.py +++ b/pre_process.py @@ -1,52 +1,49 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function -import os -import sys +import os +import nibabel import numpy as np -from util.data_loader import * +from util.data_process import * +from util.parse_config import parse_config -def data_set_crop_rename(source_folder, save_folder, modalities, crop = True): - patient_list = os.listdir(source_folder) - patient_list = [x for x in patient_list if os.path.isdir(source_folder+'/'+x)] +def data_set_crop(read_folder, save_folder, modalities): + """ + Crop the data with a bounding box that is automatically calculated based on the nonzero region + inputs: + read_folder: the folder containing the input data + save_folder: the folder to save the cropped data + modalities: modalities of the data, e.g., ['Flair', 'T1c', 'OT'] + """ + if(not os.path.isdir(save_folder)): + os.mkdir(save_folder) + patient_list = os.listdir(read_folder) + patient_list = [x for x in patient_list if modalities[0] in x] + patient_list = ['_'.join(x.split('_')[:-1]) for x in patient_list] margin = 5 + print('patient number ', len(patient_list)) - for i in range(len(patient_list)): - patient_name = patient_list[i] + for patient_name in patient_list: print(patient_name) imgs = [] for mod in modalities: - img_name = "{0:}_{1:}.nii.gz".format(patient_name, mod) - img_name = os.path.join(source_folder, patient_name, img_name) + img_name = os.path.join(read_folder, "{0:}_{1:}.nii.gz".format(patient_name, mod)) img = load_nifty_volume_as_array(img_name) imgs.append(img) - - if(crop): - [d_idxes, h_idxes, w_idxes] = np.nonzero(imgs[0]) - mind = d_idxes.min() - margin; maxd = d_idxes.max() + margin - minh = h_idxes.min() - margin; maxh = h_idxes.max() + margin - minw = w_idxes.min() - margin; maxw = w_idxes.max() + margin + + [d_idxes, h_idxes, w_idxes] = np.nonzero(imgs[0]) + mind = d_idxes.min() - margin; maxd = d_idxes.max() + margin + minh = h_idxes.min() - margin; maxh = h_idxes.max() + margin + minw = w_idxes.min() - margin; maxw = w_idxes.max() + margin for mod_idx in range(len(modalities)): - if(crop): - roi_volume = imgs[mod_idx][np.ix_(range(mind, maxd), range(minh, maxh), range(minw, maxw))] - else: - roi_volume = imgs[mod_idx] + roi_volume = imgs[mod_idx][np.ix_(range(mind, maxd), range(minh, maxh), range(minw, maxw))] save_name = "{0:}_{1:}.nii.gz".format(patient_name, modalities[mod_idx]) save_name = os.path.join(save_folder, save_name) save_array_as_nifty_volume(roi_volume, save_name) if __name__ == "__main__": - # 1, crop and rename training data - modalities = ['flair', 't1ce', 't1', 't2', 'seg'] - source_folder = 'data/Brats17TrainingData/HGG/' - target_folder = 'data/Brats17TrainingData_crop_renamed/HGG/' - data_set_crop_rename(source_folder,target_folder, modalities, crop = True) + data_read_root = "/home/guotai/data/brats_docker_data/origin" + data_save_root = "/home/guotai/data/brats_docker_data/pre_process" + modalities = ['Flair', 'T1c', 'T1', 'T2', 'OT'] + data_set_crop(data_read_root,data_save_root, modalities) - source_folder = 'data/Brats17TrainingData/LGG/' - target_folder = 'data/Brats17TrainingData_crop_renamed/LGG/' - data_set_crop_rename(source_folder,target_folder, modalities, crop = True) - - # 2, rename validation data - modalities = ['flair', 't1ce', 't1', 't2'] - source_folder = 'data/Brats17ValidationData/' - target_folder = 'data/Brats17ValidationData_renamed/' - data_set_crop_rename(source_folder,target_folder, modalities, crop = False) + diff --git a/rename_variables.py b/rename_variables.py new file mode 100644 index 0000000..57cfd26 --- /dev/null +++ b/rename_variables.py @@ -0,0 +1,33 @@ +import tensorflow as tf +# https://gist.github.com/batzner/7c24802dd9c5e15870b4b56e22135c96 +def rename(checkpoint_from, checkpoint_to, replace_from, replace_to): + checkpoint = tf.train.get_checkpoint_state(checkpoint_from) + with tf.Session() as sess: + for var_name, _ in tf.contrib.framework.list_variables(checkpoint_from): + print(var_name) + # Load the variable + var = tf.contrib.framework.load_variable(checkpoint_from, var_name) + + # Set the new name + new_name = var_name + if None not in [replace_from, replace_to]: + new_name = new_name.replace(replace_from, replace_to) + var = tf.Variable(var, name=new_name) + + # Save the variables + saver = tf.train.Saver() + sess.run(tf.global_variables_initializer()) + saver.save(sess, checkpoint_to) + +if __name__ == '__main__': + net_name = ['wt', 'tc', 'en'] + net_name_c = ['WT', 'TC', 'EN'] + num_pretrain = [10000, 20000, 20000] + for i in range(3): + for view in ['sg', 'cr']: + checkpoint_from = "model_part/msnet_{0:}32_{1:}.ckpt".format(net_name[i], num_pretrain[i]) + checkpoint_to = "model_part/msnet_{0:}32{1:}_init".format(net_name[i], view) + replace_from = "MSNet_{0:}32".format(net_name_c[i]) + replace_to = "MSNet_{0:}32{1:}".format(net_name_c[i], view) + rename(checkpoint_from, checkpoint_to, replace_from, replace_to) + diff --git a/test.py b/test.py index 587ad5c..724a080 100644 --- a/test.py +++ b/test.py @@ -292,7 +292,7 @@ def test(config_file): # 5, start to test test_slice_direction = config_test.get('test_slice_direction', 'all') - save_folder = config_test['save_folder'] + save_folder = config_data['save_folder'] test_time = [] struct = ndimage.generate_binary_structure(3, 2) margin = config_test.get('roi_patch_margin', 5) @@ -420,14 +420,15 @@ def test(config_file): label1 = (label1 + label2_3_mask) > 0 label2 = label2_3_mask label3 = label2 * label3 - vox_3 = label3.sum() + vox_3 = np.asarray(label3 > 0, np.float32).sum() if(0 < vox_3 and vox_3 < 30): print('ignored voxel number ', vox_3) label3 = np.zeros_like(label2) out_label = label1 * 2 - out_label[label2>0] = 1 - out_label[label3>0] = 3 + out_label[label2>0] = 3 + out_label[label3==1] = 1 + out_label[label3==2] = 4 out_label = np.asarray(out_label, np.int16) # 5.5, convert label and save output @@ -449,11 +450,11 @@ def test(config_file): sess.close() if __name__ == '__main__': - if(len(sys.argv) != 2): - print('Number of arguments should be 2. e.g.') - print(' python test.py config.txt') - exit() - config_file = str(sys.argv[1]) +# if(len(sys.argv) != 2): +# print('Number of arguments should be 2. e.g.') +# print(' python test.py config.txt') +# exit() + config_file = './test_data.txt' assert(os.path.isfile(config_file)) test(config_file) diff --git a/test_data.txt b/test_data.txt new file mode 100755 index 0000000..51e0c24 --- /dev/null +++ b/test_data.txt @@ -0,0 +1,90 @@ +[data] +data_root = /input_dir/Testing/HGG_LGG +save_folder = /output_dir +modality_postfix = [Flair, T1, T1c, T2] +file_post_fix = mha + +[network1ax] +net_type = MSNet +net_name = MSNet_WT32 +downsample_twice = True +data_shape = [19, 180, 160, 4] +label_shape = [11, 180, 160, 1] +class_num = 2 +model_file = model/msnet_wt32_10000.ckpt + +[network1sg] +net_type = MSNet +net_name = MSNet_WT32sg +downsample_twice = True +data_shape = [19, 160, 180, 4] +label_shape = [11, 160, 180, 1] +class_num = 2 +model_file = model/msnet_wt32sg_5000.ckpt + +[network1cr] +net_type = MSNet +net_name = MSNet_WT32cr +downsample_twice = True +data_shape = [19, 160, 160, 4] +label_shape = [11, 160, 160, 1] +class_num = 2 +model_file = model/msnet_wt32cr_5000.ckpt + + +[network2ax] +net_type = MSNet +net_name = MSNet_TC32 +downsample_twice = True +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +class_num = 2 +model_file = model/msnet_tc32_20000.ckpt + +[network2sg] +net_type = MSNet +net_name = MSNet_TC32sg +downsample_twice = True +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +class_num = 2 +model_file = model/msnet_tc32sg_5000.ckpt + +[network2cr] +net_type = MSNet +net_name = MSNet_TC32cr +downsample_twice = True +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +class_num = 2 +model_file = model/msnet_tc32cr_5000.ckpt + +[network3ax] +net_type = MSNet +net_name = MSNet_EN32 +downsample_twice = False +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +class_num = 3 +model_file = model/msnet_en32_20000.ckpt + +[network3sg] +net_type = MSNet +net_name = MSNet_EN32sg +downsample_twice = False +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +class_num = 3 +model_file = model/msnet_en32sg_5000.ckpt + +[network3cr] +net_type = MSNet +net_name = MSNet_EN32cr +downsample_twice = False +data_shape = [19, 96, 96, 4] +label_shape = [11, 96, 96, 1] +class_num = 3 +model_file = model/msnet_en32cr_5000.ckpt + +[testing] +test_slice_direction = all diff --git a/util/data_loader.py b/util/data_loader.py index 4af32ff..c03a372 100644 --- a/util/data_loader.py +++ b/util/data_loader.py @@ -16,7 +16,7 @@ def __init__(self, config): config: a dictionary representing parameters """ self.config = config - self.data_root = config['data_root'] + self.data_root = config['data_root'] if type(config['data_root']) is list else [config['data_root']] self.modality_postfix = config.get('modality_postfix', ['flair','t1', 't1ce', 't2']) self.intensity_normalize = config.get('intensity_normalize', [True, True, True, True]) self.with_ground_truth = config.get('with_ground_truth', False) @@ -37,36 +37,59 @@ def __get_patient_names(self): get the list of patient names, if self.data_names id not None, then load patient names from that file, otherwise search all the names automatically in data_root """ - if(self.data_names is not None): - assert(os.path.isfile(self.data_names)) - with open(self.data_names) as f: - content = f.readlines() - patient_names = [x.strip() for x in content] - else: # load all image in data_root - sub_dirs = [x[0] for x in os.walk(self.data_root[0])] - patient_names = [] - for sub_dir in sub_dirs: - names = os.listdir(sub_dir) - if(sub_dir == self.data_root[0]): - sub_patient_names = [] - for x in names: - if(self.file_postfix in x): - idx = x.rfind('_') - xsplit = x[:idx] - sub_patient_names.append(xsplit) - else: - sub_dir_name = sub_dir[len(self.data_root[0])+1:] - sub_patient_names = [] - for x in names: - if(self.file_postfix in x): - idx = x.rfind('_') - xsplit = os.path.join(sub_dir_name,x[:idx]) - sub_patient_names.append(xsplit) - sub_patient_names = list(set(sub_patient_names)) - sub_patient_names.sort() - patient_names.extend(sub_patient_names) - return patient_names + if('.nii' in self.file_postfix): + if(self.data_names is not None): + assert(os.path.isfile(self.data_names)) + with open(self.data_names) as f: + content = f.readlines() + patient_names = [x.strip() for x in content] + else: # load all image in data_root + sub_dirs = [x[0] for x in os.walk(self.data_root[0])] + patient_names = [] + for sub_dir in sub_dirs: + names = os.listdir(sub_dir) + if(sub_dir == self.data_root[0]): + sub_patient_names = [] + for x in names: + if(self.file_postfix in x): + idx = x.rfind('_') + xsplit = x[:idx] + sub_patient_names.append(xsplit) + else: + sub_dir_name = sub_dir[len(self.data_root[0])+1:] + sub_patient_names = [] + for x in names: + if(self.file_postfix in x): + idx = x.rfind('_') + xsplit = os.path.join(sub_dir_name,x[:idx]) + sub_patient_names.append(xsplit) + sub_patient_names = list(set(sub_patient_names)) + sub_patient_names.sort() + patient_names.extend(sub_patient_names) + else: + patient_names = os.listdir(self.data_root[0]) + patient_names = [name for name in patient_names if 'brats' in name] + return patient_names + + def __load_one_volume(self, patient_name, mod): + if('.nii' in self.file_postfix): + volume_name_short = patient_name + '_' + mod + '.' + self.file_postfix + volume_name = search_file_in_folder_list(self.data_root, volume_name_short) + volume = load_nifty_volume_as_array(volume_name) + else: + patient_dir = os.path.join(self.data_root[0], patient_name) + img_file_dirs = os.listdir(patient_dir) + volume_name = None + for img_file_dir in img_file_dirs: + if(mod+'.' in img_file_dir): + volume_name = img_file_dir + '/' + img_file_dir + '.' + self.file_postfix + break + assert(volume_name is not None) + volume_name = os.path.join(patient_dir, volume_name) + volume = load_3d_volume_as_array(volume_name) + return volume + def load_data(self): """ load all the training/testing data @@ -80,9 +103,7 @@ def load_data(self): for i in range(data_num): volume_list = [] for mod_idx in range(len(self.modality_postfix)): - volume_name_short = self.patient_names[i] + '_' + self.modality_postfix[mod_idx] + '.' + self.file_postfix - volume_name = search_file_in_folder_list(self.data_root, volume_name_short) - volume = load_nifty_volume_as_array(volume_name) + volume = self.__load_one_volume(self.patient_names[i], self.modality_postfix[mod_idx]) if(self.data_resize): volume = resize_3D_volume_to_given_shape(volume, self.data_resize, 1) if(mod_idx == 0): @@ -93,9 +114,7 @@ def load_data(self): X.append(volume_list) W.append(weight) if(self.with_ground_truth): - label_name_short = self.patient_names[i] + '_' + self.label_postfix + '.' + self.file_postfix - label_name = search_file_in_folder_list(self.data_root, label_name_short) - label = load_nifty_volume_as_array(label_name) + label = self.__load_one_volume(self.patient_names[i], self.label_postfix) if(self.data_resize): label = resize_3D_volume_to_given_shape(label, self.data_resize, 0) Y.append(label) diff --git a/util/data_process.py b/util/data_process.py index d65bd09..295c68e 100644 --- a/util/data_process.py +++ b/util/data_process.py @@ -3,6 +3,7 @@ import numpy as np import random from scipy import ndimage +import SimpleITK as sitk def search_file_in_folder_list(folder_list, file_name): """ @@ -23,6 +24,18 @@ def search_file_in_folder_list(folder_list, file_name): raise ValueError('{0:} is not found in {1:}'.format(file_name, folder)) return full_file_name +def load_3d_volume_as_array(filename): + if('.nii' in filename): + return load_nifty_volume_as_array(filename) + elif('.mha' in filename): + return load_mha_volume_as_array(filename) + raise ValueError('{0:} unspported file format'.format(filename)) + +def load_mha_volume_as_array(filename): + img = sitk.ReadImage(filename) + nda = sitk.GetArrayFromImage(img) + return nda + def load_nifty_volume_as_array(filename): """ load nifty image into numpy array, and transpose it based on the [z,y,x] axis order