Skip to content

Files

16 lines (13 loc) · 6.03 KB

bodygensegmentanything2.md

File metadata and controls

16 lines (13 loc) · 6.03 KB

BodyGenSegmentAnything2

Fields

Field Type Required Description
image components.BodyGenSegmentAnything2Image ✔️ Image to segment.
model_id Optional[str] Hugging Face model ID used for image generation.
point_coords Optional[str] Nx2 array of point prompts to the model, where each point is in (X,Y) in pixels.
point_labels Optional[str] Labels for the point prompts, where 1 indicates a foreground point and 0 indicates a background point.
box Optional[str] A length 4 array given as a box prompt to the model, in XYXY format.
mask_input Optional[str] A low-resolution mask input to the model, typically from a previous prediction iteration, with the form 1xHxW (H=W=256 for SAM).
multimask_output Optional[bool] If true, the model will return three masks for ambiguous input prompts, often producing better masks than a single prediction.
return_logits Optional[bool] If true, returns un-thresholded mask logits instead of a binary mask.
normalize_coords Optional[bool] If true, the point coordinates will be normalized to the range [0,1], with point_coords expected to be with respect to image dimensions.