#AzureIoT – How to create an Azure IoT module from an Azure #CustomVision project 👀 1/N

Buy Me A Coffee

Hi !

I’m a big fan of Azure Custom Vision, and when I talk about Computer Vision I usually share an example on how to tag images from drawings. I had 3 types of drawings

  • fish
  • flower
  • human

I build a model in Custom Vision and then I show my amazing drawing skills with something like this. The custom CV model identifies this as a fish, so I get to a point where my drawing skills are a good fit for this model.

Bruno drawing a fish on Microsoft ignite 2019

Note: I think the 1st time we did something with these drawings was in an Insider Dev Tour on 2017 or 2018. This photo is from Microsoft Ignite 2019.

Azure Custom Vision is a super cool tool that allow us to create complex Computer Vision projects without code. And, on top of that we have an additional feature:

Once we train a CV model, we can export the model to be used in different platforms. In example, TensorFlow, ONNX, or as a packaged website in a Docker image.

export custom vision project formats

If we go to the Docker option, we will have also the choice to export to different versions:

  • Linux
  • Windows
  • ARM (Raspberry Pi3)
export custom vision project as docker image

That’s cool. I can download and install the Linux version, and then build and run the project with these 2 commands

docker build -t drawingsit01 .
docker run -p 127.0.0.1:80:80 -d drawingsit01
custom vision project build and run in docker

Now I can test this with a tool like Postman. In order to do this, I draw (again) an amazing fish, and then I perform a POST request to my local running docker container, and it was recognized as a fish with a 99% of accuracy.

postman analysing drawing as recognize as fish

So, let’s recap for future posts.

  • We created and trained a project in Azure Custom Vision.
  • We exported the project as a docker image.
  • We run the image locally, and tested with an image.

Right now, I think I have everything that I need to create an Azure IoT Module based on the exported Linux module from Custom Vision.

More in next posts !

Resources

Happy coding!

Greetings

El Bruno



¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

One thought on “#AzureIoT – How to create an Azure IoT module from an Azure #CustomVision project 👀 1/N

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.