Face Engine SDK  4.6.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fsdk::IDescriptorExtractor Struct Referenceabstract

Descriptor extractor interface. More...

#include <IDescriptor.h>

Inheritance diagram for fsdk::IDescriptorExtractor:
fsdk::IRefCounted

Public Member Functions

virtual ResultValue< FSDKError,
float > 
extract (Image &image, const Detection &detection, const Landmarks5 &landmarks, IDescriptor *descriptor) const noexcept=0
 Extract a face descriptor from an image. More...
 
virtual ResultValue< FSDKError,
float > 
extractFromWarpedImage (const Image &image, IDescriptor *descriptor) const noexcept=0
 Extract descriptor from a warped image. More...
 
virtual ResultValue< FSDKError,
float > 
extractFromWarpedImageBatch (const Image *warpsBatch, IDescriptorBatch *descriptorBatch, IDescriptor *aggregation, float *garbageScoreBatch, int batchSize) const noexcept=0
 Extract batch of descriptors from a batch of images and perform aggregation. More...
 
virtual Result< FSDKErrorextractFromWarpedImageBatch (const Image *warpsBatch, IDescriptorBatch *descriptorBatch, float *garbageScoreBatch, int batchSize) const noexcept=0
 Extract batch of descriptors from a batch of images. More...
 
virtual uint32_t getModelVersion () const noexcept=0
 Get algorithm model version this extractor works with. More...
 
virtual DesctiptorType getDescriptorType () const noexcept=0
 Get type of descriptor this extractor works with. More...
 
- Public Member Functions inherited from fsdk::IRefCounted
virtual int32_t retain () noexcept=0
 Increase strong reference count. More...
 
virtual int32_t release () noexcept=0
 Decrease strong reference count. More...
 
virtual int32_t getRefCount () const noexcept=0
 Get actual strong reference count. More...
 
virtual int32_t retainWeak () noexcept=0
 Increase weak reference count. More...
 
virtual int32_t releaseWeak () noexcept=0
 Decrease weak reference count. More...
 
virtual int32_t getWeakRefCount () const noexcept=0
 Get actual weak reference count. More...
 

Detailed Description

Descriptor extractor interface.

Extracts face descriptors from images. The descriptors can be later used for face matching.

Member Function Documentation

virtual ResultValue<FSDKError, float> fsdk::IDescriptorExtractor::extract ( Image image,
const Detection detection,
const Landmarks5 landmarks,
IDescriptor descriptor 
) const
pure virtualnoexcept

Extract a face descriptor from an image.

This method accepts arbitrary images that have size at least 250x250 pixels and R8G8B8 pixel format. The input image is warped internally using an assigned warper (

See Also
IWarper). The descriptor extractor is created with a proper warped assigned by default so no additional setup is required, unless this behaviour is overriden with defaultWarper flag upon extractor creation. This method can be used only for face descriptor extractor.
Parameters
imagesource image. Format must be R8G8B8.
detectionface detection.
setface feature set.
descriptordescriptor to fill with data.
Returns
ResultValue with error code specified by FSDKError and score of descriptor normalized in range [0, 1] 1 - face on the input warp; 0 - garbage on the input detection.
See Also
ResultValue and FSDKError.
virtual ResultValue<FSDKError, float> fsdk::IDescriptorExtractor::extractFromWarpedImage ( const Image image,
IDescriptor descriptor 
) const
pure virtualnoexcept

Extract descriptor from a warped image.

Note
The input image should be warped;
See Also
IWarper.
Parameters
[in]imagesource warped image.
Note
image should be a valid 250x250 image in R8G8B8 format for DT_FACE descriptor type.
image should be a valid 192x384 image in R8G8B8 format for DT_HUMAN descriptor type.
Parameters
[out]descriptordescriptor to fill with data.
Returns
ResultValue with error code specified by FSDKError and score of descriptor normalized in range [0, 1] 1 - face on the input warp; 0 - garbage on the input warp.
Note
human descriptor does not support garbage score, 1.0 will be returned
See Also
ResultValue and FSDKError.
virtual ResultValue<FSDKError, float> fsdk::IDescriptorExtractor::extractFromWarpedImageBatch ( const Image warpsBatch,
IDescriptorBatch descriptorBatch,
IDescriptor aggregation,
float *  garbageScoreBatch,
int  batchSize 
) const
pure virtualnoexcept

Extract batch of descriptors from a batch of images and perform aggregation.

Note
The input images should be warped;
See Also
IWarper.
Parameters
[in]warpsBatchinput array of warped images.
Note
Images should be in R8G8B8 format, with size 250x250 for DT_FACE descriptor type.
Images should be in R8G8B8 format, with size 192x384 for DT_HUMAN descriptor type.
Parameters
[out]descriptorBatchdescriptor batch to fill with data.
Note
DT_HUMAN descriptor does not support garbage score
Parameters
[out]aggregationdescriptor with aggregation based on descriptor batch.
[out]garbageScoreBatcharray of descriptor scores normalized in range [0, 1] 1 - face on the input warp; 0 - garbage on the input warp.
Note
human descriptor does not support garbage score, 1.0 will be returned
Parameters
[in]batchSizesize of the batch.
Note
warpsBatch should contain batchSize images and garbaseScoreBatch should be preallocated to store batchSize scores.
Returns
Result with error code specified by FSDKError and aggregated garbage score.
See Also
Result and FSDKError.
virtual Result<FSDKError> fsdk::IDescriptorExtractor::extractFromWarpedImageBatch ( const Image warpsBatch,
IDescriptorBatch descriptorBatch,
float *  garbageScoreBatch,
int  batchSize 
) const
pure virtualnoexcept

Extract batch of descriptors from a batch of images.

Note
The input images should be warped;
See Also
IWarper.
Parameters
[in]warpsBatchinput array of warped images.
Note
Images should be in R8G8B8 format, with size 250x250 for DT_FACE descriptor type.
Images should be in R8G8B8 format, with size 192x384 for DT_HUMAN descriptor type.
Parameters
[out]descriptorBatchdescriptor batch to fill with data.
[out]garbageScoreBatcharray of descriptor scores normalized in range [0, 1] 1 - face on the input warp; 0 - garbage on the input warp. DT_HUMAN descriptor does not support garbage score. In a case of DT_HUMAN descriptor, you'll get batch filled by 1.0.
[in]batchSizesize of the batch.
Note
warpsBatch should contain batchSize images and garbaseScoreBatch should be preallocated to store batchSize scores.
Returns
Result with error code specified by FSDKError.
See Also
Result and FSDKError.
virtual DesctiptorType fsdk::IDescriptorExtractor::getDescriptorType ( ) const
pure virtualnoexcept

Get type of descriptor this extractor works with.

Returns
type as enum
See Also
DesctiptorType.
virtual uint32_t fsdk::IDescriptorExtractor::getModelVersion ( ) const
pure virtualnoexcept

Get algorithm model version this extractor works with.

Returns
Version as integral number.

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