Configuration

All default settings is stored in configuration file “faceengine.conf”. Folder “$FSDK_ROOT/data” contains this file. You can set up own *”faceengine.conf” in a VLFaceEngine initialization. You can find a detailed information about settings in “ConfigurationGuide.pdf”.

SDK configuration module.

class lunavl.sdk.faceengine.setting_provider.AttributeEstimatorSettings(coreSettingProvider)[source]

Attribute estimator settings section.

Properties:
  • genderThreshold (float): gender threshold in [0..1] range

  • adultThreshold (float): adult threshold in [0..1] range

adultThreshold

Getter for adultThreshold

Returns

adultThreshold

Return type

float

genderThreshold

Getter for genderThreshold

Returns

genderThreshold

Return type

float

class lunavl.sdk.faceengine.setting_provider.BaseSettingsSection(coreSettingProvider)[source]

Base class for a section of settings.

Proxy model to core settings provider.

_coreSettingProvider

core settings provider

Type

coreSettingProvider

getValue(name)[source]

Get setting value :param name: setting name

Returns

a value

Return type

Any

getValueAsFloat(name)[source]

Get setting value as float :param name: setting name

Returns

a float

Return type

float

getValueAsInt(name)[source]

Get setting value as int :param name: setting name

Returns

a int

Return type

int

getValueAsString(name)[source]

Get setting value as string :param name: setting name

Returns

a string

Return type

str

setValue(name, value)[source]

Set a value

Parameters
  • name – setting name

  • value – new value

Return type

None

class lunavl.sdk.faceengine.setting_provider.BiDirectionEnum[source]

Bi direction enum.

class lunavl.sdk.faceengine.setting_provider.ChildEstimatorSettings(coreSettingProvider)[source]

childThreshold settings section.

Properties:
  • childThreshold (float): if estimate value less than threshold object is a children.

childThreshold

Getter for childThreshold

Returns

childThreshold

Return type

float

class lunavl.sdk.faceengine.setting_provider.CpuClass[source]

Class of cpu by supported instructions

class lunavl.sdk.faceengine.setting_provider.DescriptorFactorySettings(coreSettingProvider)[source]

Descriptor factory settings.

Properties:

  • model (int): CNN face descriptor version.

  • UseMobileNet (bool): mobile Net is faster but less accurate

  • distance (Distance): distance between descriptors on matching. L1 faster,L2 make better precision.

  • descriptorCountWarningLevel (float): Threshold,that limits the ratio of created descriptors to the amount,

    defined by your liscence. Warning Level When the threshold is exceeded, FSDK prints the warning.

descriptorCountWarningLevel

Getter for descriptorCountWarningLevel

Returns

descriptorCountWarningLevel

Return type

str

distance

Getter for distance

Returns

distance

Return type

Distance

model

Getter for model

Returns

model

Return type

int

useMobileNet

Getter for useMobileNet

Returns

useMobileNet

Return type

bool

class lunavl.sdk.faceengine.setting_provider.DetectorType[source]

Detector types enum

FACE_DET_V1 = 'FaceDetV1'

todo description

coreDetectorType

Convert self to core detector type

Returns

ObjectDetectorClassType

Return type

ObjectDetectorClassType

class lunavl.sdk.faceengine.setting_provider.DeviceClass[source]

Device enum

class lunavl.sdk.faceengine.setting_provider.Distance[source]

Descriptor distance type enum.

class lunavl.sdk.faceengine.setting_provider.EyeEstimatorSettings(coreSettingProvider)[source]

Eyes estimator settings section.

Properties:
  • useStatusPlan (bool): use status plan or not.

useStatusPlan

Getter for useStatusPlan

Returns

useStatusPlan

Return type

bool

class lunavl.sdk.faceengine.setting_provider.FaceDetV12Settings(coreSettingProvider)[source]

Common class for FaceDetV1 and FaceDetV2 detector settings.

Properties:

  • firstThreshold (float): 1-st threshold in [0..1] range;

  • secondThreshold (float): 2-st threshold in [0..1] range;

  • thirdTThreshold (float): 3-st threshold in [0..1] range;

  • minSize (int): minimum face size in pixels;

  • scaleFactor (float): image scale factor;

  • paddings (Point4): paddings;

  • redetectTolerance (float): redetect tolerance;

firstThreshold

Getter for firstThreshold

Returns

float in [0..1] range

