Build an AI application without code

Build an AI application without code People say that AI and Machine Learning is an occupation of the future. But after seeing these tools it seems like this job title is the first to go, in the automation of work.

Today 18 monkeys tried to follow along when Zakaria Mahomood showed how to build an Azure AI application without a single line of code. This manual is an excelent case of read the manual first then only do the last two items in the instruction and delete the rest. Just so you have been warned. Azure is a cloud platform from Microsoft that contains many different services. Today we will use two API:s, the Face API and the Computer Vision API and two applications. The Blob Storage and the Logic App.
The Logic App is a generic template for building applications with buttons and forms and so on. But we are only going to use it behind the scenes, as a service. It only cost money if it is running so you could have an installation and turn it on using an app in your phone when you need it to be running. When you create a new account you get 1600 SEK to spend, but remeber to delet the account when you are done. Otherwise you risk to pay for it after 30 days or so.

Inside Azure we create a new Resource Group called BarrelWorkshop where we will build our application.
Now we create our Logic App and select North Europe as location, primarily for latency but you should also consider where you are allowed to store your data when selecting a location, especially with the new GDPR regulations on the rise.
Set Log analytics to "off". We are not corporate size org yet...
The Logic App contains many services but we want to go for a Blank Logic App and the goal is to use our smart phones to take pictures and save in One Drive. (Be aware of the difference between One Drive and One Drive for Business.) And then let the Azure application fetch the images and perform some AI analasys and finaly send the result to a Slack channel.
The Blank Logic App runs on Triggers and Actions and we want to focus on Triggers that can run each time a file is created in our One Drive.

"Add new connection" - When a file is created: Here you select a folder and how often you want to check. There is no event that is executed from the One Drive side. So, you have to check the folder on an intervall. Each check cost about 0.003 SEK, so you will not run our of money soon.

+ New step -> Add an action
Here we want to create a place to store the file on Azure. Using the "Azure Blob Storage" to "Create Blob". But before we can do that we need to setup a "Storage Account". Open a new tab in the browser so you do not get lost from the app you are currently building.

Back to the Resource Group barrelworkshop and create new "Storage Account". This is used to store blobs, files, tables and queues. Here you need to set a unique name, then you set the Resource manager to Classic, the Account to Standard the Replication to Locally-redundant storage (LRS) and Subscription to Pay as you go. Now you got your extra storage in the cloud, in just a couple of seconds. In this regard Azure is a lot faster then IBM that takes over 40 minutes to boot up a new machine.
With the Storage Account in place we can open the Keys menu and copy the primary key and head back over to our Logic App. Here we are about to create a new connection, you can set the Connection name to anything you like and then paste the Azure storage Name and Key into the Connection interface.
Finaly we are ready to Create the Blob and select a folder and a blob name. A blob is a file in Azure terminology. Blob name is File name and Blob content is File content. This moves the file from our One Drive to our Azure Storage that we just created. Go back to the Storage Account, Blobs and press Click to copy on the api url then return to the Logic App insert the url. Now you get a list and ther you select the blob called "Name"

+ New step, Choose an action. Search Face and select the "Face API" (This is like playing with bricks, they got tons of actions for Facebook, Video and many more).
When using the Face ID funtion to recognize if the same face is back Azure only stores the ID for 24 hours. Then it creates a new Face ID. This is to prevent Azure applications to be used for tracking people over longer periods of time. Other providers like amazon and IBM does not have the same kind of limit.
In the Face API we pick the action "Detect faces"

In your Microsoft Azure Resource Group you should now be able to see your Face Detect API (faceapi)
Click faceapi select the "KEY 1" and remeber your service name. Go back to the Logic App, goto Overview in the faceapi and copy End point and insert it into the Face API url and press create.

+ New step add a connection and type Vision and pic "Computer Vision API" we are going to use the Computer Vision API and select Image source: Image Content.
(Add new connection to the vision instance)
Shift tab and enter your Resource Group Vision API and copy KEY 1. Go back to the Logic App and insert the account key, change to overview and copy your endpoint and insert into the Logic App in the site URL.

Now you can select Image Content and then what features you want to extract from the image.

+ New step
Now here is a place for consideration. The system creates one output for each feature it is supposed to extract and if you are tempted to use mail as output, be aware that a 100 uploaded pictures and abuot 100 features for each image will render 10 000 mails, a mistake our presenter has done so that we do not have to. Instead we send our output to a Slack group. But you could just as well send it to facebook as to your own application.

Select the Slack API and sign in to the slack group and authorize. Pick a channel name, for instance general. Create a message text, enter your name, then select the informaion you want, like "Caption text", "Age", "Beared" and face ID.

Now Click Save in the top left corner and we are ready to take a picture. And make sure that the picture is stored in the right folder in your one drive on the phone.


Now we try to run the application and it fails. This is because you need to make your Azure storage publically available for this to work. We do not want to do this at the moment so instead we:

Delete the blob, it need to be publically available. You can create a secure access. But it is not that easy.
Delete Face API
Delete Detect Faces
Delete the blob...

Left is file and analyze image

Now create a Slack API and add post message and Caption text...and all that you want to add

Save and run.

Now take a picture and see how the Slack channel fills up with information about the images.

Remeber to delete your account and deactivate by clicking the "Enable" button in the top bar. And do not use any storage space because you will eventually pay for that, you can also disable and enable you App from an app in your phone.

So how does Azure compare to other suppliers of AI and cloud services?
IBM is old and slow. Amazon only have basic funtionallity, but Amazon does has an ML function where you can train your own model. Azure is more user friendly but more clicking than Amazon. Microsoft also has Machine Learning Studio, a separat product from Azure with up to 10 GB for free data for you to analyze. And in the MLS Microsoft will not use your data to train their own models as they do in Azure. You can also setup a webservice to stream data instead of reading from a file.

Bonus: created by Zakaria and a colluege is completely based on the Azure API:s and it is easy to just plug and play with the advanced ML features. There is lots of documentation and there are more advanced guides online to do other cool stuff!
Let your imagination run wild. This is easy, and you can create almost anything.

- Azure, Face, Image

<< How People Gather Action in mind >>


Mail (Not public)
Send mail uppdates on new comments


0 post found