IDLive Face C++ API 1.46.0
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
facesdk::FaceSDK Class Reference

Face engines and pipelines aggregator. More...

#include <facesdk/FaceSDK.h>

Static Public Member Functions

static PipelinePtr getPipeline (const std::string &name, InitConfigPtr config)
 Return pipeline engine by name.
 
static DetectEnginePtr getDetectEngine (const std::string &name, InitConfigPtr config)
 Return face detection engine by name.
 
static QualityEnginePtr getQualityEngine (const std::string &name, InitConfigPtr config)
 Return face quality engine by name.
 
static void setNumThreads (unsigned int num_threads, ThreadingLevel threading_level) noexcept
 Sets the maximum number of threads available for FaceSDK at the specified level. If 0 is passed, then the optimal number of threads is detected automatically (the same effect is achieved if setNumThreads is not called).
 
static void setOvNumThroughputStreams (int ov_num_throughput_streams) noexcept
 Sets the number of CPU execution streams for OpenVINO backend.
 
static void setOvBindThreads (bool ov_bind_threads) noexcept
 Sets the CPU bind setting for OpenVINO backend.
 
static void setOvMaxBatchSize (unsigned int ov_max_batch_size) noexcept
 Sets the maximum batch size for OpenVINO backend. This is not a hard limit (i.e. passing batches bigger than the limit will not cause an error), however setting this value to the target batch size will increase performance.
 
static void setEnableLogging (bool enable_logging) noexcept
 Sets whether to enable FaceSDK logging. Logging is enabled by default.
 
static void setNumPipelineExecutionStreams (unsigned int num_pipeline_execution_streams) noexcept
 Sets the maximum number of execution streams (maximum number of requests executed in concurrent) for Pipeline. Default value is number of logical CPU cores.
 
static void setEnableFaceOcclusionDetection (bool enabled) noexcept
 Toggles face occlusion detection. When enabled the occluded faces will be rejected.
 
static void setEnableClosedEyesDetection (bool enabled) noexcept
 Toggles closed eyes detection. When enabled the faces with closed eyes will be rejected.
 
static std::string getVersion ()
 Returns the release version.
 
static std::vector< LicenseFeatureInfogetLicenseFeaturesInfo ()
 Returns information about all available licensed features.
 
static std::string getLicenseInfo ()
 Returns information about a license if available.
 
static void setLicense (const std::string &license)
 Sets a new license.
 

Detailed Description

Face engines and pipelines aggregator.

Member Function Documentation

◆ getDetectEngine()

static DetectEnginePtr facesdk::FaceSDK::getDetectEngine ( const std::string &  name,
InitConfigPtr  config 
)
static

Return face detection engine by name.

Parameters
nameEngine name
configConfiguration object
Returns
Smart pointer to face detection engine
Exceptions
FaceException

◆ getLicenseFeaturesInfo()

static std::vector< LicenseFeatureInfo > facesdk::FaceSDK::getLicenseFeaturesInfo ( )
static

Returns information about all available licensed features.

Returns
List containing information about all available licensed features.
Exceptions
FaceException

◆ getLicenseInfo()

static std::string facesdk::FaceSDK::getLicenseInfo ( )
static

Returns information about a license if available.

Deprecated:
Use @getLicenseFeaturesInfo
Returns
String containing license information
Exceptions
FaceException

◆ getPipeline()

static PipelinePtr facesdk::FaceSDK::getPipeline ( const std::string &  name,
InitConfigPtr  config 
)
static

Return pipeline engine by name.

Parameters
namePipeline name
configConfiguration object
Returns
Smart pointer to pipeline object
Exceptions
FaceException

◆ getQualityEngine()

static QualityEnginePtr facesdk::FaceSDK::getQualityEngine ( const std::string &  name,
InitConfigPtr  config 
)
static

Return face quality engine by name.

Parameters
nameEngine name
configConfiguration object
Returns
Smart pointer to face detection engine
Exceptions
FaceException

◆ getVersion()

static std::string facesdk::FaceSDK::getVersion ( )
static

Returns the release version.

Returns
String containing the release version

◆ setEnableClosedEyesDetection()

static void facesdk::FaceSDK::setEnableClosedEyesDetection ( bool  enabled)
staticnoexcept

