About Dlib Face Landmark Detector
Overview
https://assetstore.unity.com/packages/tools/integration/dlib-facelandmark-detector-64314
Support Platforms
Dlib FaceLandmark Detector | |
|---|---|
| Editor | ○ |
| Windows | ○ |
| Mac | ○ |
| Linux | ○ |
| Android | ○ |
| iOS | ○ |
Windows10 UWP | ○ |
WebGL | ○ |
ChromeOS | ○ |
visionOS (beta) | ○ |
Setup Guide
Setup Manual
Setup Tutorial & Demo Video
Demo Application
Android
https://github.com/EnoxSoftware/DlibFaceLandmarkDetector/releases
WebGL
https://enoxsoftware.github.io/DlibFaceLandmarkDetector/webgl_example/index.htmlWebGL(simd)
https://enoxsoftware.github.io/DlibFaceLandmarkDetector/webgl_example_simd/index.htmlWebGL(simd, threads)
https://enoxsoftware.github.io/DlibFaceLandmarkDetector/webgl_example_simd_threads/index.htmlExample Project Assets
CV VTuber Example
https://assetstore.unity.com/packages/templates/tutorials/cv-vtuber-example-118186
CVVTuberExample(Computer Vision Virtual YouTuber Example) is an example project of controlling 3D humanoid model (“Unity-chan!” Model) using WebCamTexture. You can control the head orientation and the facial expression of the 3D humanoid model using WebCamTexture only.
The execution of this asset is required “OpenCV for Unity” and “Dlib FaceLandmark Detector”.
FaceMask Example
https://assetstore.unity.com/packages/templates/tutorials/facemask-example-79999
This asset is an example project that maps face mask to the detected faces in an image using “OpenCV for Unity” and “Dlib FaceLandmark Detector”.
FAQ
General
The asset package size is large. Is there a way to reduce it?
Using the Project Size Reducer , you can easily reduce unnecessary files in the Assets/DlibFaceLandmarkDetector folder. Particularly, by removing plugin files for platforms not planned to be supported in your development project, you can significantly reduce the project size.
What is the minimum file composition required for the assets to work?
You don’t need to import all files for the asset to work. If you don’t need to try Example Scenes, the minimum file configuration required is as follows.

When running Example Scenes, “DllNotFoundException: dlibfacelandmarkdetector” appears in the console.
Plugin does not seem to be loaded correctly. Please check the setup procedure.
When running Example Scenes, “Level ‘Texture2DExample’ (-1) could not be loaded because it has not been added” appears in the console.
Please Add all of the ***.unity in the “DlibFaceLandmarkDetector” folder to Build Settings → Scenes In Build.
In Texture2DExample , red rectangle is not displayed around a face.
Please move the Assets/DlibFaceLandmarkDetector/StreamingAssets/ folder to the Assets/ folder.
The size of the “sp_human_face_68.dat” is too large.
Please use the “sp_human_face_68_for_mobile.dat”. (the “sp_human_face_68_for_mobile.dat” is less accurate than the “sp_human_face_68.dat”, but it is a smaller size.)
The index of face landmark points that can be obtained using the sp_human_face_XX.dat.



Can Shape Predictor model files be used commercially?
Since the training dataset consists of flickr CC0 licensed images, the Shape Predictor model files are available for commercial use. For details of the training data set, please refer to Assets/DlibFaceLandmarkDetector folder.
How to catch native Dlib’s errors code (CVException handling)
In order to display the native Dlib’s error code, please enclose the code in Utils.setDebugMode(true) and Utils.setDebugMode(false); For details, please see this page. (How to catch native OpenCV’s errors code (CVException handling))








