Use Linux ARM eSDK Detection and Recognition

Execute the following steps to detect and recognize faces:

  1. Create a person store object. You specify a file system location and file name. A new and empty person store is created if none already exists.
  2. Create a face detector object.
  3. Create a face recognizer object and pass it a reference to the person store.
  4. Use the face detector to find faces in an image. This returns an array of detected faces. Each face has a bounding box and information about the quality of the detected face.
  5. Use the face recognizer on the faces returned by the face detector. You can attempt to recognize all faces but more typically you should first filter the array of detected faces down to the set that you want to attempt recognition on given your use case constraints.
  6. Save the updated person store to disk.

Execute Steps 1 to 3 once in a typical application. The person store, face detector, and recognizer objects should be reused whenever possible.

Note: The face detector and recognizer objects are not thread safe. Make sure only one face detection/recognition operation is executed on a single detector/recognizer object at any given time. However, you may create multiple separate detector/recognizer objects and use them in parallel from different threads.

When processing a video file, execute Step 4 on every frame or every other frame of the video file. Inspect the detected faces and decide which ones are of sufficient quality to attempt recognition on. Face recognition should be rate limited to approximately one (1) recognition per face since it is significantly more costly than face detection.

Note: Changes to a person store are not automatically saved. The changes are applied in memory and you must explicitly save the person store when it makes sense for your application.

See Also