Creating and managing your own models
You can create and manage your own models by uploading your model to the Scailable platform in ONNX format, TFLite or a zip archive containing a teachable machine model. Please see our documentation for data scientist for more information on generating and testing AI models specified in ONNX format.
Note that the TFLite and archive formats are, under the hood, converted to ONNX. Hence, they are supported by our platform, if the generated ONNX can be converted to the Scailable Portable Model format (SPMF).
At this point in our documentation we assume you have a AI model in one of aforementioned formats that adheres to our model specifications. You can learn how to create a valid model in our documentation for data scientists.
To deploy your custom ONNX model an edge device, you will first have to convert it to Scailable Portable Model format (SPMF). You can do so by logging into the Scailable Platform and navigating to the "CREATE" tab. Here you can upload your model, and we will automatically generate a highly efficient representation for deployment within the AI manager.
To upload an AI model specific in ONNX format, simply select the
.onnxfile on your filesystem, and fill out the remaining fields.
Before uploading an ONNX file to our platform, please do make sure it adheres to our ONNX requirements.
Let's look at each of the fields of the model upload page in turn:
- Model name: This is simply a user generated name that will show up in your models list in the model tab.
- Model alias: This is an alias you can give your model for parrallel execution on the AI manager. This field is optional.
- Documentation: Here you can upload documentation for your model in
- Model image input order: This field (with possible values 0 and 1) specifies the input order of the model. Does the model input need
n, c, h, w, thus, the number of input images, the number of channels (1 for grayscale, 3 for color), the height, and the width of the input image, or does it need
n, h, w, c, i.e., does the number of channels come at the end?
- Model image color channels: The number of color channels. This is
1for grayscale and
- Model image input height: The height of the input image for the model. Note that this is not the height of the camera input: the AI manager will automatically convert the image grabbed from the camera to the appropriate input size for the model.
- Model image input weight: Similar to the height, this value specifies the width of the model input.
- Model mean/std normalisation: It is common for vision models to normalize the color values by subtracting the mean and dividing by the standard deviation: The AI manager can do this extremely efficiently. If the image does not need normalization you can set the mean to
and std to
. (Note that this is a vector input, for color images one can specify
Teachable machine models have the following configuration: - width and height both equal to 224 - number of channels is 3 - order is NHWC - mean is [127, 127, 127] and std is [128, 128, 128]
- Post-processing: Depending on the output of the model (and the names of the output nodes of the ONNX graph), several post-processing options might be available:
- None: No post processing is automatically added to the model
- NMS: Available for backwards compatibility. It is strongly advised to make use of the ONNX NonMaxSuppression operator in your ONNX graph instead. The post-processing version is available for named input tensors in
bboxes-format. This post-processor runs NonMaxSuppression with a score_threshold of 0.4 and an iou_threshold of 0.0. It filters out bboxes that have high intersection-over-union (IOU) overlap with previously selected bboxes. Bboxes with score less than score_threshold are removed.
- Index of highest result: Available for backwards compatibility. Removes all non-csv content from the output string and returns the index of the highest (numeric, float) value.
- tess: Available for backwards compatibility. Runs Tesseract OCR on areas defined by
bboxes-formattype named output, outputs a character string containing the recognized text.
We are actively updating and extending our post-processing options and will make a larger set of post-processing options available in 2023.
After filling out all the fields you can click the "UPLOAD .ONNX" button and the model will automatically be converted to SPMF for deployment to your edge devices.
After uploading your ONNX model, the model will show up in your list of user generated models in the MODELS tab. Here you can manage your models, edit their descriptions, and manage model versioning.