Step 2 - Train the Dataset

Training the dataset creates the model that delivers the predictions.

  1. Now that you’ve added the labeled images to the dataset, it’s time to train the dataset. In this command, replace <TOKEN> with your token and <DATASET_ID> with your dataset ID, and then run it. This command trains the dataset and creates a model with the name specified in the name parameter.

The response contains information about the training status and looks like the following. Make a note of the modelId because you use this value in the next step.

  1. Training a dataset can take a while depending on how many images the dataset contains. To get the training status, in this command, replace <TOKEN> with your token and <YOUR_MODEL_ID> with the model ID, and then run the command.

The response returns the status of the training process. If it’s in progress, you see a status of RUNNING. When the training is complete, it returns a status of SUCCEEDED and a progress value of 1.

After you create a model, you can retrieve metrics about the model, such as its accuracy, f1 score, and confusion matrix. You can use these values to tune and tweak your model. Use this call to get the model metrics.

The command returns a response similar to this one.

To see the model metrics for each training iteration (epoch) performed to create the model, call the learning curve API. See Get Model Learning Curve.