Toggles closed eyes detection. When enabled the faces with closed eyes will be rejected.

Parameters
enabledWhether to enable the detection or not
Note
Function call is equivalent to setting FACESDK_ENABLE_CLOSED_EYES_DETECTION environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.

◆ setEnableFaceOcclusionDetection()

static void facesdk::FaceSDK::setEnableFaceOcclusionDetection ( bool  enabled)
staticnoexcept

Toggles face occlusion detection. When enabled the occluded faces will be rejected.

Parameters
enabledWhether to enable the detection or not
Note
Function call is equivalent to setting FACESDK_ENABLE_FACE_OCCLUSION_DETECTION environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.

◆ setEnableLogging()

static void facesdk::FaceSDK::setEnableLogging ( bool  enable_logging)
staticnoexcept

Sets whether to enable FaceSDK logging. Logging is enabled by default.

Parameters
enable_loggingWhether to enable logging or not
Note
Function call is equivalent to setting FACESDK_ENABLE_LOGGING environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.

◆ setLicense()

static void facesdk::FaceSDK::setLicense ( const std::string &  license)
static

Sets a new license.

On Mobile builds (Android and iOS) and Lambda SDK distributions this function can be used to update the license by passing the contents of a new license file.

It will fail on regular SDK distributions

Parameters
licenselicense to be set
Exceptions
FaceException

◆ setNumPipelineExecutionStreams()

static void facesdk::FaceSDK::setNumPipelineExecutionStreams ( unsigned int  num_pipeline_execution_streams)
staticnoexcept

Sets the maximum number of execution streams (maximum number of requests executed in concurrent) for Pipeline. Default value is number of logical CPU cores.

Parameters
num_pipeline_execution_streamsNumber of execution streams
Note
Function call does not take any effect, reserved for future usage.
Function call is equivalent to setting FACESDK_NUM_PIPELINE_EXECUTION_STREAMS environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.

◆ setNumThreads()

static void facesdk::FaceSDK::setNumThreads ( unsigned int  num_threads,
ThreadingLevel  threading_level 
)
staticnoexcept

Sets the maximum number of threads available for FaceSDK at the specified level. If 0 is passed, then the optimal number of threads is detected automatically (the same effect is achieved if setNumThreads is not called).

Parameters
num_threadsMaximum number of threads available for FaceSDK at the specified level
threading_levelThreading level to apply setting
Note
Function call is equivalent to setting FACESDK_NUM_THREADS_PIPELINE, FACESDK_NUM_THREADS_ENGINE or FACESDK_NUM_THREADS_OPERATOR environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.

◆ setOvBindThreads()

static void facesdk::FaceSDK::setOvBindThreads ( bool  ov_bind_threads)
staticnoexcept

Sets the CPU bind setting for OpenVINO backend.

Parameters
ov_bind_threadsWhether to bind execution threads to CPU physical cores or not
Note
Function call is equivalent to setting FACESDK_OV_BIND_THREADS environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.
Function does not take effect if FaceSDK build does not use OpenVINO.

◆ setOvMaxBatchSize()

static void facesdk::FaceSDK::setOvMaxBatchSize ( unsigned int  ov_max_batch_size)
staticnoexcept

Sets the maximum batch size for OpenVINO backend. This is not a hard limit (i.e. passing batches bigger than the limit will not cause an error), however setting this value to the target batch size will increase performance.

Parameters
ov_max_batch_sizeMaximum batch size
Note
Function call is equivalent to setting FACESDK_OV_MAX_BATCH_SIZE environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.
Function does not take effect if FaceSDK build does not use OpenVINO.

◆ setOvNumThroughputStreams()

static void facesdk::FaceSDK::setOvNumThroughputStreams ( int  ov_num_throughput_streams)
staticnoexcept

Sets the number of CPU execution streams for OpenVINO backend.

Parameters
ov_num_throughput_streamsNumber of CPU execution streams, valid values are -1 (auto-tune number of streams), 0 (use the default setting) and any positive value, other values are dropped without an error
Note
Function call is equivalent to setting FACESDK_OV_NUM_THROUGHPUT_STREAMS environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.
Function does not take effect if FaceSDK build does not use OpenVINO.