web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Activating AI objectde...
Power Apps
Unanswered

Activating AI objectdector when picture is taken with the camera

(0) ShareShare
ReportReport
Posted on by 1,183 Super User 2024 Season 1

Hello


I have trained an AI objectdetector, and woulld like to use it without manually pressing "detect"

 

I have a media/camera and a button that takes a picture when the button is pressed.

I want to use that picture in the AI, without any furter user input.

 

Is that possible?

Categories:
I have the same question (0)
  • billba Profile Picture
    Microsoft Employee on at

    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!

     

  • Highboy Profile Picture
    1,183 Super User 2024 Season 1 on at

    Thanks, I will have to test it in the morning.

    It's a very well written answer.👍

  • rohitK264 Profile Picture
    4 on at

    Hi,

     

    I am also facing the similar issue where I want to feed image taken from camera control in powerapps to AI Object Detector.

     

    Have you got anything on this yet ?

  • billba Profile Picture
    Microsoft Employee on at

    Did you try the technique I cited above? That’s the way to do this.

  • vkatariya Profile Picture
    5 on at

    Hi,

     

    I am also facing the similar issue where I want to feed image taken from camera control in powerapps to AI Object Detector.

     

    Have you got anything on this yet ?

  • billba Profile Picture
    Microsoft Employee on at

    Yes, you can use the technique described above.

  • rohitK264 Profile Picture
    4 on at

    Yes I tried but it seems to be not working for me as I did not want to detect the objects but instead faces. So object detection model did not work for me. Also I did not get to detect object without having user to click on Capture button.

  • billba Profile Picture
    Microsoft Employee on at

    Face detection models are somewhat different animals. Here's a thread that talks about using a different kind model. Keep in mind that you pay per model invocation, so if you want to run a model continuously (rather than on a button press) you will end up paying more, potentially a lot more. Be very careful how often you poll.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard