Which Face Detection API to choose for your project?

Updated: 2 days ago


This article is brought to you by the Eden AI team. We allow you to test and use in production a large number of AI engines from different providers directly through our API and platform. You are a solution provider and want to integrate Eden AI, contact us at: contact@edenai.co


In this article, we are going to see how we can easily integrate a Face Detection engine in your project and how to choose and access the right engine according to your data.


Definition:


Face detection is AI-based computer technology that is used to extract and identify human faces from digital images. Face detection technology uses machine learning and algorithms in order to extract human faces from larger images; such images typically contain plenty of non-face objects, such as buildings, landscapes, and various body parts.


History:


The earliest pioneers of facial recognition were Woody Bledsoe, Helen Chan Wolf and Charles Bisson. In 1964 and 1965, Bledsoe, along with Wolf and Bisson began work using computers to recognise the human face.


It wasn’t until the late 1980s that we saw further progress with the development of Facial Recognition software as a viable biometric for businesses. In 1988, Sirovich and Kirby began applying linear algebra to the problem of facial recognition.


In 1991, Turk and Pentland carried on the work of Sirovich and Kirby by discovering how to detect faces within an image which led to the earliest instances of automatic facial recognition. Face Recognition Grand Challenge (FRGC) was launched in 2006 in order to promote and advance face recognition technology designed to support existing face recognition efforts in the U.S. Government. The FRGC evaluated that the new algorithms were 10 times more accurate than the face recognition algorithms of 2002 and 100 times more accurate than those of 1995, showing the advancements of facial recognition technology over the past decade.


Since the 2010s, Facebook, Apple, Amazon, Google, and other big tech companies developed their own Face detection engines, and face detection is democratized in numerous fields.


Use cases:


You can use Face Detection in numerous fields, here are some examples of common use cases:

  • Advertising: face detection has the ability to make advertising more targeted by making educated guesses at people’s age and gender

  • Healthcare: face detection can be used to diagnose diseases that cause detectable changes in appearance

  • Marketing: face detection can be used to count the number of people (affluency) and see if people are smiling or not, young or old, male or female, etc.

  • Other facial extraction: analyze crowds face features like: eyes color, nose, mouth, skin color, hair style and color, etc.


Top 10 Named Entities Recognition API:


Microsoft Azure - Available on Eden AI

The Azure Face service provides AI algorithms that detect, recognize, and analyze human faces in images. Facial recognition software is important in many different scenarios, such as identity verification, touchless access control, and face blurring for privacy. Face detection is required as a first step in all the other scenarios. The Detect API detects human faces in an image and returns the rectangle coordinates of their locations. It also returns a unique ID that represents the stored face data, which is used in later operations to identify or verify faces.


Available on Eden AI


Imagga

Imagga is a computer vision artificial intelligence company. Imagga Image Recognition API features auto-tagging, auto-categorization, face recognition, visual search, content moderation, auto-cropping, color extraction, custom training and ready-to-use models. Available in the Cloud and on On-Premise. It is currently deployed in leading digital asset management solutions and personal cloud platforms and consumer facing apps.


Google Cloud - Available on Eden AI

Face Detection detects multiple faces within an image along with the associated key facial attributes such as emotional state or wearing headwear. The Vision API can perform feature detection on a local image file by sending the contents of the image file as a base64 encoded string in the body of your request.


Available on Eden AI


Face++

Face++ recognition technology can recognize persons' identities automatically from image and video. Our technology is widely used in security, VIP recognition, photo tagging and face login. Face++ detects and locates human faces within an image, and returns high-precision face bounding boxes. Face detection is the first step to analyzing and processing faces, Face++ also allows you to store metadata of each detected face for future use.


AWS - Available on Eden AI

Amazon Rekognition can detect faces in images and videos. This section covers non-storage operations for analyzing faces. With Amazon Rekognition, you can get information about where faces are detected in an image or video, facial landmarks such as the position of eyes, and detected emotions (for example, appearing happy or sad). When you provide an image that contains a face, Amazon Rekognition detects the face in the image, analyzes the facial attributes of the face, and then returns a percent confidence score for the face and the facial attributes that are detected in the image.


Available on Eden AI


DeepAI


DeepAI's mission is to accelerate the world's transition to artificial intelligence through offering an A.I. agent that anyone can teach to perform a task in addition to making the latest research and information more accessible through DeepAI Their face detection API detects and recognizes faces in any image or video frame. By leveraging a deep neural network trained on small, blurry, and shadowy faces of all ages, this service is able to automatically detect faces with a high level of accuracy.


Clarifai

Clarifai is a leading provider of artificial intelligence for unstructured image, video, and text data. We help organizations transform their images, video, and text data into structured data significantly faster and more accurately than humans would be able to do on their own. Their state of the art Face Detection Model can differentiate faces based on only a small number of sample images. Alignment and transformation technology allow you to automatically recognize faces from any angle.


