DocumentationAPI Reference
Back to ConsoleLog In

Step 3 – Adding Your Model

The following describes how to upload your model to the Deci Platform. This model can then serve as the baseline model to be optimized.

Uploading a Model to Deci

To add a model to be optimized –

(1) Display the Lab, which opens by default when you launch the Deci platform, or by clicking the Lab tab at the navigation bar. The following displays –

(2) Click the + New Model button (top-right corner). The following displays –

(3) Define the model’s details, as follows –

  • Model Name – Specify a free text name for identifying the model in the Deci platform.
  • Description – Specify a free descriptive text for identifying the model in the Deci platform.
  • Task – From the dropdown menu, select the type of task that is performed by the model
  • Inference Batch Size – Specify the batch size that the model is expecting to receive.
  • Target Hardware – Select the primary hardware environment on which this model is currently implemented in production from the dropdown menu.
  • Framework – Select the framework (programming language) used to develop this model.
  • Upload Model File – Click the Upload Model button in order to upload the model’s file to your private model repository in Deci. The model files must be model checkpoints according to the following requirements –

Framework

Checkpoint File requirements

ONNX 1.8.0

Your ONNX model should be saved as a .onnx file, and must support inference with dynamic batch size.

TensorFlow 2.3

The platform supports a TF2 saved-model format. Make sure to zip the file's directory before uploading.

TensorFlow 1.15

Frozen graph only - The checkpoint file should be a .pb file of a frozen graph.

Keras

Save your Keras model in .h5 format. Make sure to save both the architecture and the weights.

PyTorch

To enable the upload of a PyTorch model into Deci, convert it into an ONNX 1.8.0 format (a .onnx file) that supports inferencing with dynamic batch size. Refer to the FAQs for instructions.

TorchScript

Save your traced TorchScript module as a .pth file.

  • INPUT DIMENSION – Specify the input dimensions expected by the model so that Deci can interact with it. This is the syntax that the model is configured to handle and which will be used to measure the model’s performance. For example, 3, 244, 244 is for a model that performs an Object Detection task –
    The first parameter (in this case 3) represents the quantity of channels, which in this case is RGB, because this is a computer vision model.
    The second and third parameters represent the resolution of the image, which in this case is 224 x 224 pixels.

Notes:

  • No need for declaring the batch-size when entering the input dimensions.
  • You should enter the input dimensions as the model expects to receive them (e.g channel last/first)

(4) Click the Next button. The following displays –

(5) Defining Accuracy – Currently, it is optional to fill in this window. The accuracy that you declare here is displayed in the Lab and Insights pages for optimized models. It is not yet validated by Deci.

In the DEFINE ACCURACY METRICS field in the Key field, enter the accuracy metric that you measured for this baseline model; and in the Value field enter the measurement of that metric. For example to specify the mean average precision, enter mAP in the Key field and the actual value of the precision measurement in the Value field, as shown below –

Click the + button to define this accuracy metric as a SELECTED PARAMETER, as shown below –

This accuracy metric is automatically detected as the Main metric.
You can add additional accuracy metrics by entering them in the Key and Value fields and clicking the + button again. The following displays –

These are shown in the Accuracy Metrics section of the Insights tab.

(6) Click the Done button. After the model has been configured and processed by Deci, a notification bar is displayed showing the progress of the upload. Deci automatically benchmarks the efficiency of all supported CPU and GPU target hardware environments; and Deci also automatically benchmarks all available batch sizes.

The model then appears at the top of the list of models in the Lab, as shown below –

Exploring the Benchmark Results of the Uploaded Model

As described in Exploring an Example Project, you can view a variety of performance metrics about your baseline model. These metrics reflect your model’s performance before Deci has optimized it.

To explore the performance of your baseline model –

(1) Click on its row in the Lab.
The Select Target Hardware dropdown menu enables you to select the target hardware environments for which to show the model’s metrics, as shown below –

The Select Batch Size dropdown menu enables you to select to show the models metrics for any of the supported batch sizes, as shown below –


Did this page help you?