Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
cjwbw /semantic-segment-anything:b2691db5
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run cjwbw/semantic-segment-anything using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"cjwbw/semantic-segment-anything:b2691db53f2d96add0051a4a98e7a3861bd21bf5972031119d344d956d2f8256",
{
input: {
image: "https://replicate.delivery/pbxt/IeDnGiu4B0bmC0inKg8fdyuYXyp6PQJj6rUETYfeSZwOHZeG/sa_10014318.jpg",
output_json: false
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run cjwbw/semantic-segment-anything using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"cjwbw/semantic-segment-anything:b2691db53f2d96add0051a4a98e7a3861bd21bf5972031119d344d956d2f8256",
input={
"image": "https://replicate.delivery/pbxt/IeDnGiu4B0bmC0inKg8fdyuYXyp6PQJj6rUETYfeSZwOHZeG/sa_10014318.jpg",
"output_json": False
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run cjwbw/semantic-segment-anything using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "b2691db53f2d96add0051a4a98e7a3861bd21bf5972031119d344d956d2f8256",
"input": {
"image": "https://replicate.delivery/pbxt/IeDnGiu4B0bmC0inKg8fdyuYXyp6PQJj6rUETYfeSZwOHZeG/sa_10014318.jpg",
"output_json": false
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2023-04-14T01:41:06.778399Z",
"created_at": "2023-04-14T01:39:45.243117Z",
"data_removed": false,
"error": null,
"id": "nugo6fqkjbfvhioofwk2ysghaa",
"input": {
"image": "https://replicate.delivery/pbxt/IeDnGiu4B0bmC0inKg8fdyuYXyp6PQJj6rUETYfeSZwOHZeG/sa_10014318.jpg",
"output_json": false
},
"logs": null,
"metrics": {
"predict_time": 81.375152,
"total_time": 81.535282
},
"output": {
"img_out": "https://replicate.delivery/pbxt/y4Jeg4LSkdRTP6EKPmlyg3xc0CmGhvVzvLBtCbz5rfqyEmxQA/seg_out.png",
"json_out": null
},
"started_at": "2023-04-14T01:39:45.403247Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/nugo6fqkjbfvhioofwk2ysghaa",
"cancel": "https://api.replicate.com/v1/predictions/nugo6fqkjbfvhioofwk2ysghaa/cancel"
},
"version": "b2691db53f2d96add0051a4a98e7a3861bd21bf5972031119d344d956d2f8256"
}