As face recognition is a technique to identify a person from an image or video which has been widely used in various applications, such as security, advertising or social media. The following are some applications:
In security applications, it helps in protecting data by identifying the authorized people
Get closer than ever to your target markets which are called Know Your Customer (KYC).
For instance, it makes advertising more targeted by making educated guesses at people’s age and gender.
For social media, it automatically recognizes people in photos so it can easily suggest to tagging the photos on social media such as Facebook or Twitter
With the AI capabilities of Baseet.ai, providing a UI and API utilities to accelerate your face recognition application for your business. After using the face recognition training app on your dataset, you can use this app (Face Recognition - Twitter API) to recognize the person by fetching the last tweeted image from a certain Twitter handle.
The application built based on the following nodes:
Fetch the last tweet of a certain Twitter handle including image, text, and hashtags. To fetch tweets from Twitter, you have to provide the credential a created app from Twitter developer website:
Consumer secret key
Access token secret
Apply Multi-task Cascaded Convolutional Neural Network (MTCNN) on images to detect faces
First Import model to import the FaceNet model.
Second Import model to import the pre-trained classifier model that’s generated from training app.
Return embedding vector as a feature using FaceNet model
Apply prediction on the input feature vector to predict the class name
Draw bounding box around the detected face with the predicted class
Assume you want to fetch the last tweet from this Twitter handle, you have first to fill (tw_case) into the Twitter handle input field on the Last Tweet By User, and your credential of the previous Twitter developer as following:
You have also to select the generated model from training app, in this node:
Click on Execute App.
Given the most recent tweet of the target user is:
Return back to the test app and click on Execute app, after a couple of seconds it shows the successful run in the app log
To see the result you have to select the last node (Image preview face detection)
Select the output tab in the bottom, and click on the image, it shows a popup of the output image with the detected face along with identifying the person's name
If you want to run any application without going into the app details, Baseet.ai offers this option via Run an Example form in the overview section in the app details page.
For this app, the required input is any Twitter handle (twitter_handle: tw_case) to apply face recognition on the last tweeted image from this account:
Click on Run Example. After the app runs successfully, the output section will be shown as follows:
If the image contains one of the faces that the model is trained on then a bounding box will be drawn on the detected face with the name of the person. To enlarge the image click on the image.
If the last tweet doesn’t contain image, then the following message show:
If the image doesn’t contain people, then this message show (Can't detect face in the tweeted image)