How To Change Computer Vision Models in the alwaysAI Platform

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.

Don't have access to the dashboard or starter app? Create your account now for free to create your account.

alwaysAI Demo 2 - How to Change Models

 

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 and could 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.

Get access to the dashboard and our docs now. Create your account now for free.

 

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 lists 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, and it can detect 100 unique objects. Let's swap in this model and see how it performs.

To add the model as a dependency 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 source code command in Terminal.

 

Replace this line with copied Model ID:

 

 

Re-deploy 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.

Now 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.

Join our beta now

We are providing professional developers with a simple and easy-to-use platform to build and deploy computer vision applications on embedded devices. The alwaysAI beta program is open. Create your account now for free.

Get started