Return type

float

minSize

Getter for minSize

Returns

minSize

Return type

int

paddings

Getter for paddings

Returns

paddings

Return type

Point4

redetectTolerance

Getter for redetectTolerance

Returns

redetectTolerance

Return type

float

scaleFactor

Getter for scaleFactor

Returns

scaleFactor

Return type

float

secondThreshold

Getter for secondThreshold

Returns

secondThreshold

Return type

float

thirdThreshold

Getter for thirdThreshold

Returns

thirdThreshold

Return type

float

class lunavl.sdk.faceengine.setting_provider.FaceDetV1Settings(coreSettingProvider)[source]

FaceDetV1 settings.

class lunavl.sdk.faceengine.setting_provider.FaceDetV2Settings(coreSettingProvider)[source]

FaceDetV2 settings.

class lunavl.sdk.faceengine.setting_provider.FaceDetV3Settings(coreSettingProvider)[source]

FaceDetV3 detector settings.

Properties:

  • scoreThreshold (float): detection threshold in [0..1] range;

  • redetectScoreThreshold (float): redetect face threshold in [0..1] range;

  • NMSThreshold (float): overlap threshold for NMS [0..1] range;

  • imageSize (int): Target image size for down scaling by load side;

  • nms (NMS): type of NMS: mean or best;

  • redetectTensorSize (int): target face after preprocessing for redetect;

  • redetectFaceTargetSize (int): target face size for redetect;

  • paddings (Point4): paddings;

  • paddingsIR (Point4): paddingsIR;

  • planPrefix (str): planPrefix;

NMSThreshold

Getter for NMSThreshold

Returns

NMSThreshold

Return type

float

imageSize

Getter for imageSize

Returns

imageSize

Return type

int

nms

Getter for nms

Returns

nms

Return type

NMS

paddings

Getter for paddings

Returns

paddings

Return type

Point4

paddingsIR

Getter for paddingsIR

Returns

paddingsIR

Return type

Point4

planPrefix

Getter for planPrefix

Returns

planPrefix

Return type

str

redetectFaceTargetSize

Getter for redetectFaceTargetSize

Returns

redetectFaceTargetSize

Return type

int

redetectScoreThreshold

Getter for redetectScoreThreshold

Returns

redetectScoreThreshold

Return type

float

redetectTensorSize

Getter for redetectTensorSize

Returns

redetectTensorSize

Return type

int

scoreThreshold

Getter for scoreThreshold

Returns

scoreThreshold

Return type

float

class lunavl.sdk.faceengine.setting_provider.FlowerSettings(coreSettingProvider)[source]

Flower library is the default neural network inference engine. The library is used for:

  • face detectors;

  • estimators(attributes, quality);

  • face descriptors

Properties:

deviceClass (DeviceClass): execution device type cpu, gpu. numThreads (int): number of worker threads. verboseLogging (VerboseLogging): level of verbose logging numComputeStreams (int): increases performance, but works only with new versions of nvidia drivers

numComputeStreams

Getter for numComputeStreams

Returns

numComputeStreams

Return type

int

numThreads

Getter for numThreads

Returns

numThreads

Return type

int

verboseLogging

Getter for verboseLogging

Returns

verboseLogging

Return type

VerboseLogging

class lunavl.sdk.faceengine.setting_provider.GlassesEstimatorSettings(coreSettingProvider)[source]

Glasses estimator settings section.

Properties:
  • noGlassesThreshold (float): no glasses threshold in [0..1] range

  • eyeGlassesThreshold (float): eye glasses threshold in [0..1] range

  • sunGlassesThreshold (float): sun glasses threshold in [0..1] range

eyeGlassesThreshold

Getter for eyeGlassesThreshold

Returns

eyeGlassesThreshold

Return type

float

noGlassesThreshold

Getter for noGlassesThreshold

Returns

noGlassesThreshold

Return type

float

sunGlassesThreshold

Getter for sunGlassesThreshold

Returns

sunGlassesThreshold

Return type

float

class lunavl.sdk.faceengine.setting_provider.HeadAndShouldersLivenessEstimatorSettings(coreSettingProvider)[source]

HeadAndShouldersLiveness settings section.

Properties:
  • shouldersHeightKoeff (float): shouldersHeightKoeff

  • shouldersWidthKoeff (float): shouldersWidthKoeff

  • headWidthKoeff (float): headWidthKoeff

  • headHeightKoeff (float): headHeightKoeff

