devarsh-mavani-19/sam3
Public
3
runs
Run devarsh-mavani-19/sam3 with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
| Field | Type | Default value | Description |
|---|---|---|---|
| image |
string
|
Input image to segment.
|
|
| text_prompt |
string
|
object
|
Text description of the object(s) to segment (e.g. "yellow school bus", "person wearing red").
|
| box_prompt |
string
|
Optional: bounding box as JSON [x1, y1, x2, y2] in pixel coordinates. Example: "[100, 200, 400, 500]".
|
|
| confidence_threshold |
number
|
0.5
Max: 1 |
Minimum confidence score to include a mask in output.
|
| mask_opacity |
number
|
0.5
Max: 1 |
Opacity of the mask overlay on the visualization.
|
| mask_color |
None
|
green
|
Color of the mask overlay.
|
| output_format |
None
|
png
|
'png' returns annotated image; 'json' returns masks, boxes, and scores.
|
{
"type": "object",
"title": "Input",
"required": [
"image"
],
"properties": {
"image": {
"type": "string",
"title": "Image",
"format": "uri",
"x-order": 0,
"description": "Input image to segment."
},
"box_prompt": {
"type": "string",
"title": "Box Prompt",
"x-order": 2,
"nullable": true,
"description": "Optional: bounding box as JSON [x1, y1, x2, y2] in pixel coordinates. Example: \"[100, 200, 400, 500]\"."
},
"mask_color": {
"enum": [
"green",
"red",
"blue",
"yellow",
"cyan",
"magenta"
],
"type": "string",
"title": "mask_color",
"description": "Color of the mask overlay.",
"default": "green",
"x-order": 5
},
"text_prompt": {
"type": "string",
"title": "Text Prompt",
"default": "object",
"x-order": 1,
"description": "Text description of the object(s) to segment (e.g. \"yellow school bus\", \"person wearing red\")."
},
"mask_opacity": {
"type": "number",
"title": "Mask Opacity",
"default": 0.5,
"maximum": 1,
"minimum": 0,
"x-order": 4,
"description": "Opacity of the mask overlay on the visualization."
},
"output_format": {
"enum": [
"png",
"json"
],
"type": "string",
"title": "output_format",
"description": "'png' returns annotated image; 'json' returns masks, boxes, and scores.",
"default": "png",
"x-order": 6
},
"confidence_threshold": {
"type": "number",
"title": "Confidence Threshold",
"default": 0.5,
"maximum": 1,
"minimum": 0,
"x-order": 3,
"description": "Minimum confidence score to include a mask in output."
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
Schema
{
"type": "string",
"title": "Output",
"format": "uri"
}