-
Notifications
You must be signed in to change notification settings - Fork 1
/
load_path.py
39 lines (33 loc) · 1.44 KB
/
load_path.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
"""
load path
"""
import os
import yaml
brain_tumor_datasets_path = os.path.join('..', 'dataset', 'brain_tumor_datasets')
data_2017_path = os.path.join(brain_tumor_datasets_path, '2017')
data_2018_path = os.path.join(brain_tumor_datasets_path, '2018')
data_2024_path = os.path.join(brain_tumor_datasets_path, '2024')
MICCAI_BraTS_2017_Data_Training_path = os.path.join(data_2017_path, 'Brats17TrainingData')
MICCAI_BraTS_2018_Data_Training_path = os.path.join(data_2018_path, 'MICCAI_BraTS_2018_Data_Training')
ISBI_BraTS_2024_Data_Training_path = os.path.join(data_2024_path, 'ISBI2024-BraTS-GoAT-TrainingData')
H_subjects_2018_list = [
os.path.join(HGG_path, x)
for HGG_path in [
os.path.join(MICCAI_BraTS_2018_Data_Training_path, 'HGG')
]
for x in os.listdir(HGG_path)
]
L_subjects_2017_2018_list = [
os.path.join(LGG_path, x)
for LGG_path in [
os.path.join(MICCAI_BraTS_2017_Data_Training_path, 'LGG'),
os.path.join(MICCAI_BraTS_2018_Data_Training_path, 'LGG')
]
for x in os.listdir(LGG_path)
]
subjects_2024_list = [os.path.join(ISBI_BraTS_2024_Data_Training_path, x) for x in os.listdir(ISBI_BraTS_2024_Data_Training_path)]
hdf5_path_list = [os.path.join('..', ''.join([tag,'.hdf5'])) for tag in ['HGG', 'LGG']]
save_npz_path = os.path.join('..', 'saved_npz')
if not os.path.exists(save_npz_path): os.makedirs(save_npz_path)
with open('config.yaml', 'r') as file:
config = yaml.safe_load(file)