Train#
Data Preparation#
SKOOTS requires specific file naming conventions to locate training data. An annotated image train_data.tif should have associated ground truth instance segmentation mask labels train_data.labels.tif and precomputed skeletons train_data.skeletons.tif. Therefore, a data directory might have the following files:
data\
├ train\
│ │ train_data.tif
│ │ train_data.labels.tif
│ └ train_data.skeletons.tif
└ validation\
│ val_data.tif
│ val_data.labels.tif
└ val_data.skeletons.tif
To pre-compute skeletons, cd into the train data directory and use the utility function in the skoots cli:
skoots --skeletonize-train-data *
Configuration File#
SKOOTS needs various pieces of information to train a model: where your training data is located, how big are your objects, and others. We set these parameters in a configuration file: my-config.yaml. An example might look like this:
TRAIN:
TRAIN_DATA_DIR: ['path/to/train/data'] # set your own here!
VALIDATION_DATA_DIR: ['path/to/validation/data']
NUM_EPOCHS: 100
LEARNING_RATE: 1e-3
SKOOTS:
VECTOR_SCALING: (50, 50, 10) # max radius of objects in (X, Y, Z)
Train with the CLI#
There are a lot more configuration options - see the Training Tutorial for more information on configuration. We may now train a SKOOTS model by typing in the terminal:
skoots-train --config-file "my-config.yaml"

This will let the SKOOTS training script run, but will likely not produce a usable model. See the Training Tutorial for more details on creating a custom configuration file.
Monitoring#
SKOOTS uses tensorboard to track training, which will automatically be served to http://localhost:6006