typefile
{
"conf": 0.3,
"input_image": "https://replicate.delivery/pbxt/ICdjEO98ocfguIXmE3CwKmSQCcloEdurvNLRW6fiffJuQTFA/1.jpg",
"model_name": "yolox-s",
"nms": 0.3,
"tsize": 640
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_5Ij**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run daanelson/yolox using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"daanelson/yolox:377452881deb2ecb723223682b70f159d15abd15baa36bd08f621d2aa5aba260",
{
input: {
conf: 0.3,
input_image: "https://replicate.delivery/pbxt/ICdjEO98ocfguIXmE3CwKmSQCcloEdurvNLRW6fiffJuQTFA/1.jpg",
model_name: "yolox-s",
nms: 0.3,
tsize: 640
}
}
);
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=r8_5Ij**********************************
This is your API token. Keep it to yourself.
import replicate
Run daanelson/yolox using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"daanelson/yolox:377452881deb2ecb723223682b70f159d15abd15baa36bd08f621d2aa5aba260",
input={
"conf": 0.3,
"input_image": "https://replicate.delivery/pbxt/ICdjEO98ocfguIXmE3CwKmSQCcloEdurvNLRW6fiffJuQTFA/1.jpg",
"model_name": "yolox-s",
"nms": 0.3,
"tsize": 640
}
)
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=r8_5Ij**********************************
This is your API token. Keep it to yourself.
Run daanelson/yolox 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": "daanelson/yolox:377452881deb2ecb723223682b70f159d15abd15baa36bd08f621d2aa5aba260",
"input": {
"conf": 0.3,
"input_image": "https://replicate.delivery/pbxt/ICdjEO98ocfguIXmE3CwKmSQCcloEdurvNLRW6fiffJuQTFA/1.jpg",
"model_name": "yolox-s",
"nms": 0.3,
"tsize": 640
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Object output with 1 properties
{
"id": "kawxfc72uzgyngvgcj62pcm2ty",
"model": "daanelson/yolox",
"version": "377452881deb2ecb723223682b70f159d15abd15baa36bd08f621d2aa5aba260",
"input": {
"conf": 0.3,
"input_image": "https://replicate.delivery/pbxt/ICdjEO98ocfguIXmE3CwKmSQCcloEdurvNLRW6fiffJuQTFA/1.jpg",
"model_name": "yolox-s",
"nms": 0.3,
"tsize": 640
},
"logs": "2023-01-26 08:46:49.356 | INFO | tools.demo:inference:165 - Infer time: 1.4221s",
"output": {
"img": "https://replicate.delivery/pbxt/ZeRmjaFp1HS8aiY7C7GRegCNlVLSviAtYmE6NCY1cpB5f9vgA/outputs.png"
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-01-26T08:45:17.81136Z",
"started_at": "2023-01-26T08:46:45.31687Z",
"completed_at": "2023-01-26T08:46:50.106137Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/kawxfc72uzgyngvgcj62pcm2ty/cancel",
"get": "https://api.replicate.com/v1/predictions/kawxfc72uzgyngvgcj62pcm2ty"
},
"metrics": {
"predict_time": 4.789267,
"total_time": 92.294777
}
}
