Skip to main content

Notifications

Power Apps - AI Builder
Unanswered

Object Detection - Once Detected Pull Data Only Related to that Object detected

(1) ShareShare
ReportReport
Posted on by

Hello everyone,

 

I am trying to create an app that will detect college football logos. I create a simple CDS database with a couple teams and their current stats for 2019. I have the AI object detector working fine, however in my app I want to only display the team stats that was detected. When I created a label based on the object detector I find that I only have a few options to display (count, display etc), not data in the CDS table that is connected to the respective team. When I used a gallery, I could not find a way to filter out the other teams that were not detected.

 

Thank you so much for any help,

 

Ryan

Categories:
  • harris_b Profile Picture
    harris_b on at
    Re: Object Detection - Once Detected Pull Data Only Related to that Object detected

    Hi @HSheild , @Anonymous 

     

    HSeild is right when advising to use the filtering/lookup functions.

     

    If you want to display teams that have been detected, you should apply a filter on the detected objects and then on your entity.

    As the ObjectDetector control outputs a table of records containing id, label and count, I would recommend you to:

     

    1. Filter records that have a count greater than 0.

    2. Apply a filter based on teams retrieved in step 1, on your entity.

     

    Assuming your control is name "ObjectDetector1" in your app, you should use the following formula to filter detected teams:

    Filter(ObjectDetector1.VisionObjects, count > 0)

     

    Assuming that your football team entity is named 'CollegeFootballTeam' and it contains a column 'team_name' that is the name of the team.

    Then you can combine the output of this formula with another Filter function which would look like the following:

     
     
    Filter(
        'CollegeFootballTeam',
        team_name in (Filter(
            ObjectDetector1.VisionObjects,
            count > 0
        ).displayName)
    )

     

  • H Sheild Profile Picture
    H Sheild 2,964 on at
    Re: Object Detection - Once Detected Pull Data Only Related to that Object detected

    Hi @Anonymous ,

     

    As you say AI Builder only returns the label text and the number of times the object appears.  What you will have to do is use the Lookup function in your PowerApp to take the label returned by AI Builder and find the CDS record that contains the team's data.

     

    Something like

     

    LookUp( CollegeFootballTeam, Name= "<label returned from AI Builder>")

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard