SDK Developer Guide Release 3.4.1
The purpose of the SDK is to detect facial expressions and their underlying emotions, appearance and emojis from facial images. The SDK is distributed as a Installer. Its included assemblies enable integration with .NET and C++ Windows applications and the data folder required by API in runtime:
Watch the video tutorial below to help you get started on how to use the SDK:
Click on the download link from the table for the desired architecture:
For a C++ Application: Configure your project to use the affdex-native library.
For a .NET Application: Add the Affdex assembly to your project.
The .NET assembly depends on the affdex-native.dll and loads it in runtime.
A dynamic library, opencv_ffmpeg.dll is required by VideoDetector [c++], [c#] in runtime for the video decoding. Also, the SDK uses access to the internet when available to communicate anonymized usage data.
Facial images can be captured from different sources. For each of the different sources, the SDK defines a detector class that can handle processing images acquired from that source:
Sample applications for processing videos, and connecting to the camera are available for cloning on our GitHub repository.
AffdexMe is an open source application that demonstrates the use of the Affdex SDK. It uses the camera connected to your device to view, process and analyze live video of your face. Start the app and you will see your own face on the screen, and metrics describing your facial expression of emotion.
As of v3.1, the SDK exposes a parameter max_faces in the detectors constructor to specify the maximum number of faces to look for in an image. For the realtime use cases, to achieve a high accuracy and processing throughput (20+ processed frames per second), the SDK requires a CPU thread per face.
On a recent dual core machine, we can track up to 3 people in parallel with all the facial expressions, emotions and appearance metrics enabled.
If the number of faces tracked is greater than the number of available CPU threads on the machine, they will all be tracked, but at a cost of the processing frame rate. Therefore, make sure to plan for providing enough hardware power for the number of faces they are expecting to track with each camera.
The software runtime requirements are installed automatically by the SDK installer.