Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
lucataco /depth-anything-video:91436914
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";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run lucataco/depth-anything-video using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/depth-anything-video:9143691405afc64c7952499a1e81e3f779535a8916c8da7154a9995f145d5e6d",
{
input: {
video: "https://replicate.delivery/pbxt/KNKOSnn6o2d9gTnx7zyZotBxiRvLhbPd76FDSSSxW5fOJ8az/seasnake.mp4",
encoder: "vits"
}
}
);
// 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
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run lucataco/depth-anything-video using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/depth-anything-video:9143691405afc64c7952499a1e81e3f779535a8916c8da7154a9995f145d5e6d",
input={
"video": "https://replicate.delivery/pbxt/KNKOSnn6o2d9gTnx7zyZotBxiRvLhbPd76FDSSSxW5fOJ8az/seasnake.mp4",
"encoder": "vits"
}
)
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 lucataco/depth-anything-video 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": "lucataco/depth-anything-video:9143691405afc64c7952499a1e81e3f779535a8916c8da7154a9995f145d5e6d",
"input": {
"video": "https://replicate.delivery/pbxt/KNKOSnn6o2d9gTnx7zyZotBxiRvLhbPd76FDSSSxW5fOJ8az/seasnake.mp4",
"encoder": "vits"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-02-09T19:33:50.579000Z",
"created_at": "2024-02-09T19:33:10.749181Z",
"data_removed": false,
"error": null,
"id": "nzv2anzboxw3fqqq6o27chmr2i",
"input": {
"video": "https://replicate.delivery/pbxt/KNKOSnn6o2d9gTnx7zyZotBxiRvLhbPd76FDSSSxW5fOJ8az/seasnake.mp4",
"encoder": "vits"
},
"logs": "Processing /tmp/tmprjza_xe3seasnake.mp4\n/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/transformers/pipelines/base.py:1123: UserWarning: You seem to be using the pipelines sequentially on GPU. In order to maximize efficiency please use a dataset\nwarnings.warn(\nffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers\nbuilt with gcc 11 (Ubuntu 11.2.0-19ubuntu1)\nconfiguration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared\nlibavutil 56. 70.100 / 56. 70.100\nlibavcodec 58.134.100 / 58.134.100\nlibavformat 58. 76.100 / 58. 76.100\nlibavdevice 58. 13.100 / 58. 13.100\nlibavfilter 7.110.100 / 7.110.100\nlibswscale 5. 9.100 / 5. 9.100\nlibswresample 3. 9.100 / 3. 9.100\nlibpostproc 55. 9.100 / 55. 9.100\nInput #0, image2, from '/tmp/frames/depth-%d.png':\nDuration: 00:00:03.20, start: 0.000000, bitrate: N/A\nStream #0:0: Video: png, rgb24(pc), 1920x1080, 25 fps, 25 tbr, 25 tbn, 25 tbc\nStream mapping:\nStream #0:0 -> #0:0 (png (native) -> h264 (libx264))\nPress [q] to stop, [?] for help\n[libx264 @ 0x5699dd544380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2\n[libx264 @ 0x5699dd544380] profile High, level 4.0, 4:2:0, 8-bit\n[libx264 @ 0x5699dd544380] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00\nOutput #0, mp4, to '/tmp/output.mp4':\nMetadata:\nencoder : Lavf58.76.100\nStream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, progressive), 1920x1080, q=2-31, 24 fps, 12288 tbn\nMetadata:\nencoder : Lavc58.134.100 libx264\nSide data:\ncpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A\nframe= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x\nframe= 19 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x\nframe= 38 fps= 36 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x\nframe= 47 fps= 26 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x\nframe= 62 fps= 26 q=30.0 size= 0kB time=00:00:00.12 bitrate= 3.1kbits/s speed=0.0532x\nframe= 71 fps= 25 q=30.0 size= 0kB time=00:00:00.50 bitrate= 0.8kbits/s speed=0.174x\nframe= 80 fps= 16 q=-1.0 Lsize= 809kB time=00:00:03.20 bitrate=2066.3kbits/s speed=0.624x\nvideo:808kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.210413%\n[libx264 @ 0x5699dd544380] frame I:7 Avg QP:20.24 size: 19880\n[libx264 @ 0x5699dd544380] frame P:27 Avg QP:22.87 size: 12204\n[libx264 @ 0x5699dd544380] frame B:46 Avg QP:23.17 size: 7774\n[libx264 @ 0x5699dd544380] consecutive B-frames: 18.8% 7.5% 18.8% 55.0%\n[libx264 @ 0x5699dd544380] mb I I16..4: 51.2% 48.3% 0.4%\n[libx264 @ 0x5699dd544380] mb P I16..4: 21.2% 14.5% 0.0% P16..4: 38.0% 1.9% 0.7% 0.0% 0.0% skip:23.8%\n[libx264 @ 0x5699dd544380] mb B I16..4: 3.4% 2.7% 0.0% B16..8: 40.0% 1.7% 0.0% direct: 1.2% skip:51.0% L0:48.0% L1:51.5% BI: 0.5%\n[libx264 @ 0x5699dd544380] 8x8 transform intra:43.9% inter:99.8%\n[libx264 @ 0x5699dd544380] coded y,uvDC,uvAC intra: 6.1% 41.7% 2.9% inter: 2.4% 9.4% 0.0%\n[libx264 @ 0x5699dd544380] i16 v,h,dc,p: 7% 55% 4% 34%\n[libx264 @ 0x5699dd544380] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 23% 43% 2% 5% 3% 5% 1% 2%\n[libx264 @ 0x5699dd544380] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 20% 46% 2% 8% 2% 4% 1% 1%\n[libx264 @ 0x5699dd544380] i8c dc,h,v,p: 36% 45% 7% 13%\n[libx264 @ 0x5699dd544380] Weighted P-Frames: Y:22.2% UV:22.2%\n[libx264 @ 0x5699dd544380] ref P L0: 51.4% 0.7% 29.0% 13.6% 5.3%\n[libx264 @ 0x5699dd544380] ref B L0: 74.8% 20.4% 4.8%\n[libx264 @ 0x5699dd544380] ref B L1: 89.6% 10.4%\n[libx264 @ 0x5699dd544380] kb/s:1983.01",
"metrics": {
"predict_time": 39.808361,
"total_time": 39.829819
},
"output": "https://replicate.delivery/pbxt/PpitTafTW43vek69S9KyZHtG2VbAPRVWcLLZsczjT5EeAGqkA/output.mp4",
"started_at": "2024-02-09T19:33:10.770639Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/nzv2anzboxw3fqqq6o27chmr2i",
"cancel": "https://api.replicate.com/v1/predictions/nzv2anzboxw3fqqq6o27chmr2i/cancel"
},
"version": "9143691405afc64c7952499a1e81e3f779535a8916c8da7154a9995f145d5e6d"
}
Processing /tmp/tmprjza_xe3seasnake.mp4
/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/transformers/pipelines/base.py:1123: UserWarning: You seem to be using the pipelines sequentially on GPU. In order to maximize efficiency please use a dataset
warnings.warn(
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Input #0, image2, from '/tmp/frames/depth-%d.png':
Duration: 00:00:03.20, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgb24(pc), 1920x1080, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x5699dd544380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x5699dd544380] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0x5699dd544380] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/tmp/output.mp4':
Metadata:
encoder : Lavf58.76.100
Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, progressive), 1920x1080, q=2-31, 24 fps, 12288 tbn
Metadata:
encoder : Lavc58.134.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 19 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 38 fps= 36 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 47 fps= 26 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 62 fps= 26 q=30.0 size= 0kB time=00:00:00.12 bitrate= 3.1kbits/s speed=0.0532x
frame= 71 fps= 25 q=30.0 size= 0kB time=00:00:00.50 bitrate= 0.8kbits/s speed=0.174x
frame= 80 fps= 16 q=-1.0 Lsize= 809kB time=00:00:03.20 bitrate=2066.3kbits/s speed=0.624x
video:808kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.210413%
[libx264 @ 0x5699dd544380] frame I:7 Avg QP:20.24 size: 19880
[libx264 @ 0x5699dd544380] frame P:27 Avg QP:22.87 size: 12204
[libx264 @ 0x5699dd544380] frame B:46 Avg QP:23.17 size: 7774
[libx264 @ 0x5699dd544380] consecutive B-frames: 18.8% 7.5% 18.8% 55.0%
[libx264 @ 0x5699dd544380] mb I I16..4: 51.2% 48.3% 0.4%
[libx264 @ 0x5699dd544380] mb P I16..4: 21.2% 14.5% 0.0% P16..4: 38.0% 1.9% 0.7% 0.0% 0.0% skip:23.8%
[libx264 @ 0x5699dd544380] mb B I16..4: 3.4% 2.7% 0.0% B16..8: 40.0% 1.7% 0.0% direct: 1.2% skip:51.0% L0:48.0% L1:51.5% BI: 0.5%
[libx264 @ 0x5699dd544380] 8x8 transform intra:43.9% inter:99.8%
[libx264 @ 0x5699dd544380] coded y,uvDC,uvAC intra: 6.1% 41.7% 2.9% inter: 2.4% 9.4% 0.0%
[libx264 @ 0x5699dd544380] i16 v,h,dc,p: 7% 55% 4% 34%
[libx264 @ 0x5699dd544380] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 23% 43% 2% 5% 3% 5% 1% 2%
[libx264 @ 0x5699dd544380] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 20% 46% 2% 8% 2% 4% 1% 1%
[libx264 @ 0x5699dd544380] i8c dc,h,v,p: 36% 45% 7% 13%
[libx264 @ 0x5699dd544380] Weighted P-Frames: Y:22.2% UV:22.2%
[libx264 @ 0x5699dd544380] ref P L0: 51.4% 0.7% 29.0% 13.6% 5.3%
[libx264 @ 0x5699dd544380] ref B L0: 74.8% 20.4% 4.8%
[libx264 @ 0x5699dd544380] ref B L1: 89.6% 10.4%
[libx264 @ 0x5699dd544380] kb/s:1983.01