headHeightKoeff

Getter for betaMode

Returns

betaMode

Return type

float

headWidthKoeff

Getter for betaMode

Returns

betaMode

Return type

float

shouldersHeightKoeff

Getter for betaMode

Returns

betaMode

Return type

float

shouldersWidthKoeff

Getter for betaMode

Returns

betaMode

Return type

float

class lunavl.sdk.faceengine.setting_provider.HeadPoseEstimatorSettings(coreSettingProvider)[source]

Head pose estimator settings section.

Properties:
  • useEstimationByImage (bool): use head pose estimation by image

  • useEstimationByLandmarks (bool): use head pose estimation by landmarks

useEstimationByImage

Getter for useEstimationByImage

Returns

useEstimationByImage

Return type

bool

useEstimationByLandmarks

Getter for useEstimationByLandmarks

Returns

useEstimationByLandmarks

Return type

bool

class lunavl.sdk.faceengine.setting_provider.LNetBaseSettings(coreSettingProvider)[source]

Base class for configuration LNet neural network.

Properties:

  • planName (str): plan name

  • size (int): size

  • mean (Point3): mean

  • sigma (Point3): sigma

mean

Getter for mean

Returns

mean

Return type

Point3

planName

Getter for planName

Returns

planName

Return type

str

sigma

Getter for sigma

Returns

sigma

Return type

Point3

size

Getter for size

Returns

size

Return type

int

class lunavl.sdk.faceengine.setting_provider.LNetIRSettings(coreSettingProvider)[source]

LNetIR configuration section

class lunavl.sdk.faceengine.setting_provider.LNetSettings(coreSettingProvider)[source]

LNet configuration section

class lunavl.sdk.faceengine.setting_provider.LivenessIREstimatorSettings(coreSettingProvider)[source]

LivenessIREstimator settings section.

Properties:
  • cooperativeMode (bool): whether liveness is checking in cooperative mode

  • irCooperativeThreshold (float): liveness threshold for cooperative mode in [0..1] range

  • irNonCooperativeThreshold (float): liveness threshold for non cooperative mode in [0..1] range

cooperativeMode

Getter for cooperativeMode

Returns

cooperativeMode

Return type

bool

irCooperativeThreshold

Getter for irCooperativeThreshold

Returns

irCooperativeThreshold

Return type

float

irNonCooperativeThreshold

Getter for irNonCooperativeThreshold

Returns

irNonCooperativeThreshold

Return type

float

class lunavl.sdk.faceengine.setting_provider.NMS[source]

NMS type enum.

class lunavl.sdk.faceengine.setting_provider.OverlapEstimatorSettings(coreSettingProvider)[source]

OverlapThreshold any object settings section.

Properties:
  • overlapThreshold (float): overlap threshold for any object in [0..1] range

overlapThreshold

Getter for overlapThreshold

Returns

overlapThreshold

Return type

float

class lunavl.sdk.faceengine.setting_provider.Point2(x, y)[source]

Point in 2-dimensional space. .. attribute:: x

x coordinate

type

float

y

y coordinate

Type

float

asTuple()[source]

Convert point to tuple.

Returns

tuple from coordinate

Return type

Tuple[float, float]

class lunavl.sdk.faceengine.setting_provider.Point3(x, y, z)[source]

Point in 3-dimensional space. .. attribute:: x

x coordinate

type

float

y

y coordinate

Type

float

z

z coordinate

Type

float

asTuple()[source]

Convert point to tuple.

Returns

tuple from coordinate

Return type

Tuple[float, float, float]

class lunavl.sdk.faceengine.setting_provider.Point4(x, y, z, w)[source]

Point in 4-dimensional space. .. attribute:: x

x coordinate

type

float

y

y coordinate

Type

float

z

z coordinate

Type

float

w

w coordinate

Type

float

asTuple()[source]

Convert point to tuple.

Returns

tuple from coordinate

Return type

Tuple[float, float, float, float]

class lunavl.sdk.faceengine.setting_provider.QualityEstimatorSettings(coreSettingProvider)[source]

Quality estimator settings section.

Properties:

  • size (int): size

  • expLight (Point3): expLight

  • expDark (Point3): expDark

  • expBlur (Point3): expBlur

  • logGray (Point4): logGray

  • platt (Point2): coefficient platt

