Face Match API | With Bounding Box | Post Request

Overview

Face Match API is used for applications where you need to determine if two faces belong to the same person or not. The API accepts two faces as inputs (using the tag img_1 & img_2) and determines if they are a match or not.

Here we are looking at the API format when the bounding box parameter is being used.

Image Requirement

  1. Please refer to the article “Image Quality for Facial Recognition” for best practices.
  2. We recommend an image resolution no higher than 1024x, since it could slow down the request process. Supported image formats are JPEG/PNG format.

Request URL

http://www.facexapi.com/match_faces?bboxes_1=1035,239,1216,450&bboxes_2=822,492,968,666

Note:  If you have only one face per image and do not require to use bounding box, please refer to the article “The Post Request | Face Match

Params

Fields

Type

Description

bboxes_1 String The bounding box of the face in img_1 you require the analysis for

(For example: 1035,239,1216)

bboxes_2 String The bounding box of the face in img_2 you require the analysis for

(For example: 822,492,968,666)

Note: To learn more about the bounding box parameter, please refer to this article “Face Bounding Box

Header

Type

Description

user_id String Your valid User ID

(as shown in your user portal when you log in)

content-type multipart/form-data (if using image file)

application/json (if using Base64/URL)

Note: Your User ID will be valid for Face Match API only if you have an active FaceAPI plan

Body

Fields

Type

Description

img_1 File or  String An image file, base64 or URL of the first person
img_2 File or  String An image file, base64 or URL of the Second person

Result

The API Returns two results

Fields

Value

Description

Result Match

or

Not a Match

The API provides a result based on facial vector comparison

on whether the two faces are a match or not

Euclidian Distance 0 – 0.9 The Euclidian distance between the vectors of the two images.

If the distance is less than the current threshold (0.6): Match

If the distance is more than the current threshold(0.6): Not a match

 

Related Articles
Post a Comment