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

Announcements

News and Announcements icon
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,187 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:
  • 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,187 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard