/recognition/search

Description

Given a face and a faceset, find the most similar faces in the faceset. Note: if there are more than 10000 faces to search, you can split them into different Faceset, search in each of these Faceset and merge the results by confidence. The faceset should be trained when ever modified (see /train/search  ), otherwise some faces may fail to appear in the result.

Parameter

Name Description
Required api_key Your registered API Key
api_secret Your registered API Secret
key_face_id The face to be searched for.
faceset_id or faceset_name The faceset to search the face in.
Optional count The number of search results to be returned, which defaults to 3.
async If set to true, the API would be invoked asynchronously (i.e. a session id would be returned immediately, which could be later used to retrieve the result via /info/get_session). Defaults to false.

Return Values

Field Type Description
candidate array The search results, which consists of a list of Face informations.
session_id string Unique id of a session

Parameter

https://apius.faceplusplus.com/v2/recognition/search?api_secret=YOUR_API_SECRET&api_key=YOUR_API_KEY&key_face_id=f31f90f78c11d5ba26f67e1302a3014d&faceset_name=DemoFaceset

JSON Response

{
    "candidate": [
        {
            "face_id": "a9cebf8d5ae6fff514d8d2d8e07fa55b", 
            "similarity": 100,
            "tag": ""
        }, 
        {
            "face_id": "7f2de0e85bede3171c839d0dcabd849f", 
            "similarity": 55.379097,
            "tag": ""
        }, 
        {
            "face_id": "40ebb31e8af7237a73dec9f242885a7e", 
            "similarity": 52.59766,
            "tag": ""
        }
    ], 
    "session_id": "670ad0f86fb809b26421003ffba1a768"
}

Error Code List

Error Code HTTP Status Code Error Message
1001 500 INTERNAL_ERROR
1003 403 AUTHORIZATION_ERROR
1003 403 INSUFFICIENT_PRIVILEGE_OR_QUOTA_LIMIT_EXCEEDED
1004 400 MISSING_ARGUMENTS
1005 400 INVALID_ARGUMENTS
1006 403 ILLEGAL_USE_OF_DEMO_KEY
1202 502 SERVER_TOO_BUSY
1401 441 OBJECT_UNTRAINED
Google+