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.
Attribute estimator settings section.
- Properties:
genderThreshold (float): gender threshold in [0..1] range
adultThreshold (float): adult threshold in [0..1] range
Getter for adultThreshold
- Returns
adultThreshold
- Return type
float
Getter for genderThreshold
- Returns
genderThreshold
- Return type
float
Base class for a section of settings.
Proxy model to core settings provider.
core settings provider
- Type
coreSettingProvider
Get setting value :param name: setting name
- Returns
a value
- Return type
Any
Get setting value as float :param name: setting name
- Returns
a float
- Return type
float
Get setting value as int :param name: setting name
- Returns
a int
- Return type
int
Get setting value as string :param name: setting name
- Returns
a string
- Return type
str
Set a value
- Parameters
name – setting name
value – new value
- Return type
None
Bi direction enum.
childThreshold settings section.
- Properties:
childThreshold (float): if estimate value less than threshold object is a children.
Getter for childThreshold
- Returns
childThreshold
- Return type
float
Class of cpu by supported instructions
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.
Getter for descriptorCountWarningLevel
- Returns
descriptorCountWarningLevel
- Return type
str
Getter for distance
- Returns
distance
- Return type
Getter for model
- Returns
model
- Return type
int
Getter for useMobileNet
- Returns
useMobileNet
- Return type
bool
Detector types enum
todo description
Convert self to core detector type
- Returns
ObjectDetectorClassType
- Return type
ObjectDetectorClassType
Device enum
Descriptor distance type enum.
Eyes estimator settings section.
- Properties:
useStatusPlan (bool): use status plan or not.
Getter for useStatusPlan
- Returns
useStatusPlan
- Return type
bool
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;
Getter for firstThreshold
- Returns
float in [0..1] range
- Return type
float
Getter for minSize
- Returns
minSize
- Return type
int
Getter for paddings
- Returns
paddings
- Return type
Getter for redetectTolerance
- Returns
redetectTolerance
- Return type
float
Getter for scaleFactor
- Returns
scaleFactor
- Return type
float
Getter for secondThreshold
- Returns
secondThreshold
- Return type
float
Getter for thirdThreshold
- Returns
thirdThreshold
- Return type
float
FaceDetV1 settings.
FaceDetV2 settings.
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;
Getter for NMSThreshold
- Returns
NMSThreshold
- Return type
float
Getter for imageSize
- Returns
imageSize
- Return type
int
Getter for nms
- Returns
nms
- Return type
Getter for paddings
- Returns
paddings
- Return type
Getter for paddingsIR
- Returns
paddingsIR
- Return type
Getter for planPrefix
- Returns
planPrefix
- Return type
str
Getter for redetectFaceTargetSize
- Returns
redetectFaceTargetSize
- Return type
int
Getter for redetectScoreThreshold
- Returns
redetectScoreThreshold
- Return type
float
Getter for redetectTensorSize
- Returns
redetectTensorSize
- Return type
int
Getter for scoreThreshold
- Returns
scoreThreshold
- Return type
float
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
Getter for numComputeStreams
- Returns
numComputeStreams
- Return type
int
Getter for numThreads
- Returns
numThreads
- Return type
int
Getter for verboseLogging
- Returns
verboseLogging
- Return type
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
Getter for eyeGlassesThreshold
- Returns
eyeGlassesThreshold
- Return type
float
Getter for noGlassesThreshold
- Returns
noGlassesThreshold
- Return type
float
Getter for sunGlassesThreshold
- Returns
sunGlassesThreshold
- Return type
float
HeadAndShouldersLiveness settings section.
- Properties:
shouldersHeightKoeff (float): shouldersHeightKoeff
shouldersWidthKoeff (float): shouldersWidthKoeff
headWidthKoeff (float): headWidthKoeff
headHeightKoeff (float): headHeightKoeff
Getter for betaMode
- Returns
betaMode
- Return type
float
Getter for betaMode
- Returns
betaMode
- Return type
float
Getter for betaMode
- Returns
betaMode
- Return type
float
Getter for betaMode
- Returns
betaMode
- Return type
float
Head pose estimator settings section.
- Properties:
useEstimationByImage (bool): use head pose estimation by image
useEstimationByLandmarks (bool): use head pose estimation by landmarks
Getter for useEstimationByImage
- Returns
useEstimationByImage
- Return type
bool
Getter for useEstimationByLandmarks
- Returns
useEstimationByLandmarks
- Return type
bool
Base class for configuration LNet neural network.
Properties:
planName (str): plan name
size (int): size
mean (Point3): mean
sigma (Point3): sigma
Getter for mean
- Returns
mean
- Return type
Getter for planName
- Returns
planName
- Return type
str
Getter for sigma
- Returns
sigma
- Return type
Getter for size
- Returns
size
- Return type
int
LNetIR configuration section
LNet configuration section
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
Getter for cooperativeMode
- Returns
cooperativeMode
- Return type
bool
Getter for irCooperativeThreshold
- Returns
irCooperativeThreshold
- Return type
float
Getter for irNonCooperativeThreshold
- Returns
irNonCooperativeThreshold
- Return type
float
NMS type enum.
OverlapThreshold any object settings section.
- Properties:
overlapThreshold (float): overlap threshold for any object in [0..1] range
Getter for overlapThreshold
- Returns
overlapThreshold
- Return type
float
Point in 2-dimensional space. .. attribute:: x
x coordinate
- type
float
y coordinate
- Type
float
Convert point to tuple.
- Returns
tuple from coordinate
- Return type
Tuple
[float
,float
]
Point in 3-dimensional space. .. attribute:: x
x coordinate
- type
float
y coordinate
- Type
float
z coordinate
- Type
float
Convert point to tuple.
- Returns
tuple from coordinate
- Return type
Tuple
[float
,float
,float
]
Point in 4-dimensional space. .. attribute:: x
x coordinate
- type
float
y coordinate
- Type
float
z coordinate
- Type
float
w coordinate
- Type
float
Convert point to tuple.
- Returns
tuple from coordinate
- Return type
Tuple
[float
,float
,float
,float
]
Quality estimator settings section.
Properties:
size (int): size
expLight (Point3): expLight
expDark (Point3): expDark
expBlur (Point3): expBlur
logGray (Point4): logGray
platt (Point2): coefficient platt
Getter for expBlur
- Returns
expBlur
- Return type
Getter for expDark
- Returns
expDark
- Return type
Getter for expLight
- Returns
expLight
- Return type
Getter for logGray
- Returns
logGray
- Return type
Getter for platt
- Returns
platt
- Return type
Getter for size
- Returns
size
- Return type
int
SLNet configuration section
SDK Setting provider.
Proxy model.
path to a configuration file. Config file is getting from the folder’data’ in “FSDK_ROOT”.
- Type
str
Getter for LNetIR settings section.
- Returns
Mutable LNetIR section
- Return type
Getter for LNet settings section.
- Returns
Mutable LNet section
Getter for SLNet settings section.
- Returns
Mutable SLNet section
- Return type
Getter for AttributeEstimator settings section.
- Returns
Mutable AttributeEstimator section
- Return type
Getter for ChildEstimator settings section.
- Returns
Mutable ChildEstimator section
- Return type
Getter for descriptor factory settings section.
- Returns
Mutable descriptor factory section
- Return type
Getter for EyeEstimator settings section.
- Returns
Mutable EyeEstimator section
- Return type
Getter for FaceDetV1 settings section.
- Returns
Mutable FaceDetV1 section
- Return type
Getter for FaceDetV2 settings section.
- Returns
Mutable FaceDetV2 section
- Return type
Getter for FaceDetV3 settings section.
- Returns
Mutable FaceDetV3 section
- Return type
Getter for flower settings section.
- Returns
Mutable flower section
- Return type
Getter for GlassesEstimator settings section.
- Returns
Mutable GlassesEstimator section
- Return type
Getter for HeadAndShouldersLivenessEstimator settings section.
- Returns
Mutable HeadAndShouldersLivenessEstimator section
- Return type
Getter for HeadPoseEstimator settings section.
- Returns
Mutable HeadPoseEstimator section
- Return type
Getter for LivenessIREstimator settings section.
- Returns
Mutable LivenessIREstimator section
- Return type
Getter for OverlapEstimator settings section.
- Returns
Mutable OverlapEstimator section
- Return type
Getter for QualityEstimator settings section.
- Returns
Mutable QualityEstimator section
- Return type
Getter for system settings section.
- Returns
Mutable system section
- Return type
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
Getter for betaMode
- Returns
betaMode
- Return type
bool
Getter for cpuClass
- Returns
cpuClass
- Return type
Getter for defaultDetectorType
- Returns
betaMode
- Return type
Getter for verboseLogging
- Returns
verboseLogging
- Return type
Level of log versobing enum