As you know in Lens Studio 3.0 we’ve released SnapML, which allows you to extend Lens Studio capabilities using machine learning models!
I wanted to share with you today a face mask classification and segmentation model that you can use in your next project!
This template allows you to
- Trigger effects depending on whether the user is wearing or not wearing a facemask
- Provides a segmentation texture that segments where the face mask is
This template is actually based on the Classification Template! So if you’ve used it before, it should feel very familiar. Take a look at the Classification Template guide to learn more about how you can set up your triggers.
The template comes with several examples that you can reference to see how you can trigger effects. Take a look at the following objects: AnimatedBackground, MaskIndicator,ToggleObjectHelper, and how they are hooked up to the Face Mask Controller object.
To segment texture to the Face Mask, you can use the mask ML Proxy Texture as an Opacity Texture in your material. Take a look at the mask-wavy and pattern-image object to see an example!
Tip: See the Segmentation guide to see how else you can use opacity textures
Looking forward to see your creations with the mask template! Don't forget to share with us your work on the forum ;)
Please sign in to leave a comment.