Re: Activating AI objectdector when picture is taken with the camera
This is possible using an experimental feature that we will be talking more about at Ignite next month.
1. In Settings/Upcoming features make sure "AI models as data sources" is turned on.
2. Select the "data" icon on the far left
3. Select "Add data"
4. In "Select a data source" you should now see an "AI models" option. Select that.
5. Your object detection model should show up on this list. Select it.
Now that your model has been added to the app, you can access it from any control using PowerFx. It has a single method called "Predict" which has different inputs and outputs depending on the model type. For Object Detection the input is an image and the output is a table called "results", each of which contains a tagId, confidence, and boundingBox.
For instance you might do something like this:
Button.OnSelect = Set(tagId, First('Your Model'.Predict(Camera1.Photo).responseV2.predictionOutput.results).tagId)
Label.Text = tagId
In the near future this API will change and the new expression would look like:
Button.OnSelect = Set(tagId, First('Your Model'.Predict(Camera1.Photo).results).tagId)
I hope this helps!