Skip to content

Latest commit

 

History

History

HOL01-Cogs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Day#2 – AI & ML

HOL01: AI Apps - COGS-CustomVision-PowerApps

Overview

Create an intelligent application for image classification using AI service. Components:

  • Object Clasification model - CustomVision.ai
  • PowerApps application to call the object classification serivce and display results

alt text alt text

Prerequisitites

  • Microsoft Azure account
  • Microsoft O365 account (PowerApps access)
  • images to classification (at least 15 per category)

Guide

1. CustomVision (https://cusomvision.ai)

  1. create CustomVision project - classification (select Multiclass - from Classification types choices) alt text
  2. upload images - get data from zip file
  3. label / tag images to separate classes within CustomVision portal
  4. run training! alt text
  5. quick test with one of the test images alt text

You have now created a first model for car classification.

2. Test the created model by callin Custom Vision API

  1. Go to https://notebooks.azure.com/ and log in with your Azure credentials.
  2. Go to My Projects (upper left)
  3. Import Git Repo (azurecz/azuretechacademy-data-analyst-labs-day2) xxx
  4. check the import was successfull xxx
  5. go to HOL01-Cogs folder and select [Jupyter Notebook] CustomVision-Prediction-API.ipynb in HOL1-Cogs folder and follow the steps.

note: if you see error for missing kernell select Python 3.6 xxx

note: change first code cell from !/data/anaconda/envs/py36/bin/pip install azure-cognitiveservices-vision-customvision to !pip install azure-cognitiveservices-vision-customvision xxx

[OPTIONAL] 2. PowerApps (https://powerapps.microsoft.com)

  1. create PowerApps application - phone layout alt text

  2. add elements: labels, media alt text

  3. add CustomVision as datasource [prediction key] alt text

  4. select "AddMediaButton1" and put into OnChange action scoring the image (use your CustomVision project ID insted of xxx...): UpdateContext({res:CustomVision.PredictImage("xxxxxxxx-xxxx-xxx-xxxx-xxxxxx", UploadedImage1).Predictions})

  5. update label property to update text based on results (text): Concatenate("Probability: ",Text(First(res).Probability))

  6. save & publish the app