Estimator collections

99% real applications is needed one instance of faceengine and one instance of every estimators. Initialization of estimators is to slow therefore application should initialize all needing estimators on start up and re use its.

A estimator collection are a logical groped estimators. Estimators from collection are initialized in first call.

Class FaceEstimatorsCollection contains all estimators for a face.

Module contains face estimator collections.

class lunavl.sdk.estimator_collections.FaceEstimator[source]

Enum for face estimators.

AGS = 8

ags estimator

BasicAttributes = 4

basic attributes estimator

Descriptor = 9

face descriptor estimator

Emotions = 3

emotion estimator

Eye = 2

eye estimation (eyelid, iris landmarks and state)

GazeDirection = 5

gaze direction estimator

HeadPose = 1

head pose estimator

MouthState = 6

mouth state estimator

WarpQuality = 7

warp quality estimator

class lunavl.sdk.estimator_collections.FaceEstimatorsCollection(startEstimators=None, faceEngine=None)[source]

Collection of lazy load face estimators.

_headPoseEstimator

lazy load head pose estimator

Type

Optional[HeadPoseEstimator]

_eyeEstimator

lazy load eye estimator

Type

Optional[EyeEstimator]

_gazeDirectionEstimator

lazy load gaze direction estimator

Type

Optional[GazeEstimator]

_mouthStateEstimator

lazy load mouth state estimator

Type

Optional[MouthStateEstimator]

_warpQualityEstimator

lazy load warp quality estimator

Type

Optional[WarpQualityEstimator]

_basicAttributesEstimator

lazy load basic attributes estimator

Type

Optional[BasicAttributesEstimator]

_emotionsEstimator

lazy load emotions estimator

Type

Optional[EmotionsEstimator]

_AGSEstimator

lazy load ags estimator

Type

Optional[AGSEstimator]

_descriptorEstimator

lazy load face descriptor estimator

Type

Optional[FaceDescriptorEstimator]

warper

warper

Type

Optional[Warper]

AGSEstimator

Get ags estimator.

If estimator is initialized it will be returned otherwise it will be initialized and returned

Returns

estimator

Return type

AGSEstimator

basicAttributesEstimator

Get basic attributes estimator.

If estimator is initialized it will be returned otherwise it will be initialized and returned

Returns

estimator

Return type

BasicAttributesEstimator

descriptorEstimator

Get head pose estimator.

If estimator is initialized it will be returned otherwise it will be initialized and returned

Returns

estimator

Return type

FaceDescriptorEstimator

emotionsEstimator

Get emotions estimator.

If estimator is initialized it will be returned otherwise it will be initialized and returned

Returns

estimator

Return type

EmotionsEstimator

eyeEstimator

Get eye estimator.

If estimator is initialized it will be returned otherwise it will be initialized and returned

Returns

estimator

Return type

EyeEstimator

faceEngine

Get current faceengine.

Returns

self._faceEngine

Return type

VLFaceEngine

gazeDirectionEstimator

Get gaze direction estimator.

If estimator is initialized it will be returned otherwise it will be initialized and returned

Returns

estimator

Return type

GazeEstimator

headPoseEstimator

Get head pose estimator.

If estimator is initialized it will be returned otherwise it will be initialized and returned

Returns

estimator

Return type

HeadPoseEstimator

initEstimator(estimator)[source]

Create an estimator. Create new estimator with help self._faceengine

Parameters

estimator – estimator for creating

Raises

ValueError("Bad estimator type") – if estimator not found

Return type

None

mouthStateEstimator

Get mouth state estimator.

If estimator is initialized it will be returned otherwise it will be initialized and returned

Returns

estimator

Return type

MouthStateEstimator

removeEstimator(estimator)[source]

Remove estimators.

Parameters

estimator – estimator for removing

Return type

None

warpQualityEstimator

Get warp quality estimator.

If estimator is initialized it will be returned otherwise it will be initialized and returned

Returns

estimator

Return type

WarpQualityEstimator