FaceSDK 7.2.1

Released 9 November 2020

  • How can I evaluate FaceSDK?
    In order to evaluate FaceSDK, you will need to start trial period here.

  • How much does FaceSDK cost?
    The license fees for FaceSDK vary and are based on how FaceSDK is being used. For specific pricing information, please fill in our FaceSDK license use form.

  • Does FaceSDK support visual effects?
    No. The additional visual effects found in our end-user products or on Web sites are not included in FaceSDK. If you want to use these applications, fill in this form and specify the type of technology you are interested in.

  • How can I use FaceSDK with a database (DB)?
    You can use FaceSDK with any DB you like. FaceSDK facial templates are created as a binary field. Our sample application Lookalikes demonstrates how to use FaceSDK with SQL databases.

  • Does FaceSDK support IP cameras?
    Yes. The 7.2.1 version of FaceSDK supports MJPEG cameras.

  • What are the speed and accuracy of face recognition?
    FaceSDK can compare a single face to a database of faces at a matching speed of 53191489 comparisons per second on an AMD Ryzen 5 1600X processor with 12 threads. You can find the ROC diagram here.

  • Can I use FaceSDK in a Web application?
    Yes, you can see FaceSDK in both web and mobile applications. See baby generator as an example of a mobile app, as well as MakeMeBabies which is a web app.

  • Does FaceSDK work in low light?
    Yes. FaceSDK works in low light conditions and it can even process pictures from infrared or nightvision cameras. We recommend making several facial templates for each person in low light conditions.

  • What operating systems and languages does FaceSDK support?

    FaceSDK supports the following platforms:

    • Windows Vista / 2008 / 2012 / 2016 / 2019, Windows 7, Windows 8, Windows 10
    • Linux (RHEL 7+, CentOS 7+ and other)
    • Linux/ARMv7 (Raspberry Pi2+)
    • macOS 10.7+ x86_64, arm64
    • iOS 7.0+, armv7/x86 (iPhone 4+, iPad 2+, simulator)
    • iOS 7.0+, arm64/x86_64 (iPhone 5S+, iPad Air+, iPad mini retina+, simulator)
    • Android 4.0+ (platform version 14+), arm64 (arm64-v8a)/ armv7 (armeabi-v7a)/ x86

    FaceSDK supports the following languages:
    • C++, Microsoft Visual C++ 6.0 / 2005 / 2008 / 2010 / 2012 / 2013 / 2015 / 2017+, GCC, LLVM/CLANG
    • Visual Basic .NET 2005 / 2008 / 2010+, Microsoft C# .NET 2005 / 2008 / 2010+
    • Delphi 6.0+
    • Netbeans (Java)
    • Xcode 4.2+ (iOS)
    • Eclipse ADT and Android Studio (Android)
    • Visual Basic 6.0 and C++ Builder 6.0
    • Python 2+

  • Do you have a Web API for face recognition?
    Yes. For more information, fill out this form and specify your interest in our facial recognition WebAPI.

  • File uploading to Web API samples does not work.
    Make sure the webserver has write access to the "uploaded" directory

    If using new php version 5.5+, change "@$saved_filename" in sample code to the CurlFile or curl_file_create call:
    'client_file1' => curl_file_create("$saved_filename"),

  • Web API returns Access Denied.
    Make sure you pass md5 hash of password + date, as described in docs.

  • FaceSDK function returns an error code. How to fix the error?
    The error codes are listed here: https://www.luxand.com/facesdk/documentation/errorcodes.php
    Additionally Windows API error codes can be returned in some rare cases on Windows (large numbers).

    The most common error code is -2 when the key wasn’t passed to FSDK_ActivateLibrary.

  • How to speedup the faces processing in FaceSDK
    If Tracker is used (FSDK_FeedFrame) - adjust Tracker parameters using FSDK_SetTrackerMultipleParameters / FSDK_SetTrackerParameter:
    https://www.luxand.com/facesdk/documentation/tracker.php#TrackerParameters
    For example, pass RecognizeFaces=false if you need face tracking only instead of face recognition. Also try lower InternalResizeWidth values and HandleArbitraryRotations=false.

    If Tracker is not used - you can adjust InternalResizeWidth and HandleArbitraryRotations using the FSDK_SetFaceDetectionParameters:
    https://www.luxand.com/facesdk/documentation/facedetection.php#FSDK_SetFaceDetectionParameters

  • How to lower the CPU load by FaceSDK
    By default, FaceSDK tries to maximize performance by utilizing all available CPU cores. Try limiting the CPU cores usage by calling FSDK_SetNumThreads(3) or FSDK_SetNumThreads(2), or even FSDK_SetNumThreads(1).

  • Why aren’t my face detection parameters applied in FaceSDK?
    Make sure you call the correct function. If Tracker is used (FSDK_FeedFrame) - you should pass the face detection parameters using FSDK_SetTrackerMultipleParameters / FSDK_SetTrackerParameter.

    If Tracker is not used (FSDK_DetectFace/FSDK_DetectMultipleFaces) - you should pass the face detection parameters using FSDK_SetFaceDetectionParameters / FSDK_SetFaceDetectionThreshold.

  • Faces in masks are not detected by FaceSDK, what can I do?
    Please follow the recommendation from https://www.luxand.com/facesdk/documentation/maskon.php
    to load the special mask-on face detection model and set TrimFacesWithUncertainFacialFeatures=false.

  • How to improve face matching in FaceSDK for the faces in masks?
    You can try the following approach.
    1. Try to detect a face two times with TrimFacesWithUncertainFacialFeatures=true and TrimFacesWithUncertainFacialFeatures=false (https://www.luxand.com/facesdk/documentation/maskon.php).
    2. If the face is detected only with TrimFacesWithUncertainFacialFeatures=false then use lower threshold value for face matching.

  • Getting crash in Java (JNA 4.x+) when trying to work with FaceSDK. The exception is reported as java.lang.Error: Structure.getFieldOrder().
    Re-build facesdk.jar on your machine from the sources located at the samples\advanced\Java wrapper directory of FaceSDK installation.

    New versions of JNA require implementing getFieldOrder() method for jna.Structure. The required changes are as follows.

    public static class TFacePosition extends com.sun.jna.Structure {
        ...
        protected java.util.List getFieldOrder() {
            return Arrays.asList("xc", "yc", "w", "angle");
        }
        ...
    }
    public static class TPoint extends com.sun.jna.Structure {
        ...
        protected java.util.List getFieldOrder() {
            return Arrays.asList("x", "y");
        }
        ...
    }
    public static class FSDK_Features extends com.sun.jna.Structure {
        ...
        protected java.util.List getFieldOrder() {
            return Arrays.asList("features");
        }
        ...
    }
    public static class FSDK_FaceTemplate extends com.sun.jna.Structure {
        ...
        protected java.util.List getFieldOrder() {
            return Arrays.asList("template");
        }
        ...
    }
    public static class FSDK_VideoFormatInfo extends com.sun.jna.Structure {
        ...
        protected java.util.List getFieldOrder() {
            return Arrays.asList("Width", "Height", "BPP");
        }
        ...
    }
    


    Also newer versions of JNA deprecate the Pointer.getStringArray(long, int, bool) method, which should be replaced with Pointer.getStringArray(long, int). The default encoding will be used in that case. Wide strings can be explicitly decoded using Pointer.getWideStringArray(long, int) or Pointer.getStringArray(long, int, "UTF-16"). UTF-8 can be explicitly specified as Pointer.getStringArray(long, int, "UTF-8").

  • Java sample shows the error on start: Unable to load library 'facesdk'.
    Sometimes JRE can't find the library in the project directory.

    On 32-bit Windows you can try copying the file win32\facesdk.dll from FaceSDK installation to the directory C:\Windows\System32.

    On 64-bit Windows you can try copying the file win64\facesdk.dll from FaceSDK installation to the directory C:\Windows\System32 and the file win32\facesdk.dll to the directory C:\Windows\Syswow64.

    On Linux/macOS try copying libfsdk to /usr/lib.

  • Is it possible to work with images of different sizes in FaceSDK Tracker?
    Tracker API designed to work with continuous video streams. To work with images you need to call:
    FSDK_SetTrackerParameter(tracker, "VideoFeedDiscontinuity", "0");
    before each FSDK_FeedFrame call.

    Also you may need to call FSDK_FeedFrame several times (2-3) for each image. FSDK_SetTrackerParameter(tracker, "VideoFeedDiscontinuity", "0") should be called only once for such a group of FSDK_FeedFrame calls.

  • Is it possible to open a camera from several applications using FaceSDK on Windows at the same time or will I get an error from FSDK_OpenVideoCamera?
    From our past experience, the ability to open the camera which is already open in an application depends on the camera driver. It was possible with some cameras and with others we got an error in FSDK_OpenVideoCamera call.

  • I would like to work with FaceSDK Tracker from several devices/cameras simultaneously to work with the same database of people. Is that possible?
    Unfortunately such a scenario is not supported by Tracker yet.

    You can replace FSDK_FeedFrame call with FSDK_DetectiMultipleFaces, FSDK_GetFaceTemplateInRegion, FSDK_MatchFaces calls:
    https://www.luxand.com/facesdk/documentation/facematching.php
    Then it will be possible to send/receive individual face templates to/from the server or any other device.

    Another possible solution is to implement Tracker memory merging using the trackerMemoryTool.py utility from the samples\advanced\Python directory of FaceSDK installation, but that can be much harder.

  • Does FaceSDK support .NET Core?
    The .NET wrapper from samples\advanced directory can be used with .NET core by commenting out the lines working with System.Drawing.Image. The ASP .NET Core sample is available here:
    https://www.luxand.com/tmp/ASP.NET_7.2_x64.zip

  • Why isn’t my .NET application starting up?
    To run your .NET application, please make sure of the following:
    • facesdk.net.dll has been placed in the same folder as your application
    • facesdk.net.dll is 32- or 64-bit, depending on your application (System.BadImageFormatException may arise when using wrong library)
    • Microsoft Visual C++ 2017 Redistributable has been installed (this can be found in the bin folder of the FaceSDK installation)

  • Does FaceSDK support React-Native, Xamarin, Unity?
    Pre-release samples for Android are available here:
    https://www.luxand.com/tmp/react-native-7.2.zip
    https://www.luxand.com/tmp/FaceSDK_7_2.LiveRecognition.Xamarin.Android.zip
    https://www.luxand.com/tmp/Unity_7.2.zip

  • In Android the app using FaceSDK crashes with java.lang.UnsatisfiedLinkError: No implementation found for ...FSDK...
    That happens when the Java package for the class FSDK is changed. That is not allowed because FSDK class is partially implemented natively in libfsdk.so binary. The package for FSDK has to be com.luxand.

    FSDK class also should be added to the ProGuard exclusions, if used.

  • How to use a back facing camera in Android FaceSDK samples?
    The following modifications are needed to the sample code.
    1. Inside Preview.surfaceCreated method, change the line
    if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {
    to the line:
    if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK) {
    2. Inside ProcessImageAndDrawResults.onDraw method, comment out the call:
    FSDK.MirrorImage(Image, false);
    and change the line
    FSDK.RotateImage90(Image, -1, RotatedImage);
    to the line:
    FSDK.RotateImage90(Image, 1, RotatedImage);

  • When using FaceSDK in Xcode I receive the error message: "The linked library is missing one or more architectures required"
    FaceSDK libraries for different architectures can be merged in a single file when needed using lipo utility. For iOS one can call:
    lipo libfsdk-static.a libfsdk-static_64.a -create -output libfsdk-static_all.a
    Then include the joined libfsdk-static_all.a file instead of libfsdk-static.a and libfsdk-static_64.a.

  • I experience slow face detection and recognition using LiveRecognition iOS sample in Swift
    Apple introduced throttling for the background tasks and the frames from camera are processed in background. Please change in RecognitionViewController:
                DispatchQueue.global(qos: .background).async {
                    self.processImage(args: args)
                }
                
    to:
                DispatchQueue.global(qos: .userInitiated).async {
                    self.processImage(args: args)
                }
                
    Another option is to create a separate NSThread to process the frames from camera.

  • Does FaceSDK support RTSP cameras?
    We have only preliminary support of RTSP cameras. Please check the following samples:
    https://www.luxand.com/download/MSVC_RTSP_sample.zip
    https://www.luxand.com/download/CSharp_RTSP_sample.zip
    https://www.luxand.com/download/VB_RTSP_sample.zip

  • How can I use FaceSDK with VB6?
    Unfortunately, FaceSDK does not always run smoothly with VB6. However, most of the problems you will encounter are caused by VB6, not FaceSDK. If you receive an error while trying to compile the application, try opening file .vbp with the vb6.exe program (instead of opening VB6 first and then trying to open the project). Please also try to install Microsoft Visual C++ 2017 Redistributable (this can be found in the bin folder of the FaceSDK installation).

  • How can I learn more about FaceSDK?
    Click here to view our online FaceSDK documentation or download it here.

  • I still have a question. What should I do?
    If you are still experiencing problems with FaceSDK or have additional questions that were not answered in these FAQs, please contact our support team at support@luxand.com. Be sure to include a full description of your problem and the source code (if you are receiving errors and do not know how to fix them). This will help our support team assist you more quickly.