input image
image size
Default: 1280
iou threshold for filtering the annotations
Default: 0.45
threshold for detection
Default: 0.6
show_conf
Default: true
show_text
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/sec_detect using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/sec_detect:624142fab1995881995e5d0502e669436c3f0266076f74ffda25929a8aca2dc3", { input: { iou: 0.45, image: "https://replicate.delivery/pbxt/JV6Hf1o3UjfjXbBXVEBnsSehCpM4Jc3foqx7HQRHXExB2pdj/screenshot-20230910-083933.png", imgsz: 1280, show_conf: true, show_text: true, threshold: 0.6 } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "hilongjw/sec_detect:624142fab1995881995e5d0502e669436c3f0266076f74ffda25929a8aca2dc3", input={ "iou": 0.45, "image": "https://replicate.delivery/pbxt/JV6Hf1o3UjfjXbBXVEBnsSehCpM4Jc3foqx7HQRHXExB2pdj/screenshot-20230910-083933.png", "imgsz": 1280, "show_conf": True, "show_text": True, "threshold": 0.6 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "hilongjw/sec_detect:624142fab1995881995e5d0502e669436c3f0266076f74ffda25929a8aca2dc3", "input": { "iou": 0.45, "image": "https://replicate.delivery/pbxt/JV6Hf1o3UjfjXbBXVEBnsSehCpM4Jc3foqx7HQRHXExB2pdj/screenshot-20230910-083933.png", "imgsz": 1280, "show_conf": true, "show_text": true, "threshold": 0.6 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{ "completed_at": "2023-09-10T01:00:47.096828Z", "created_at": "2023-09-10T01:00:45.301575Z", "data_removed": false, "error": null, "id": "ne7xpebbqyyy6zosucw5ygai7a", "input": { "iou": 0.45, "image": "https://replicate.delivery/pbxt/JV6Hf1o3UjfjXbBXVEBnsSehCpM4Jc3foqx7HQRHXExB2pdj/screenshot-20230910-083933.png", "imgsz": 1280, "show_conf": true, "show_text": true, "threshold": 0.6 }, "logs": "image /tmp/tmpolktnjo4screenshot-20230910-083933.png\nimg_path /tmp/tmpolktnjo4screenshot-20230910-083933.png\n0: 640x640 Section 0.71, SectionGradient 0.21, SectionImage 0.08, 63.6ms\nSpeed: 8.0ms preprocess, 63.6ms inference, 0.3ms postprocess per image at shape (1, 3, 640, 640)", "metrics": { "predict_time": 1.812001, "total_time": 1.795253 }, "output": "https://replicate.delivery/pbxt/xCAJS4fJA1UADKRg4eG7Vv9wWwmOTLMqCzF02elfVvw7zxKGB/output_tmpolktnjo4screenshot-20230910-083933.png", "started_at": "2023-09-10T01:00:45.284827Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ne7xpebbqyyy6zosucw5ygai7a", "cancel": "https://api.replicate.com/v1/predictions/ne7xpebbqyyy6zosucw5ygai7a/cancel" }, "version": "624142fab1995881995e5d0502e669436c3f0266076f74ffda25929a8aca2dc3" }
image /tmp/tmpolktnjo4screenshot-20230910-083933.png img_path /tmp/tmpolktnjo4screenshot-20230910-083933.png 0: 640x640 Section 0.71, SectionGradient 0.21, SectionImage 0.08, 63.6ms Speed: 8.0ms preprocess, 63.6ms inference, 0.3ms postprocess per image at shape (1, 3, 640, 640)
View more examples
This model runs on Nvidia T4 GPU hardware. We don't yet have enough runs of this model to provide performance information.
This model doesn't have a readme.
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
Choose a file from your machine
Hint: you can also drag files onto the input