Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - AI Builder
Unanswered

Activating AI objectdector when picture is taken with the camera

(0) ShareShare
ReportReport
Posted on by 1,171 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
    Re: Activating AI objectdector when picture is taken with the camera

    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.

  • rohitK264 Profile Picture
    4 on at
    Re: Activating AI objectdector when picture is taken with the camera

    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
    Re: Activating AI objectdector when picture is taken with the camera

    Yes, you can use the technique described above.

  • vkatariya Profile Picture
    5 on at
    Re: Activating AI objectdector when picture is taken with the camera

    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
    Re: Activating AI objectdector when picture is taken with the camera

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

  • rohitK264 Profile Picture
    4 on at
    Re: Activating AI objectdector when picture is taken with the camera

    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 ?

  • Highboy Profile Picture
    1,171 Super User 2024 Season 1 on at
    Re: Activating AI objectdector when picture is taken with the camera

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

    It's a very well written answer.👍

  • billba Profile Picture
    Microsoft Employee on at
    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!

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1