zedge/sam3-image
Public
21.9K
runs
Run zedge/sam3-image 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 file
|
|
| prompt |
string
|
person
|
Text prompt for segmentation
|
| threshold |
number
|
0.5
Max: 1 |
Confidence threshold for object detection
|
| save_overlay |
boolean
|
False
|
If True, includes the overlay image in the ZIP file
|
| mask_only |
boolean
|
False
|
If True, returns a black-and-white mask image instead of an overlay on the original image
|
| return_zip |
boolean
|
True
|
If True, returns a ZIP file containing individual masks as PNGs
|
| mask_opacity |
number
|
0.5
Max: 1 |
Opacity of the mask overlay (0.0 to 1.0)
|
| mask_color |
string
|
green
|
Color of the mask overlay. Options: 'green', 'red', 'blue', 'yellow', 'cyan', 'magenta'
|
| warm_delay |
integer
|
Parameter for warming the model. If set, returns nothing after the specified number of seconds
|
{
"type": "object",
"title": "Input",
"properties": {
"image": {
"type": "string",
"title": "Image",
"format": "uri",
"x-order": 0,
"description": "Input image file"
},
"prompt": {
"type": "string",
"title": "Prompt",
"default": "person",
"x-order": 1,
"description": "Text prompt for segmentation"
},
"mask_only": {
"type": "boolean",
"title": "Mask Only",
"default": false,
"x-order": 4,
"description": "If True, returns a black-and-white mask image instead of an overlay on the original image"
},
"threshold": {
"type": "number",
"title": "Threshold",
"default": 0.5,
"maximum": 1,
"minimum": 0,
"x-order": 2,
"description": "Confidence threshold for object detection"
},
"mask_color": {
"type": "string",
"title": "Mask Color",
"default": "green",
"x-order": 7,
"description": "Color of the mask overlay. Options: 'green', 'red', 'blue', 'yellow', 'cyan', 'magenta'"
},
"return_zip": {
"type": "boolean",
"title": "Return Zip",
"default": true,
"x-order": 5,
"description": "If True, returns a ZIP file containing individual masks as PNGs"
},
"warm_delay": {
"type": "integer",
"title": "Warm Delay",
"x-order": 8,
"description": "Parameter for warming the model. If set, returns nothing after the specified number of seconds"
},
"mask_opacity": {
"type": "number",
"title": "Mask Opacity",
"default": 0.5,
"maximum": 1,
"minimum": 0,
"x-order": 6,
"description": "Opacity of the mask overlay (0.0 to 1.0)"
},
"save_overlay": {
"type": "boolean",
"title": "Save Overlay",
"default": false,
"x-order": 3,
"description": "If True, includes the overlay image in the ZIP file"
}
}
}
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"
}