Working with Models

Use a Custom Model

In order to use your own custom model, first upload the model to your account. Although your model lives in the alwaysAI cloud, it will be private and only accessible by you or collaborators on projects you have shared the model with.

Upload your model

You can upload a private model from the My Models section of the Dashboard.

Simply click the Upload custom models link and follow the prompts.

Using your model

Once your model is in the catalog, it can be installed just like any other model.

Add the new model to your application configuration

Navigate to your app directory and run the following command in the terminal:

$ aai app models add <username>/<modelName>

Where username is your alwaysAI username, and modelName is the name you gave the model when you uploaded it. Here’s an example:

$ aai app models add alwaysai/MyFirstModel

Update app source to use the new model

Update the class instantiation in your application source to use the new model. If you’re using an ObjectDetection model your code might look like this:

obj_detect = ObjectDetection("alwaysai/MyFirstModel")

Deploy the updated application to your local machine or remote device

To deploy locally on Mac or Windows, use the command:

$ aai app install

To deploy locally on Linux, or to a remote device, use the command:

$ aai app deploy

Start the application

$ aai app start

(Optional) Remove an old model from your application configuration

If you have a previous model in your app, you can remove it from the configuration:

$ aai app models remove alwaysai/mobilenet_ssd