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
- Microsoft Azure account
- Microsoft O365 account (PowerApps access)
- images to classification (at least 15 per category)
1. CustomVision (https://cusomvision.ai)
- create CustomVision project - classification (select Multiclass - from Classification types choices)
- upload images - get data from zip file
- label / tag images to separate classes within CustomVision portal
- run training!
- quick test with one of the test images
You have now created a first model for car classification.
- Go to https://notebooks.azure.com/ and log in with your Azure credentials.
- Go to My Projects (upper left)
- Import Git Repo (
azurecz/azuretechacademy-data-analyst-labs-day2
) - check the import was successfull
- go to
HOL01-Cogs
folder and select [Jupyter Notebook]CustomVision-Prediction-API.ipynb
inHOL1-Cogs
folder and follow the steps.
note: if you see error for missing kernell select Python 3.6
note: change first code cell from
!/data/anaconda/envs/py36/bin/pip install azure-cognitiveservices-vision-customvision
to!pip install azure-cognitiveservices-vision-customvision
[OPTIONAL] 2. PowerApps (https://powerapps.microsoft.com)
-
select "AddMediaButton1" and put into
OnChange
action scoring the image (use your CustomVision project ID insted ofxxx...
):UpdateContext({res:CustomVision.PredictImage("xxxxxxxx-xxxx-xxx-xxxx-xxxxxx", UploadedImage1).Predictions})
-
update label property to update text based on results (text):
Concatenate("Probability: ",Text(First(res).Probability))
-
save & publish the app