‫Well, hello, my friends, and welcome again.
‫Are you excited to run our application?
‫Yes, me too.
‫So what we have done before is adding the dependency for the gradle, creating two layouts, the main
‫and the fragment for the result dialog and two classes, one for the main and one for the result dialog
‫as a template for whatever messages that we are going to display inside the dialog.
‫So inside of the main activity we have created, the two major or the two major methods plus small methods
‫like open file on an activity result we have overriding this.
‫The big method is that phase detection process.
‫We have tracked the faces, checking if there is a smiling probability, left eye or opened or right
‫eye.
‫Open probability and titling and rotating the tilting.
‫Tilting here, tilting and rotating probability for the face, for the head.
‫Then we have this play created the method to display the detection and results.
‫So this method will show the result of Firebase ML Detection and text.
‫Now let's run our application and see if there is any error to fix it.
‫Okay, so I will connect my phone and my physical phone, my real phone, and I will start testing the
‫application.
‫So.
‫Here.
‫I have the application.
‫Hello.
‫Camera and the text.
‫This displayed at the beginning of the application, starting with the application.
‫And now let me test the application.
‫So if we click on camera.
‫We will see this camera.
‫This is the physical camera that I have.
‫I will go to the crown.
‫Okay.
‫And I will capture this image.
‫So I will captured this image.
‫These are three faces.
‫Okay.
‫So I will capture it.
‫And I will click.
‫Okay.
‫And here we go.
‫We have.
‫These results.
‫Three phases detected.
‫The first one.
‫The second one.
‫And the third one.
‫The first one.
‫This is face ID number zero, which is the first one.
‫The head rotation rotation degrees is -0.96, which is tilted to the left head tilted sideways.
‫7.7 smiling probability is 0.9.
‫He is different.
‫Definitely is and absolutely is.
‫Smiling, smiling probabilities mining probability and smiling probability.
‫0.90.
‫Okay, I have missed the smiling probability.
‫I repeated it three times.
‫So if we go to the code again, let me go up and go up and smiling probability I need to put it.
‫This is to the left and here left I append probability.
‫And I need to copy this.
‫And paste it here.
‫Right.
‫I probably let me run again.
‫Again?
‫I will.
‫Took the same pic.
‫So camera.
‫I will take this picture and we'll click.
‫Okay.
‫So three phases detected, phase number one, which is ID equal to zero head rotation to right -0.5
‫degrees, head tilted sideways 5.86.
‫And it is very important to to note that these degrees may be different according to your camera shot
‫angle.
‫So the angle that you took the pic at is very important.
‫Smiling probability is 0.99.
‫It's almost one.
‫So we are detecting that he is smiling.
‫The left eye opened probability is 0.9 and the right eye opened previously is 0.99.
‫Now let's see the second phase.
‫Second phase is.
‫Third is having the rotation degree to the right is -0.5 had tilted sideways.
‫You see we have this this girl has a rotation angle rotation of the of the head and tilting the head
‫is -3023.
‫It's tilting.
‫It's bending its head to the left.
‫Left eye opened one and right eye opened one and smiled.
‫Probability is one.
‫So we are assuming absolutely that they are opened, the eyes are opened and she is smiling.
‫That third phase, phase ID number two, which is the third one.
‫The rotation to the right is -0.9, had tilted sideways is -0.49 and this mining probability is 0.45.
‫Okay, left eye is open, 0.449 and the right eye open 0.49.
‫Because it may be a confusing with for the for the kid that her hair is like it's approximately like
‫very close to its eyes.
‫So this is our application.
‫You see, guys, how we have created an amazing app that starts with ML Kit face detection.
‫So congratulations guys.
‫We have created this amazing app.
‫I hope you start building your own complex applications and start polishing them on playstore.