Neural networks

SuperAnnotate suggests a one-click model training within the platform and makes it possible to integrate training and prediction calls within the Python pipeline.


To run a model training:

  model_name = "Cityscapes Segmentation Model", 
  model_description = "Model Finetuned on Cityscapes", 
  task = "Instance Segmentation for Vector Projects",
  base_model = "Instance Segmentation (trained on COCO)", 
  train_data = ["Cityscapes/Batch 1", "Cityscapes/Batch 2"], 
  test_data = ["Cityscapes/Test"], 
  hyperparameters = {"base_lr": 0.02, "images_per_batch": 8},
  log = True)

Each training task is processed by refining the base_model on the train_data where the base_model can be either one of the provided pre-trained models or a custom model trained on the platform.

Check the full list of pre-trained models in the table below:


Base model

Instance Segmentation for Vector Projects

Instance segmentation (trained on COCO)

Instance Segmentation for Pixel projects

Instance segmentation (trained on COCO)

Object Detection for Vector projects

Object detection (trained on COCO)

Semantic Segmentation for Pixel projects

Semantic segmentation (trained on Cityscapes)


  • The values of task and base_model are case-sensitive. Type them as they appear in the table above.
  • The values of train_data and test_data should be folders that contain at least one image with the Completed status. Don't use the same project or folder to train and test data.

Adjust the default values of the training hyperparameters based on the following table:



Default value


The type of the devices (GPUs) that are available to train your model. You have 2 options: One T4 GPU with a 16GB memory or four GPUs of the same type.

"1 x T4 16 GB"


The number of times the dataset undergoes training. The epoch count ranges from 10 to 200.



Number of images fed to the network per training iteration per GPU.



The model’s initial learning step. The learning rate ranges from 0 to 1.



The 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.



The number of epochs to run evaluation periodically. 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.



Gamma is needed for the learning rate. Its value ranges from 0 to 1, and it will be multiplied with the learning rate.



List of epoch counts to decrease learning rate gamma times.


Smart Prediction

To run Smart Prediction with a specific model:

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

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

This function logs the progress bar which shows the number of images that were predicted successfully.


To download the trained model and its metadata:

  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.

Did this page help you?