Dlib FaceLandmark Detector
https://assetstore.unity.com/packages/tools/integration/dlib-facelandmark-detector-64314
https://www.youtube.com/watch?v=pwm66AC7lFk
Requires Unity2021.3.35f1 or higher.
iOS & Android & Windows10 UWP support
Win & Mac & Linux Standalone support
WebGL support
ChromeOS support
visionOS support(beta)
Support for preview in the Editor
DlibFaceLandmarkDetector can ObjectDetection and ShapePrediction using Dlib19.7 C++ Library.
Official Site | ExmpleCode | Android Demo WebGL Demo | Tutorial & Demo Video | Forum | API Reference
Features:
-
You can detect frontal human faces and face landmark (68 points, 17points, 6points) in Texture2D, WebCamTexture and Image byte array. In addition, You can detect a different objects by changing trained data file.
-
ObjectDetector is made using the now classic Histogram of Oriented Gradients (HOG) feature combined with a linear classifier, an image pyramid, and sliding window detection scheme. You can train your own detector in addition to human faces detector. If you want to train your own detector, please refer to this page.
-
ShapePredictor is created by using dlibâs implementation of the paper (One Millisecond Face Alignment with an Ensemble of Regression Trees by Vahid Kazemi and Josephine Sullivan, CVPR 2014). You can train your own models in addition to human face landmark model using dlibâs machine learning tools. If you want to train your own models, please refer to this page.
-
Advanced samples using âOpenCV for Unityâ are Included. (The execution of this samples are required âOpenCV for Unityâ.)
-
By utilizing the VisualScripting With DlibFaceLandmarkDetector Example, you can leverage all the methods available in DlibFaceLandmarkDetector within the Unityâs Visual Scripting development environment..VisualScripting With DlibFaceLandmarkDetector Example (GitHub)
Examples:
- Texture2DExample
- WebCamTextureExample
- Benchmark Example
Advanced Examples(require OpenCV for Unity):
- Texture2DToMatExample
- WebCamTextureToMatHelperExample
- VideoCaptureExample
- AR Head WebCamTexture Example
- AR Head VideoCapture Example
- Frame Optimization Example
- NoiseFilter WebCamTexture Example
- NoiseFilter VideoCapture Example
ExampleCode using Dlib FaceLandmark Detector is available.
- FaceMask Example
- CVVTuberExample
- HoloLens with Dlib FaceLandmarkDetector Example
- VisualScriptingWithDlibFaceLandmarkDetectorExample
DlibFaceLandmarkDetector uses Dlib under Boost Software License ; see Third-Party Notices.txt file in package for details.
The Shape Predictor model files included with this asset are available for commercial use.
System Requirements:
Build Win Standalone & Preview Editor : Windows8 or later
Build Mac Standalone & Preview Editor : OSX 10.13 or later
Build Linux Standalone & Preview Editor : Ubuntu18.04 or later
Build Android : API level 21 or later
Build iOS : iOS Version 12.0 or later
Build VisionOS : visionOS 1 or later (beta)
Release Notes:
2.0.0
[Common] Updated FpsMonitor to version 1.0.4.
[visionOS] Updated beta support for the VisionOS platform on Unity 2022.3.18f1 and later.
[Android] Updated native library libdlibfacelandmarkdetector.so for Android to be compatible with 16KB page size.
[Common] Removed CatDetectionExample.
[Common] Changed namespace of the Utils class from UnityUtils to UnityIntegration, split into function-specific classes, and marked old classes as deprecated.
[Common] Changed moved the OpenCVForUnityUtils class bundled with DlibFaceLandmarkDetectorWithOpenCVExample to the main Dlib module as DlibOpenCVUtils.
[Common] Changed return types of DetectValueTuple and DetectLandmark to List.
[Common] Changed removed the Extra folder.
[Common] Changed increased the resolution of video files used for examples.
[Common] Added overloads of GetDetectResult and GetDetectLandmarkResult methods that accept Span.
[Common] Added overloads of the DrawFaceLandmark method that support ReadOnlySpan, ReadOnlySpan, and ReadOnlySpan.
[Common] Added IsDebugMode and IsThrowException methods to DlibDebug.
[Common] Added GetFilePathCoroutine, GetFilePathAsync, and GetFilePathTaskAsync methods to DlibEnv.
1.4.2
[Common] Changed the FpsMonitor display system from IMGUI to uGUI.
[Common] Added support for the new Input System (UnityEngine.InputSystem).
1.4.1
[Common] Added method overloads in DlibFaceLandmarkDetector class that use ValueTuples.
[Common] Add method overloads in OpenCVForUnityUtils class that use structs and ValueTuples corresponding to the data formats of OpenCV base classes. Accordingly, the minimum required version of OpenCVForUnity is now 2.6.4.
[Common] Added Utils.getFilePathAsyncTask() and Utils.getMultipleFilePathsAsyncTask() methods. It is an asynchronous Task return version of the existing Utils.getFilePathsAsync() method. It can be seamlessly integrated with other asynchronous code.
[iOS] Fixed an issue where AddToEmbeddedBinaries was processed redundantly with each incremental build.
1.4.0
[Common] Changed the minimum supported version to Unity2021.3.35f1.
[Common] Separated the examples using the Built-in Render Pipeline and Scriptable Render Pipeline.
1.3.9
[iOS] Added separate plugin files for iOS for devices and simulators.
[WebGL] Added plugin files with only simd enabled.
1.3.8
[Common] Changed to use unsafe code by default.
[Common] Optimized the amount of memory allocation, in the FaceLandmarkDetector class.
1.3.7
[Common] Changed the minimum supported version to Unity2020.3.48f1.
[WebGL] Added support for âWebAssembly 2023â.
[iOS] Changed âTarget minimum iOS Versionâ to 11.0.
1.3.6
[WebGL] Added a plugin file with threads and simd enabled for the WebGL platform. This update removes support for the WebGL platform in Unity 2021.1 and below. (Select MenuItem[Tools/Dlib FaceLandmark Detector/Open Setup Tools/WebGL Settings])
1.3.5
[Windows] Added Support for ARM64.
[WebGL] Added Unity2023.2 or later support.
[Lumin] Removed Lumin platform support (for MagicLeapOne).
[Common] Add a button to SetupTools to automatically add scenes under the âExamplesâ folder to âScenes In Buildâ.
1.3.4
[Common] Changed the setup procedure to use the SetupToolsWindow.
[Common] Change the namespace under âDlibFaceLandmarkDetector/Editorâ folder from âDlibFaceLandmarkDetectorâ to âDlibFaceLandmarkDetector.Editorâ.
[Common] Added âDlibFaceLandmarkDetectorâ folder under âStreamingAssetsâ folder.
[Common] Added function to automatically move the StreamingAssets folder.
[WebGL] Added Unity2022.2 or later support.
1.3.3
[Android] Added Support for ChromeOS (x86 and x86_64 architectures).
1.3.2
[Common] Added Assembly Definitions.
1.3.1
[Common] Fixed a small issue.
1.3.0
[UWP] Added ARM64 Architecture.
1.2.9
[Common] Added optimization code using NativeArray class. (require PlayerSettings.allowUnsafeCode flag, âDLIB_USE_UNSAFE_CODEâ ScriptingDefineSymbol and Unity2018.2 or later.)
[Common] Added support for Unicode file path (objectDetectorFilePath and shapePredictorFilePath).
[Common] Added ImageOptimizationHelper to ARHeadWebCamTextureExample.
[Common] Added some converter methods to OpenCVForUnityUtils.cs.
1.2.8
[Lumin] Added the code for MagicLeap.
1.2.7
[WebGL] Added Unity2019.1 or later support.
1.2.6
[Common] Added âsp_human_face_17.datâ, âsp_human_face_17_mobile.datâ and âsp_human_face_6.datâ.
[Common] Changed the training dataset of Shape Predictor model. Since the training dataset consists of Flickr CC0 licensed images, the Shape Predictor model files are available for commercial use.
[Common] Added BenchmarkExample.
1.2.5
[Common] Re-assigned namespace.
[Common] Support for OpenCVforUnity2.3.3 or later.
1.2.4
[macOS] Removed 32bit architecture (i386) from dlibfacelandmarkdetector.bundle.
1.2.3
[Android,UWP] Fixed Utils.setDebugMode() method on the IL2CPP backend.
1.2.2
[iOS] Added a function to automatically remove the simulator architecture(i386,x86_64) at build time.
[Common] Improved DlibFaceLandmarkDetectorMenuItem.setPluginImportSettings() method.
[Common] Updated to WebCamTextureToMatHelper.cs v1.0.9.
[Common] Added support for Utils.setDebugMode() method on all platforms.
1.2.1
[Common] Updated to WebCamTextureToMatHelper.cs v1.0.8.
[Common] Updated to LowPassPointsFilter v1.0.1. Updated to KFPointsFilter v1.0.2. Updated to OFPointsFilter v1.0.2.
[Common] Added updateMipmaps and makeNoLongerReadable flag to DrawDetectResult() and DrawDetectLandmarkResult() method.
[Common] Fixed Utils.getFilePathAsync() method. (Changed #if UNITY_2017 && UNITY_2017_1_OR_NEWER to #if UNITY_2017_1_OR_NEWER.)
1.2.0
[Common] Updated to WebCamTextureToMatHelper.cs v1.0.7.
[Common] Fixed WebCamTextureExample and OpenCVForUnityUtils.cs.
[Common] Added NoiseFilterVideoCaptureExample and NoiseFilterWebCamTextureExample.
[Common] Added useLowPassFilter option to ARHeadVideoCaptureExample and ARHeadWebCamTextureExample.
[Common] Added throwException flag to Utils.setDebugMode() method.
[Common] Added drawIndexNumbers flag to DrawFaceLandmark() method.
1.1.9
[Android] Added arm64-v8a Architecture.
1.1.8
[Common] Updated WebCamTextureExample. (support Portrait ScreenOrientation)
[Common] Updated to WebCamTextureToMatHelper.cs v1.0.4.
1.1.7
[Common] Updated âhuman_face_68_sp.datâ and âhuman_face_68_sp_for_mobile.datâ.
1.1.6
[Common] Updated to dlib19.7.
[Common] Updated to WebCamTextureToMatHelper.cs v1.0.3.
[Common] Updated âhuman_face_68_sp.datâ and âhuman_face_68_sp_for_mobile.datâ.
1.1.5
[Common] Switched to the shape predictor file trained using new datasets.
1.1.4
[Common] Updated WebCamTextureToMatHelper.cs v1.0.2
[Common] Improved Utils.getFilePathAsync().
1.1.3
[Common] Fixed to improve the pose estimation performance.
[Common] Changed DetectLandmarkArray (int left, int top, int width, int height) to DetectLandmarkArray (double left, double top, double width, double height).
[WebGL] Fixed Utils.getFilePathAsync() method.
1.1.2
[Common] Updated WebCamTextureToMatHelper.cs and OptimizationWebCamTextureToMatHelper.cs (Changed several method names).
[Common] Changed the Example name.
1.1.1
[Common] Improved Utils.getFilePath() and Utils.getFilePathAsync().
1.1.0
[Win][Mac][Linux][UWP] Added the native plugin file enabled SSE4 or AVX compiler option.
1.0.9
[WebGL] Added WebGL Plugin for Unity5.6.
1.0.8
[Common] Changed the name of asset project. (âSampleâ to âExampleâ)
[Common] Fixed VideoCaptureARExample and WebCamTextureARExample.
1.0.7
[Common] Fixed WebCamTextureToMatHelper.cs. (flipVertical and flipHorizontal flag)
1.0.6
[Common] Fixed OpenCVForUnityMenuItem.cs. (No valid name for platform: 11 Error)
[Common] Added OptimizationWebCamTextureToMatHelper.cs.
1.0.5
[Common] Fixed WebCamTextureToMatHelper class.
[Common] Added Utils.getVersion().
[Common] Fixed Utils.getFilePathAsync().
1.0.4
[Common] Updated shape_predictor_68_face_landmarks_for_mobile.dat.
1.0.3
[WebGL] Added WebGL(beta) support. (Unity5.3 or later)
[Common] Fixed missing script error. (WebCamTextureToMatHelper.cs)
[Common] Added shape_predictor_68_face_landmarks_for_mobile.dat.
1.0.2
[Common] Improved WebCamTextureHelper class.
1.0.1
[Common] Added OptimizationSample.
[Common] Added DetectRectDetection() method.
1.0.0
[Common] Initial Commit.