Developer stories to your inbox.

Subscribe to the Developer Digest, a monthly dose of all things code.

You may unsubscribe at any time using the unsubscribe link in the digest email. See our privacy policy for more information.

alwaysAI Ad

How To Change Computer Vision Models in the alwaysAI Platform

By Jason Koo Oct 16, 2019

In this tutorial, we will show you the steps needed to change the computer vision model in the alwaysAI application. Your development computer and edge device (if you're using one) should be set up based on the instructions on our dashboard. You should also have an app running like this object detector starter app. Finally, you should have a Terminal window open.

If you don't have an alwaysAI account yet, you can sign-up here.

You learned how to run a real-time object detector app on a Raspberry Pi previously in this article. That app uses the MobileNet SSD Caffe model trained on the Pascal VOC dataset which can detect 20 unique objects. We saw that we were able to detect a potted plant in our office. Now, we want a model to detect a potted plant and a vase independently of each other, so we’ll need a different model. To change the computer vision model in your application, head over to the alwaysAI dashboard.


1. Browse the model catalog

From the alwaysAI dashboard, click on “Browse Models” from the Browse the Model Catalog panel.

There you will see the full list of available models.


2. Choose a model to deploy

Next, find the model set you wish to deploy.

Since we're running the real-time object detector app, we can swap in any object detection model regardless of the framework on which it was trained and see how it performs.

Here's the TensorFlow version of MobileNet SSD trained on the Coco dataset, which can detect 100 unique objects. Let's swap in this model and see how it performs.

To add the model to the app using the CLI:

  • Click on the option dots in the upper right-hand corner of the data set you wish to install.
  • Copy the CLI command
  • Paste it into your terminal window and press enter.



3. Update the model and re-deploy

To use the new model, update your source code to use the new model and re-deploy the app on the device.

First, return to the option dots and select “Copy Model ID”. Type in the source code command in the Terminal.


Replace this line with the copied Model ID:



Re-deploy the application to install the update:


4. Run the start command

Now that the updated app is deployed, run the start command alwaysai app start


Visit the Streamer link http://localhost:5000 in a browser to see how the updated model performs.

We can see that this model detects the plant and the vase independently.


That's how easy it is to swap out computer vision models in your alwaysAI application.

Try it yourself with our realtime_object_detector starter app.

Get Started Now
We are providing professional developers with a simple and easy-to-use platform to build and deploy computer vision applications on edge devices.
Get Started Now
By Jason Koo Oct 16, 2019