expBlur

Getter for expBlur

Returns

expBlur

Return type

Point3

expDark

Getter for expDark

Returns

expDark

Return type

Point3

expLight

Getter for expLight

Returns

expLight

Return type

Point3

logGray

Getter for logGray

Returns

logGray

Return type

Point4

platt

Getter for platt

Returns

platt

Return type

Point2

size

Getter for size

Returns

size

Return type

int

class lunavl.sdk.faceengine.setting_provider.SLNetSettings(coreSettingProvider)[source]

SLNet configuration section

class lunavl.sdk.faceengine.setting_provider.SettingsProvider(pathToConfig=None)[source]

SDK Setting provider.

Proxy model.

pathToConfig

path to a configuration file. Config file is getting from the folder’data’ in “FSDK_ROOT”.

Type

str

_coreSettingProvider
LNetIRSettings

Getter for LNetIR settings section.

Returns

Mutable LNetIR section

Return type

LNetIRSettings

LNetSettings

Getter for LNet settings section.

Returns

Mutable LNet section

SLNetSettings

Getter for SLNet settings section.

Returns

Mutable SLNet section

Return type

SLNetSettings

attributeEstimatorSettings

Getter for AttributeEstimator settings section.

Returns

Mutable AttributeEstimator section

Return type

AttributeEstimatorSettings

childEstimatorSettings

Getter for ChildEstimator settings section.

Returns

Mutable ChildEstimator section

Return type

ChildEstimatorSettings

descriptorFactorySettings

Getter for descriptor factory settings section.

Returns

Mutable descriptor factory section

Return type

DescriptorFactorySettings

eyeEstimatorSettings

Getter for EyeEstimator settings section.

Returns

Mutable EyeEstimator section

Return type

EyeEstimatorSettings

faceDetV1Settings

Getter for FaceDetV1 settings section.

Returns

Mutable FaceDetV1 section

Return type

FaceDetV1Settings

faceDetV2Settings

Getter for FaceDetV2 settings section.

Returns

Mutable FaceDetV2 section

Return type

FaceDetV2Settings

faceDetV3Settings

Getter for FaceDetV3 settings section.

Returns

Mutable FaceDetV3 section

Return type

FaceDetV3Settings

flowerSettings

Getter for flower settings section.

Returns

Mutable flower section

Return type

FlowerSettings

glassesEstimatorSettings

Getter for GlassesEstimator settings section.

Returns

Mutable GlassesEstimator section

Return type

GlassesEstimatorSettings

headAndShouldersLivenessEstimatorSettings

Getter for HeadAndShouldersLivenessEstimator settings section.

Returns

Mutable HeadAndShouldersLivenessEstimator section

Return type

HeadAndShouldersLivenessEstimatorSettings

headPoseEstimatorSettings

Getter for HeadPoseEstimator settings section.

Returns

Mutable HeadPoseEstimator section

Return type

HeadPoseEstimatorSettings

livenessIREstimatorSettings

Getter for LivenessIREstimator settings section.

Returns

Mutable LivenessIREstimator section

Return type

LivenessIREstimatorSettings

overlapEstimatorSettings

Getter for OverlapEstimator settings section.

Returns

Mutable OverlapEstimator section

Return type

OverlapEstimatorSettings

qualityEstimatorSettings

Getter for QualityEstimator settings section.

Returns

Mutable QualityEstimator section

Return type

QualityEstimatorSettings

systemSettings

Getter for system settings section.

Returns

Mutable system section

Return type

SystemSettings

class lunavl.sdk.faceengine.setting_provider.SystemSettings(coreSettingProvider)[source]

Common system settings.

Properties:

  • cpuClass (CpuClass): class of cpu by supported instructions

  • verboseLogging (VerboseLogging): Level of log versobing

  • betaMode (bool): enable experimental features.

  • defaultDetectorType (DetectorType): default detector type

betaMode

Getter for betaMode

Returns

betaMode

Return type

bool

cpuClass

Getter for cpuClass

Returns

cpuClass

Return type

CpuClass

defaultDetectorType

Getter for defaultDetectorType

Returns

betaMode

Return type

DetectorType

verboseLogging

Getter for verboseLogging

Returns

verboseLogging

Return type

VerboseLogging

class lunavl.sdk.faceengine.setting_provider.VerboseLogging[source]

Level of log versobing enum