Parameters
ImageInput
required
RGB image as file path, URL, PIL Image, or numpy array.
str
required
Text description of objects to detect.
float | None
Optional confidence threshold (0.0-1.0) for filtering detections.
float | None
Optional timeout in seconds for the HTTP request.
Returns
Dictionary with keys:- “boxes”: List of bounding boxes as [x1, y1, x2, y2] coordinates
- “scores”: List of confidence scores (0.0-1.0)
- “labels”: List of label indices
Example
Tips
- Prompt with period-separated object phrases, e.g.
"car. person. traffic light". box_thresholddefaults to0.2.
Example Output
