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.
zsxkib /yolo-world:07aee09f
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 zsxkib/yolo-world using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zsxkib/yolo-world:07aee09fc38bc4459409caa872ea416717712f4e6e875f8751a0d0d5bbea902f",
{
input: {
nms_thr: 0.5,
score_thr: 0.05,
class_names: "fish",
input_media: "https://replicate.delivery/pbxt/KOKT7vl0qmcC8l57jYrr6fmCS1PvZ3IETg3Ld0S1tkwTGasA/tmplm24klgrout_0.mp4",
max_num_boxes: 100
}
}
);
// 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 zsxkib/yolo-world using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zsxkib/yolo-world:07aee09fc38bc4459409caa872ea416717712f4e6e875f8751a0d0d5bbea902f",
input={
"nms_thr": 0.5,
"score_thr": 0.05,
"class_names": "fish",
"input_media": "https://replicate.delivery/pbxt/KOKT7vl0qmcC8l57jYrr6fmCS1PvZ3IETg3Ld0S1tkwTGasA/tmplm24klgrout_0.mp4",
"max_num_boxes": 100
}
)
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 zsxkib/yolo-world 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": "zsxkib/yolo-world:07aee09fc38bc4459409caa872ea416717712f4e6e875f8751a0d0d5bbea902f",
"input": {
"nms_thr": 0.5,
"score_thr": 0.05,
"class_names": "fish",
"input_media": "https://replicate.delivery/pbxt/KOKT7vl0qmcC8l57jYrr6fmCS1PvZ3IETg3Ld0S1tkwTGasA/tmplm24klgrout_0.mp4",
"max_num_boxes": 100
}
}' \
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-12T15:16:26.272087Z",
"created_at": "2024-02-12T15:14:55.608171Z",
"data_removed": false,
"error": null,
"id": "xmcdtn3bbsm6oy7326ilbvg2yq",
"input": {
"nms_thr": 0.5,
"score_thr": 0.05,
"class_names": "fish",
"input_media": "https://replicate.delivery/pbxt/KOKT7vl0qmcC8l57jYrr6fmCS1PvZ3IETg3Ld0S1tkwTGasA/tmplm24klgrout_0.mp4",
"max_num_boxes": 100
},
"logs": "[!] Using batch size 512\n[~] Getting FPS for /tmp/tmp3wrf3r3wtmplm24klgrout_0.mp4\n[!] Temporary directory for frames: /tmp/tmpsmv9tu8j\n[~] Extracting audio from /tmp/tmp3wrf3r3wtmplm24klgrout_0.mp4 to /tmp/tmpsmv9tu8j/audio.mp3\n[!] No audio stream found in the video.\nProcessing frames: 0%| | 0/47 [00:00<?, ?it/s]/root/.pyenv/versions/3.10.12/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)\nreturn _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]\nProcessing frames: 100%|██████████| 47/47 [00:07<00:00, 5.88it/s]\n[~] All frames processed, generating video...\n[!] Running ffmpeg command: ffmpeg -y -r 24.0 -i /tmp/tmpsmv9tu8j/frame_%05d.png -c:v libx264 -pix_fmt yuv420p /tmp/output_video.mp4\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/tmpsmv9tu8j/frame_%05d.png':\nDuration: 00:00:01.88, start: 0.000000, bitrate: N/A\nStream #0:0: Video: png, rgb24(pc), 1024x576, 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 @ 0x55708890e940] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2\n[libx264 @ 0x55708890e940] profile High, level 3.1, 4:2:0, 8-bit\n[libx264 @ 0x55708890e940] 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=15 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=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00\nOutput #0, mp4, to '/tmp/output_video.mp4':\nMetadata:\nencoder : Lavf58.76.100\nStream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, progressive), 1024x576, 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= 47 fps=0.0 q=-1.0 Lsize= 1191kB time=00:00:01.83 bitrate=5322.7kbits/s speed= 3.6x\nvideo:1190kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.116873%\n[libx264 @ 0x55708890e940] frame I:1 Avg QP:27.27 size: 82799\n[libx264 @ 0x55708890e940] frame P:13 Avg QP:28.14 size: 49457\n[libx264 @ 0x55708890e940] frame B:33 Avg QP:31.60 size: 14909\n[libx264 @ 0x55708890e940] consecutive B-frames: 2.1% 8.5% 12.8% 76.6%\n[libx264 @ 0x55708890e940] mb I I16..4: 0.3% 88.3% 11.5%\n[libx264 @ 0x55708890e940] mb P I16..4: 0.3% 10.2% 6.6% P16..4: 24.9% 36.6% 21.0% 0.0% 0.0% skip: 0.4%\n[libx264 @ 0x55708890e940] mb B I16..4: 0.1% 1.2% 1.4% B16..8: 34.0% 19.3% 6.8% direct: 7.0% skip:30.4% L0:28.0% L1:41.0% BI:30.9%\n[libx264 @ 0x55708890e940] 8x8 transform intra:63.4% inter:71.5%\n[libx264 @ 0x55708890e940] coded y,uvDC,uvAC intra: 90.0% 99.7% 96.4% inter: 40.7% 46.1% 23.4%\n[libx264 @ 0x55708890e940] i16 v,h,dc,p: 34% 42% 17% 7%\n[libx264 @ 0x55708890e940] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 15% 9% 5% 12% 13% 11% 9% 9%\n[libx264 @ 0x55708890e940] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 22% 10% 4% 10% 9% 9% 6% 6%\n[libx264 @ 0x55708890e940] i8c dc,h,v,p: 34% 29% 27% 10%\n[libx264 @ 0x55708890e940] Weighted P-Frames: Y:30.8% UV:23.1%\n[libx264 @ 0x55708890e940] ref P L0: 54.7% 25.9% 13.5% 4.7% 1.3%\n[libx264 @ 0x55708890e940] ref B L0: 95.3% 3.7% 1.0%\n[libx264 @ 0x55708890e940] ref B L1: 98.9% 1.1%\n[libx264 @ 0x55708890e940] kb/s:4974.56",
"metrics": {
"predict_time": 10.823607,
"total_time": 90.663916
},
"output": "https://replicate.delivery/pbxt/pXIGmtdzlP4kAFCLOu1edltOaffmmu8YYx5ooFtFUCzQC9rkA/output_video.mp4",
"started_at": "2024-02-12T15:16:15.448480Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/xmcdtn3bbsm6oy7326ilbvg2yq",
"cancel": "https://api.replicate.com/v1/predictions/xmcdtn3bbsm6oy7326ilbvg2yq/cancel"
},
"version": "07aee09fc38bc4459409caa872ea416717712f4e6e875f8751a0d0d5bbea902f"
}
[!] Using batch size 512
[~] Getting FPS for /tmp/tmp3wrf3r3wtmplm24klgrout_0.mp4
[!] Temporary directory for frames: /tmp/tmpsmv9tu8j
[~] Extracting audio from /tmp/tmp3wrf3r3wtmplm24klgrout_0.mp4 to /tmp/tmpsmv9tu8j/audio.mp3
[!] No audio stream found in the video.
Processing frames: 0%| | 0/47 [00:00<?, ?it/s]/root/.pyenv/versions/3.10.12/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Processing frames: 100%|██████████| 47/47 [00:07<00:00, 5.88it/s]
[~] All frames processed, generating video...
[!] Running ffmpeg command: ffmpeg -y -r 24.0 -i /tmp/tmpsmv9tu8j/frame_%05d.png -c:v libx264 -pix_fmt yuv420p /tmp/output_video.mp4
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/tmpsmv9tu8j/frame_%05d.png':
Duration: 00:00:01.88, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgb24(pc), 1024x576, 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 @ 0x55708890e940] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55708890e940] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x55708890e940] 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=15 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=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/tmp/output_video.mp4':
Metadata:
encoder : Lavf58.76.100
Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, progressive), 1024x576, 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= 47 fps=0.0 q=-1.0 Lsize= 1191kB time=00:00:01.83 bitrate=5322.7kbits/s speed= 3.6x
video:1190kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.116873%
[libx264 @ 0x55708890e940] frame I:1 Avg QP:27.27 size: 82799
[libx264 @ 0x55708890e940] frame P:13 Avg QP:28.14 size: 49457
[libx264 @ 0x55708890e940] frame B:33 Avg QP:31.60 size: 14909
[libx264 @ 0x55708890e940] consecutive B-frames: 2.1% 8.5% 12.8% 76.6%
[libx264 @ 0x55708890e940] mb I I16..4: 0.3% 88.3% 11.5%
[libx264 @ 0x55708890e940] mb P I16..4: 0.3% 10.2% 6.6% P16..4: 24.9% 36.6% 21.0% 0.0% 0.0% skip: 0.4%
[libx264 @ 0x55708890e940] mb B I16..4: 0.1% 1.2% 1.4% B16..8: 34.0% 19.3% 6.8% direct: 7.0% skip:30.4% L0:28.0% L1:41.0% BI:30.9%
[libx264 @ 0x55708890e940] 8x8 transform intra:63.4% inter:71.5%
[libx264 @ 0x55708890e940] coded y,uvDC,uvAC intra: 90.0% 99.7% 96.4% inter: 40.7% 46.1% 23.4%
[libx264 @ 0x55708890e940] i16 v,h,dc,p: 34% 42% 17% 7%
[libx264 @ 0x55708890e940] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 15% 9% 5% 12% 13% 11% 9% 9%
[libx264 @ 0x55708890e940] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 22% 10% 4% 10% 9% 9% 6% 6%
[libx264 @ 0x55708890e940] i8c dc,h,v,p: 34% 29% 27% 10%
[libx264 @ 0x55708890e940] Weighted P-Frames: Y:30.8% UV:23.1%
[libx264 @ 0x55708890e940] ref P L0: 54.7% 25.9% 13.5% 4.7% 1.3%
[libx264 @ 0x55708890e940] ref B L0: 95.3% 3.7% 1.0%
[libx264 @ 0x55708890e940] ref B L1: 98.9% 1.1%
[libx264 @ 0x55708890e940] kb/s:4974.56