Skip to content

Data Preparation

fgdfgfthgr-fox edited this page Mar 27, 2024 · 3 revisions

Tools

Microscopy Image Browser is the recommended tool for create and viewing data.

Fiji can be useful for doing post-segmentation processing and analysis.

What should the data be like?

Training and Validation Images

8bit or 16bit greyscale 3D tif images, preferably normalized (contrast enhanced).

Can have isotropic or anisotropic resolution. But xy dimension should have the same resolution.

There is no upper size limit on the training image, as the tool work by feeding the network with small randomly cropped patches of each training image.

Example (only showing the top most slice):

Training Image

Training and Validation Image Labels

Semantic-segmentation-left-and-Instance-segmentation-right-8

Left: Semantic segmentation. Right: Instance segmentation.

Semantic Segmentation (Fully Labelled)

8bit or 16bit greyscale 3D tif image, have the same spatial size as the corresponding image file. The file name should start with "Labels_".

Value of 0 is background while value of 1 is foreground.

If you are using Microscopy Image Browser, then the tif file generated by "save model as..." option should be just the thing you need.

Example (only showing the top most slice):

Semantic Fully Labelled

Semantic Segmentation (Sparsely Labelled)

Same as above. But value of 0 is unlabeled, value of 1 is foreground, and value of 2 is background.

Example (only showing the top most slice):

Semantic Sparsely Labelled

Instance Segmentation (Fully Labelled only)

Same as Fully Labelled Semantic Segmentation. But except that each value represents a different foreground object. Value of 0 is still background.

Example (only showing the top most slice):

Instance Fully Labelled

Dataset structure

In default, the tool automatically uses the data from the "Dataset" folder in the repository root directory. Although you can set it to somewhere else.

Place training images and they labels to "train" folder, validation images and they labels to "val" folder. Place the images that you want the network to predict to "predict" folder. You will find your result at "result" folder.