Executables¶
Synthesis Trainer¶
train a patch-based regressor for MR image synthesis
usage: synth-train [-h] -s SOURCE_DIR [SOURCE_DIR ...] -t TARGET_DIR
[-o OUTPUT] [-m MASK_DIR] [-r {rf,xg,pr,mlr,mlp}] [-v]
[--cross-validate] [-ps PATCH_SIZE] [-fp] [-ns N_SAMPLES]
[-cr CTX_RADIUS [CTX_RADIUS ...]] [-th THRESHOLD]
[-pd POLY_DEG] [--mean] [--use-xyz] [-n N_JOBS]
[-msl MIN_SAMP_LEAF] [-nt N_TREES] [-mf MAX_FEATURES]
[-md MAX_DEPTH] [-nr NUM_RESTARTS] [-mi MAX_ITERATIONS]
[-hls HIDDEN_LAYER_SIZES [HIDDEN_LAYER_SIZES ...]]
[-rs RANDOM_SEED]
Required¶
-s, --source-dir | |
path to directory with domain images (multiple paths can be provided for multi-modal synthesis, put T1-w images first if they are not skull-stripped) | |
-t, --target-dir | |
path to directory with target images |
Options¶
-o, --output | path to output the trained regressor |
-m, --mask-dir | optional directory of brain masks for images |
-r, --regr-type | |
Possible choices: rf, xg, pr, mlr, mlp specify type of regressor to use Default: “rf” | |
-v, --verbosity | |
increase output verbosity (e.g., -vv is more than -v) Default: 0 | |
--cross-validate | |
do leave one out cross-validation on the provided dataset (e.g., if 5 datasets are provided, then 5 models are trained where all the data are used except one). Default: False |
Synthesis Options¶
-ps, --patch-size | |
patch size extracted for regression [Default=3] Default: 3 | |
-fp, --full-patch | |
use the full patch in regression vs a reduced size patch [Default=False] Default: False | |
-ns, --n-samples | |
use randomly sampled (with replacement) n_samples voxels for training regressor (None uses all voxels) [Default=None] | |
-cr, --ctx-radius | |
context radii to use when extracting patches [Default=(3,5,7)] Default: (3, 5, 7) | |
-th, --threshold | |
threshold for foreground and background (above is foreground) [Default=0] Default: 0 | |
-pd, --poly-deg | |
degree of polynomial features derived from extracted patches (None means do not use polynomial features) [Default=None] | |
--mean | learn to take the mean value of input patch to the mean value of output patches Default: False |
--use-xyz | use the x,y,z coordinates of voxels as features Default: False |
Regressor Options¶
-n, --n-jobs | number of processors to use (-1 is all processors) [Default=-1] Default: -1 |
-msl, --min-samp-leaf | |
minimum number of samples in each leaf in rf (see min_samples_leaf) [Default=5] Default: 5 | |
-nt, --n-trees | number of trees in rf or xg (see n_estimators) [Default=60] Default: 60 |
-mf, --max-features | |
proportion of features to use in rf (see max_features) [Default=1/3] Default: 0.3333333333333333 | |
-md, --max-depth | |
maximum tree depth in rf or xg [Default=None (3 for xg)] | |
-nr, --num-restarts | |
number of restarts for mlr (since finds local optimum) [Default=8] Default: 8 | |
-mi, --max-iterations | |
maximum number of iterations for mlr and mlp [Default=20] Default: 20 | |
-hls, --hidden-layer-sizes | |
number of neurons in each hidden layer for mlp [Default=(100,)] Default: (100,) | |
-rs, --random-seed | |
set random seed for reproducibility [Default=0] Default: 0 |
Synthesis Predictor¶
synthesize MR images via patch-based regression
usage: synth-predict [-h] -s SOURCE_DIR [SOURCE_DIR ...] -t TRAINED_MODEL
[-o OUTPUT_DIR] [-m MASK_DIR] [-v] [--cross-validate]
Required¶
-s, --source-dir | |
path to directory with domain images | |
-t, --trained-model | |
path to the trained model (.pkl) |
Options¶
-o, --output-dir | |
path to output the synthesized images | |
-m, --mask-dir | optional directory of brain masks for images |
-v, --verbosity | |
increase output verbosity (e.g., -vv is more than -v) Default: 0 | |
--cross-validate | |
do leave one out cross-validation on the provided dataset (e.g., if 5 datasets are provided, then 5 models are trained where all the data are used except one). Default: False |