SDK installation and deployment
1. Introduction
This document describes the components provided in the product FacePhi SelphID SDK.
This product includes several libraries whose APIs allow you to integrate features into your biometric authentication and identification solutions that use facial images and/or templates, passive liveness detection, data validation, and information extraction from identity documents.
The following sections describe the components provided and the steps required to install the SDK on Windows and Linux.
2. SelphID SDK Contents
The Software Development Kit, FacePhi SelphID SDK, contains a set of libraries for the Java, .NET, and C++ programming languages that allow developers to integrate the main features offered by this product:
Reading and validating information from digital identity documents (OCR).
User authentication (1:1) and identification (1:N) using facial recognition with images or templates.
Passive user liveness detection using images (without requiring user cooperation).
The contents of SelphID SDK are as follows:
Libraries for the C++, Java, and .NET programming languages (.NET is only available in the Windows version).
Java API and .NET API documentation, both in HTML format, with information about all the methods supported by each class.
Product license configuration file, as well as usage and log files.
Web service programming examples in .NET/Java.
C++ header files.
Different products are provided for the Windows and Linux operating systems.
Products available for Windows.
fphi-selphid-sdk-win64_x.x.x.x (64-bit Windows).
Products available for Linux.
fphi-selphid-sdk-linux64_x.x.x.x (Linux Ubuntu-based distributions).

3. SDK Installation
This chapter describes the steps to install SelphID SDK.
3.1 Installing the Software Development Kit
Install SelphID SDK by extracting the provided contents to a directory on your system. The recommended directories are as follows:
Recommended installation directories on Windows: C:\Program Files\FacePhi\Sdk\SelphId\x.x.x.x
To extract the Windows SDK, simply extract the ZIP file to the specified path.
Recommended installation directories on Linux: /opt/facephi/sdk/selphid/x.x.x.x
To extract the Linux SDK, you must do so on the same Linux server where the symbolic links are created. To do this, use the following command:
3.2 SDK Configuration
For the libraries included in the SDK to be available on the system, perform the actions described below:
Create the FACEPHI_SELPHID_INSTALL_PATH environment variable
The value of this environment variable must contain the selected installation directory from section 3.1 above.
Add the library directory to the PATH environment variable
Once you have created the environment variable above, include the SDK's "bin" (for Windows) or "lib/lib" (for Linux) directory in the system's
PATH(Windows) orLD_LIBRARY_PATH(Linux) environment variable:
3.3 Environment Variables
Several environment variables can be set to configure the SDK's behavior:
FACEPHI_SELPHID_FACIAL_LICPATH_KEY(required). Path to thelicense.lic. E.g./opt/facephi/sdk/selphid/x.x.x.x/config/license.lic.FACEPHI_SELPHID_DEBUGPATH_KEY(required). Path to the file where the log will be written. E.g./opt/facephi/sdk/selphid/x.x.x.x/config/selphidDebug.log.FACEPHI_SELPHID_USAGEPATH_KEY(required). Path where the usage data file will be stored. E.g./opt/facephi/sdk/selphid/x.x.x.x/config/selphidUsage.db.FACEPHI_SELPHID_FACIALLIVENESS_PATH_KEY(required). Path to the/datadirectory in your local file system. E.g./opt/facephi/sdk/selphid/x.x.x.x/data.FACEPHI_SELPHID_FACIALAUTHENTICATION_THRESHOLD(optional). Similarity value from 0 to 100 used to determine whether an authentication is positive or negative. Default65.FACEPHI_SELPHID_FACIALLIVENESS_THRESHOLD(optional). Threshold from 0 to 100 used to determine whether a liveness operation is positive (Live) or negative (NoLive). Default50.FACEPHI_SELPHID_FACIALEXTRACTOR_NUM_THREADS(optional) 1–8 Number of threads (cores) allocated for extraction and authentication operations. Default4.FACEPHI_SELPHID_FACIALLIVENESS_NUM_THREADS(optional) 1–8 Number of threads (cores) allocated for liveness operations. Default4.FACEPHI_SELPHID_FACIALLIVENESS_IAD(optional) (enableordisable) Enables theInyection Attack Detectionfilters for liveness operations. The default isenable.FACEPHI_SELPHID_FACIALLIVENESS_DEPTH(optional) (partialorfull) Specifies the depth of the liveness checks:partial(FPAD Presentation Attack Detection),full(FPAD + FMAD Manipulation Attack Detection). The default ispartial.FACEPHI_SELPHID_GALLERY_REMOVE_METHOD(optional) (eraseornoerase) Specifies whether gallery items will be completely removed usingSelphIDIdentifier::RemoveWithGalleryIndex()or marked as invalid without being removed. The default iserase.FACEPHI_SELPHID_FUTURE_TIME_ALLOWED(optional) 0-N Specifies the time, in seconds, for which a token with a future date will be valid. This is a global value that can be overridden per operation usingSelphIDVerifierOptions::SetFutureTimeAllowed(). The default is 0, which means that all tokens with a future date will be rejected.
4. SDK Licensing
To license the SelphID SDK product, perform the actions described below:
4.1 Generating machine identifiers
Machine identifiers can be obtained using a terminal and running the following command in the directory containing the utility: FACEPHI_SELPHID_INSTALL_PATH\bin (on both Windows and Linux)
Once the machine identifiers have been obtained, the file hostid.txt must be sent to your license provider so that your license (a file with the .lic extension) can be generated.
4.2 License installation
The following steps describe how to install the license:
Copy the license to the config directory
To install the license, simply copy the file
license.licthat you receive from your distributor to theconfigdirectory located in the SDK installation path:FACEPHI_SELPHID_INSTALL_PATH\configConfigure the license in the selphid.cfg file
Once the license file has been copied, set the value of the variable in the file selphid.cfg to the path where the license is located:
4.3 License service installation
The SelphID SDK license server is a command-line application that runs on Windows or Linux.
This application serves SelphID licenses to client nodes without a static hostID. However, the server must run on a machine with both a hostID and a service port with a static TCP/UDP configuration.
Requirements:
Hardware:
Static HostID
Static port
Software:
SelphID SDK
Running the license service on a Linux terminal
Steps to run the license service on a Linux user terminal:
Unzip SelphID SDK. Example:
Copy the license from the server to the server directory with
rwpermissions. Example:Export the SelphID SDK library path to
LD_LIBRARY_PATH. Example:Run the license service application, specifying the port (-port), the path to the server license file (-lic) and, optionally, the path to the license service log (-log).
Example writing the log to disk and to the console:
Example with the log in the console:
The license server may have been configured for online or offline activation. The licensing mode will be embedded in the
.licfile. For offline activation, the server will provide an activation key the first time it starts.
This activation key must be sent to your license provider so that your license
.liccan be updated.The license update will include the activation code for the server, which can then be started without an Internet connection.
Running the license service as a Linux system service
Steps to run the license service as a system service on Linux:
Follow steps 1 and 2 of the previous instructions.
Run the application as a system startup application by editing the crontab:
$crontab -e:
Configuring environment variables
Run the SelphID license server when the system restarts
Restart the system. Example:
$sudo shutdown -r nowCheck the log file to confirm that licenses are being served correctly. Example:
Last updated