Face Engine SDK  5.8.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
IFaceEngine.h
1 
8 #pragma once
9 
29 #include "Log.h"
30 #include "Version.h"
31 #include "IObject.h"
32 #include "ISettingsProvider.h"
33 #include "IEstimator.h"
34 #include "IDetector.h"
35 #include "IDescriptor.h"
36 #include "IWarper.h"
37 #include "IHumanDetector.h"
38 #include "IHumanWarper.h"
39 #include "IIndex.h"
40 #include "IAsyncContext.h"
41 #include "ILicense.h"
42 #include "LaunchOptions.h"
43 #include "Exception.h"
44 #include "Types/FaceEngineEdition.h"
45 
47 namespace fsdk {
48 
49 #ifndef DOXYGEN_SHOULD_SKIP_THIS
50  DECLARE_SMARTPTR(IFaceEngine);
51 #endif
52 
63 
75  const LaunchOptions* launchOptions = nullptr) noexcept = 0;
76 
77 
79  createOrientationEstimator(
80  const LaunchOptions* launchOptions = nullptr
81  ) noexcept = 0;
82 
89  virtual ResultValue<FSDKError, IHumanDetectorPtr> createHumanDetector(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
90 
97  virtual ResultValue<FSDKError, IHeadPoseEstimatorPtr> createHeadPoseEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
98 
105  virtual ResultValue<FSDKError, IOverlapEstimatorPtr> createOverlapEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
106 
113  virtual ResultValue<FSDKError, IChildEstimatorPtr> createChildEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
114 
121  virtual ResultValue<FSDKError, IAGSEstimatorPtr> createAGSEstimator(const LaunchOptions* options = nullptr) noexcept = 0;
122 
130 
137  virtual ResultValue<FSDKError, IAttributeEstimatorPtr> createAttributeEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
138 
145  virtual ResultValue<FSDKError, IHumanAttributeEstimatorPtr> createHumanAttributeEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
146 
153  virtual ResultValue<FSDKError, IQualityEstimatorPtr> createQualityEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
154 
161  virtual ResultValue<FSDKError, IBlackWhiteEstimatorPtr> createBlackWhiteEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
162 
169  virtual ResultValue<FSDKError, ILivenessDepthEstimatorPtr> createDepthEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
170 
177  virtual ResultValue<FSDKError, ILivenessIREstimatorPtr> createIREstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
178 
186 
193  virtual ResultValue<FSDKError, IMouthEstimatorPtr> createMouthEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
194 
201  virtual ResultValue<FSDKError, IMedicalMaskEstimatorPtr> createMedicalMaskEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
202 
210 
217  virtual ResultValue<FSDKError, ILivenessFPREstimatorPtr> createLivenessFPREstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
218 
226  virtual ResultValue<FSDKError, ILivenessFlowEstimatorPtr> createFaceFlowEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
227 
235  virtual ResultValue<FSDKError, ILivenessRGBMEstimatorPtr> createLivenessRGBMEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
236 
244  virtual ResultValue<FSDKError, IEyeEstimatorPtr> createEyeEstimator(SensorType mode = SensorType::Visible, const LaunchOptions* launchOptions = nullptr) noexcept = 0;
245 
252  virtual ResultValue<FSDKError, IEmotionsEstimatorPtr> createEmotionsEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
253 
261  virtual ResultValue<FSDKError, IGazeEstimatorPtr> createGazeEstimator(SensorType mode = SensorType::Visible, const LaunchOptions* launchOptions = nullptr) noexcept = 0;
262 
269  virtual ResultValue<FSDKError, IGlassesEstimatorPtr> createGlassesEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
270 
278 
286 
293  virtual ResultValue<FSDKError, IHeadWearEstimatorPtr> createHeadWearEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
294 
301  virtual ResultValue<FSDKError, IFacialHairEstimatorPtr> createFacialHairEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
302 
309  virtual ResultValue<FSDKError, IFishEyeEstimatorPtr> createFishEyeEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
310 
317  virtual ResultValue<FSDKError, INaturalLightEstimatorPtr> createNaturalLightEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
318 
326 
333  virtual ResultValue<FSDKError, IPortraitStyleEstimatorPtr> createPortraitStyleEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
334 
341  virtual ResultValue<FSDKError, IBackgroundEstimatorPtr> createBackgroundEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
342 
349  virtual ResultValue<FSDKError, IRedEyeEstimatorPtr> createRedEyeEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
350 
358 
367  virtual ResultValue<FSDKError, IDescriptorPtr> createDescriptor(uint32_t version = 0) noexcept = 0;
368 
376  virtual ResultValue<FSDKError, IDescriptorPtr> createDescriptor(IArchive* archive, uint32_t flags = 0) noexcept = 0;
377 
387  virtual ResultValue<FSDKError, IDescriptorBatchPtr> createDescriptorBatch(int32_t size, uint32_t version = 0) noexcept = 0;
388 
398  virtual ResultValue<FSDKError, IDescriptorExtractorPtr> createExtractor(uint32_t version = 0, const LaunchOptions* launchOptions = nullptr) noexcept = 0;
399 
409  virtual ResultValue<FSDKError, IDescriptorMatcherPtr> createMatcher(uint32_t version = 0) noexcept = 0;
410 
419  const size_t capacity = 0,
420  uint32_t version = 0) noexcept = 0;
421 
430  const char* indexPath) noexcept = 0;
431 
440  const char* indexPath) noexcept = 0;
441 
447  virtual ResultValue<FSDKError, IWarperPtr> createWarper() noexcept = 0;
448 
455 
462  virtual ResultValue<FSDKError, IAsyncContextPtr> createAsyncContext(const int8_t threadCount) noexcept = 0;
463 
471  virtual FaceEngineEdition getFaceEngineEdition() const noexcept = 0;
472 
477  virtual void setDataDirectory(const char* path) noexcept = 0;
478 
484  virtual const char* getDataDirectory() const noexcept = 0;
485 
490  virtual void setSettingsProvider(ISettingsProvider* provider) noexcept = 0;
491 
496  virtual void setRuntimeSettingsProvider(ISettingsProvider* provider) noexcept = 0;
497 
502  virtual ISettingsProvider* getSettingsProvider() const noexcept = 0;
503 
508  virtual ISettingsProvider* getRuntimeSettingsProvider() const noexcept = 0;
509 
514  virtual ILicense* getLicense() const noexcept = 0;
515  };
516 
523  FSDK_API Result<FSDKError> activateLicense(ILicense* license, const char* configPath) noexcept;
524 
532 
545  const char* dataPath = nullptr,
546  const char* configPath = nullptr,
547  const char* runtimePath = nullptr) noexcept;
548 
554  FSDK_API ResultValue<FSDKError, ISettingsProviderPtr> createSettingsProvider(const char* path) noexcept;
555 
558 }
virtual ResultValue< FSDKError, IHeadWearEstimatorPtr > createHeadWearEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates HeadWear estimator.
virtual ResultValue< FSDKError, IWarperPtr > createWarper() noexcept=0
Creates warper.
virtual ResultValue< FSDKError, IHumanDetectorPtr > createHumanDetector(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates a human detector.
virtual ResultValue< FSDKError, IPortraitStyleEstimatorPtr > createPortraitStyleEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates PortraitStyle estimator.
virtual ResultValue< FSDKError, IHeadAndShouldersLivenessEstimatorPtr > createHeadAndShouldersLivenessEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates HeadAndShouldersLiveness estimator.
virtual ResultValue< FSDKError, IAGSEstimatorPtr > createAGSEstimator(const LaunchOptions *options=nullptr) noexcept=0
Creates AGS estimator.
virtual ResultValue< FSDKError, IFacialHairEstimatorPtr > createFacialHairEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates FacialHair estimator.
virtual ResultValue< FSDKError, ILivenessDepthEstimatorPtr > createDepthEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Liveness Depth estimator.
#define FSDK_API
Dummy.
Definition: Def.h:27
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
LaunchOptions struct configures inference options on per-estimator/detector basis, giving user fine grained control over cpu/gpu utilisation.
Definition: LaunchOptions.h:34
virtual ResultValue< FSDKError, IFishEyeEstimatorPtr > createFishEyeEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates FishEye estimator.
Default detector cpecified in config file.
Definition: IDetector.h:45
Image and landmarks warping.
A structure that encapsulates an action result enumeration.
Definition: Result.h:29
virtual ResultValue< FSDKError, IHeadPoseEstimatorPtr > createHeadPoseEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Head pose estimator.
virtual ResultValue< FSDKError, IDescriptorBatchPtr > createDescriptorBatch(int32_t size, uint32_t version=0) noexcept=0
Creates Batch of descriptors.
virtual ResultValue< FSDKError, ILivenessFlyingFacesEstimatorPtr > createLivenessFlyingFacesEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates LivenessFlyingFaces estimator.
virtual ResultValue< FSDKError, ICredibilityCheckEstimatorPtr > createCredibilityCheckEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates CredibilityCheck estimator.
virtual ResultValue< FSDKError, IRedEyeEstimatorPtr > createRedEyeEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Red Eye estimator.
virtual ResultValue< FSDKError, IMouthEstimatorPtr > createMouthEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Mouth estimator.
virtual ResultValue< FSDKError, ILivenessOneShotRGBEstimatorPtr > createLivenessOneShotRGBEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Liveness OneShot estimator.
virtual ISettingsProvider * getSettingsProvider() const noexcept=0
Gets settings provider.
Image warping base on Human detection.
virtual ResultValue< FSDKError, IEyeBrowEstimatorPtr > createEyeBrowEstimator(const LaunchOptions *LaunchOptions=nullptr) noexcept=0
Creates EyeBrow estimator .
virtual ResultValue< FSDKError, IPPEEstimatorPtr > createPPEEstimator(const LaunchOptions *LaunchOptions=nullptr) noexcept=0
Creates Personal Protection Equipment (PPE) estimator.
virtual ResultValue< FSDKError, IHumanWarperPtr > createHumanWarper() noexcept=0
Creates human warper.
FSDK_API Result< FSDKError > activateLicense(ILicense *license, const char *configPath) noexcept
Makes License activation with some platform specific manner. Network connection is required...
Object system types and interfaces.
virtual ResultValue< FSDKError, IDescriptorMatcherPtr > createMatcher(uint32_t version=0) noexcept=0
Creates descriptor matcher.
License objects interface.
Definition: ILicense.h:38
virtual ResultValue< FSDKError, IGlassesEstimatorPtr > createGlassesEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Glasses estimator.
virtual ResultValue< FSDKError, IBestShotQualityEstimatorPtr > createBestShotQualityEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates BestShotQuality estimator.
virtual ILicense * getLicense() const noexcept=0
Get current License object, which was set for FaceEngine object.
virtual void setSettingsProvider(ISettingsProvider *provider) noexcept=0
Sets settings provider.
Root LUNA SDK object interface.
Definition: IFaceEngine.h:62
Base strong reference counted object interface.
Definition: IRefCounted.h:36
virtual ResultValue< FSDKError, IIndexBuilderPtr > createIndexBuilder(const size_t capacity=0, uint32_t version=0) noexcept=0
Creates index builder.
SDK version information routines.
Log interfaces.
Image analysis and attribute estimation interfaces.
FSDK_API ResultValue< FSDKError, IFaceEnginePtr > createFaceEngine(const char *dataPath=nullptr, const char *configPath=nullptr, const char *runtimePath=nullptr) noexcept
Create the LUNA SDK root object.
SensorType
Sensor type structure. Determines which type of camera sensor is used to perform face recognition...
Definition: IDetector.h:30
virtual ResultValue< FSDKError, IDescriptorExtractorPtr > createExtractor(uint32_t version=0, const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates descriptor extractor.
Descriptor extractor and matcher interfaces.
virtual ResultValue< FSDKError, ILivenessRGBMEstimatorPtr > createLivenessRGBMEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Liveness RGBM estimator.
virtual ResultValue< FSDKError, IGazeEstimatorPtr > createGazeEstimator(SensorType mode=SensorType::Visible, const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Gaze estimator.
virtual ResultValue< FSDKError, IDescriptorPtr > createDescriptor(uint32_t version=0) noexcept=0
Creates Descriptor.
virtual ISettingsProvider * getRuntimeSettingsProvider() const noexcept=0
Gets runtime settings provider.
virtual ResultValue< FSDKError, IOverlapEstimatorPtr > createOverlapEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Overlap estimator.
virtual ResultValue< FSDKError, IDenseIndexPtr > loadDenseIndex(const char *indexPath) noexcept=0
Loads dense index.
virtual ResultValue< FSDKError, ILivenessFPREstimatorPtr > createLivenessFPREstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates LivenessFPR estimator.
Addon for Result to output some value aside the result. Specialization for copiable types...
Definition: ResultValue.h:25
Face detector interfaces.
Visible sensor type.
virtual ResultValue< FSDKError, IDetectorPtr > createDetector(ObjectDetectorClassType type=FACE_DET_DEFAULT, SensorType mode=SensorType::Visible, const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates a detector of given type.
virtual ResultValue< FSDKError, IEmotionsEstimatorPtr > createEmotionsEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Emotions estimator.
virtual ResultValue< FSDKError, ILivenessFlowEstimatorPtr > createFaceFlowEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Liveness flow estimator.
Async context interface.
virtual ResultValue< FSDKError, IDynamicIndexPtr > loadDynamicIndex(const char *indexPath) noexcept=0
Loads dynamic index.
virtual ResultValue< FSDKError, INaturalLightEstimatorPtr > createNaturalLightEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates NaturalLight estimator.
virtual void setRuntimeSettingsProvider(ISettingsProvider *provider) noexcept=0
Sets runtime settings provider.
virtual ResultValue< FSDKError, IQualityEstimatorPtr > createQualityEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Quality estimator.
virtual ResultValue< FSDKError, IMedicalMaskEstimatorPtr > createMedicalMaskEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates MedicalMask estimator.
virtual const char * getDataDirectory() const noexcept=0
Gets data directory.
virtual ResultValue< FSDKError, IEyeEstimatorPtr > createEyeEstimator(SensorType mode=SensorType::Visible, const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Eye estimator.
virtual ResultValue< FSDKError, IAsyncContextPtr > createAsyncContext(const int8_t threadCount) noexcept=0
Creates async context.
ObjectDetectorClassType
Object detector type enumeration.
Definition: IDetector.h:44
Archive interface.
Definition: IObject.h:37
virtual FaceEngineEdition getFaceEngineEdition() const noexcept=0
Get LUNA SDK ditribution edition.
FSDKError
Common SDK error codes.
Definition: FSDKError.h:17
virtual ResultValue< FSDKError, IBackgroundEstimatorPtr > createBackgroundEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Background estimator.
virtual ResultValue< FSDKError, ILivenessIREstimatorPtr > createIREstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Liveness Infrared estimator.
Settings provider interface.
FSDK_API ResultValue< FSDKError, ISettingsProviderPtr > createSettingsProvider(const char *path) noexcept
Create a settings provider.
virtual ResultValue< FSDKError, IBlackWhiteEstimatorPtr > createBlackWhiteEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates BlackWhite estimator.
virtual void setDataDirectory(const char *path) noexcept=0
Sets data directory.
virtual ResultValue< FSDKError, IChildEstimatorPtr > createChildEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Child estimator.
virtual ResultValue< FSDKError, IAttributeEstimatorPtr > createAttributeEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Attribute estimator.
virtual ResultValue< FSDKError, IHumanAttributeEstimatorPtr > createHumanAttributeEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates HumanAttribute estimator.
SDK settings provider interface.
Definition: ISettingsProvider.h:32