Is there any option to choose body index for garment segmentation?

Hello, Snap community!
I'm trying to make simple 2d projection on user's garment,
but I want to project different textures for each user,
That's why I need two separate garment segmentation masks for each body.
Currently, full garment segmentation doesn't have option to choose body index,
are there any ways to separate those masks?
(I've tried fullbody tracking in combination with garmet segmentation, it has artifacts of body tracking...)
Thank you!

Answers

  • Bakari Mustafa
    Bakari Mustafa Posts: 178 🔥🔥🔥

    Hi Oleksandr,

    It is currently not possible to use the garment segmentation feature in Lens Studio to obtain separate masks for different bodies in the scene. The garment segmentation feature is designed to identify and segment garments on the entire body, rather than individual bodies.

    If you want to project different textures on different bodies in the scene, one possibility you could consider is using the body tracking feature to identify and track the individual bodies, and then using the depth map generated by the device's camera to separate the bodies and project the textures onto them.

    To use the depth map for this purpose, you can use the "Depth" output of the Depth component in your scene to get a grayscale image that represents the distance of each pixel from the camera. You can then use this image to separate the bodies in the scene based on their depth and use this information to project the appropriate texture onto each body.