Face Engine SDK  5.27.0
A face detection, recognition and tracking engine.
IFaceEngine.h
1 
8 #pragma once
9 
32 #include <fsdk/Log.h>
33 #include <fsdk/Version.h>
34 #include <fsdk/MemoryTrim.h>
35 #include <fsdk/IObject.h>
36 #include <fsdk/ISettingsProvider.h>
37 #include <fsdk/IEstimator.h>
38 #include <fsdk/IDetector.h>
39 #include <fsdk/IFaceLandmarksDetector.h>
40 #include <fsdk/IHeadDetector.h>
41 #include <fsdk/IDescriptor.h>
42 #include <fsdk/IWarper.h>
43 #include <fsdk/IImageTransfer.h>
44 #include <fsdk/IHumanDetector.h>
45 #include <fsdk/IHumanFaceDetector.h>
46 #include <fsdk/IHumanWarper.h>
47 #include <fsdk/IIndex.h>
48 #include <fsdk/IAsyncContext.h>
49 #include <fsdk/ILicense.h>
50 #include <fsdk/LaunchOptions.h>
51 #include <fsdk/Exception.h>
52 #include <fsdk/Types/FaceEngineEdition.h>
53 
55 namespace fsdk {
56 
57 #ifndef DOXYGEN_SHOULD_SKIP_THIS
58  DECLARE_SMARTPTR(IFaceEngine);
59 #endif
60 
71 
83  const LaunchOptions* launchOptions = nullptr) noexcept = 0;
84 
92  createHeadDetector(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
93 
103  const LaunchOptions* launchOptions = nullptr) noexcept = 0;
104 
105 
107  createOrientationEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
108 
116  createHumanDetector(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
117 
125  createHumanFaceDetector(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
126 
134  createHeadPoseEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
135 
143  createOverlapEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
144 
152  createAGSEstimator(const LaunchOptions* options = nullptr) noexcept = 0;
153 
161  createAttributeEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
162 
170  createHumanAttributeEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
171 
179  createQualityEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
180 
188  createBlackWhiteEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
189 
197  createDepthEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
198 
206  createDepthLivenessEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
207 
215  createLivenessDepthRGBEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
216 
224  createIREstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
225 
233  createLivenessOneShotRGBEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
234 
242  createMouthEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
243 
251  createMedicalMaskEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
252 
260  createLivenessFlyingFacesEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
261 
269  createLivenessFPREstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
270 
279  createLivenessRGBMEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
280 
290  const LaunchOptions* launchOptions = nullptr) noexcept = 0;
291 
299  createEmotionsEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
300 
310  const LaunchOptions* launchOptions = nullptr) noexcept = 0;
311 
319  createGlassesEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
320 
328  createFaceOcclusionEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
329 
337  createBestShotQualityEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
338 
346  createCredibilityCheckEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
347 
355  createHeadWearEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
356 
364  createFacialHairEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
365 
373  createFishEyeEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
374 
382  createNaturalLightEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
383 
391  createPPEEstimator(const LaunchOptions* LaunchOptions = nullptr) noexcept = 0;
392 
400  createPortraitStyleEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
401 
409  createDynamicRangeEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
410 
418  createBackgroundEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
419 
427  createRedEyeEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
428 
436  createEyeBrowEstimator(const LaunchOptions* LaunchOptions = nullptr) noexcept = 0;
437 
439  createEthnicityEstimator(const LaunchOptions* launchOptions = nullptr) noexcept = 0;
440 
450  const LaunchOptions* LaunchOptions = nullptr) noexcept = 0;
451 
452 
464  const experimental::DeepFakeMode mode = experimental::DeepFakeMode::Default,
465  const LaunchOptions* launchOptions = nullptr) noexcept = 0;
466 
475  const NIRLivenessMode mode = NIRLivenessMode::Default,
476  const LaunchOptions* launchOptions = nullptr) noexcept = 0;
477 
485  createFightsEstimator(const LaunchOptions* LaunchOptions = nullptr) noexcept = 0;
486 
495  virtual ResultValue<FSDKError, IDescriptorPtr> createDescriptor(uint32_t version = 0) noexcept = 0;
496 
505  createDescriptor(IArchive* archive, uint32_t flags = 0) noexcept = 0;
506 
518  createDescriptorBatch(int32_t size, uint32_t version = 0) noexcept = 0;
519 
531  createExtractor(uint32_t version = 0, const LaunchOptions* launchOptions = nullptr) noexcept = 0;
532 
542  virtual ResultValue<FSDKError, IDescriptorMatcherPtr> createMatcher(uint32_t version = 0) noexcept = 0;
543 
552  createIndexBuilder(const size_t capacity = 0, uint32_t version = 0) noexcept = 0;
553 
561  virtual ResultValue<FSDKError, IDenseIndexPtr> loadDenseIndex(const char* indexPath) noexcept = 0;
562 
570  virtual ResultValue<FSDKError, IDynamicIndexPtr> loadDynamicIndex(const char* indexPath) noexcept = 0;
571 
577  virtual ResultValue<FSDKError, IWarperPtr> createWarper() noexcept = 0;
578 
585 
593  createImageTransfer(const LaunchOptions* LaunchOptions = nullptr) noexcept = 0;
594 
602  createAsyncContext(const int8_t threadCount) noexcept = 0;
603 
611  virtual FaceEngineEdition getFaceEngineEdition() const noexcept = 0;
612 
617  virtual void setDataDirectory(const char* path) noexcept = 0;
618 
624  virtual const char* getDataDirectory() const noexcept = 0;
625 
630  virtual void setSettingsProvider(ISettingsProvider* provider) noexcept = 0;
631 
636  virtual void setRuntimeSettingsProvider(ISettingsProvider* provider) noexcept = 0;
637 
642  virtual ISettingsProvider* getSettingsProvider() const noexcept = 0;
643 
648  virtual ISettingsProvider* getRuntimeSettingsProvider() const noexcept = 0;
649 
654  virtual ILicense* getLicense() const noexcept = 0;
655  };
656 
665  FSDK_API Result<FSDKError> activateLicense(ILicense* license, const char* configPath) noexcept;
666 
676 
689  const char* dataPath = nullptr,
690  const char* configPath = nullptr,
691  const char* runtimePath = nullptr) noexcept;
692 
698  FSDK_API ResultValue<FSDKError, ISettingsProviderPtr> createSettingsProvider(const char* path) noexcept;
699 
706  FSDK_API ResultValue<FSDKError, ISettingsProviderPtr>
707  createSettingsProviderFromString(const char* content) noexcept;
708 
709 
712 } // namespace fsdk
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, experimental::IDeepFakeEstimatorPtr > createDeepFakeEstimator(const experimental::DeepFakeMode mode=experimental::DeepFakeMode::Default, const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates DeepFake estimator. The current implementation is experimental, and does not support backward...
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:56
SDK namespace.
Definition: IAGSEstimator.h:8
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:37
Image and landmarks warping.
virtual ResultValue< FSDKError, IDynamicRangeEstimatorPtr > createDynamicRangeEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates DynamicRange estimator.
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
virtual ResultValue< FSDKError, IHeadPoseEstimatorPtr > createHeadPoseEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Head pose estimator.
DeepFakeMode
DeepFake estimation mode. Currently, available values for selecting estimation scenario are: Default...
Definition: IDeepFakeEstimator.h:28
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, IFaceLandmarksDetectorPtr > createFaceLandmarksDetector(SensorType mode=SensorType::Visible, const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates a face landmark detector.
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.
virtual ResultValue< FSDKError, ILivenessDepthRGBEstimatorPtr > createLivenessDepthRGBEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Liveness Depth+RGB estimator.
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, ICrowdEstimatorPtr > createCrowdEstimator(fsdk::CrowdEstimatorType type=fsdk::CrowdEstimatorType::CET_DEFAULT, const LaunchOptions *LaunchOptions=nullptr) noexcept=0
Creates Crowd estimator.
virtual ResultValue< FSDKError, IHumanWarperPtr > createHumanWarper() noexcept=0
Creates human warper.
Object system types and interfaces.
virtual ResultValue< FSDKError, IDescriptorMatcherPtr > createMatcher(uint32_t version=0) noexcept=0
Creates descriptor matcher.
FSDK_API Result< FSDKError > activateLicense(ILicense *license, const char *configPath) noexcept
Makes License activation with some platform specific manner. Network connection is required...
NIRLivenessMode
NIRLiveness estimation mode. Currently, available values to select the estimation mode are: Default...
Definition: INIRLivenessEstimator.h:23
License objects interface.
Definition: ILicense.h:47
virtual ResultValue< FSDKError, IGlassesEstimatorPtr > createGlassesEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Glasses estimator.
virtual ResultValue< FSDKError, IFaceOcclusionEstimatorPtr > createFaceOcclusionEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates FaceOcclusion estimator.
virtual ResultValue< FSDKError, IDepthLivenessEstimatorPtr > createDepthLivenessEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates universal DepthLiveness estimator.
FSDK_API ResultValue< FSDKError, ISettingsProviderPtr > createSettingsProviderFromString(const char *content) noexcept
Creates a settings provider from the xml-formatted string.
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:70
Base strong reference counted object interface.
Definition: IRefCounted.h:37
Default type which is specified in config file.
Definition: ICrowdEstimator.h:27
virtual ResultValue< FSDKError, IHumanFaceDetectorPtr > createHumanFaceDetector(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates a HumanFace detector, which detects humans, faces and associations between them...
virtual ResultValue< FSDKError, IFightsEstimatorPtr > createFightsEstimator(const LaunchOptions *LaunchOptions=nullptr) noexcept=0
Creates FightsEstimator estimator.
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: SensorType.h:9
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, IHeadDetectorPtr > createHeadDetector(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates a head detector.
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:21
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 a given type.
virtual ResultValue< FSDKError, IEmotionsEstimatorPtr > createEmotionsEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Emotions 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:36
Archive interface.
Definition: IObject.h:38
virtual ResultValue< FSDKError, INIRLivenessEstimatorPtr > createNIRLivenessEstimator(const NIRLivenessMode mode=NIRLivenessMode::Default, const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates NIRLiveness estimator.
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.
virtual ResultValue< FSDKError, IImageTransferPtr > createImageTransfer(const LaunchOptions *LaunchOptions=nullptr) noexcept=0
Creates Image transfer facility.
FSDK_API ResultValue< FSDKError, ISettingsProviderPtr > createSettingsProvider(const char *path) noexcept
Creates 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, IAttributeEstimatorPtr > createAttributeEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates Attribute estimator.
CrowdEstimatorType
CrowdEstimator type enumeration.
Definition: ICrowdEstimator.h:26
virtual ResultValue< FSDKError, IHumanAttributeEstimatorPtr > createHumanAttributeEstimator(const LaunchOptions *launchOptions=nullptr) noexcept=0
Creates HumanAttribute estimator.
SDK settings provider interface.
Definition: ISettingsProvider.h:32