I've built an AI with the new AiBuilder by PowerApps. It detects faces. I want to make an App which says "face detected" when it detected a face and "no face detected" when it didn't detect a face. Is there any way to let the Text know that a face is detected? I'm completely new to PowerApps so any help would be appreciated.
I've included my AI Model. I've included text with the above shown text. I turned the visibility off on both texts. Then I set a rule for the "face detected" text called "detected" with the condition:
"ObjectDetector1.face >=1"
the action then is "Visible -> true
.
The text "no face detected" has the rule "not detected" with the condition: "ObjectDetector1.face =0" the action is "Visible -> true. The code for the conditions is probably wrong so can anyone help me out with that? I would appreciate it.
It should display the text "face detected" when he actually detected a face and "no face detected" when the is no face detected. At the moment it shows no text when it detected a face nor didn't detect a face.
Edit: I forgot to mention that I called my module "face" so it should recognize the ".face". (I hope?)
Got it!
First(ObjectDetector1.VisionObjects).count >= 1
and
First(ObjectDetector1.VisionObjects).count = 0
were the key! If anyone runs into the same issue.