hilongjw / fast-sam
(Updated 1 year, 11 months ago)
- Public
- 1K runs
Prediction
hilongjw/fast-sam:d4246f053bd7609777a30ef851736bd981fc12db9b2ba5834e038725ecf521bcInput
{ "image": "https://replicate.delivery/pbxt/J3vUEWFnXB7QFcxagPNQX38my2AFOpcZFJJ8WiT5FNyjsITO/5.jpg", "scale": 1.5 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:d4246f053bd7609777a30ef851736bd981fc12db9b2ba5834e038725ecf521bc", { input: { image: "https://replicate.delivery/pbxt/J3vUEWFnXB7QFcxagPNQX38my2AFOpcZFJJ8WiT5FNyjsITO/5.jpg", scale: 1.5 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:d4246f053bd7609777a30ef851736bd981fc12db9b2ba5834e038725ecf521bc", input={ "image": "https://replicate.delivery/pbxt/J3vUEWFnXB7QFcxagPNQX38my2AFOpcZFJJ8WiT5FNyjsITO/5.jpg", "scale": 1.5 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:d4246f053bd7609777a30ef851736bd981fc12db9b2ba5834e038725ecf521bc", "input": { "image": "https://replicate.delivery/pbxt/J3vUEWFnXB7QFcxagPNQX38my2AFOpcZFJJ8WiT5FNyjsITO/5.jpg", "scale": 1.5 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-25T11:39:43.111914Z", "created_at": "2023-06-25T11:39:37.830775Z", "data_removed": false, "error": null, "id": "wulnd2bbisqxsu2yymbygvw7di", "input": { "image": "https://replicate.delivery/pbxt/J3vUEWFnXB7QFcxagPNQX38my2AFOpcZFJJ8WiT5FNyjsITO/5.jpg", "scale": 1.5 }, "logs": "image <class 'cog.types.Path'> /tmp/tmp2_wo61005.jpg\npre process /tmp/tmp2_wo61005.jpg\nimage 1/1 /tmp/tmp2_wo61005.jpg: 1024x1024 6 objects, 4214.3ms\nSpeed: 6.0ms preprocess, 4214.3ms inference, 6.3ms postprocess per image at shape (1, 3, 1024, 1024)\nresults\nresult_name: tmp2_wo61005.jpg\nargs.img_path: <class 'str'> /tmp/tmp2_wo61005.jpg True\nresultPath", "metrics": { "predict_time": 4.768469, "total_time": 5.281139 }, "output": "https://replicate.delivery/pbxt/uE2NbCwAMF68AhTSeNIuahDJVp867Aq7HRhkSrp9uFWfldJRA/tmp2_wo61005.jpg", "started_at": "2023-06-25T11:39:38.343445Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/wulnd2bbisqxsu2yymbygvw7di", "cancel": "https://api.replicate.com/v1/predictions/wulnd2bbisqxsu2yymbygvw7di/cancel" }, "version": "d4246f053bd7609777a30ef851736bd981fc12db9b2ba5834e038725ecf521bc" }
Generated inimage <class 'cog.types.Path'> /tmp/tmp2_wo61005.jpg pre process /tmp/tmp2_wo61005.jpg image 1/1 /tmp/tmp2_wo61005.jpg: 1024x1024 6 objects, 4214.3ms Speed: 6.0ms preprocess, 4214.3ms inference, 6.3ms postprocess per image at shape (1, 3, 1024, 1024) results result_name: tmp2_wo61005.jpg args.img_path: <class 'str'> /tmp/tmp2_wo61005.jpg True resultPath
Prediction
hilongjw/fast-sam:14a515585dd1986ad41ddf1346fc78e19dc450fb0725c7ff039057026947eb60IDcyd2dlrboiu4l4x4bs3xkacmpqStatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4cVhqye4uOs1TpQF8hg2OtMRbl6gf3yD2LmOCfbcaEwfOJb/6.jpg", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:14a515585dd1986ad41ddf1346fc78e19dc450fb0725c7ff039057026947eb60", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4cVhqye4uOs1TpQF8hg2OtMRbl6gf3yD2LmOCfbcaEwfOJb/6.jpg", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:14a515585dd1986ad41ddf1346fc78e19dc450fb0725c7ff039057026947eb60", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4cVhqye4uOs1TpQF8hg2OtMRbl6gf3yD2LmOCfbcaEwfOJb/6.jpg", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:14a515585dd1986ad41ddf1346fc78e19dc450fb0725c7ff039057026947eb60", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4cVhqye4uOs1TpQF8hg2OtMRbl6gf3yD2LmOCfbcaEwfOJb/6.jpg", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-28T03:38:31.979835Z", "created_at": "2023-06-28T03:36:45.838999Z", "data_removed": false, "error": null, "id": "cyd2dlrboiu4l4x4bs3xkacmpq", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4cVhqye4uOs1TpQF8hg2OtMRbl6gf3yD2LmOCfbcaEwfOJb/6.jpg", "imgsz": 1024 }, "logs": "args model_path: , img_path: /tmp/tmp952bwtu56.jpg, imgsz: 1024, iou: 0.9, text_prompt: None, conf: 0.4, output: ./output/, randomcolor: True, point_prompt: [[0,0]], point_label: [0], box_prompt: [0,0,0,0], better_quality: False, device: cuda, retina: True, withContours: False mask: False crop: True\nimage 1/1 /tmp/tmp952bwtu56.jpg: 1024x576 23 objects, 118.6ms\nSpeed: 9.4ms preprocess, 118.6ms inference, 3.8ms postprocess per image at shape (1, 3, 1024, 1024)\nresult_name: tmp952bwtu56.jpg\nargs.img_path: <class 'str'> /tmp/tmp952bwtu56.jpg True", "metrics": { "predict_time": 9.473077, "total_time": 106.140836 }, "output": "https://replicate.delivery/pbxt/QLaN9o3ZkjbRNdtUDI0qqTLPKUHpdbnf4JIhpl35SFmb6KlIA/tmp952bwtu56_crop.png", "started_at": "2023-06-28T03:38:22.506758Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/cyd2dlrboiu4l4x4bs3xkacmpq", "cancel": "https://api.replicate.com/v1/predictions/cyd2dlrboiu4l4x4bs3xkacmpq/cancel" }, "version": "14a515585dd1986ad41ddf1346fc78e19dc450fb0725c7ff039057026947eb60" }
Generated inargs model_path: , img_path: /tmp/tmp952bwtu56.jpg, imgsz: 1024, iou: 0.9, text_prompt: None, conf: 0.4, output: ./output/, randomcolor: True, point_prompt: [[0,0]], point_label: [0], box_prompt: [0,0,0,0], better_quality: False, device: cuda, retina: True, withContours: False mask: False crop: True image 1/1 /tmp/tmp952bwtu56.jpg: 1024x576 23 objects, 118.6ms Speed: 9.4ms preprocess, 118.6ms inference, 3.8ms postprocess per image at shape (1, 3, 1024, 1024) result_name: tmp952bwtu56.jpg args.img_path: <class 'str'> /tmp/tmp952bwtu56.jpg True
Prediction
hilongjw/fast-sam:14a515585dd1986ad41ddf1346fc78e19dc450fb0725c7ff039057026947eb60IDjhz6olzbe7clzth2ibvoxrejfiStatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4sA9Hv5Zr6OFmk2DP3Ry0yBvo64Tp23juei23m1tiUb3bOB/13.jpg", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:14a515585dd1986ad41ddf1346fc78e19dc450fb0725c7ff039057026947eb60", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4sA9Hv5Zr6OFmk2DP3Ry0yBvo64Tp23juei23m1tiUb3bOB/13.jpg", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:14a515585dd1986ad41ddf1346fc78e19dc450fb0725c7ff039057026947eb60", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4sA9Hv5Zr6OFmk2DP3Ry0yBvo64Tp23juei23m1tiUb3bOB/13.jpg", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:14a515585dd1986ad41ddf1346fc78e19dc450fb0725c7ff039057026947eb60", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4sA9Hv5Zr6OFmk2DP3Ry0yBvo64Tp23juei23m1tiUb3bOB/13.jpg", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-28T03:39:01.136633Z", "created_at": "2023-06-28T03:38:59.678417Z", "data_removed": false, "error": null, "id": "jhz6olzbe7clzth2ibvoxrejfi", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4sA9Hv5Zr6OFmk2DP3Ry0yBvo64Tp23juei23m1tiUb3bOB/13.jpg", "imgsz": 1024 }, "logs": "args model_path: , img_path: /tmp/tmpja4x7sn313.jpg, imgsz: 1024, iou: 0.9, text_prompt: None, conf: 0.4, output: ./output/, randomcolor: True, point_prompt: [[0,0]], point_label: [0], box_prompt: [0,0,0,0], better_quality: False, device: cuda, retina: True, withContours: False mask: False crop: True\nimage 1/1 /tmp/tmpja4x7sn313.jpg: 704x1024 60 objects, 195.4ms\nSpeed: 5.2ms preprocess, 195.4ms inference, 3.5ms postprocess per image at shape (1, 3, 1024, 1024)\nresult_name: tmpja4x7sn313.jpg\nargs.img_path: <class 'str'> /tmp/tmpja4x7sn313.jpg True", "metrics": { "predict_time": 1.480853, "total_time": 1.458216 }, "output": "https://replicate.delivery/pbxt/kGILE03RSfwQEyX02E3GuGIycNeZJMrOefGFJrWDLrflquSJC/tmpja4x7sn313_crop.png", "started_at": "2023-06-28T03:38:59.655780Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/jhz6olzbe7clzth2ibvoxrejfi", "cancel": "https://api.replicate.com/v1/predictions/jhz6olzbe7clzth2ibvoxrejfi/cancel" }, "version": "14a515585dd1986ad41ddf1346fc78e19dc450fb0725c7ff039057026947eb60" }
Generated inargs model_path: , img_path: /tmp/tmpja4x7sn313.jpg, imgsz: 1024, iou: 0.9, text_prompt: None, conf: 0.4, output: ./output/, randomcolor: True, point_prompt: [[0,0]], point_label: [0], box_prompt: [0,0,0,0], better_quality: False, device: cuda, retina: True, withContours: False mask: False crop: True image 1/1 /tmp/tmpja4x7sn313.jpg: 704x1024 60 objects, 195.4ms Speed: 5.2ms preprocess, 195.4ms inference, 3.5ms postprocess per image at shape (1, 3, 1024, 1024) result_name: tmpja4x7sn313.jpg args.img_path: <class 'str'> /tmp/tmpja4x7sn313.jpg True
Prediction
hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5IDwpbvzpzbz5prvde26pilkxagfuStatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yF1vjBdP7xXlrsVkNeEPS2z3E8dWdo7wDiV2TvtBkM79Xd/21.png", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4yF1vjBdP7xXlrsVkNeEPS2z3E8dWdo7wDiV2TvtBkM79Xd/21.png", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4yF1vjBdP7xXlrsVkNeEPS2z3E8dWdo7wDiV2TvtBkM79Xd/21.png", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yF1vjBdP7xXlrsVkNeEPS2z3E8dWdo7wDiV2TvtBkM79Xd/21.png", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-28T10:16:45.613022Z", "created_at": "2023-06-28T10:16:44.362128Z", "data_removed": false, "error": null, "id": "wpbvzpzbz5prvde26pilkxagfu", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yF1vjBdP7xXlrsVkNeEPS2z3E8dWdo7wDiV2TvtBkM79Xd/21.png", "imgsz": 1024 }, "logs": "image 1/1 /tmp/tmpmwx9ok0021.png: 704x1024 4 objects, 188.6ms\nSpeed: 5.0ms preprocess, 188.6ms inference, 5.5ms postprocess per image at shape (1, 3, 1024, 1024)", "metrics": { "predict_time": 1.277395, "total_time": 1.250894 }, "output": "https://replicate.delivery/pbxt/TSwLeXECznQdFqqGwwd6Y2BSPfduaczufVcrvieD4vT2oupEB/tmpmwx9ok0021_crop.png", "started_at": "2023-06-28T10:16:44.335627Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/wpbvzpzbz5prvde26pilkxagfu", "cancel": "https://api.replicate.com/v1/predictions/wpbvzpzbz5prvde26pilkxagfu/cancel" }, "version": "6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5" }
Prediction
hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5IDflmr4rzb62q4jyknb4hmbhqfgyStatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yG00ZQNJaev7YXRmVyPd1jrHidT2VHSPSyVoJ9wkmv3Wpf/128.png", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4yG00ZQNJaev7YXRmVyPd1jrHidT2VHSPSyVoJ9wkmv3Wpf/128.png", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4yG00ZQNJaev7YXRmVyPd1jrHidT2VHSPSyVoJ9wkmv3Wpf/128.png", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yG00ZQNJaev7YXRmVyPd1jrHidT2VHSPSyVoJ9wkmv3Wpf/128.png", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-28T10:17:46.802308Z", "created_at": "2023-06-28T10:17:45.456614Z", "data_removed": false, "error": null, "id": "flmr4rzb62q4jyknb4hmbhqfgy", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yG00ZQNJaev7YXRmVyPd1jrHidT2VHSPSyVoJ9wkmv3Wpf/128.png", "imgsz": 1024 }, "logs": "image 1/1 /tmp/tmpofifabn3128.png: 704x1024 14 objects, 182.7ms\nSpeed: 5.4ms preprocess, 182.7ms inference, 4.1ms postprocess per image at shape (1, 3, 1024, 1024)", "metrics": { "predict_time": 1.366993, "total_time": 1.345694 }, "output": "https://replicate.delivery/pbxt/FBzwUZFtvJqENFRMUfsqES8xFn8c3dqLzaXsSIr2z9Ml1NlIA/tmpofifabn3128_crop.png", "started_at": "2023-06-28T10:17:45.435315Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/flmr4rzb62q4jyknb4hmbhqfgy", "cancel": "https://api.replicate.com/v1/predictions/flmr4rzb62q4jyknb4hmbhqfgy/cancel" }, "version": "6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5" }
Prediction
hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5IDi5gn2djbhwqoxuw3hudfpvtxbeStatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yOvwdDUMJVMfO2w07acah5ORfYCcC5XLHeswshF7Nt0OwG/105.png", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4yOvwdDUMJVMfO2w07acah5ORfYCcC5XLHeswshF7Nt0OwG/105.png", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4yOvwdDUMJVMfO2w07acah5ORfYCcC5XLHeswshF7Nt0OwG/105.png", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yOvwdDUMJVMfO2w07acah5ORfYCcC5XLHeswshF7Nt0OwG/105.png", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-28T10:27:12.791572Z", "created_at": "2023-06-28T10:27:10.785421Z", "data_removed": false, "error": null, "id": "i5gn2djbhwqoxuw3hudfpvtxbe", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yOvwdDUMJVMfO2w07acah5ORfYCcC5XLHeswshF7Nt0OwG/105.png", "imgsz": 1024 }, "logs": "image 1/1 /tmp/tmps8yur9lx105.png: 1024x768 17 objects, 199.0ms\nSpeed: 6.4ms preprocess, 199.0ms inference, 3.2ms postprocess per image at shape (1, 3, 1024, 1024)", "metrics": { "predict_time": 2.02752, "total_time": 2.006151 }, "output": "https://replicate.delivery/pbxt/TP0M4yO4fqTqGaL3Mp1O6B2jtffuXbf1kXwmbQruGO8CQvpEB/tmps8yur9lx105_crop.png", "started_at": "2023-06-28T10:27:10.764052Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/i5gn2djbhwqoxuw3hudfpvtxbe", "cancel": "https://api.replicate.com/v1/predictions/i5gn2djbhwqoxuw3hudfpvtxbe/cancel" }, "version": "6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5" }
Prediction
hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5IDok6ansjbhw2ahlahnk42ukyfemStatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yQXJZXHZJjlOTlN3HYQzSSwfqUYxKkJ4mmblMaE5eNSLX4/405.png", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4yQXJZXHZJjlOTlN3HYQzSSwfqUYxKkJ4mmblMaE5eNSLX4/405.png", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4yQXJZXHZJjlOTlN3HYQzSSwfqUYxKkJ4mmblMaE5eNSLX4/405.png", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yQXJZXHZJjlOTlN3HYQzSSwfqUYxKkJ4mmblMaE5eNSLX4/405.png", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-28T10:28:53.719291Z", "created_at": "2023-06-28T10:28:52.203346Z", "data_removed": false, "error": null, "id": "ok6ansjbhw2ahlahnk42ukyfem", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yQXJZXHZJjlOTlN3HYQzSSwfqUYxKkJ4mmblMaE5eNSLX4/405.png", "imgsz": 1024 }, "logs": "image 1/1 /tmp/tmpvtoys3wg405.png: 704x1024 7 objects, 174.3ms\nSpeed: 5.6ms preprocess, 174.3ms inference, 30.3ms postprocess per image at shape (1, 3, 1024, 1024)", "metrics": { "predict_time": 1.537443, "total_time": 1.515945 }, "output": "https://replicate.delivery/pbxt/WIMqIwCrl8ZSPxSwkfWCHYTvBx4T7wE7Ye6vB9TVoAfLr3UiA/tmpvtoys3wg405_crop.png", "started_at": "2023-06-28T10:28:52.181848Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ok6ansjbhw2ahlahnk42ukyfem", "cancel": "https://api.replicate.com/v1/predictions/ok6ansjbhw2ahlahnk42ukyfem/cancel" }, "version": "6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5" }
Prediction
hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5IDfeq3pnrb4tw3kkgrznbakhgxtyStatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yQxciFvwwF5ts0srZHYaSrzrvuzBwHc2qbfrC6HCkTa3MX/613.png", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4yQxciFvwwF5ts0srZHYaSrzrvuzBwHc2qbfrC6HCkTa3MX/613.png", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4yQxciFvwwF5ts0srZHYaSrzrvuzBwHc2qbfrC6HCkTa3MX/613.png", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yQxciFvwwF5ts0srZHYaSrzrvuzBwHc2qbfrC6HCkTa3MX/613.png", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-28T10:29:20.513556Z", "created_at": "2023-06-28T10:29:19.014551Z", "data_removed": false, "error": null, "id": "feq3pnrb4tw3kkgrznbakhgxty", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yQxciFvwwF5ts0srZHYaSrzrvuzBwHc2qbfrC6HCkTa3MX/613.png", "imgsz": 1024 }, "logs": "image 1/1 /tmp/tmp0dgcp6fd613.png: 1024x1024 7 objects, 254.4ms\nSpeed: 7.0ms preprocess, 254.4ms inference, 3.5ms postprocess per image at shape (1, 3, 1024, 1024)", "metrics": { "predict_time": 1.526274, "total_time": 1.499005 }, "output": "https://replicate.delivery/pbxt/5aYUdDlN9uZuJlI0mnecg1Ee5wZSg4i6N0O4HsftAi1Bs3UiA/tmp0dgcp6fd613_crop.png", "started_at": "2023-06-28T10:29:18.987282Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/feq3pnrb4tw3kkgrznbakhgxty", "cancel": "https://api.replicate.com/v1/predictions/feq3pnrb4tw3kkgrznbakhgxty/cancel" }, "version": "6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5" }
Prediction
hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5ID3bfstbbbwt36kirjykbn6xunn4StatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yv0gwkGPIIgAtCFanMv2v01VzV315VQqfTvCbjgij7NE1N/03.webp", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4yv0gwkGPIIgAtCFanMv2v01VzV315VQqfTvCbjgij7NE1N/03.webp", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4yv0gwkGPIIgAtCFanMv2v01VzV315VQqfTvCbjgij7NE1N/03.webp", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yv0gwkGPIIgAtCFanMv2v01VzV315VQqfTvCbjgij7NE1N/03.webp", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-28T11:03:58.740009Z", "created_at": "2023-06-28T11:01:02.001233Z", "data_removed": false, "error": null, "id": "3bfstbbbwt36kirjykbn6xunn4", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yv0gwkGPIIgAtCFanMv2v01VzV315VQqfTvCbjgij7NE1N/03.webp", "imgsz": 1024 }, "logs": "image 1/1 /tmp/tmpfi9r7kak03.webp: 704x1024 6 objects, 118.9ms\nSpeed: 10.7ms preprocess, 118.9ms inference, 4.7ms postprocess per image at shape (1, 3, 1024, 1024)", "metrics": { "predict_time": 13.430888, "total_time": 176.738776 }, "output": "https://replicate.delivery/pbxt/n5tyjMVDnaZZG5cx8pv8zMfFboOa1Bu6R28i9k2ekz9es4UiA/tmpfi9r7kak03_crop.webp", "started_at": "2023-06-28T11:03:45.309121Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/3bfstbbbwt36kirjykbn6xunn4", "cancel": "https://api.replicate.com/v1/predictions/3bfstbbbwt36kirjykbn6xunn4/cancel" }, "version": "6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5" }
Prediction
hilongjw/fast-sam:659575b576e585087714f477f92fa4b1a1e7d5e074f5f2deb4028fa29e565040Input
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4b67phqamMBmRJuy2CMN8ffpWRKwksx28BfG5UwDVue4RuB/10.jpg", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:659575b576e585087714f477f92fa4b1a1e7d5e074f5f2deb4028fa29e565040", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4b67phqamMBmRJuy2CMN8ffpWRKwksx28BfG5UwDVue4RuB/10.jpg", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:659575b576e585087714f477f92fa4b1a1e7d5e074f5f2deb4028fa29e565040", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4b67phqamMBmRJuy2CMN8ffpWRKwksx28BfG5UwDVue4RuB/10.jpg", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:659575b576e585087714f477f92fa4b1a1e7d5e074f5f2deb4028fa29e565040", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4b67phqamMBmRJuy2CMN8ffpWRKwksx28BfG5UwDVue4RuB/10.jpg", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-27T09:02:24.024755Z", "created_at": "2023-06-27T09:02:22.028353Z", "data_removed": false, "error": null, "id": "sm37tfrb5w357wlvxvf2n22tqq", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4b67phqamMBmRJuy2CMN8ffpWRKwksx28BfG5UwDVue4RuB/10.jpg", "imgsz": 1024 }, "logs": "args model_path: , img_path: /tmp/tmpkznyqn6q10.jpg, imgsz: 1024, iou: 0.9, text_prompt: None, conf: 0.4, output: ./output/, randomcolor: True, point_prompt: [[0,0]], point_label: [0], box_prompt: [0,0,0,0], better_quality: False, device: cuda, retina: True, withContours: False mask: False crop: True\nimage 1/1 /tmp/tmpkznyqn6q10.jpg: 1024x736 2 objects, 201.8ms\nSpeed: 5.5ms preprocess, 201.8ms inference, 2.8ms postprocess per image at shape (1, 3, 1024, 1024)\nresult_name: tmpkznyqn6q10.jpg\nargs.img_path: <class 'str'> /tmp/tmpkznyqn6q10.jpgTrue", "metrics": { "predict_time": 2.035388, "total_time": 1.996402 }, "output": "https://replicate.delivery/pbxt/SdKIkYmsAcoRJtn746uXWxLfb6pN7Fa5i0vM5uZ4cfif8KUiA/tmpkznyqn6q10_crop.png", "started_at": "2023-06-27T09:02:21.989367Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/sm37tfrb5w357wlvxvf2n22tqq", "cancel": "https://api.replicate.com/v1/predictions/sm37tfrb5w357wlvxvf2n22tqq/cancel" }, "version": "659575b576e585087714f477f92fa4b1a1e7d5e074f5f2deb4028fa29e565040" }
Generated inargs model_path: , img_path: /tmp/tmpkznyqn6q10.jpg, imgsz: 1024, iou: 0.9, text_prompt: None, conf: 0.4, output: ./output/, randomcolor: True, point_prompt: [[0,0]], point_label: [0], box_prompt: [0,0,0,0], better_quality: False, device: cuda, retina: True, withContours: False mask: False crop: True image 1/1 /tmp/tmpkznyqn6q10.jpg: 1024x736 2 objects, 201.8ms Speed: 5.5ms preprocess, 201.8ms inference, 2.8ms postprocess per image at shape (1, 3, 1024, 1024) result_name: tmpkznyqn6q10.jpg args.img_path: <class 'str'> /tmp/tmpkznyqn6q10.jpgTrue
Prediction
hilongjw/fast-sam:659575b576e585087714f477f92fa4b1a1e7d5e074f5f2deb4028fa29e565040IDngkf2hbbhbw27rnric2k6a2y74StatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4b7NlRxxpAFkYC3Wm6mt3qQj0EAIepVVVR1eaRSs9YQCTQM/2.jpg", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:659575b576e585087714f477f92fa4b1a1e7d5e074f5f2deb4028fa29e565040", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4b7NlRxxpAFkYC3Wm6mt3qQj0EAIepVVVR1eaRSs9YQCTQM/2.jpg", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:659575b576e585087714f477f92fa4b1a1e7d5e074f5f2deb4028fa29e565040", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4b7NlRxxpAFkYC3Wm6mt3qQj0EAIepVVVR1eaRSs9YQCTQM/2.jpg", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:659575b576e585087714f477f92fa4b1a1e7d5e074f5f2deb4028fa29e565040", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4b7NlRxxpAFkYC3Wm6mt3qQj0EAIepVVVR1eaRSs9YQCTQM/2.jpg", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-27T09:03:43.876983Z", "created_at": "2023-06-27T09:03:42.010335Z", "data_removed": false, "error": null, "id": "ngkf2hbbhbw27rnric2k6a2y74", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4b7NlRxxpAFkYC3Wm6mt3qQj0EAIepVVVR1eaRSs9YQCTQM/2.jpg", "imgsz": 1024 }, "logs": "args model_path: , img_path: /tmp/tmp45vjh7ho2.jpg, imgsz: 1024, iou: 0.9, text_prompt: None, conf: 0.4, output: ./output/, randomcolor: True, point_prompt: [[0,0]], point_label: [0], box_prompt: [0,0,0,0], better_quality: False, device: cuda, retina: True, withContours: False mask: False crop: True\nimage 1/1 /tmp/tmp45vjh7ho2.jpg: 1024x896 4 objects, 241.8ms\nSpeed: 5.3ms preprocess, 241.8ms inference, 2.4ms postprocess per image at shape (1, 3, 1024, 1024)\nresult_name: tmp45vjh7ho2.jpg\nargs.img_path: <class 'str'> /tmp/tmp45vjh7ho2.jpg True", "metrics": { "predict_time": 1.892038, "total_time": 1.866648 }, "output": "https://replicate.delivery/pbxt/OfeMHM6ii4oOc0H21x4rDcziMBXpcTcvaICpnFEfLLf8erQJC/tmp45vjh7ho2_crop.png", "started_at": "2023-06-27T09:03:41.984945Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ngkf2hbbhbw27rnric2k6a2y74", "cancel": "https://api.replicate.com/v1/predictions/ngkf2hbbhbw27rnric2k6a2y74/cancel" }, "version": "659575b576e585087714f477f92fa4b1a1e7d5e074f5f2deb4028fa29e565040" }
Generated inargs model_path: , img_path: /tmp/tmp45vjh7ho2.jpg, imgsz: 1024, iou: 0.9, text_prompt: None, conf: 0.4, output: ./output/, randomcolor: True, point_prompt: [[0,0]], point_label: [0], box_prompt: [0,0,0,0], better_quality: False, device: cuda, retina: True, withContours: False mask: False crop: True image 1/1 /tmp/tmp45vjh7ho2.jpg: 1024x896 4 objects, 241.8ms Speed: 5.3ms preprocess, 241.8ms inference, 2.4ms postprocess per image at shape (1, 3, 1024, 1024) result_name: tmp45vjh7ho2.jpg args.img_path: <class 'str'> /tmp/tmp45vjh7ho2.jpg True
Prediction
hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5IDjzysdfbb6pe3w6rtv74rrvau3yStatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yyjKY3t7tTa7ArCBcp2B6d8V00pNfkFVvanPvRW1EbWjG3/eurasian-whimbrel-7982937_1280.webp", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4yyjKY3t7tTa7ArCBcp2B6d8V00pNfkFVvanPvRW1EbWjG3/eurasian-whimbrel-7982937_1280.webp", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4yyjKY3t7tTa7ArCBcp2B6d8V00pNfkFVvanPvRW1EbWjG3/eurasian-whimbrel-7982937_1280.webp", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yyjKY3t7tTa7ArCBcp2B6d8V00pNfkFVvanPvRW1EbWjG3/eurasian-whimbrel-7982937_1280.webp", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-28T11:05:04.488350Z", "created_at": "2023-06-28T11:04:57.211414Z", "data_removed": false, "error": null, "id": "jzysdfbb6pe3w6rtv74rrvau3y", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4yyjKY3t7tTa7ArCBcp2B6d8V00pNfkFVvanPvRW1EbWjG3/eurasian-whimbrel-7982937_1280.webp", "imgsz": 1024 }, "logs": "image 1/1 /tmp/tmpuizgx3eqeurasian-whimbrel-7982937_1280.webp: 768x1024 9 objects, 206.0ms\nSpeed: 7.4ms preprocess, 206.0ms inference, 4.8ms postprocess per image at shape (1, 3, 1024, 1024)", "metrics": { "predict_time": 7.302178, "total_time": 7.276936 }, "output": "https://replicate.delivery/pbxt/GmV2ZMnBerTkXSlJZIF1zoP0jVCjZlZpymicN6UxjTdwLOlIA/tmpuizgx3eqeurasian-whimbrel-7982937_1280_crop.webp", "started_at": "2023-06-28T11:04:57.186172Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/jzysdfbb6pe3w6rtv74rrvau3y", "cancel": "https://api.replicate.com/v1/predictions/jzysdfbb6pe3w6rtv74rrvau3y/cancel" }, "version": "6652acb1cc178cc864e1da82faf5e7aa23d85a0b79257bcfc069c6effadb28d5" }
Prediction
hilongjw/fast-sam:39a1601f60c9f4f1cc6bd3f15620b40bdc5e635c8f28e5004330d1d31c84e931IDd6uofcbbsv3ks3pwovidzja34aStatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4bDzOScljvNyw865AHUC7JD4khmzmn27Bbt5VmO6pVbVr1q/04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:39a1601f60c9f4f1cc6bd3f15620b40bdc5e635c8f28e5004330d1d31c84e931", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4bDzOScljvNyw865AHUC7JD4khmzmn27Bbt5VmO6pVbVr1q/04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:39a1601f60c9f4f1cc6bd3f15620b40bdc5e635c8f28e5004330d1d31c84e931", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4bDzOScljvNyw865AHUC7JD4khmzmn27Bbt5VmO6pVbVr1q/04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:39a1601f60c9f4f1cc6bd3f15620b40bdc5e635c8f28e5004330d1d31c84e931", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4bDzOScljvNyw865AHUC7JD4khmzmn27Bbt5VmO6pVbVr1q/04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-27T10:33:06.641468Z", "created_at": "2023-06-27T10:33:01.413943Z", "data_removed": false, "error": null, "id": "d6uofcbbsv3ks3pwovidzja34a", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4bDzOScljvNyw865AHUC7JD4khmzmn27Bbt5VmO6pVbVr1q/04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg", "imgsz": 1024 }, "logs": "args model_path: , img_path: /tmp/tmplujgwwzf04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg, imgsz: 1024, iou: 0.9, text_prompt: None, conf: 0.4, output: ./output/, randomcolor: True, point_prompt: [[0,0]], point_label: [0], box_prompt: [0,0,0,0], better_quality: False, device: cuda, retina: True, withContours: False mask: False crop: True\nimage 1/1 /tmp/tmplujgwwzf04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg: 704x1024 25 objects, 196.0ms\nSpeed: 6.1ms preprocess, 196.0ms inference, 6.3ms postprocess per image at shape (1, 3, 1024, 1024)\nresult_name: tmplujgwwzf04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg\nargs.img_path: <class 'str'> /tmp/tmplujgwwzf04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg True", "metrics": { "predict_time": 5.256869, "total_time": 5.227525 }, "output": "https://replicate.delivery/pbxt/B68p9kcScHoYK9gtxIROdiCxW6eqNrv29k9cK9ll5hAxZDlIA/tmplujgwwzf04eadd2b-7dd4-43fc-af3d-cff948811986_balloons_crop.png", "started_at": "2023-06-27T10:33:01.384599Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/d6uofcbbsv3ks3pwovidzja34a", "cancel": "https://api.replicate.com/v1/predictions/d6uofcbbsv3ks3pwovidzja34a/cancel" }, "version": "39a1601f60c9f4f1cc6bd3f15620b40bdc5e635c8f28e5004330d1d31c84e931" }
Generated inargs model_path: , img_path: /tmp/tmplujgwwzf04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg, imgsz: 1024, iou: 0.9, text_prompt: None, conf: 0.4, output: ./output/, randomcolor: True, point_prompt: [[0,0]], point_label: [0], box_prompt: [0,0,0,0], better_quality: False, device: cuda, retina: True, withContours: False mask: False crop: True image 1/1 /tmp/tmplujgwwzf04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg: 704x1024 25 objects, 196.0ms Speed: 6.1ms preprocess, 196.0ms inference, 6.3ms postprocess per image at shape (1, 3, 1024, 1024) result_name: tmplujgwwzf04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg args.img_path: <class 'str'> /tmp/tmplujgwwzf04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg True
Prediction
hilongjw/fast-sam:39a1601f60c9f4f1cc6bd3f15620b40bdc5e635c8f28e5004330d1d31c84e931IDmxjagibb5drcv3bywjymdzce3qStatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4bAJ2TDE3SwutBVR5Y6CHtPE1Ylm6OQO66sd20nLIZ6WiP7/dogs.jpg", "imgsz": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hilongjw/fast-sam:39a1601f60c9f4f1cc6bd3f15620b40bdc5e635c8f28e5004330d1d31c84e931", { input: { iou: 0.9, crop: true, image: "https://replicate.delivery/pbxt/J4bAJ2TDE3SwutBVR5Y6CHtPE1Ylm6OQO66sd20nLIZ6WiP7/dogs.jpg", imgsz: 1024 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run hilongjw/fast-sam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "hilongjw/fast-sam:39a1601f60c9f4f1cc6bd3f15620b40bdc5e635c8f28e5004330d1d31c84e931", input={ "iou": 0.9, "crop": True, "image": "https://replicate.delivery/pbxt/J4bAJ2TDE3SwutBVR5Y6CHtPE1Ylm6OQO66sd20nLIZ6WiP7/dogs.jpg", "imgsz": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run hilongjw/fast-sam 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": "hilongjw/fast-sam:39a1601f60c9f4f1cc6bd3f15620b40bdc5e635c8f28e5004330d1d31c84e931", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4bAJ2TDE3SwutBVR5Y6CHtPE1Ylm6OQO66sd20nLIZ6WiP7/dogs.jpg", "imgsz": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-27T10:33:47.306665Z", "created_at": "2023-06-27T10:33:42.191770Z", "data_removed": false, "error": null, "id": "mxjagibb5drcv3bywjymdzce3q", "input": { "iou": 0.9, "crop": true, "image": "https://replicate.delivery/pbxt/J4bAJ2TDE3SwutBVR5Y6CHtPE1Ylm6OQO66sd20nLIZ6WiP7/dogs.jpg", "imgsz": 1024 }, "logs": "args model_path: , img_path: /tmp/tmp8_ur26nadogs.jpg, imgsz: 1024, iou: 0.9, text_prompt: None, conf: 0.4, output: ./output/, randomcolor: True, point_prompt: [[0,0]], point_label: [0], box_prompt: [0,0,0,0], better_quality: False, device: cuda, retina: True, withContours: False mask: False crop: True\nimage 1/1 /tmp/tmp8_ur26nadogs.jpg: 576x1024 21 objects, 168.3ms\nSpeed: 5.3ms preprocess, 168.3ms inference, 5.1ms postprocess per image at shape (1, 3, 1024, 1024)\nresult_name: tmp8_ur26nadogs.jpg\nargs.img_path: <class 'str'> /tmp/tmp8_ur26nadogs.jpg True", "metrics": { "predict_time": 5.145882, "total_time": 5.114895 }, "output": "https://replicate.delivery/pbxt/GVfdNaH8xA0aTaQAgmCuu2Oqf9hNDQssNZeIes4NbCiuQboEB/tmp8_ur26nadogs_crop.png", "started_at": "2023-06-27T10:33:42.160783Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/mxjagibb5drcv3bywjymdzce3q", "cancel": "https://api.replicate.com/v1/predictions/mxjagibb5drcv3bywjymdzce3q/cancel" }, "version": "39a1601f60c9f4f1cc6bd3f15620b40bdc5e635c8f28e5004330d1d31c84e931" }
Generated inargs model_path: , img_path: /tmp/tmp8_ur26nadogs.jpg, imgsz: 1024, iou: 0.9, text_prompt: None, conf: 0.4, output: ./output/, randomcolor: True, point_prompt: [[0,0]], point_label: [0], box_prompt: [0,0,0,0], better_quality: False, device: cuda, retina: True, withContours: False mask: False crop: True image 1/1 /tmp/tmp8_ur26nadogs.jpg: 576x1024 21 objects, 168.3ms Speed: 5.3ms preprocess, 168.3ms inference, 5.1ms postprocess per image at shape (1, 3, 1024, 1024) result_name: tmp8_ur26nadogs.jpg args.img_path: <class 'str'> /tmp/tmp8_ur26nadogs.jpg True
Want to make some of these yourself?
Run this model