FaceMask Unity sample displays different masks on a face created with a 3D mesh of a face (see Anthropometric points). In this sample, 4 standard face masks and one dynamic mask are available, in which images are selected depending on your emotions:
An example of running FaceMasks.apk: the displayed mask depends on the emotion
The pre-built demo is available for Android 64-bit and Windows 64-bit in the assets to the release.
- Download the FaceMask.apk file from the releases page and install it on your device (only 64-bit architecture is supported).
- Launch the FaceMask application.
- Allow the application to access photos, media and files on the device, as well as take photos and videos.
- Unpack the windows_x86_64.zip archive. This application is located in the directory
- Add the path to the
binfolder to the
- Run the
- At the bottom of the screen you can choose one of the standard masks or a dynamic mask (the last one in the list).
- In a dynamic mask, the image depends on your emotions. You can change the set of masks for different emotions: to do this, click on the dynamic mask icon and then click on the emotion icon (NEUTRAL/HAPPY/ANGRY/SURPRISE) to select a mask.
- To change the used device camera, click on the camera icon at the top of the screen.
To change the sample settings, click on the arrow at the bottom of the screen. The following options are available:
- Opacity - the degree of transparency of the mask. Available values: from 0 to 1
- Motion smoothing. Available values: from 0 to 1
- Resolution. Available values: depends on the device used