Create face

This method is available on following paths:
  • POST /v0/face/

Processes the uploaded image or provided URL, detects faces and adds the detected faces to the searchable dataset. If there are multiple faces on a photo, only the biggest face is added by default.

Optionally, you can add a custom string meta, such as a name or an ID, which uniquely identifies a person. Multiple face objects may have the same meta. We recommend that you don't assign the same meta to different persons. Thus when using person's name as a meta, make sure that all names are unique.

Parameters

Parameter Description Type Accepted in
photo

Url of the photo or the photo itself as multipart upload

Example:
http://static.findface.pro/sample.jpg
url file json body multipart query
mf_selector

Specifies behavior in case if multiple faces are detected on the photo; one of:

  • reject return an error and a list of faces if more than one face is detected on the provided photo
  • biggestdefault search using the biggest face on the photo
  • all search for each face found on the photo.

Example:
all
string json body multipart query
bbox

[optional]: array of bounding boxes specifying faces coordinates on the photo.

Note that bbox only accepts rectangles returned by /detect/ method. Arbitrary values are not supported.

Examples:
[[225, 345, 307, 428]]
[{"x1": 225,"y1": 345,"x2": 307,"y2": 428}]
bboxes.lists bboxes.dicts json body multipart query
meta

Metadata string that you can use to store any information associated with the face.

Example:
Sam Berry
string json body multipart query
galleries

List of gallery names to add face(s) to.

Examples:
["gal1","gal2"]
gal1,gal2
galleries json body multipart query

Responses

Status code Description
200

Face as it is stored

Example:
{
  "results": [
    {
      "galleries": [
        "default",
        "ppl"
      ],
      "id": 2333,
      "meta": "Sam Berry",
      "photo": "http://static.findface.pro/sample.jpg",
      "photo_hash": "dc7ac54590729669ca869a18d92cd05e",
      "thumbnail": "https://static.findface.pro/57726179d6946f02f3763824/dc7ac54590729669ca869a18d92cd05e_thumb.jpg",
      "timestamp": "2016-06-13T11:06:42.075754",
      "x1": 225,
      "x2": 307,
      "y1": 345,
      "y2": 428
    }
  ]
}