Using Your Model

This guide details how to use your newly trained model, which is now in your local model cache. You must add your new model to a project, either locally or via publishing to the model catalog. Then you can see how your model performs by installing the model and starting up your application. In some cases, the model may need to be converted before being used in a application.

Model Conversion

  • Models may need to be converted before they can be used.

Available Target Format

  • EyeCloud

  • OAK

Converting a Model Using the CLI

  • After training a model, you can convert them into different formats by using the command below.

$ aai model convert <username/modelname> --format <target_format> --output_id <new_modelname>

username/modelname - name of the model you want to convert.

target_format - format you want to convert to.

new_modelname - name of the converted model.

Note: Your username is automatically prepended to <new_modelname> and supplying it may result in errors!

EyeCloud Camera

  • To convert a model for EyeCloud cameras, supply eyecloud for the format parameter.

$ aai model convert <username/modelname> --format eyecloud --output_id <new_modelname>

This will output a model with the name username/new_modelname to the local model cache.

OAK Camera

  • To convert a model for OAK cameras, supply oak for the format parameter.

$ aai model convert <username/modelname> --format oak --output_id <new_modelname>

This will output a model with the name username/new_modelname to the local model cache.

Add the Model to a Project

All models within the alwaysAI system can be used in Projects much in the same manner. The only difference with models that you have trained yourself is that you must either publish the model to your private model catalog, or use a special flag when adding the model if it is unpublished.

To publish a model to your private model catalog, run the command:

$ aai model publish <username/modelname>

Once your model is published, you can add it to a Project as usual to test it out. This model will remain private to your Projects. Collaborators on Projects that use this model will also be able to use the model.

If you’d rather test your model out locally before pulishing it to the cloud, you can check out the documentation for using your model locally.

Use the Model in the Project

As with any alwaysAI model, once you have added your model to a Project, you must install it locally, and then you can start your application to view how it performs in your application.

We have detailed documentation on using models in Projects in general, which can be found in our Using Models documentation.