Skip to content

Settings Explaination

fgdfgfthgr-fox edited this page Aug 18, 2025 · 7 revisions

Introduction

After Starting the GUI, you should see a page like this: main interface

This is the main interface for the tool, where all the configurations will be performed.

Most of the settings are explained in the GUI already, this page only covers those don't have an explanation.

Segmentation Mode

Semantic: The segmentation goal is to predict a class label for every pixel, where the two possible labels are foreground object(s) and background. For example, the foreground object is mitochondria, and the background is everything else, all the mitochondria will get the same label.

Instance: The segmentation goal is to predict a class label for every pixel, and also distinguishes between different instances of the same class. For example, different mitochondria in an image get different label.

This tool does not support segmenting multiple different types of object at once. If there is a need for that, user should try separate their task into multiple smaller tasks.

Workflows to enable

Training: Train a network using the training dataset.

Validation: Use a Validation Dataset to evaluate the network during training.

Test: Similar to Validation, but only run once after the model has finished training.

Predict: Use a (trained) network to predict the label of the predict dataset.

Note that if the validation is not enabled, the script will use train dataset loss to determine when to reduce the learning rate.

Dataset Information

Size to spot feature

Please read the description on the GUI. Note that setting this too high (>256) could consumes significantly more VRAM and are slower to train.

Training Settings

Offload training dataset to disk

If this setting is clicked, VST will first load the training images one at a time, and save them as zarr files in the "zarr_preprocessed" folder under your training folder. During training, VST will load from the zarr files. Which uses far less system memory if the training datasets are large.

Pair positive and negative samples

Tick this if your training data contain large areas that doesn't have any foreground object, or large areas that doesn't have any background object.

Dataset Mode

Determines the format required for the manual image labels for training. sparse vs full labels

Fully Labelled: value of 0 is the background, value of 1 is the foreground.

Sparsely Labelled: value of 0 is unlabelled, value of 1 is foreground, value of 2 is background.

Note: Sparsely Labelled data is unsupported in Instance Segmentation Mode.

Width of contour (outward)

This setting only work in instance segmentation mode. It determines the width of the contour between objects in the generated contour maps.

It's default to 1, but if the image has very high resolution, it's safe to increase it to 2 for better performance. You should check what the cached contour map in the "generated_contour_maps" folder look like, to determine the suitable value.

Same data:

contourwidth1 Width = 1

contourwidth2 Width = 2

Validation and Test Settings

Dataset Mode

Same as Training Settings

Predict Settings

Height and Width of each Patch (px) (Automatically calculated)

Since the image can be big, feeding the entire image into the network can have unrealistic VRAM demand. So, it will get cropped into several (potentially) overlapping smaller images. The final results will be stitched together from predictions of these smaller images. This is the height and width of patches the prediction image will be cropped to. In pixels.

Depth of each Patch (px)

The depth of patches the prediction image will be cropped to. In pixels.

Expansion in Height and Width for each Patch (px)

The additional gain in height and width of the patches. In pixels. Helps smooth out borders between patches.

The actual height and width of each patch is hw_size + 2 * hw_overlap. Same goes for depth.

Expansion in Depth for each Patch (px)

Same as above but for depth.

Use distance transform watershed for instance segmentation.

Because instance segmentation is achieved by predicting a contour map, and it's quite often those contour map would have holes in them. Those holes will cause objects not being properly seperated. By using distance transform watershed, this problem can be avoided. However it's much slower, uses much more CPU RAM, and can cause (severe) over-segmentation if the dynamic is not high enough.

Still, it's easier to merge objects than to seperate them, so it's helpful in some cases to tick it.

Csv File for Data Augmentation Settings

Path to the file which containing all the parameters for data augmentation.