Command line interface documentation

Training

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

Prediction

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

Parameters

network

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

image_path

Define a folder with tiff or tif images

path/to/my/images

or a wildcard

"path/to/my/images/*.tif"

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.

label_path

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

path/to/my/ilastik_project.ilp

or to label masks in tif format.

path/to/my/labelfiles/
"path/to/my/labelsfiles/*.tif"
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]

–cpu

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

–gpu=VISIBLE_DEVICES

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.

–version

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=STEPS

Steps per epoch [default: 50].

–equalize

Equalize label weights to promote influcence of less frequent labels.

–csvfile=LOSSDATA

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