Stay organized with collections
Save and categorize content based on your preferences.
ML Kit's subject segmentation API allows developers to easily separate multiple
subjects from the background in a picture, enabling use cases such as sticker
creation, background swap, or adding cool effects to subjects.
Subjects are defined as the most prominent people, pets, or objects in the
foreground of the image. If 2 subjects are very close or touching each other,
they are considered a single subject.
The subject segmentation API takes an input image and generates an output mask
or bitmap for the foreground. It also provides a mask and bitmap for each one of
the subjects detected (the foreground is equal to all subjects combined).
By default, the foreground mask and foreground bitmap are the same size as the
input image (the size of each individual subject's mask and bitmap will likely
differ from input image size). Each pixel of the mask is assigned a float number
that has a range between 0.0 and 1.0. The closer the number is to 1.0, the
higher the confidence that the pixel represents a subject, and vice versa.
On average the latency measured on Pixel 7 Pro is around 200 ms. This API
currently only supports static images.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["The ML Kit subject segmentation API enables developers to isolate subjects (people, pets, objects) from the background in images for various applications like sticker creation and background replacement."],["This API provides individual masks and bitmaps for each detected subject, allowing for granular manipulation and effects."],["All processing happens on-device, ensuring user privacy and eliminating the need for internet connectivity."],["This API is currently in beta and might undergo changes that could affect backward compatibility."]]],[]]