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.
Works with Unity Cloud Build
ChromeOS support
iOS & Android support
Windows10 UWP support
WebGL support
Win & Mac & Linux Standalone support
Preview support 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
- CatDetectionExample
Advanced Examples(require OpenCV for Unity):
- Texture2DToMatExample
- WebCamTextureToMatHelperExample
- VideoCaptureExample
- ARHeadExample
- VideoCaptureARHeadExample
- FrameOptimizationExample
ExampleCode using Dlib FaceLandmark Detector is available.
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 11.0 or later
More Info >>
Release Notes:
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 namespase 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-assined 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.
[Commo]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