Parameters
ImageInput
required
RGB image as file path, URL, PIL Image, or numpy array.
str
required
Text description of objects to segment.
float | None
Optional confidence threshold (0.0-1.0) for filtering detections.
float | None
Optional text confidence threshold (0.0-1.0).
float | None
Optional Non-Maximum-Suppression threshold (0.0-1.0).
float | None
Optional timeout in seconds for the HTTP request.
Returns
np.ndarray: Binary segmentation mask as numpy array (H, W) with dtype uint8. Foreground pixels are 255, background pixels are 0.Example
Example Output