Available on Eden AI


FaceX

FaceX provides a platform for firms to implement Facial Recognition into their applications with ease. Its versatility enables developers to integrate High Accuracy Face Recognition APIs and SDKs with only a few lines of code. .


Kairos

Kairos provides state-of-the-art, ethical face recognition to developers and businesses worldwide. Kairos is an artificial intelligence company specializing in face recognition. Through computer vision and machine learning, Kairos can recognize faces in videos, photos, and the real-world - making it easier than ever to transform the way your business interacts with people.


Sightengine

Sightengine is an Artificial Intelligence company that empowers developers and businesses. Our powerful image and video analysis technology is built on proprietary state-of-the-art Deep Learning systems and is made available through simple and clean APIs. Their Face Detection endpoint detects and positions faces in real-time. This endpoint is useful if you need to determine if images or videos contain visible faces of people.


DeepFace (Bonus - Open Source)

DeepFace is a deep learning facial recognition system created by a research group at Facebook. It identifies human faces in digital images. The program employs a nine-layer neural network with over 120 million connection weights and was trained on four million images uploaded by Facebook users. Deepface is a lightweight face recognition and facial attribute analysis (age, gender, emotion and race) framework for python. It is a hybrid face recognition framework wrapping state-of-the-art models: VGG-Face, Google FaceNet, OpenFace, Facebook DeepFace, DeepID, ArcFace and Dlib.

Experiments show that human beings have 97.53% accuracy on facial recognition tasks whereas those models already reached and passed that accuracy level.


The Multi cloud approach


When you need a Face Detection engine, you have 2 options:

  • First option: multiple open source Face Detection engines exist, they are free to use. Some of them can be performant but it can be complex to set up and use. Using an open source AI library requires data science expertise. Moreover, you will need to set up a server internally to run open source engines.

  • Second option: you can use engines from your cloud provider. Actually, cloud providers like Google Cloud, AWS, Microsoft Azure, Alibaba Cloud or IBM Watson are all providing multiple AI engines often including Face Detection. This option looks very easy because you can stay in a known environment where you might have abilities in your company and the engine is ready-to-use.

The only way you have to select the right provider is to benchmark different providers’ engines with your data and choose the best OR combine different providers’ engines results. You can also compare prices if the price is one of your priorities, as well as you can do for rapidity.

This method is the best in terms of performance and optimization but it presents many inconveniences:

  • you may not know every performant providers on the market

  • you need to subscribe and contract with all providers

  • you need to master each providers API documentation

  • you need to check their pricings

  • You need to process data in each engine to realize the benchmark

Here is where Eden AI becomes very useful. You just have to subscribe and create an Eden AI account, and you have access to many providers engines for many technologies including Face Detection. The platform allows you to benchmark and visualize results from different engines, and also allows you to have centralized cost for the use of different providers.


Eden AI provides the same easy to use API with the same documentation for every technology. You can use the Eden AI API to call Face Detection engines with a provider as a simple parameter. With only a few lines, you can set up your project in production:

Test and API:


Here is the code in Python (GitHub repo) that allows to test Eden AI for face detection:


Eden AI Python SDK: Face Detection

Response:

{'Google Cloud': {'image_path': 'media/data/files/test-face-2_ZcYExgF.jpg', 'attributes_label': [['Quality', 'Accessories'], ['Quality', 'Accessories']], 'attributes_value': [[{'Exposed': 0.2, 'Blurred': 0.2}, {'headwear': 0.2}], [{'Exposed': 0.2, 'Blurred': 0.2}, {'headwear': 0.2}]], 'confidences': [0.91628295, 0.93018544], 'landmarks': [{'LEFT_EYE': [0.1093286953125, 0.38354160583941604], 'RIGHT_EYE': [0.183652015625, 0.40949165797705944], 'LEFT_OF_LEFT_EYEBROW': [0.0835499296875, 0.3511349947862356], 'RIGHT_OF_LEFT_EYEBROW': [0.139786890625, 0.3637824504692388], 'LEFT_OF_RIGHT_EYEBROW': [0.1742885, 0.37767497393117827], 'RIGHT_OF_RIGHT_EYEBROW': [0.2124576796875, 0.3969138686131387], 'MIDPOINT_BETWEEN_EYES': [0.15544960937500002, 0.3930161001042753], 'NOSE_TIP': [0.15809434375, 0.45315847758081335], 'UPPER_LIP': [0.124565015625, 0.49442732012513035], 'LOWER_LIP': [0.112271453125, 0.5243764337851929], 'MOUTH_LEFT': [0.08237208124999999, 0.4804685297184567], 'MOUTH_RIGHT': [0.15022992968749999, 0.5215997914494265], 'MO...