$ python scripts/prepare_aorta_segmentation.py -h
usage: prepare_2D.py [-h] [--batch-size N] [--j J] idir odir
Preprocess CT scans for ROI segmentation.
positional arguments:
idir input directory
odir output directory
optional arguments:
-h, --help show this help message and exit
--batch-size N batch size to load in RAM
--j J number of process to run simultaneously
$ python scripts/train_aorta_segmentation.py -h
usage: train_2D.py [-h] [--batch-size N] [--epochs E] [--split S] [--j J]
idir mdir
Train UNet over CT scans for ROI segmentation.
positional arguments:
idir input directory
mdir output model directory
optional arguments:
-h, --help show this help message and exit
--batch-size N batch size to load in RAM
--epochs E number of epochs
--split S train / test split: train = patient_ids[int(SPLIT *
len(patient_ids)):]
--j J number of process to run simultaneously
$ python scripts/predict_aorta_segmentation.py -h
usage: segment_2D.py [-h] [--spacing S] [--batch-size N] [--TTA T] [--j J]
idir odir mpath
UNet inference over CT scans for ROI segmentation.
positional arguments:
idir input directory
odir output directory
mpath path to the model
optional arguments:
-h, --help show this help message and exit
--spacing S if included isotropic spacing of CT will be forced,
otherwise original spacing will be preserved
--batch-size N batch size to load in RAM
--TTA T whether to have testtime augmentations, T in {0, 1, 2, 3}
--j J number of process to run simultaneously
Extract normal planes of CT scans and predicted masks
$ python scripts/extract_normals.py -h
usage: extract_normals.py [-h] [--side SIDE] [--j J] maskdir patdir odir
Extract normal planes of CT scans and predicted masks.
positional arguments:
maskdir masks input directory
patdir input directory should contains patients' CT scans odir output directoryoptional arguments: -h, --help show this help message and exit --side SIDE output directory --j J number of process to run simultaneously
Prepare dataset for valve segmentation (require valve annotated data)
$ python scripts/prepare_valve_segmentation.py -h
usage: prepare_valve_segmentation.py [-h] [--n N] idir mdir odir
Prepare dataset for valve segmentation.
positional arguments:
idir input directory (should contains zis.npy and prods.npy)
mdir directory with valve masks
odir output directory
optional arguments:
-h, --help show this help message and exit
--n N maximum number of samples to be processed
$ python scripts/train_valve_segmentation.py -h
usage: train_valve_segmentation.py [-h] [--epochs E] idir mdir mpath
Train valve segmentation model.
positional arguments:
idir input directory (should contains folders with zis.npy and
prods.npy)
mdir directory with prepared data (should contains folders with
mask_*.npy)
mpath path to the model
optional arguments:
-h, --help show this help message and exit
--epochs E maximum number of epochs to be trained
$ python scripts/predict_valve_segmentation.py -h
usage: predict_valve_segmentation.py [-h] [--n N] idir odir mpath
Valve segmentation model inference over prepared dataset.
positional arguments:
idir directory with prepared data (should contains mask_*.npy)
odir output directory
mpath path to the model
optional arguments:
-h, --help show this help message and exit
--n N maximum number of epochs to be trained
$ python scripts/prepare_features.py -h
usage: prepare_features.py [-h] [--labels_path LABELS_PATH]
[--exclude_paths EXCLUDE_PATHS] [--n N]
idir zpdir valve_path odir
Prepare dataset for valve segmentation.
positional arguments:
idir input directory
zpdir directory should contains zis.npy and prods.npy
valve_path path to the valve.csv
odir output directory
optional arguments:
-h, --help show this help message and exit
--labels_path LABELS_PATH
path to the REPRISE III Sizes.xlsx
--exclude_paths EXCLUDE_PATHS
path to the pickled version of excluded paths
--n N maximum number of samples to be processed