Face SDK  1.13.0 Mozart release
Face Recognition Software Development Kit
Classes | Public Member Functions | Protected Member Functions | List of all members
com.tech5.FaceSDK.Alignment Class Reference
Inheritance diagram for com.tech5.FaceSDK.Alignment:

Public Member Functions

 Alignment (int version, int batchSize, int computeDevice) throws FaceSDKException
 
 Alignment (int version, License license, int batchSize, int computeDevice) throws FaceSDKException
 
 Alignment (int version, DataContainer dataContainer, int batchSize, int computeDevice) throws FaceSDKException
 
 Alignment (int version, License license, DataContainer dataContainer, int batchSize, int computeDevice) throws FaceSDKException
 
boolean equals (Object o)
 
int hashCode ()
 
void close () throws Exception
 
int getVersion ()
 
AlignmentInfoSet calcAlignment (FaceSet faces) throws FaceSDKException
 
boolean isCompatibleWithFaceDetector (int detectorVersion)
 

Protected Member Functions

void finalize () throws Throwable
 

Detailed Description

Algorithm aligns Face objects for the following processing (template extraction on a Builder or age and gender classification on a AgeGender).

Be aware that Alignment module can work incorrectly if you send the image with several faces on it.
Alignment algorithm can contains quality assessment parameter (AlignmentInfo#faceExists()), which give internal assessment if there is a face on the image or not, but it`s up to the SDK user how to work with this parameter (to use it or not).
Different Alignment algorithm versions can generate different types of aligned images with can cause incompatibility between alignment and builder, and age&gender algorithms. Use AgeGender#isCompatible(int), Builder#isCompatibleWithAlignment(int) methods to check compatibility.

Constructor & Destructor Documentation

◆ Alignment() [1/4]

com.tech5.FaceSDK.Alignment.Alignment ( int  version,
int  batchSize,
int  computeDevice 
) throws FaceSDKException
inline

Creates the object with needed version, batch size and compute device.
The data container is loaded from known paths.
The default license is loaded. License#makeDefaultLicense().

Parameters
versionrequired version of the algorithm.
batchSizethe batch size.
computeDevicethe compute device. -1 = CPU. 0, 1, ..., N - GPU device.
Exceptions
FaceSDKExceptionin case of an error in native code.

◆ Alignment() [2/4]

com.tech5.FaceSDK.Alignment.Alignment ( int  version,
License  license,
int  batchSize,
int  computeDevice 
) throws FaceSDKException
inline

Creates the object with needed version, license, batch size and compute device.
The data container is loaded from known paths.

Parameters
versionrequired version of the algorithm.
licensethe license object.
batchSizethe batch size.
computeDevicethe compute device. -1 = CPU. 0, 1, ..., N - GPU device.
Exceptions
IllegalArgumentExceptionif license is null.
FaceSDKExceptionin case of an error in native code.

◆ Alignment() [3/4]

com.tech5.FaceSDK.Alignment.Alignment ( int  version,
DataContainer  dataContainer,
int  batchSize,
int  computeDevice 
) throws FaceSDKException
inline

Creates the object with needed version, data container, batch size and compute device.
The default license is loaded. License#makeDefaultLicense().

Parameters
versionrequired version of the algorithm.
dataContainerthe license object.
batchSizethe batch size.
computeDevicethe compute device. -1 = CPU. 0, 1, ..., N - GPU device.
Exceptions
IllegalArgumentExceptionif dataContainer is null.
FaceSDKExceptionin case of an error in native code.

◆ Alignment() [4/4]

com.tech5.FaceSDK.Alignment.Alignment ( int  version,
License  license,
DataContainer  dataContainer,
int  batchSize,
int  computeDevice 
) throws FaceSDKException
inline

Creates the object with needed version, license, data container, batch size and compute device.

Parameters
versionrequired version of the algorithm.
licensethe license object.
dataContainerthe license object.
batchSizethe batch size.
computeDevicethe compute device. -1 = CPU. 0, 1, ..., N - GPU device.
Exceptions
IllegalArgumentExceptionif license is null or dataContainer is null.
FaceSDKExceptionin case of an error in native code.

Member Function Documentation

◆ calcAlignment()

AlignmentInfoSet com.tech5.FaceSDK.Alignment.calcAlignment ( FaceSet  faces) throws FaceSDKException
inline

Performs alignment operation on specified face set.

Parameters
facesthe face set to be aligned
Returns
a set of alignment info where i-element of the set corresponds to i-element in the input face set
Exceptions
IllegalArgumentExceptionif faces is null.
FaceSDKExceptionin case of an error in native code.

◆ getVersion()

int com.tech5.FaceSDK.Alignment.getVersion ( )
inline

Returns the algorithm's version

Returns
the algorithm's version

◆ isCompatibleWithFaceDetector()

boolean com.tech5.FaceSDK.Alignment.isCompatibleWithFaceDetector ( int  detectorVersion)
inline

Checks compatibility with FaceDetector version

Parameters
detectorVersionFaceDetector version to check compatibility with the alignment algorithm.
Returns
true if algorithms are compatible.

The documentation for this class was generated from the following file: