In

Generally API is used for two types of tasks: face detection and face recognition. Doing face detection is pretty easy and straight forward – you just call faces/detect API method with passing image you want to find faces in and get the results. On the other hand, doing face recognition is composed of several steps that should be done before doing any actual face recognition. In other words, face recognition is composed of several steps: face enrollment/trainingand face matching/recognition.

Face enrollment/training – during this step system creates a face template from specified face (face tag) in image and adds created template to data namespace. Data namespace is a place were all of your face templates are stored, so in other words – it is a face template database (every user is allowed to create 2 data namespaces, which can be used by different user’s applications).

Face recognition – during this step system tries to find a match for specified faces in user defined data namespace.

Face enrollment steps (in order of calling):

  1. faces/detect – detects faces in specified images, returns face tags (every tag has unique tag id – tid).
  2. tags/save – saves specified face tags (by tid) with user specified user id(eg. mark@docs, where docs – data namespace name).
  3. faces/train – checks changes for specified user ids (eg. new tags were added using tags/save or removed using tags/remove) and either creates/updates/removes face template for specified user id from data namespace.

Face tags are also returned by faces/recognize and faces/group methods. In case face tag was already saved – saved tid is returned, if it is new tag – temporary tid (starting with TEMP_) is returned. You can use returned tags to add enroll new users, thus skipping a call to faces/detect.

faces/train is potentially a long operation. You can check status of face training being done by calling faces/status method.

Once the enrollment is complete, specified user can be now recognized using faces/recognize method.

Recent Posts