A python interface to LUNA product.
We implemented only interface to LUNA C++ SDK. It is face detection and recognition library.
The main dependencies are Luna SDK library and FaceEnginePythonBindings. If these dependencies are installed add to PATH a path to FaceEngineSDK.dll or FaceEngineSDK.so.
You can install this package several path:
-
install from github:
pip install git+https://github.com/VisionLabs/lunasdk.git
We get a path to folder with neural network models and path to a FaceEngine configuration file from environment variable FSDK_ROOT ({FSDK_ROOT}/data, {FSDK_ROOT}/data/faceengine.conf) by default. You can also specify these paths within VLFaceEngine initialization.
Attributes estimation example:
>>> from lunavl.sdk.luna_faces import VLFaceDetector
>>> from lunavl.sdk.luna_faces import VLImage
>>> detector = VLFaceDetector()
>>> image = VLImage.load(url='https://upload.wikimedia.org/wikipedia/commons/d/d3/Albert_Einstein_Head.jpg')
>>> detection = detector.detectOne(image)
>>> detection.basicAttributes.age
16.0
>>> detection.emotions.predominateEmotion.name
'Happiness'