Create a model

Create a customized training model to automate your project and speed up the annotation process all while delivering quality results. Only Team Owners and Team Admins can run model trainings.

Create model

Step 1: Enter your model’s name and description

neural network
  1. Go to Neural Network.
  2. Click the + button.
  3. Type the model’s name and description.

Step 2: Choose the annotation task

  1. Click Annotation Task.
  2. Choose an annotation task from the drop-down list.

For Image (Legacy) Projects:

  • Instance segmentation
  • Semantic segmentation

For Image Projects:

  • Instance segmentation
  • Object detection

Step 3: Choose the base model

  1. Click Base Model.
  2. Choose the base model upon which your new model will be refined from the drop-down list.

Step 4: Choose the training data

  1. Click Train Data.
  2. Choose the projects, folders, or root images that you want to use to train your model from the drop-down list. Only projects and folders that contain completed images appear in the drop-down list.

Step 5: Choose the testing data

  1. Click Test Data.
  2. Choose the projects, folders, or images that you want to use to evaluate your model from the drop-down list. Only projects and folders that contain completed images appear in the drop-down list.

Step 6: Set your training’s parameters

Parameter nameDescription
Base modelThe base model upon which your new model will be refined.
Number of devices (GPUs)The details of the devices (GPUs) available to train your model. You have two options: a 12GB GPU or a 16GB GPU.
Epoch countThe number of times the dataset undergoes training. The epoch count ranges from 1 to 200.
Batch sizeThe number of images.
Learning rateThe model’s learning speed. The learning rate ranges from 0 to 1.
Image (ROIs) per batchThe number of regions of interest (ROI) per image. The ROI ranges from 2 to 512 and is a power of 2. The smaller the ROI, the faster the learning rate. Image (ROIs) per batch works only with instance segmentation.
Evaluation periodThe number of epochs per evaluation period. If the epoch count is 10 and the evaluation period is 2, it means that the dataset will undergo an evaluation every 2 epochs. The user will be reported of the best model that resulted from the evaluation period.
GammaGamma is needed for the learning rate. Its value ranges from 0 to 1, and it will be multiplied with the learning rate.
Epochs for gammaAfter you specify the number of epochs for gamma, the learning rate will be multiplied by gamma.

Run training

To run the training:

  1. In the top right corner, click Run training.
  2. In the pop-up message, click Run Training.

After the training is complete, you can use your new model to run Smart Prediction.

SDK function

To run Smart Prediction with a specific model:

raw_images = sa.search_items(
  project = "Cityscapes", 
  annotation_status = "NotStarted")

succeeded, failed = sa.run_prediction(
  project = "Cityscapes", 
  images_list = raw_images,
  model = "Cityscapes Segmentation Model")

Stop training

To stop the training:

  1. Click Stop in the top right corner.
  2. In the pop-up message, click Yes.

Get model training metrics

To download your training's metrics:

  1. Go to your model.
  2. Under Training metrics, click Download.
neural network metrics

SDK function

To download the trained model and its metadata:

sa.download_model(
  model = "Cityscapes Segmentation Model", 
  output_dir = "./models")

The downloaded model directory contains trained model weights and a configuration file on the model architecture.

📘

Model deployment tutorials

Check out our GitHub repository for model deployment tutorials on edge devices like Jetson Nano and OAK-D.