Command line interface documentation


yapic train <network> <image_path> <label_path> [options]


yapic predict <network> <image_path> <output_path> [options]



Either a model file in h5 format to use a pretrained model or specific string to initialize a new model.


Define a folder with tiff or tif images


or a wildcard


Don’t forget double quotes in case of wildcards!

Input image format

YAPic supports tif and tiff files

Especially in case of multidimensional images: Make sure to always convert your pixel images with Fiji before using YAPiC. Large amounts of image data can be conveniently converted with Fiji by using batch processing.


Define a path to an Ilastik Project File (.ilp)


or to label masks in tif format.

Ilastik Project Files

The images in associated with your Ilastik project have to be identical with the tif images you define in the image_path argument.

Label masks in tif format

Optional parameters

-n –normalize=NORM

Set pixel normalization scope [default: local]


Train using the CPU (not recommended, very slow).


If you want to use specific GPUs. To use gpu 0, set --gpu=0. To use gpus 2 and 3, set --gpu=2,3.

-h –help

Show documentation.


Show version.

Train options

-e –epochs=MAX_EPOCHS

Maximum number of epochs to train [default: 5000].

-a –augment=AUGMENT

Set augmentation method for training [default: flip].

-v –valfraction=VAL

Fraction of images to be used for validation [default: 0.2] between 0 and 1.

-f –file=CLASSIFER

Path to trained model [default: model.h5].


Steps per epoch [default: 50].


Equalize label weights to promote influcence of less frequent labels.


Path to csv file for training loss data [default: loss.csv].