Image Models
Segment Anything

In order to deploy the model you can use the identifier below:

  • Segment Anything: segment-anything

The Segment Anything Model (SAM) produces high quality object masks from input prompts such as points or boxes, and it can be used to generate masks for all objects in an image. It has been trained on a dataset of 11 million images and 1.1 billion masks, and has strong zero-shot performance on a variety of segmentation tasks.

You can follow this example of how to call the deployed endpoint:

Request Parameters

  curl --location --request POST 'https://run.cerebrium.ai/segment-anything-webhook/predict' \
      --header 'Authorization: <API_KEY>' \
      --header 'Content-Type: application/json' \
      --data-raw '{
        "image": <BASE_64_STRING>,
        "file_url": "https://your-url.com",
        "cursor": [400,300],
        "webhook_endpoint": "https://your-url.com"
      }'
Authorizationrequired
string

This is the Cerebrium API key used to authenticate your request. You can get it from your Cerebrium dashboard.

imageoptional
string

A base64 encoded string of the image you would like to upscale.

file_urloptional
string

A publicly accessible url of a image you would like to upscale

cursorrequired
list

Two coordinates of the object on the image you would like to select

webhook_endpointoptional
string

The url endpoint you would like us to send the image results to once it has finished generating

{
    "run_id": "<UUID_STRING>",
    "message": "Successfully generated image",
    "result": [<BASE_64_STRING>]
}

Response Parameters

run_idrequired
string

A unique identifier for the run that you can use to associate prompts with webhook endpoints.

messagerequired
string

Whether of not the response was successful

resultrequired
string

An array of base64 encoded strings of the image that you can convert into an image