Links

Train Your Model with SmartML™

Train a custom model with your dataset using SmartML

Overview

Start training computer vision models right from Plainsight using your labeled datasets. With our SmartML model training backend, you can easily set up a training run with a few clicks of your mouse, no coding required.
New Model Performance Metrics are now available for newly trained models.
Train a model from a dataset in a few clicks. Actual training time has been sped up for this graphic.

Configure a SmartML Training Run

To begin training a model, you will need a locked version of your dataset. See Versioning for more information.
After you've created and locked a dataset version, you'll be able to train a model using your labeled data.
From your dataset:
  1. 1.
    In the "Versions & Export" tab of your dataset, click the "Train" link under Actions for the dataset version you wish to train
Click "Train" on a locked version of your dataset to configure SmartML.
From elsewhere:
  1. 1.
    Navigate to Models from the side navigation, or click "Create New" and select "Model" from the menu
  2. 2.
    Click "Add Model" at the top right, or select an existing model and click "New Version"
  3. 3.
    If this is a new model, enter a name for your model.
  4. 4.
    Configure the dataset and model training options.
Create New Model to configure training

Model Training Options

SmartML requires some basic options to be set in order to begin your training run.

Dataset Name and Version

The dataset and version to be used as input for training your model. Only locked versions can be used. If you've entered the SmartML configuration from the "Versions" tab of your dataset, this will be pre-populated.
Select your dataset and version for your training run

Dataset Label for Model Output

Model Output Options - Select your desired model output. Your options will depend on the labels in your dataset. Options include: Bounding box, Polygon, Semantic Segmentation, Classification, Regression.
Labels for this Model Version Output - Select the labels you want to include in your training. A model can be trained on only one label type. If no labels are found for the selected label type, ensure that you have locked a version of your dataset that contains those labels.
Only Bounding box (rectangle labels), Polygon (instance or semantic segmentation), Classification, and Regression are currently supported in SmartML training. Other label types (Feature Points, Text, and MultiClassification) can be exported and trained outside of Plainsight.

Training Length

Training length, between 1-24 hrs (defaults to 2 hrs). This is the desired amount of time allocated to training your model. Larger, more complex datasets require longer training times, especially if tiling is used.
The desired training length will depend on the dataset. If you are unsure about how much training time is needed we suggest starting with 1 hour per a 1000 image dataset. SmartML will automatically end training when the model has stopped learning.
Read more about Training Time in the Model Training Results section.
Set the appropriate training length for your model

SmartML Hyperparameters

Optional parameters for advanced settings. Do not enable this section unless you are an advanced user and understand the appropriate settings to configure.
Read more about hyperparameters:

Starting a Training Run

Once you've completed selecting your options, scroll down and click "Save and Start Training"
Click to start your training
You will be taken to the Model Version Details where you can monitor the progress of your model.

Training States

When a model enters the training process, it goes through several states:
  1. 1.
    Starting - Training job is waiting to begin
  2. 2.
    Running - Training is actively running
  3. 3.
    Succeeded - Training is complete. This model can be deployed for inferencing
  4. 4.
    Failed - Training encountered an error and was stopped prematurely by the system
  5. 5.
    Canceled - Training run was stopped prematurely by the user
Your model will automatically stop training when it stops measurably improving or when the training reaches the budgeted time.
Your model version will be created and displayed at the top of your model's version list.

Canceling a Training Run

You can stop a training run of an actively training model. This option is only available when a model is in a "Starting" or "Running" state.
Click the "Stop Training" button from the Model Versions list:
Cancel an actively training model from the Model Versions list.

Model Training Results

When training has completed, the Model Version Details will be populated with information on the model and training results. You will find a detailed view containing your model information, various metrics used to evaluate model performance, model training settings, and a gallery view of your dataset splits with predictions.
Read more about Model Performance Metrics and what metrics are available for each model type:
The model training metrics dashboard can provide useful data on model performance.
General model training information is listed at the top, including:
Status is the training status in Model Performance tab of Model Version Details.
Ended At is the training completion date and time.
Dataset is the dataset version used to train this model version.
Training Time (Used) - the actual GPU time spent training this model.
Training Time (Max) - this is the amount of time allocated for the actual training portion, as specified in the "Training Length" option of your model training configuration. SmartML will automatically stop training when your model's validation loss stops decreasing, saving unnecessary training hours. Note: Training a model using Tiling can add up to 50% pre-processing time.
Total Time - The total amount of time the training process takes from beginning to end, including pre and post-processing (initializing a container). This time involves container setup and generating predictions on the dataset images. Unpredictable processing times may cause slight overages especially for larger datasets (10-15%).

Training Settings Summary Review

You can also review the training settings configured for this model in the "Training Settings" sub-tab:

Failures

Occasionally your training run may return with a "Failed" status and display a training error. Read more about training errors and how to troubleshoot them:

Predictions API

This feature will soon be deprecated and replaced with Plainsight Pipelines.
A successfully trained model can be used for inference. Start your Image API to begin running an Live API endpoint and use the Predictions API to run inference. See our guide to using the Predictions API:
You can set up your pub/sub credentials here to receive output from your model inference.
See our Google Pub/Sub guide for more information on how to configure
After training your model, you can view the detections on your dataset images and compare it to the labeled annotations. In the "Gallery" tab, you can preview the splits in Test Set, Validation Set, and Train Set.
The Gallery displays your images in their dataset splits used in training.
  1. 1.
    Select the sub-tab for Test Set, Validation Set, or Train Set.
  2. 2.
    Click on an image thumbnail to open the image.
  3. 3.
    Under Display, select "Model Detection" to see the labels that the model detected. Select "Labeled Annotations" to see what was actually labeled.
Compare Model Detections with Labeled Annotations for your object detection models.
Successfully trained models can be deployed for testing and inferencing by building a deployment pipeline with the model as a data processor. Read about how to deploy your model using Plainsight Pipelines.