Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
ML Kit'in konu segmentasyonu API'si, geliştiricilerin bir resimdeki birden fazla özneyi arka plandan kolayca ayırmasına olanak tanıyarak çıkartma oluşturma, arka plan değiştirme veya öznelere havalı efektler ekleme gibi kullanım alanlarını mümkün kılar.
Özneler, görselin ön planındaki en belirgin kişiler, evcil hayvanlar veya nesneler olarak tanımlanır. 2 özne birbirine çok yakınsa veya birbirine dokunuyorsa tek bir özne olarak kabul edilir.
Konu segmentasyonu API'si, giriş görüntüsü alır ve ön plan için çıkış maskesi veya bit eşlem oluşturur. Ayrıca, algılanan öznelerin her biri için maske ve bit eşlem sağlar (ön plan, tüm öznelere eşittir).
Varsayılan olarak ön plan maskesi ve ön plan bit eşlemi, giriş resmiyle aynı boyuttadır (her bir öznenin maskesi ve bit eşleminin boyutu muhtemelen giriş resmi boyutundan farklı olacaktır). Maskenin her bir pikseline 0.0 ile 1.0 arasında aralığa sahip bir kayan sayı atanır. Sayı 1.0'e ne kadar yakın olursa pikselin bir konuyu temsil etmeyle ilgili güven o kadar yüksek olur.
Pixel 7 Pro'da ölçülen gecikme ortalama olarak 200 ms'dir. Bu API şu anda yalnızca statik resimleri desteklemektedir.
[null,null,["Son güncelleme tarihi: 2025-07-25 UTC."],[[["\u003cp\u003eThe 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.\u003c/p\u003e\n"],["\u003cp\u003eThis API provides individual masks and bitmaps for each detected subject, allowing for granular manipulation and effects.\u003c/p\u003e\n"],["\u003cp\u003eAll processing happens on-device, ensuring user privacy and eliminating the need for internet connectivity.\u003c/p\u003e\n"],["\u003cp\u003eThis API is currently in beta and might undergo changes that could affect backward compatibility.\u003c/p\u003e\n"]]],[],null,["# Subject Segmentation\n\n| This API is offered in beta, and is not subject to any SLA or deprecation policy. Changes may be made to this API that break backward compatibility.\n\nML Kit's subject segmentation API allows developers to easily separate multiple\nsubjects from the background in a picture, enabling use cases such as sticker\ncreation, background swap, or adding cool effects to subjects.\n\nSubjects are defined as the most prominent people, pets, or objects in the\nforeground of the image. If 2 subjects are very close or touching each other,\nthey are considered a single subject.\n\nThe subject segmentation API takes an input image and generates an output mask\nor bitmap for the foreground. It also provides a mask and bitmap for each one of\nthe subjects detected (the foreground is equal to all subjects combined).\n\nBy default, the foreground mask and foreground bitmap are the same size as the\ninput image (the size of each individual subject's mask and bitmap will likely\ndiffer from input image size). Each pixel of the mask is assigned a float number\nthat has a range between `0.0` and `1.0`. The closer the number is to `1.0`, the\nhigher the confidence that the pixel represents a subject, and vice versa.\n\nOn average the latency measured on Pixel 7 Pro is around 200 ms. This API\ncurrently only supports static images.\n\n[Android](/ml-kit/vision/subject-segmentation/android)\n\n### Key capabilities\n\n- **Multi-subject segmentation:** provides masks and bitmaps for each individual subject, rather than a single mask and bitmap for all subjects combined.\n- **Subject recognition:** subjects recognized are objects, pets, and humans.\n- **On-device processing:** all processing is performed on the device, preserving user privacy and requiring no network connectivity.\n\n### Example results\n\n| Input Image | Output Image + Mask |\n|-------------|---------------------|\n| | |\n| | |\n| | |"]]