typefile
{
"input_image": "https://replicate.delivery/mgxm/cf21baaf-55c3-49dd-a5e9-c723eaac5fd5/ILSVRC2012_val_00023440.JPEG",
"iou_thresholds": "0.0, 0.1",
"output_format": "Final-probs-plot"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_PN9**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run winycg/anchor_net using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"winycg/anchor_net:8f850419498ecd6b579114a857d0cf759f43eb7bd4d49393ef1e049f330d08f3",
{
input: {
input_image: "https://replicate.delivery/mgxm/cf21baaf-55c3-49dd-a5e9-c723eaac5fd5/ILSVRC2012_val_00023440.JPEG",
iou_thresholds: "0.0, 0.1",
output_format: "Final-probs-plot"
}
}
);
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_PN9**********************************
This is your API token. Keep it to yourself.
import replicate
Run winycg/anchor_net using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"winycg/anchor_net:8f850419498ecd6b579114a857d0cf759f43eb7bd4d49393ef1e049f330d08f3",
input={
"input_image": "https://replicate.delivery/mgxm/cf21baaf-55c3-49dd-a5e9-c723eaac5fd5/ILSVRC2012_val_00023440.JPEG",
"iou_thresholds": "0.0, 0.1",
"output_format": "Final-probs-plot"
}
)
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_PN9**********************************
This is your API token. Keep it to yourself.
Run winycg/anchor_net 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": "winycg/anchor_net:8f850419498ecd6b579114a857d0cf759f43eb7bd4d49393ef1e049f330d08f3",
"input": {
"input_image": "https://replicate.delivery/mgxm/cf21baaf-55c3-49dd-a5e9-c723eaac5fd5/ILSVRC2012_val_00023440.JPEG",
"iou_thresholds": "0.0, 0.1",
"output_format": "Final-probs-plot"
}
}' \
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": "6rgi7rfwxbfxlgewur526m6dcm",
"model": "winycg/anchor_net",
"version": "8f850419498ecd6b579114a857d0cf759f43eb7bd4d49393ef1e049f330d08f3",
"input": {
"input_image": "https://replicate.delivery/mgxm/cf21baaf-55c3-49dd-a5e9-c723eaac5fd5/ILSVRC2012_val_00023440.JPEG",
"iou_thresholds": "0.0, 0.1",
"output_format": "Final-probs-plot"
},
"logs": "/root/.pyenv/versions/3.8.13/lib/python3.8/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.)\n return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)",
"output": {
"plot": "https://replicate.delivery/mgxm/2960d3dc-96b6-4e40-8098-fb4b48dfd886/output.png"
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2022-06-23T06:52:25.052396Z",
"started_at": "2022-06-23T06:53:38.734094Z",
"completed_at": "2022-06-23T06:53:38.734096Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/6rgi7rfwxbfxlgewur526m6dcm/cancel",
"get": "https://api.replicate.com/v1/predictions/6rgi7rfwxbfxlgewur526m6dcm"
},
"metrics": {
"predict_time": 0.000002,
"total_time": 73.6817
}
}