[EXAMPLE PROJECT] SnapML: Face Mask Classification and SegmentationFeatured
As you know in Lens Studio 3.0 we’ve released SnapML, which allows you to extend Lens Studio capabilities using machine learning models!
You can find several templates within Lens Studio that show you the usage of different types of ML model. You can also get more models in the Model Zoo, as well as in the ML Templates Library!
I wanted to share with you today a face mask classification and segmentation model that you can use in your next project!
Download the Face Mask Classification and Segmentation Template
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 ;)
Can you provide python notebook and dataset so we can understand how you did it?
Great Example Project - Here are my 3 experiments https://support.lensstudio.snapchat.com/hc/en-us/community/posts/360071825391-3-New-Lenses-that-use-the-Face-Mask-Classification-and-Segmentation-Example