Use an image classification model by Lobe in Power Apps
In this article, you'll learn about using an image classification model by Lobe in Power Apps.
Create a canvas app
Create a new canvas app for your image classification model. (If your model is already in a canvas app, skip this section and go to Add the Power Fx Prediction formula later in this topic.)
Sign in to Power Apps.
Select Create > Canvas app from blank.
In the App name field, enter a name and select Create.
If you see the Welcome to Power Apps Studio screen, select Skip.
Select Data > Add data > AI models.
On the dropdown, select the image classification model you want to add.
Add the Power Fx Prediction formula
On the image classification model, select the control area next to Prediction.
On the formula bar, type 'Model Name'.Predict(Image).Prediction.
In the following example of car damage, you would type this:
'Car Damage Classifier'.Predict(AddMediaButton.Media).Prediction
The last property in the formula,
.Prediction, will return the predicted label for the image from the model. If you want a list of all the possible labels and their corresponding confidence values from the model, use the
.Labelsproperty in the following example:
Use a canvas app with a classification model
The following animation shows how users of your new app can add their own images in Power Apps and have the appropriate label automatically predicted. For example, if the user is an insurance claim adjuster, they can upload an image of a broken window in a car. The app will then predict and assign the Broken Glass label to it. The user might also want to enter more detail on a claim, such as Window broken on the driver's side.