Only makes segmentations for further processing
Clear picture of the model
Default: "https://raw.githubusercontent.com/viktorfa/oot_diffusion/main/oot_diffusion/assets/model_1.png"
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"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run viktorfa/oot_segmentation using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "viktorfa/oot_segmentation:029c7a3275615693983f1186a94d3c02a5a46750a763e5deb30c1b608b7c3003", { input: { model_image: "https://raw.githubusercontent.com/viktorfa/oot_diffusion/main/oot_diffusion/assets/model_1.png" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "viktorfa/oot_segmentation:029c7a3275615693983f1186a94d3c02a5a46750a763e5deb30c1b608b7c3003", input={ "model_image": "https://raw.githubusercontent.com/viktorfa/oot_diffusion/main/oot_diffusion/assets/model_1.png" } ) 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": "029c7a3275615693983f1186a94d3c02a5a46750a763e5deb30c1b608b7c3003", "input": { "model_image": "https://raw.githubusercontent.com/viktorfa/oot_diffusion/main/oot_diffusion/assets/model_1.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/viktorfa/oot_segmentation@sha256:029c7a3275615693983f1186a94d3c02a5a46750a763e5deb30c1b608b7c3003 \ -i 'model_image="https://raw.githubusercontent.com/viktorfa/oot_diffusion/main/oot_diffusion/assets/model_1.png"'
To learn more, take a look at the Cog documentation.
docker run -d -p 5000:5000 --gpus=all r8.im/viktorfa/oot_segmentation@sha256:029c7a3275615693983f1186a94d3c02a5a46750a763e5deb30c1b608b7c3003 curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "model_image": "https://raw.githubusercontent.com/viktorfa/oot_diffusion/main/oot_diffusion/assets/model_1.png" } }' \ http://localhost:5000/predictions
docker run -d -p 5000:5000 --gpus=all r8.im/viktorfa/oot_segmentation@sha256:029c7a3275615693983f1186a94d3c02a5a46750a763e5deb30c1b608b7c3003
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "model_image": "https://raw.githubusercontent.com/viktorfa/oot_diffusion/main/oot_diffusion/assets/model_1.png" } }' \ http://localhost:5000/predictions
mask
face_mask
model_mask
model_parse
original_image
{ "completed_at": "2024-02-27T16:54:59.321984Z", "created_at": "2024-02-27T16:50:32.308395Z", "data_removed": false, "error": null, "id": "myi6nqzbhs5h7g5lwdgv6bznfy", "input": { "model_image": "https://raw.githubusercontent.com/viktorfa/oot_diffusion/main/oot_diffusion/assets/model_1.png" }, "logs": "0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:37<00:00, 37.49s/it]\n100%|██████████| 1/1 [00:37<00:00, 37.49s/it]\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 4.97it/s]\n100%|██████████| 1/1 [00:00<00:00, 4.95it/s]\nModel parse in 40.01 seconds.\nOpen pose in 1.55 seconds.", "metrics": { "predict_time": 42.85964, "total_time": 267.013589 }, "output": { "mask": "https://replicate.delivery/pbxt/Y7LPG8Wf6YzoLKLZeDg5Faiz5fVU9I6JgAo5SSHW9GZFv41kA/tmp2gpxjswu.png", "face_mask": "https://replicate.delivery/pbxt/exkuRgQPv3wYekdkUNqiFXsqn2KIfGDekmG6lghcM9ROeiXTC/tmph2grkjcm.png", "model_mask": "https://replicate.delivery/pbxt/PYWubkbZIM5mJBu8Cn6VP7mlHc3VqpHThnbKd8YdYrn4FvmE/tmpv54oetly.png", "model_parse": "https://replicate.delivery/pbxt/GotZUVCZolbbOFeUGa4Ep3emHr8jDaOWgsfJm18vUgGHv41kA/tmp0hk_1by1.png", "original_image": "https://replicate.delivery/pbxt/fQSInp7Io1ToYKo9rzBh2Ia6gs5ZA61Wh4r1pL3zBZExLeaSA/tmpq_ugxya4.png" }, "started_at": "2024-02-27T16:54:16.462344Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/myi6nqzbhs5h7g5lwdgv6bznfy", "cancel": "https://api.replicate.com/v1/predictions/myi6nqzbhs5h7g5lwdgv6bznfy/cancel" }, "version": "32a2efd334440c6109631ff6544ec0a811eed0879626344bce2ea62b32c75004" }
0%| | 0/1 [00:00<?, ?it/s] 100%|██████████| 1/1 [00:37<00:00, 37.49s/it] 100%|██████████| 1/1 [00:37<00:00, 37.49s/it] 0%| | 0/1 [00:00<?, ?it/s] 100%|██████████| 1/1 [00:00<00:00, 4.97it/s] 100%|██████████| 1/1 [00:00<00:00, 4.95it/s] Model parse in 40.01 seconds. Open pose in 1.55 seconds.
This example was created by a different version, viktorfa/oot_segmentation:32a2efd3.
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