typefile
{
"box_nms_thresh": 0.7,
"crop_n_points_downscale_factor": 1,
"crop_nms_thresh": 0.7,
"crop_overlap_ratio": 0.3413333333333333,
"image": "https://replicate.delivery/pbxt/Iiuk5Wbn4LZgOckuDhVt7xYItEs46K1hBW8DTETFYUte27Aa/Screen%20Shot%202022-10-11%20at%2010.38.29%20PM.png",
"mask_limit": -1,
"points_per_side": 32,
"pred_iou_thresh": 0.88,
"stability_score_offset": 1,
"stability_score_thresh": 0.95
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_bfR**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run yyjim/segment-anything-everything using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"yyjim/segment-anything-everything:b28e02c3844df2c44dcb2cb96ba2496435681bf88878e3bd0ab6b401a971d79e",
{
input: {
box_nms_thresh: 0.7,
crop_n_points_downscale_factor: 1,
crop_nms_thresh: 0.7,
crop_overlap_ratio: 0.3413333333333333,
image: "https://replicate.delivery/pbxt/Iiuk5Wbn4LZgOckuDhVt7xYItEs46K1hBW8DTETFYUte27Aa/Screen%20Shot%202022-10-11%20at%2010.38.29%20PM.png",
mask_limit: -1,
points_per_side: 32,
pred_iou_thresh: 0.88,
stability_score_offset: 1,
stability_score_thresh: 0.95
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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=r8_bfR**********************************
This is your API token. Keep it to yourself.
import replicate
Run yyjim/segment-anything-everything using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"yyjim/segment-anything-everything:b28e02c3844df2c44dcb2cb96ba2496435681bf88878e3bd0ab6b401a971d79e",
input={
"box_nms_thresh": 0.7,
"crop_n_points_downscale_factor": 1,
"crop_nms_thresh": 0.7,
"crop_overlap_ratio": 0.3413333333333333,
"image": "https://replicate.delivery/pbxt/Iiuk5Wbn4LZgOckuDhVt7xYItEs46K1hBW8DTETFYUte27Aa/Screen%20Shot%202022-10-11%20at%2010.38.29%20PM.png",
"mask_limit": -1,
"points_per_side": 32,
"pred_iou_thresh": 0.88,
"stability_score_offset": 1,
"stability_score_thresh": 0.95
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_bfR**********************************
This is your API token. Keep it to yourself.
Run yyjim/segment-anything-everything 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": "yyjim/segment-anything-everything:b28e02c3844df2c44dcb2cb96ba2496435681bf88878e3bd0ab6b401a971d79e",
"input": {
"box_nms_thresh": 0.7,
"crop_n_points_downscale_factor": 1,
"crop_nms_thresh": 0.7,
"crop_overlap_ratio": 0.3413333333333333,
"image": "https://replicate.delivery/pbxt/Iiuk5Wbn4LZgOckuDhVt7xYItEs46K1hBW8DTETFYUte27Aa/Screen%20Shot%202022-10-11%20at%2010.38.29%20PM.png",
"mask_limit": -1,
"points_per_side": 32,
"pred_iou_thresh": 0.88,
"stability_score_offset": 1,
"stability_score_thresh": 0.95
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "6t2wm6ejmfannd2g4sr2hlugsi",
"model": "yyjim/segment-anything-everything",
"version": "b28e02c3844df2c44dcb2cb96ba2496435681bf88878e3bd0ab6b401a971d79e",
"input": {
"box_nms_thresh": 0.7,
"crop_n_points_downscale_factor": 1,
"crop_nms_thresh": 0.7,
"crop_overlap_ratio": 0.3413333333333333,
"image": "https://replicate.delivery/pbxt/Iiuk5Wbn4LZgOckuDhVt7xYItEs46K1hBW8DTETFYUte27Aa/Screen%20Shot%202022-10-11%20at%2010.38.29%20PM.png",
"mask_limit": -1,
"points_per_side": 32,
"pred_iou_thresh": 0.88,
"stability_score_offset": 1,
"stability_score_thresh": 0.95
},
"logs": "",
"output": [
"https://replicate.delivery/pbxt/kNBeEULfYVok90fHR3ihTWBY24psx4lICaphEmyRs8HKP7rhA/mask_0.png",
"https://replicate.delivery/pbxt/1jkyQa0HDQ7LLF7exMoqVrzaSers8svx0XpepTyoXiqMP7rhA/mask_1.png",
"https://replicate.delivery/pbxt/HXZAE9kQcrKiDV5HvECt8YbrafMUoYmf1siOYV1fYpFMP7rhA/mask_2.png",
"https://replicate.delivery/pbxt/uKbPjMhtYhJJG5BKha6I1Q9iCpt9vf8eWzZ9snLMDEgmn91QA/mask_3.png",
"https://replicate.delivery/pbxt/lUbreFem5xtfQpelSyP4cEQfYBPE7DvHGCa7cIfEi9Nk5ZfaIA/mask_4.png",
"https://replicate.delivery/pbxt/yAhKrgRwSA7pNdSbxixNUbLanVfmDS05G55XbplkeG8mn91QA/mask_5.png",
"https://replicate.delivery/pbxt/iuPi6FhzdCoUNlJ1hcgjOkcB9ReEpMveh2HevjysZWLNP7rhA/mask_6.png",
"https://replicate.delivery/pbxt/oumtfv0yJh0nB6uY5W7v9D1Vpa2ZbPSFsPmTZTYBQTozze1QA/mask_7.png",
"https://replicate.delivery/pbxt/JxUdu1bO8W4iINcy7eqCGI0zCaaOK5IMfdcOgpiYkAknn91QA/mask_8.png",
"https://replicate.delivery/pbxt/REP4Bdke25QeO0u6ftdvNIglI273RhFrAy9dWSJQXuXOP7rhA/mask_9.png",
"https://replicate.delivery/pbxt/yrESwvd8PAIcJdwyErlM6ClnO0H4l8OLDULRrfjdwfKnn91QA/mask_10.png",
"https://replicate.delivery/pbxt/3EszyRkv6bYqBVxhjfl0lEFC0anPWKWfNuGShul5JafPP7rhA/mask_11.png",
"https://replicate.delivery/pbxt/U8OQTmvUmsrWM1tMtl5SsyXcV8rgWPEpN1Ar5gfGsv0zze1QA/mask_12.png",
"https://replicate.delivery/pbxt/CaeAy7KuQ3QjECFtctbcv0MKG46U6fR4BrJ9gTU6UPXnn91QA/mask_13.png",
"https://replicate.delivery/pbxt/yMrcOQ5iANL1NBpfORZeXuhahf2slQNR3x1lkYBsWH3RP7rhA/mask_14.png",
"https://replicate.delivery/pbxt/lFOvHeqEprxPJqkeBemvT1NsfQHoAZzcIqdzKCXnTNigesvGC/mask_15.png",
"https://replicate.delivery/pbxt/XLVT5QdzWObUNxQHbMOxv3EZjNgz30TkMtabCkPINXM6ZfaIA/mask_16.png",
"https://replicate.delivery/pbxt/auQrEPStTyYUCNygqpWAvPnNseQWc4f7lCT7x8o9dexQP7rhA/mask_17.png",
"https://replicate.delivery/pbxt/fItmBgY9x028WiLfsXVDf0tiyxgTORqzqoKFud9Bp9pQP7rhA/mask_18.png",
"https://replicate.delivery/pbxt/NAVDobojpWIvBJAfDfS1tdnWXEVYB4balfjv4WbZJ67QP7rhA/mask_19.png",
"https://replicate.delivery/pbxt/jN4RJ7qo2IaGOhzAscwNEBCslQFXIV9fTPoaDBTUSwX0ze1QA/mask_20.png",
"https://replicate.delivery/pbxt/2r7e1HbMIQRmDCWW9dr2efMWFsotEzoOTTn7iDmBNJxRP7rhA/mask_21.png",
"https://replicate.delivery/pbxt/EQP8KDNVRLbbNll3kqSVcuzd2jzSaiBVze175j6W8u40ze1QA/mask_22.png",
"https://replicate.delivery/pbxt/9xTDNAW5bzIfRaTG5YmBuKmKW0Fmsy1uGmPJYHP62ay0ze1QA/mask_23.png",
"https://replicate.delivery/pbxt/x0koufQXAkyQSqDF8CqKkZ4wEFjOQM8MSsxlwiumequpn91QA/mask_24.png",
"https://replicate.delivery/pbxt/CmbGfHSFgVzMLyUbdhPvi5eBdAJKGEie7tk5bJkr4A2SP7rhA/mask_25.png",
"https://replicate.delivery/pbxt/DXNTN3FZLko1PZeoBYp924tBn7iXyM7gVBHSJVCL6lr0ze1QA/mask_26.png",
"https://replicate.delivery/pbxt/t5KvZJOhUy63LRPwkgG6MRpT1OF5TgRgBvAasxWIrzb6ZfaIA/mask_27.png",
"https://replicate.delivery/pbxt/LKr6hfwcuhVDQCB1IiH1bi2riepXWV2i5djhvW8Dju8pn91QA/mask_28.png",
"https://replicate.delivery/pbxt/NQGBSfYy0ARmeE4PwdRow9GvBFdivIpenxs4fvrj1tlresvGC/mask_29.png",
"https://replicate.delivery/pbxt/uNiFvBeioR1JLS4u382X4RiLD1uPcYqJNNzuoIcm6gJ1ze1QA/mask_30.png",
"https://replicate.delivery/pbxt/nAfBHFhSiHX4EyuWQdUUNxkfXTQbOnif3ivajEONZiVUP7rhA/mask_31.png",
"https://replicate.delivery/pbxt/UICFLCw7kLZoN9cAdFsaxeGvyDs8BniAU4nL1zycuou1ze1QA/mask_32.png",
"https://replicate.delivery/pbxt/4vIg1SmApxbUJN2t3ZcgfTIz8WZfugfchI56hjkaS0VWP7rhA/masked_0.png",
"https://replicate.delivery/pbxt/lGMC0Y4cBCbHDBsnUAm6tycFjyecmip7umIKCaMPuis1ze1QA/masked_1.png",
"https://replicate.delivery/pbxt/SaAyhYSQwXILNp0W7dFADCN6fcqeqxVg3F4ELHo7b3Csn91QA/masked_2.png",
"https://replicate.delivery/pbxt/T7gjPh6bXCZYD1dxWLEyBjbLDCPeeWUOTTnM6tQ7jfSbP7rhA/masked_3.png",
"https://replicate.delivery/pbxt/l8u90hz3gfRPVijGfKMNDZfs6iZQQo1v2WyNqz0yr3e3esvGC/masked_4.png",
"https://replicate.delivery/pbxt/52Sx61jUkiaSJZHXvKWqezqMaKJ0tVf4CrJeX3GoNjtdP7rhA/masked_5.png",
"https://replicate.delivery/pbxt/0oVsiH72o54UPJ6UjmDeNRn7T3fMOfOagM4IvpmslXJeesvGC/masked_6.png",
"https://replicate.delivery/pbxt/ypD7jtbHItrkItxN7qT7gWbmy1Qm4USHWYP5MRTdYS77ZfaIA/masked_7.png",
"https://replicate.delivery/pbxt/xVf1uQZzDJXzNiVaKhnp1eefRAdx8sFQSp8uI2UFBT5CfsvGC/masked_8.png",
"https://replicate.delivery/pbxt/vfpe2I0nssrP9EZj3apq5fCNziLAXqPnzS5v4Yx0PoaiP7rhA/masked_9.png",
"https://replicate.delivery/pbxt/BruHgwUSIn6lCN24hjdouczfNYaXSJPVc1uFeaRdcy1xn91QA/masked_10.png",
"https://replicate.delivery/pbxt/gClhqGwoCdrMCluvjotD1eneLx5yhNFesJaPDdSW8FfIfsvGC/masked_11.png",
"https://replicate.delivery/pbxt/gaNgK5dpae04Ca9K0MdsaOydIjwJPxz9HM5PJQCkgwfzn91QA/masked_12.png",
"https://replicate.delivery/pbxt/XJP0Luoal87QP5KhjXz2fcaA5B93kkP7xMgYG1nAXe90n91QA/masked_13.png",
"https://replicate.delivery/pbxt/lJ7b0yVW6GbIK5mPcpETCLlK9xwKn4FM9yXTkZmfGfb0n91QA/masked_14.png",
"https://replicate.delivery/pbxt/AztcKAEzYWJwF5aCENcZQnkpFwRojkmOr2IOlpbvTvT9ZfaIA/masked_15.png",
"https://replicate.delivery/pbxt/n9faZAOfJmoXkUZqcmXUjL2iWDu6KqCpcJIpZbNfm3eYfsvGC/masked_16.png",
"https://replicate.delivery/pbxt/xvVNBvJplL7aPdzkoCn2G7StG39HIBaqyXeeCeEJId8tP7rhA/masked_17.png",
"https://replicate.delivery/pbxt/QNFDLbSx0ew1AKA1cnJQxA9gb1Dfgwf8eVDj5d5ftm9e9ZfaIA/masked_18.png",
"https://replicate.delivery/pbxt/wQRIqnqCeTUbfEVf9AsmQTbReoGFHxf9OaychGljajPBfZfaIA/masked_19.png",
"https://replicate.delivery/pbxt/fB1XOeH9uvo6VEnef5xDwGfjRThftmLGO7ND5T8QSw4Feze1QA/masked_20.png",
"https://replicate.delivery/pbxt/GygWDyZmQZ7IIBfHFNfE2yro2c1ihT8k0ymcDx5ks4B5n91QA/masked_21.png",
"https://replicate.delivery/pbxt/KnDCopFiEZYoAJS4QxQtveHRZomgsYfgikMlistUTqP6n91QA/masked_22.png",
"https://replicate.delivery/pbxt/zvAtIMdDDrIXJtgmLTTGjLsejwqDV6eqoR0ic3HPaos6n91QA/masked_23.png",
"https://replicate.delivery/pbxt/PVpLuwH78F7VE51fXf11JZLwtiHABebmd82uJcN1RF82P7rhA/masked_24.png",
"https://replicate.delivery/pbxt/bbMuO8eqPVStA6xJ6i5xeJRMmbhWCywNhCN8FCgoRLR8n91QA/masked_25.png",
"https://replicate.delivery/pbxt/ff7vv8OuoVrjfIDyfwGDbl21NNkCbtnVtsao1p1BvVozfsvGC/masked_26.png",
"https://replicate.delivery/pbxt/ctefj5jufYVXioJVVEfZe2ZKPFhRfJpdTOeU8oWpDedp9n91QA/masked_27.png",
"https://replicate.delivery/pbxt/nzz1HCrcK0KCJ1pae0i1vQpNlTNMeCoZKWn7ftUjjSi8P7rhA/masked_28.png",
"https://replicate.delivery/pbxt/K9JL1cKRGkqmMppnCy77UA0ebChoBOfOCW5pJbd4BnsfP7rhA/masked_29.png",
"https://replicate.delivery/pbxt/uxJP0dce0jT3FCAts5swbvVnzrGfR3EPDxZzje3Zv0wffsvGC/masked_30.png",
"https://replicate.delivery/pbxt/86sCbofgX4UcICVUhseUWTSvhJvu2YjfO9w3fjQsetfFAafaIA/masked_31.png",
"https://replicate.delivery/pbxt/IDREqsXV4rb9KFtjNT1JtsHrOx0VrNajk7CskTbSUQTAafaIA/masked_32.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-04-27T07:43:46.69147Z",
"started_at": "2023-04-27T07:44:24.883103Z",
"completed_at": "2023-04-27T07:45:05.802379Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/6t2wm6ejmfannd2g4sr2hlugsi/cancel",
"get": "https://api.replicate.com/v1/predictions/6t2wm6ejmfannd2g4sr2hlugsi"
},
"metrics": {
"predict_time": 40.919276,
"total_time": 79.110909
}
}

































































