casia-iva-lab
/
fastsam
Fast Segment Anything
Prediction
casia-iva-lab/fastsam:371aeee1IDdcamatzb7iq7qlp4ah5zjzdrbmStatusSucceededSourceWebHardwareT4Total durationCreatedInput
- iou
- 0.9
- conf
- 0.4
- retina
- box_prompt
- [0,0,0,0]
- image_size
- 640
- model_name
- FastSAM-x
- point_label
- [0]
- point_prompt
- [[0,0]]
- withContours
{ "iou": 0.9, "conf": 0.4, "retina": true, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J45o004GBhb0mvUJgqQlaMM7lmHkdcOF5e1FV2yFFXttNbCH/download.jpeg", "point_label": "[0]", "point_prompt": "[[0,0]]", "withContours": true }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run casia-iva-lab/fastsam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "casia-iva-lab/fastsam:371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17", { input: { iou: 0.9, conf: 0.4, retina: true, box_prompt: "[0,0,0,0]", image_size: 640, model_name: "FastSAM-x", input_image: "https://replicate.delivery/pbxt/J45o004GBhb0mvUJgqQlaMM7lmHkdcOF5e1FV2yFFXttNbCH/download.jpeg", point_label: "[0]", point_prompt: "[[0,0]]", withContours: true } } ); console.log(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
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run casia-iva-lab/fastsam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "casia-iva-lab/fastsam:371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17", input={ "iou": 0.9, "conf": 0.4, "retina": True, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J45o004GBhb0mvUJgqQlaMM7lmHkdcOF5e1FV2yFFXttNbCH/download.jpeg", "point_label": "[0]", "point_prompt": "[[0,0]]", "withContours": True } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run casia-iva-lab/fastsam 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": "371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17", "input": { "iou": 0.9, "conf": 0.4, "retina": true, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J45o004GBhb0mvUJgqQlaMM7lmHkdcOF5e1FV2yFFXttNbCH/download.jpeg", "point_label": "[0]", "point_prompt": "[[0,0]]", "withContours": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-30T16:55:16.638031Z", "created_at": "2023-06-30T16:55:11.633983Z", "data_removed": false, "error": null, "id": "dcamatzb7iq7qlp4ah5zjzdrbm", "input": { "iou": 0.9, "conf": 0.4, "retina": true, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J45o004GBhb0mvUJgqQlaMM7lmHkdcOF5e1FV2yFFXttNbCH/download.jpeg", "point_label": "[0]", "point_prompt": "[[0,0]]", "withContours": true }, "logs": "image 1/1 /tmp/tmpbn30lvdudownload.jpeg: 448x640 90 objects, 89.9ms\nSpeed: 4.1ms preprocess, 89.9ms inference, 50.3ms postprocess per image at shape (1, 3, 640, 640)", "metrics": { "predict_time": 5.037943, "total_time": 5.004048 }, "output": "https://replicate.delivery/pbxt/IDntbZdXce1Hf0iMjbhFOqWRIe25eveyb3ArS4wZ5aJf86ySE/tmp.out.png", "started_at": "2023-06-30T16:55:11.600088Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/dcamatzb7iq7qlp4ah5zjzdrbm", "cancel": "https://api.replicate.com/v1/predictions/dcamatzb7iq7qlp4ah5zjzdrbm/cancel" }, "version": "371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17" }
Generated inimage 1/1 /tmp/tmpbn30lvdudownload.jpeg: 448x640 90 objects, 89.9ms Speed: 4.1ms preprocess, 89.9ms inference, 50.3ms postprocess per image at shape (1, 3, 640, 640)
Prediction
casia-iva-lab/fastsam:371aeee1IDbbcp6xzbzy6rj4clkvsgfuumhmStatusSucceededSourceWebHardwareT4Total durationCreatedInput
- iou
- 0.9
- conf
- 0.4
- retina
- box_prompt
- [0,0,0,0]
- image_size
- 640
- model_name
- FastSAM-x
- point_label
- [0]
- point_prompt
- [[0,0]]
{ "iou": 0.9, "conf": 0.4, "retina": true, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J457GSbs7gcd1y6ZvsIz38Zu1Dn7KHEwNg3KP0e9qrmCPfhG/dogs.jpg", "point_label": "[0]", "point_prompt": "[[0,0]]" }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run casia-iva-lab/fastsam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "casia-iva-lab/fastsam:371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17", { input: { iou: 0.9, conf: 0.4, retina: true, box_prompt: "[0,0,0,0]", image_size: 640, model_name: "FastSAM-x", input_image: "https://replicate.delivery/pbxt/J457GSbs7gcd1y6ZvsIz38Zu1Dn7KHEwNg3KP0e9qrmCPfhG/dogs.jpg", point_label: "[0]", point_prompt: "[[0,0]]" } } ); console.log(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
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run casia-iva-lab/fastsam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "casia-iva-lab/fastsam:371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17", input={ "iou": 0.9, "conf": 0.4, "retina": True, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J457GSbs7gcd1y6ZvsIz38Zu1Dn7KHEwNg3KP0e9qrmCPfhG/dogs.jpg", "point_label": "[0]", "point_prompt": "[[0,0]]" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run casia-iva-lab/fastsam 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": "371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17", "input": { "iou": 0.9, "conf": 0.4, "retina": true, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J457GSbs7gcd1y6ZvsIz38Zu1Dn7KHEwNg3KP0e9qrmCPfhG/dogs.jpg", "point_label": "[0]", "point_prompt": "[[0,0]]" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-30T16:55:32.539191Z", "created_at": "2023-06-30T16:55:31.593164Z", "data_removed": false, "error": null, "id": "bbcp6xzbzy6rj4clkvsgfuumhm", "input": { "iou": 0.9, "conf": 0.4, "retina": true, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J457GSbs7gcd1y6ZvsIz38Zu1Dn7KHEwNg3KP0e9qrmCPfhG/dogs.jpg", "point_label": "[0]", "point_prompt": "[[0,0]]" }, "logs": "image 1/1 /tmp/tmp5vb0n4ludogs.jpg: 384x640 14 objects, 87.1ms\nSpeed: 2.1ms preprocess, 87.1ms inference, 4.2ms postprocess per image at shape (1, 3, 640, 640)", "metrics": { "predict_time": 0.979189, "total_time": 0.946027 }, "output": "https://replicate.delivery/pbxt/EPxOPYVmVDbrGFVfhBhFc5hnimdAoynDpl11NFCal4RC2llIA/tmp.out.png", "started_at": "2023-06-30T16:55:31.560002Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/bbcp6xzbzy6rj4clkvsgfuumhm", "cancel": "https://api.replicate.com/v1/predictions/bbcp6xzbzy6rj4clkvsgfuumhm/cancel" }, "version": "371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17" }
Generated inimage 1/1 /tmp/tmp5vb0n4ludogs.jpg: 384x640 14 objects, 87.1ms Speed: 2.1ms preprocess, 87.1ms inference, 4.2ms postprocess per image at shape (1, 3, 640, 640)
Prediction
casia-iva-lab/fastsam:371aeee1IDafyxdejbtz57g7xjkld7fdttqaStatusSucceededSourceWebHardwareT4Total durationCreatedInput
- iou
- 0.9
- conf
- 0.4
- retina
- box_prompt
- [0,0,0,0]
- image_size
- 640
- model_name
- FastSAM-x
- point_label
- [0]
- point_prompt
- [[0,0]]
- withContours
- better_quality
{ "iou": 0.9, "conf": 0.4, "retina": true, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J45qcllCGZNBhg0bwAPYDSqIf0Cp1Yh0VucBg5K7caiDW2D4/sa_1309.jpg", "point_label": "[0]", "point_prompt": "[[0,0]]", "withContours": true, "better_quality": true }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run casia-iva-lab/fastsam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "casia-iva-lab/fastsam:371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17", { input: { iou: 0.9, conf: 0.4, retina: true, box_prompt: "[0,0,0,0]", image_size: 640, model_name: "FastSAM-x", input_image: "https://replicate.delivery/pbxt/J45qcllCGZNBhg0bwAPYDSqIf0Cp1Yh0VucBg5K7caiDW2D4/sa_1309.jpg", point_label: "[0]", point_prompt: "[[0,0]]", withContours: true, better_quality: true } } ); console.log(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
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run casia-iva-lab/fastsam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "casia-iva-lab/fastsam:371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17", input={ "iou": 0.9, "conf": 0.4, "retina": True, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J45qcllCGZNBhg0bwAPYDSqIf0Cp1Yh0VucBg5K7caiDW2D4/sa_1309.jpg", "point_label": "[0]", "point_prompt": "[[0,0]]", "withContours": True, "better_quality": True } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run casia-iva-lab/fastsam 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": "371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17", "input": { "iou": 0.9, "conf": 0.4, "retina": true, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J45qcllCGZNBhg0bwAPYDSqIf0Cp1Yh0VucBg5K7caiDW2D4/sa_1309.jpg", "point_label": "[0]", "point_prompt": "[[0,0]]", "withContours": true, "better_quality": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-30T16:56:00.519076Z", "created_at": "2023-06-30T16:55:54.254157Z", "data_removed": false, "error": null, "id": "afyxdejbtz57g7xjkld7fdttqa", "input": { "iou": 0.9, "conf": 0.4, "retina": true, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J45qcllCGZNBhg0bwAPYDSqIf0Cp1Yh0VucBg5K7caiDW2D4/sa_1309.jpg", "point_label": "[0]", "point_prompt": "[[0,0]]", "withContours": true, "better_quality": true }, "logs": "image 1/1 /tmp/tmp0bowo8issa_1309.jpg: 448x640 30 objects, 91.7ms\nSpeed: 3.4ms preprocess, 91.7ms inference, 18.5ms postprocess per image at shape (1, 3, 640, 640)", "metrics": { "predict_time": 6.29792, "total_time": 6.264919 }, "output": "https://replicate.delivery/pbxt/Fj5V1f6pWOQPISwBq3sjtvaENfkfffkUmfrTR9Vy8fbmP2llIA/tmp.out.png", "started_at": "2023-06-30T16:55:54.221156Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/afyxdejbtz57g7xjkld7fdttqa", "cancel": "https://api.replicate.com/v1/predictions/afyxdejbtz57g7xjkld7fdttqa/cancel" }, "version": "371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17" }
Generated inimage 1/1 /tmp/tmp0bowo8issa_1309.jpg: 448x640 30 objects, 91.7ms Speed: 3.4ms preprocess, 91.7ms inference, 18.5ms postprocess per image at shape (1, 3, 640, 640)
Prediction
casia-iva-lab/fastsam:371aeee1IDbqwn2ojb55kbdonx6pfzizlezqStatusSucceededSourceWebHardwareT4Total durationCreatedInput
- iou
- 0.9
- conf
- 0.4
- retina
- box_prompt
- [0,0,0,0]
- image_size
- 640
- model_name
- FastSAM-x
- point_label
- [0]
- point_prompt
- [[0,0]]
- withContours
- better_quality
{ "iou": 0.9, "conf": 0.4, "retina": true, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J45tzbTDdnrUx5C81t4MieMlBNjSYQ2jWiqjM6LDx0oH2NMb/download%20%281%29.jpeg", "point_label": "[0]", "point_prompt": "[[0,0]]", "withContours": true, "better_quality": true }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run casia-iva-lab/fastsam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "casia-iva-lab/fastsam:371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17", { input: { iou: 0.9, conf: 0.4, retina: true, box_prompt: "[0,0,0,0]", image_size: 640, model_name: "FastSAM-x", input_image: "https://replicate.delivery/pbxt/J45tzbTDdnrUx5C81t4MieMlBNjSYQ2jWiqjM6LDx0oH2NMb/download%20%281%29.jpeg", point_label: "[0]", point_prompt: "[[0,0]]", withContours: true, better_quality: true } } ); console.log(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
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run casia-iva-lab/fastsam using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "casia-iva-lab/fastsam:371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17", input={ "iou": 0.9, "conf": 0.4, "retina": True, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J45tzbTDdnrUx5C81t4MieMlBNjSYQ2jWiqjM6LDx0oH2NMb/download%20%281%29.jpeg", "point_label": "[0]", "point_prompt": "[[0,0]]", "withContours": True, "better_quality": True } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run casia-iva-lab/fastsam 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": "371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17", "input": { "iou": 0.9, "conf": 0.4, "retina": true, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J45tzbTDdnrUx5C81t4MieMlBNjSYQ2jWiqjM6LDx0oH2NMb/download%20%281%29.jpeg", "point_label": "[0]", "point_prompt": "[[0,0]]", "withContours": true, "better_quality": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-30T16:57:01.306121Z", "created_at": "2023-06-30T16:56:46.596393Z", "data_removed": false, "error": null, "id": "bqwn2ojb55kbdonx6pfzizlezq", "input": { "iou": 0.9, "conf": 0.4, "retina": true, "box_prompt": "[0,0,0,0]", "image_size": 640, "model_name": "FastSAM-x", "input_image": "https://replicate.delivery/pbxt/J45tzbTDdnrUx5C81t4MieMlBNjSYQ2jWiqjM6LDx0oH2NMb/download%20%281%29.jpeg", "point_label": "[0]", "point_prompt": "[[0,0]]", "withContours": true, "better_quality": true }, "logs": "image 1/1 /tmp/tmp36n3ga2jdownload%20(1).jpeg: 448x640 91 objects, 89.8ms\nSpeed: 3.4ms preprocess, 89.8ms inference, 48.8ms postprocess per image at shape (1, 3, 640, 640)", "metrics": { "predict_time": 14.766861, "total_time": 14.709728 }, "output": "https://replicate.delivery/pbxt/2VwnaTqmiwZOIZ4J6TlfgLTQJ7Z4QytCfaIiWswPrfx4aXWiA/tmp.out.png", "started_at": "2023-06-30T16:56:46.539260Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/bqwn2ojb55kbdonx6pfzizlezq", "cancel": "https://api.replicate.com/v1/predictions/bqwn2ojb55kbdonx6pfzizlezq/cancel" }, "version": "371aeee1ce0c5efd25bbef7a4527ec9e59188b963ebae1eeb851ddc145685c17" }
Generated inimage 1/1 /tmp/tmp36n3ga2jdownload%20(1).jpeg: 448x640 91 objects, 89.8ms Speed: 3.4ms preprocess, 89.8ms inference, 48.8ms postprocess per image at shape (1, 3, 640, 640)
Want to make some of these yourself?
Run this model