Skip to content

Training

tselea edited this page Dec 18, 2019 · 6 revisions

Training

Usage

Each training operation includes:

  • pre-processing - actions applied to the input data
  • model configuration - specify inputs and outputs, customize model training parameters

It is mandatory to prepare a training configuration YAML file, that sets the parameters for the training process.

The pre-processing steps includes:

  • tiling the image in smaller patches
  • standardise the pixel values based on Z-Score

Starting the training step (from the src directory):

python -m hugin.tools.cli train --config /path/to/training_config.yaml --keras-batch-size 5

The --config parameter is mandatory. This should be followed by the path to the training configuration file.
The --keras-batch-size is optional. If not present, the training batch size is set from the configuration file.

An example file can be found at hugin/etc/usecases/s2-forestry/train_unet_corine_gt.yaml.

Options on top of basic Hugin parameters:

  • data_pattern: Mandatory parameter. This is the regex pattern that must match all the possible image types and ground truth (GT) images that should be included in the sampling. The regex should include named groups (?P<group_name>regex), in order to make the image name pattern easier to identify.
    Example: ''(?PT[0-9A-Z]+)(?P[A-Z0-9]+)(?P[A-Z0-9_a-z]+)(?P[0-9a-z]+)(?P[0-9]+)..*$''
    Explanation: A match for the pattern is: T31UES_20180508T104031_B02_10m_4326.jp2
Clone this wiki locally