Skip to main content
POST
/
models
/
v2
/
sayeed99
/
segformer-b3-fashion
image-segmentation
curl --request POST \
  --url https://api.bytez.com/models/v2/sayeed99/segformer-b3-fashion \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://www.padoniavets.com/sites/default/files/field/image/cats-and-dogs.jpg",
  "base64": "data:image/jpg;base64,...BASE_64_GOES_HERE (Only use this is you are not using a url)"
}
'
{
  "error": "<string>",
  "output": [
    {
      "label": "unlabelled",
      "score": null,
      "mask_png": "iVBORw0KGgoAAAANSUhEUgAAAn8AAAHgCAAAAADx/"
    },
    {
      "label": "top, t-shirt, sweatshirt",
      "score": null,
      "mask_png": "iVBORw0KGgoAAAANSUhEUgAAAn8AAAHgCAAAAADx/"
    },
    {
      "label": "sleeve",
      "score": null,
      "mask_png": "iVBORw0KGgoAAAANSUhEUgAAAn8AAAHgCAAAAADx/"
    }
  ]
}

Authorizations

Authorization
string
header
required

Set Authorization header to BYTEZ_KEY 'Authorization: YOUR_BYTEZ_KEY_HERE'

Body

application/json

Schema for image-segmentation models

url
string
required
Example:

"https://www.padoniavets.com/sites/default/files/field/image/cats-and-dogs.jpg"

base64
string
Example:

"data:image/jpg;base64,...BASE_64_GOES_HERE (Only use this is you are not using a url)"

Response

Successful image-segmentation response.

error
string | null
required

Null on success; otherwise an error message.

output
object
required

Successful response with segmentation results (URL to the result)

Example:
[
{
"label": "unlabelled",
"score": null,
"mask_png": "iVBORw0KGgoAAAANSUhEUgAAAn8AAAHgCAAAAADx/"
},
{
"label": "top, t-shirt, sweatshirt",
"score": null,
"mask_png": "iVBORw0KGgoAAAANSUhEUgAAAn8AAAHgCAAAAADx/"
},
{
"label": "sleeve",
"score": null,
"mask_png": "iVBORw0KGgoAAAANSUhEUgAAAn8AAAHgCAAAAADx/"
}
]