Landing AI
Florence-2 Sam2 Image

A tool that can segment multiple objects given a text prompt such as category names or referring expressions. The categories in the text prompt are separated by commas. It returns a list of bounding boxes, label names, mask file names and associated probability scores of 1.0.

Input

Find windows and doors from a photo

Output

python
import requests url = "https://api.landing.ai/v1/tools/florence2-sam2" files = { "image": open("{{path_to_image}}", "rb") } data = { "prompts": [ "{{prompt1}}", "{{prompt2}}" ], "function_name": "florence2_sam2_image" } response = requests.post(url, files=files, data=data) print(response.json())