Trueface SDK Reference - Stable¶
Welcome to the Trueface SDK. The SDK allows you to integrate Trueface’s AI models directly into your application while ensuring maximum performance and flexibility. Start by downloading the correct version of the SDK for your target platform and desired language. Next, refer to the General section for guidance on how to initialize the SDK.
Downloads¶
Stable release version 2.1.28535
Choosing Your Release Type¶
Alpha contains the absolute latest features (updated daily), but may also contain bugs. Beta contains fewer bugs while still having relatively new features. Stable will contain the fewest bugs but will take the longest to get new features. You will generally want to choose the Beta or Stable releases.
Note, if downloading the SDK in an automated manner (ex. building docker images) and you always require the latest SDK version, then replace the postfix in the download link (SDK version) with _latest.zip
instead.
So for example, https://reference.trueface.ai/cpp/staging/latest/uploads/truefaceSDK_v0.10.5483.zip
would become https://reference.trueface.ai/cpp/staging/latest/uploads/truefaceSDK_latest.zip
. This is only available for Alpha and Beta releases.
If you require a previous version of the documentation or SDK downloads, refer to the Previous Stable Releases tab on the left.
x86-64 C++¶
Target platform |
Notes |
SHA256 |
---|---|---|
Compiled with gcc 7.5.0, GLIBC 2.27, tested on Ubuntu 18.04 and CentOS 8. |
|
|
Compiled with gcc 9.3.0, GLIBC 2.31, tested on Ubuntu 20.04. |
|
|
Must install GPU dependencies. Compiled with gcc 7.5.0, GLIBC 2.27, Cuda 11.8, tested on Ubuntu 18.04 and CentOS 8. |
|
|
Must install GPU dependencies. Compiled with gcc 9.3.0, GLIBC 2.31, Cuda 11.8, tested on Ubuntu 20.04. |
|
|
Compiled with AppleClang 15.0.0. |
|
|
Must install Windows dependencies. Compiled with MSVC 19.35.32217.1 in Release mode. |
|
x86-64 Python bindings¶
Target platform |
Notes |
SHA256 |
---|---|---|
For CentOS, must run |
|
|
For CentOS, must run |
|
|
For CentOS, must run |
|
|
|
||
Must install GPU dependencies. Tested on Ubuntu 20.04. |
|
|
Must install GPU dependencies. Tested on Ubuntu 18.04. |
|
ARM C++¶
Target platform |
Notes |
SHA256 |
---|---|---|
Compiled with aarch64-linux-gnu-g++ 8.4.0, GLIBC 2.27, tested on Ubuntu 18.04. |
|
|
Compiled with aarch64-linux-gnu-g++ 9.4.0, GLIBC 2.31, tested on Ubuntu 20.04. |
|
|
Must install GPU dependencies. Compiled with aarch64-linux-gnu-g++ 8.4.0, GLIBC 2.27, CUDA-10.2, tested on Ubuntu 18.04. |
|
ARM Python Bindings¶
Target platform |
Notes |
SHA256 |
---|---|---|
Tested on Ubuntu 18.04. |
|
|
Must install GPU dependencies. Tested on Ubuntu 18.04. |
|
|
Tested on Ubuntu 18.04. |
|
|
Tested on Ubuntu 20.04. |
|
SDK Dependencies¶
The SDK has a few external dependencies, including:
OpenMP
libdl
ONNX Runtime
When linking against the static Trueface SDK, these dependencies must be manually linked by specifying them in the target_link_libraries
command in the CMakeLists.txt
file.
When linking against the dynamic Trueface SDK, they do not need to be manually linked as the dependency linkage has already been set to Public.
Before you can run an application linking against the SDK, you will need to add the directory which contains the onnxruntime shared library (shipped as part of the SDK bundle) to you LD_LIBRARY_PATH
environment variable.
GPU SDK Dependencies¶
In addition to the dependencies listed above, the GPU SDK has a few additional dependencies which must be installed.
nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu18.04
docker image.apt-get install -y libomp-dev libopenblas-dev libgomp1
Next, navigate to this link, create an account or login with your existing account, then click on TensorRT 8.6 GA.
From there, go ahead an download TensorRT 8.6 GA for Linux x86_64 and CUDA 11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7 and 11.8 TAR Package.
Once downloaded, extract the package by running tar -xzf ./TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
then add the full path to the TensorRT-8.6.1.6/lib
directory to your LD_LIBRARY_PATH
environment variable
(ex. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/tensorrt/dir/lib
. If you want this change to persist, you should add the command to your ~/.bashrc
.).
nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04
docker image.apt-get install -y libomp-dev libopenblas-dev libgomp1
ln -s /usr/lib/x86_64-linux-gnu/libomp.so.5 /usr/lib/x86_64-linux-gnu/libomp.so
Next, navigate to this link, create an account or login with your existing account, then click on TensorRT 8.6 GA.
From there, go ahead an download TensorRT 8.6 GA for Linux x86_64 and CUDA 11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7 and 11.8 TAR Package.
Once downloaded, extract the package by running tar -xzf ./TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
then add the full path to the TensorRT-8.6.1.6/lib
directory to your LD_LIBRARY_PATH
environment variable
(ex. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/tensorrt/dir/lib
. If you want this change to persist, you should add the command to your ~/.bashrc
.).
apt-get install -y libopenblas-dev
If you see that your system has libnvinfer.so.7
installed instead of the required libnvinfer.so.8
, then you’ll need to update the image running on your Jetson.
Windows SDK¶
For a full tutorial on how to install the Windows SDK, please consult this video.
Our team does the majority of development and testing in a Unix environment. The Windows SDK may therefore contain more bugs than the other platform releases and may be lacking in a few features. The current known issues and limitations are as follows:
Any file including
winerror.h
must have#undef NO_ERROR
as theNO_ERROR
defined inwinerror.h
conflicts withTrueface::ErrorCodes::NO_ERROR
.Trueface::SDK::identifyTopCandidate()
andTrueface::SDK::identifyTopCandidates()
will only use a single thread for search and will therefore be slower than searches run on Unix platforms. However,Trueface::SDK::batchIdentifyTopCandidate()
is capable of using multiple threads.
Dependencies which must be installed. These dependencies will automatically be installed by installing Git for Windows:
libintl-8.dll
libcrypto-1_1-x64.dll
libsll-1_1-x64.dll
As of this time, we are only supporting a release
configured version of the library (and not a debug
version).
The library is built as a dynamic library; therefore, you must link against libtf.lib
when compiling your application and must ensure that libtf.dll
is in the same directory as your executable.
We advise using “Git Bash” when compiling and and running your application to ensure the dependency libraries are properly found.
Getting Started Tutorials¶
Every SDK download package comes bundled with sample code (C++ and Python) demonstrating proper usage of the SDK for various tasks such as face detection, face recognition, object detection, mask detection, and more. Start by understanding how the sample code works by reading the comments in the code.
Sample Apps¶
Sample Apps demonstrate full working applications. These extend the scope of the sample code which comes shipped with the SDK.
Reporting SDK Bugs and Documentation Errors¶
If you encounter a bug in the SDK, please send an email to support@pangiam.com. Please include at minimum the following:
SDK version
SDK target (ex. Python 3.7 CPU Linux)
Expected behaviour
Observed behaviour
A minimal reproducible code example showing how to replicate the bug
Any input images used
The more information you provide, the faster we can diagnose the issue and push out a fix.
If you happen to find a mistake (spelling, syntax error, etc.) in the latest Alpha, Beta, or Stable documentation, please email support@pangiam.com with a screenshot of the mistake, documentation version number (same as SDK version), and the release type (Alpha, Beta, or Stable). We will push out a fix as soon as we can.
- General
- License Validation
- Input Image
- Face Detection
- Face Image Quality
- 1 to 1 Face Recognition
- 1 to N Identification
- Object Detection
- Spoof Detection
- Body Pose Estimation
- Blink Detection
- Mask Detection
- Eye glasses Detection
- Image Annotation
- Environment Variables
- Frequently Asked Questions
- How many threads does the SDK use for inference?
- How can I reduce the number of threads used by the SDK?
- What is a global inference threadpool and when should it be used?
- How can I increase throughput?
- Is the SDK threadsafe?
- How do I choose a similarity threshold for face recognition?
- What are the differences between the face recognition models?
- Are Faceprints compatible between models?
- How can I upgrade my collection if is filled with Faceprints from a deprecated model?
- What is the difference between similarity score and match probability?
- Why are small faces not being detected in my very high resolution images?
- What is the impact of various factors on the face recognition similarity score?
- How to select the best image for enrollment?
- What is the difference between the static library and the dynamic library?
- What hardware does the GPU library support?
- What is the TensorRT engine file and what is it used for?
- Why is my license key not working with the GPU library?
- Why does the first call to an inference function take much longer than the subsequent calls?
- What does a typical 1 to N face recognition pipeline involve?
- What architecture should I use when I have multiple camera streams producing lots of data?
- Why was setImage replaced by preprocessImage?
- How do I use the python bindings for the SDK?
- How do createDatabaseConnection and createLoadCollection work?
- What does the frVectorCompression flag do? When should I use it?
- What is the difference between the host and hostaddr PostgreSQL database connection parameters?
- Changelog
- v2.1 September 25, 2023
- v2.0 August 21, 2023
- v1.8 July 24, 2023
- v1.7 June 23, 2023
- v1.6 March 30, 2023
- v1.5: February 22, 2023
- v1.4: December 29, 2022
- v1.3: October 13, 2022
- v1.2: July 22, 2022
- v1.1: June 10, 2022
- v1.0: May 10, 2022
- v0.33: November 15, 2021
- v0.32: October 15, 2021
- v0.31: October 15, 2021
- v0.30: September 24, 2021
- v0.29: September 13, 2021
- v0.28: August 18, 2021
- v0.27: August 2, 2021
- v0.26: July 6, 2021
- v0.25: June 22, 2021
- v0.24: June 8, 2021
- v0.23: May 27, 2021
- v0.22: May 12, 2021
- v0.21: May 4, 2021
- v0.20: April 26, 2021
- v0.19: April 14, 2021
- v0.18: March 29, 2021
- v0.17: March 11, 2021
- v0.16: February 25, 2021
- v0.15: February 16, 2021
- v0.14: January 25, 2021
- v0.13: January 15, 2021
- v0.12: January 4, 2021
- v0.11: December 23, 2020
- v0.10: December 11, 2020
- v0.9: November 20, 2020
- v0.8: November 9, 2020
- v0.7: August 14, 2020
- v0.6: July 7, 2020
- Previous Stable Releases
- 2.0.28060
- 2.0.27928
- 1.8.27271
- 1.7.26589
- 1.6.25368
- 1.5.24600
- 1.4.23700
- 1.3.21916
- 1.2.20713
- 1.1.19673
- 1.0.19187
- 1.0.18283
- 0.33.14634
- 0.33.13850
- 0.32.13387
- 0.32.13359
- 0.32.13313
- 0.30.12706
- 0.29.12214
- 0.29.12111
- 0.28.11386
- 0.27.10876
- 0.26.10390
- 0.25.10099
- 0.24.9786
- 0.24.9740
- 0.23.9508
- 0.23.9476
- 0.22.9292
- 0.22.9196
- 0.21.8922
- 0.20.8553
- 0.19.8416
- 0.18.7976
- 0.17.7745
- 0.17.7722
- 0.16.7561
- 0.16.7542
- 0.15.7233
- 0.15.7198
- 0.15.7184
- 0.14.6743
- 0.14.6732
- 0.14.6709
- 0.14.6699
- 0.13.6676
- 0.13.6670
- 0.13.6500
- 0.12.6330
- 0.12.6300
- 0.11.6229
- 0.10.5855
- 0.10.5732
- 0.9.5131
- 0.8.4786
- 0.7.3005