You're looking at a specific version of this model. Jump to the model overview.
nateraw /video-background-remover:ac5c1381
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable: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 nateraw/video-background-remover using Replicateās API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"nateraw/video-background-remover:ac5c138171b04413a69222c304f67c135e259d46089fc70ef12da685b3c604aa",
{
input: {
video: "https://replicate.delivery/pbxt/KObDFVxLp3hoAWCPsvxdVjHJLtN23IN1cHIv0XDyAjnOg0II/obama_1_trimmed.mp4"
}
}
);
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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run nateraw/video-background-remover using Replicateās API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"nateraw/video-background-remover:ac5c138171b04413a69222c304f67c135e259d46089fc70ef12da685b3c604aa",
input={
"video": "https://replicate.delivery/pbxt/KObDFVxLp3hoAWCPsvxdVjHJLtN23IN1cHIv0XDyAjnOg0II/obama_1_trimmed.mp4"
}
)
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=<paste-your-token-here>
Find your API token in your account settings.
Run nateraw/video-background-remover 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": "ac5c138171b04413a69222c304f67c135e259d46089fc70ef12da685b3c604aa",
"input": {
"video": "https://replicate.delivery/pbxt/KObDFVxLp3hoAWCPsvxdVjHJLtN23IN1cHIv0XDyAjnOg0II/obama_1_trimmed.mp4"
}
}' \
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/nateraw/video-background-remover@sha256:ac5c138171b04413a69222c304f67c135e259d46089fc70ef12da685b3c604aa \
-i 'video="https://replicate.delivery/pbxt/KObDFVxLp3hoAWCPsvxdVjHJLtN23IN1cHIv0XDyAjnOg0II/obama_1_trimmed.mp4"'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/nateraw/video-background-remover@sha256:ac5c138171b04413a69222c304f67c135e259d46089fc70ef12da685b3c604aa
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "video": "https://replicate.delivery/pbxt/KObDFVxLp3hoAWCPsvxdVjHJLtN23IN1cHIv0XDyAjnOg0II/obama_1_trimmed.mp4" } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.048. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-02-13T09:31:44.309273Z",
"created_at": "2024-02-13T09:30:31.334414Z",
"data_removed": false,
"error": null,
"id": "sjwxeclbzmdkpsgfgaqziiofxu",
"input": {
"video": "https://replicate.delivery/pbxt/KObDFVxLp3hoAWCPsvxdVjHJLtN23IN1cHIv0XDyAjnOg0II/obama_1_trimmed.mp4"
},
"logs": "0 0.0 - 1.5\n/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/torchvision/transforms/functional.py:1603: UserWarning: The default value of the antialias parameter of all the resizing transforms (Resize(), RandomResizedCrop(), etc.) will change from None to True in v0.17, in order to be consistent across the PIL and Tensor backends. To suppress this warning, directly pass antialias=True (recommended, future default), antialias=None (current default, which means False for Tensors and True for PIL), or antialias=False (only works on Tensors - PIL will still use antialiasing). This also applies if you are using the inference transforms from the models weights: update the call to weights.transforms(antialias=True).\nwarnings.warn(\n1 1.5 - 3.0\n2 3.0 - 4.5\n3 4.5 - 6.0\n4 6.0 - 7.5\n5 7.5 - 8.716",
"metrics": {
"predict_time": 19.167757,
"total_time": 72.974859
},
"output": "https://replicate.delivery/pbxt/a0OxmU83VxpaEBvMlXfl7GwTS2PxJXfNR1Dtfvo76I29HdskA/out.mp4",
"started_at": "2024-02-13T09:31:25.141516Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/sjwxeclbzmdkpsgfgaqziiofxu",
"cancel": "https://api.replicate.com/v1/predictions/sjwxeclbzmdkpsgfgaqziiofxu/cancel"
},
"version": "ac5c138171b04413a69222c304f67c135e259d46089fc70ef12da685b3c604aa"
}
0 0.0 - 1.5
/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/torchvision/transforms/functional.py:1603: UserWarning: The default value of the antialias parameter of all the resizing transforms (Resize(), RandomResizedCrop(), etc.) will change from None to True in v0.17, in order to be consistent across the PIL and Tensor backends. To suppress this warning, directly pass antialias=True (recommended, future default), antialias=None (current default, which means False for Tensors and True for PIL), or antialias=False (only works on Tensors - PIL will still use antialiasing). This also applies if you are using the inference transforms from the models weights: update the call to weights.transforms(antialias=True).
warnings.warn(
1 1.5 - 3.0
2 3.0 - 4.5
3 4.5 - 6.0
4 6.0 - 7.5
5 7.5 - 8.716