/grouping/grouping

Description

Given a list of faces, try to group them into clusters so that faces from the same person fall into the same cluster. The grouping procedure may be time-consuming, so asynchronous invocation is forced and only the session id is returned.

Parameter

Name Description
Required api_key Your registered API Key
api_secret Your registered API Secret
faceset_id or faceset_name The id or name of the target faceset.

Return Values

Field Type Description
session_id string Id of the session, can be used to query the result
create_time int Start timestamp of the task in second
finish_time int End timestamp of the task in second
face_id string Id of the face
group array Grouping result, faces from same person would be in the same collection
ungrouped array The faces that can not be grouped
status string See /info/get_session for more information. Value can be SUCC / FAILED / INQUEUE

Parameter

https://apius.faceplusplus.com/v2/grouping/grouping?api_secret=YOUR_API_SECRET&faceset_id=c0d0e124a8921f4895658c2419dc8909&api_key=YOUR_API_KEY

JSON Response

{
    "session_id": "39cddae6a2a8da9a29affb2e1a1fb7c1"
}
{
    "create_time": 1364542970, 
    "finish_time": 1364542970, 
    "result": {
        "group": [
            [
                {
                    "face_id": "199d1efd19ce4ee67a7ec7655f859b1a", 
                    "tag": ""
                }, 
                {
                    "face_id": "02ff3c4a65a7a055ddd6ce788a345842", 
                    "tag": ""
                }
            ],
            [
                {
                    "face_id": "614cca6e9ec0d45c2904bd0a30d5343f", 
                    "tag": ""
                }, 
                {
                    "face_id": "15b27925563e0d580e3273262028d04c", 
                    "tag": ""
                }
            ]            
        ], 
        "ungrouped": [
	        {
    	        "face_id": "34238667d64444abfe7b8bf0b454c9ce", 
        	    "tag": ""
	        }
    	]
    }, 
    "session_id": "83b8126d6f644ef69ffe02b69cbe86c5", 
    "status": "SUCC"
}

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
Google+