Skip to content

Experiment settings: Image instance segmentation

Besides having certain common experiment settings with other problem types, the specific settings for an image instance segmentation experiment are listed and described below.

Dataset Settings

Data Folder

Defines the folder location of the images to use for the experiment. When the experiment is running, H2O Hydrogen Torch will load images from this folder.

Data Folder Test

Defines the folder location of the images H2O Hydrogen Torch will use to test the model. H2O Hydrogen Torch will load images from this folder when testing the model. This setting is only available if a test dataframe is selected.

Note

The Data Folder Test setting will appear when you specify a test dataframe using the Test Dataframe setting.

Class Name Column

Defines the dataset column containing a list of class names that H2O Hydrogen Torch will use for each instance mask.

RLE Mask Column

Defines the dataset column containing a list of run-length encoded (RLE) masks that H2O Hydrogen Torch will use for instance class.

Image Column

Defines the dataframe column storing the names of images that H2O Hydrogen Torch will load from the data folder and data folder test when training and testing the model.

Image Settings

Image Width

Defines the width H2O Hydrogen Torch will use to rescale the images for training and predictions.

Note

Depending on the original image size, a bigger width can generate a higher accuracy value.

Image Height

Defines the height H2O Hydrogen Torch will use to rescale the images for training and predictions.

Note

Depending on the original image size, a bigger height can generate a higher accuracy value.

Image Channels

Defines the number of channels the train images contain.

Note

  • Typically images have three input channels (red, green, and blue (RGB)), but grayscale images have only 1. When you provide image data in a NumPy data format, any number of channels is allowed. For this reason, data scientists can specify the number of channels.

  • The defined number of channels will also refer to the provided validation and test datasets.

Image Normalization

Grid search hyperparameter

Defines the transformer to normalize the image data before training the model.

Note

Usually, state-of-the-art image models normalize the training images by scaling values of each of the input channels to predefined means and standard deviations.

Augmentation Settings

Augmentations strategy

Grid search hyperparameter

Defines the augmentation strategy to apply to the input images. Soft, Medium, and Hard values correspond to the strength of the augmentations to apply.

Options
  • Soft: The Soft strategy applies image Resize and random HorizontalFlip during model training while applying image Resize during model inference.

  • Medium: The Medium strategy adds ShiftScaleRotate and CoarseDropout to the list of the train augmentations.

  • Hard: The Hard strategy applies RandomResizedCrop (instead of Resize) during model training while adding RandomBrightnessContrast to the list of train augmentations.

  • Custom: The Custom strategy allows users to use their own augmentations that can be defined in the following two settings:

Note

Augmentations are ways to modify train images while keeping the target values valid, such as flipping the image or adding noise. Distorting training images do not influence the expected prediction of the model but enrich the training data. Augmentations help generalize the model better and improve its accuracy.

Custom Train Augmentations

Defines a list of augmentations to use for the train data. The format is a resulting .json of the albumentations.save() function call from Albumentations library. IMAGE_HEIGHT and IMAGE_WIDTH placeholders can be used to utilize image dimensions from the experiment configuration.

Note

Augmentations are ways to modify train images while keeping the target values valid, such as flipping the image or adding noise. Distorting training images do not influence the expected prediction of the model but enrich the training data. Augmentations help generalize the model better and improve its accuracy. Augmentations are applied to every image at each epoch with the provided probability.

Custom Inference Augmentations

Defines a list of inference augmentations to be applied to the test and validation data. The format is a resulting .json of the albumentations.save() function call from Albumentations library. IMAGE_HEIGHT and IMAGE_WIDTH placeholders can be used to utilize image dimensions from the experiment configuration.

Note

Inference augmentations serve the same purpose as training augmentations, but the difference is that inference augmentations are applied to validation and test data. Typically, inference augmentations only contain resizing or very simple augmentations.

Mix Image

Grid search hyperparameter

Defines the image mix augmentation to use during model training. If this setting has Disabled selected, no mix augmentation is applied. Mixup and Cutmix options correspond to the mix augmentation to apply:

Options

Mix Target

Grid search hyperparameter

Defines the target (label) mix augmentation to apply during model training. Ratio is used as the mixed target if disabled is selected. Mix target is only available when the Mix Image setting is not disabled.

Options
  • Ratio: Two target masks will be averaged based on the sample ratio during model training.

  • Max: The maximum of both masks will be taken while ignoring the ratio during model training.

  • Min: The minimum of both masks will be taken while ignoring the ratio during model training.

Cutmix Corner

Grid search hyperparameter

Determines whether, during Cutmix augmentation, H2O Hydrogen Torch will patch corners of an image with areas of another. Cutmix corner is only available if selected in the Mix Image setting.

Mix Concentration

Grid search hyperparameter

Defines the concentration parameter value of the Beta probability distribution to generate mix ratios. A larger value will lead to more equal ratios (50% - 50%) for mixing. Mix concentration is only available when Mixup is selected in the Mix Image setting.

Mix Probability

Grid search hyperparameter

Defines the probability value to apply mix augmentation. The mix probability value is used for each batch or mix iteration. Mix probability is available when Mixup is selected in the Mix Image setting.

Example

If the mixing probability is specified as 0.3, mix augmentation will be applied to each batch (or mix iteration) with a probability of 0.3.

Mix Iterations

Grid search hyperparameter

Defines the number of times to apply mix augmentation on each batch. The larger the value, the more images are mixed into a single train sample. Mix iterations is available when you select Mixup in the Mix Image setting.

Architecture Settings

Backbone

Grid search hyperparameter

Defines the backbone neural network architecture to train the model.

Note

H2O Hydrogen Torch provides several backbone state-of-the-art neural network architectures to train the model.

Tip

Usually, it is good to use simpler architectures for quicker experiments and larger models when aiming for the highest accuracy.

Architecture

Grid search hyperparameter

Defines the architecture to use for the experiment. H2O Hydrogen Torch uses Semantic Segmentation architectures with additional postprocessing to separate masks into individual instances.

Pretrained

Defines whether the neural network should start with pre-trained weights. When this setting is On, the training of the neural network will start with a pre-trained model on a generic task. When turn Off, the initial weights of the neural network to train will be random.

Training Settings

An image instance segmentation experiment does not have specific training settings besides those specified in the training settings section of the common experiment settings page.

Prediction Settings

Probability Threshold

Defines the probability threshold; a predicted pixel will be treated as positive if its probability is larger than the probability threshold.

Max Instances

Defines the Maximum number of instances to use during the evaluation.

Test Time Augmentations

Defines the test time augmentation(s) to apply during inference. Test time augmentations are applied when the model makes predictions on new data. The final prediction is an average of the predictions for all the augmented versions of an image.

Note

This technique can improve the model accuracy.

Environment Settings

An image instance segmentation experiment does not have specific environment settings besides those specified in the environment settings section of the common experiment settings page.

Logging Settings

An image instance segmentation experiment does not have specific logging settings besides those specified in the logging settings section of the common experiment settings page.


Back to top