Skip to content

Training sets

Jean-Baptiste Lugagne edited this page Aug 16, 2018 · 17 revisions

Training set GUI

We designed a Graphical User Interface to help users create their own training sets to solve image analysis problems. The GUI allows the user to draw regions in the stack that will define the different classes that the classifiers will train against. It also allows them to set training parameters as well as defining image pre-processing operations to apply on each frame in the stack.

To launch the GUI, call the createOrLoadTrainingSet function. The following window will pop up:

From there, the user can load up Z-stacks or training sets that were previously saved to disk via the add Stack / Set / Bundle button in the top right corner. Once this is done and they have created at least one class, they can start labelling regions of the image.

For a detailed description of the GUI and its associated functions, as well as a description of the training parameters, see: https://github.com/Lab513/Zcells/wiki/Training-set-GUI

Training sets variable

After clicking the "Done" button, a 'training_set' variable will show up in the workspace. This variable contains all the information necessary to train the classifier from the Z-stacks. See Training to run the training routine from it. Of course, you shouldn't move Z-stacks files between training set construction and launching the training.

For a detailed description of the structure of this variable, see Training set structure.

Tips for constructing a good training set.

While the classifiers generally do an okay job even with poorly drawn training sets, it is necessary to be careful of a few things when drawing sets:

  1. We recommend drawing several small regions all over the stack instead of one big region in one corner of the stack. This generally makes the classification more robust to changes of illumination and other spatial disparities that can happen in microscopy acquisitions
  2. We recommend drawing the set over several different stacks, if possible over several different experiments. This again makes the whole classification more robust.
  3. Make sure that your drawing of regions is consistent, especially in-between Z-stacks. When drawing cells, it is not always clear where the cells start and where they end, and one can easily draw cells that are a few pixels thinner by the end of the training set construction than when they started. Make sure to check regularly how you were drawing your cells at the beginning.
  4. Make extensive use of boolean and morphology operations. Not only does it reduce set construction time, it makes the drawing more consistent throughout.
  5. Try to have a single set made entirely by a single person. Different people will decide differently what parts of the image are a cell or something else.

Clone this wiki locally