bytedance/sa2va-4b-video 🖼️📝🔢 → ❓

▶️ 43 runs 📅 Feb 2025 ⚙️ Cog 0.13.8-dev+gdeaa413.d20250220 🔗 GitHub 📄 Paper ⚖️ License
referring-video-segmentation text-guided-segmentation video-segmentation video-to-video

About

Sa2VA: Marrying SAM2 with LLaVA for Dense Grounded Understanding of Images and Videos

Example Output

Output

Performance Metrics

17.08s Prediction Time
17.08s Total Time
All Input Parameters
{
  "video": "https://replicate.delivery/pbxt/MXbMlgO6lBD93p0OZrWjcQzRrGa3tuns7q7Si64C15pNs4yT/flower-6.mp4",
  "instruction": "Segment the flower",
  "frame_interval": 4
}
Input Parameters
video (required) Type: string
Input video for segmentation
instruction (required) Type: string
Text instruction for the model
frame_interval Type: integerDefault: 6Range: 1 - 30
Frame interval for processing
Output Schema
response Type: string
Response
masked_video Type: stringFormat: uri
Masked Video
Example Execution Logs
propagate in video:   0%|          | 0/45 [00:00<?, ?it/s]
propagate in video:  18%|█▊        | 8/45 [00:00<00:00, 73.20it/s]
propagate in video:  36%|███▌      | 16/45 [00:00<00:00, 37.01it/s]
propagate in video:  47%|████▋     | 21/45 [00:00<00:00, 32.92it/s]
propagate in video:  56%|█████▌    | 25/45 [00:00<00:00, 30.94it/s]
propagate in video:  64%|██████▍   | 29/45 [00:00<00:00, 29.67it/s]
propagate in video:  73%|███████▎  | 33/45 [00:01<00:00, 28.79it/s]
propagate in video:  80%|████████  | 36/45 [00:01<00:00, 28.28it/s]
propagate in video:  87%|████████▋ | 39/45 [00:01<00:00, 27.86it/s]
propagate in video:  93%|█████████▎| 42/45 [00:01<00:00, 27.66it/s]
propagate in video: 100%|██████████| 45/45 [00:01<00:00, 27.39it/s]
propagate in video: 100%|██████████| 45/45 [00:01<00:00, 30.44it/s]
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, avi, from '/tmp/output/temp_masked.avi':
Metadata:
software        : Lavf59.27.100
Duration: 00:00:06.04, start: 0.000000, bitrate: 2362 kb/s
Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080, 2403 kb/s, 7.45 fps, 7.45 tbr, 7.45 tbn, 7.45 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0x5dcaa0724e00] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x5dcaa06eaf80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x5dcaa06eaf80] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0x5dcaa06eaf80] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 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=1 keyint=250 keyint_min=7 scenecut=40 intra_refresh=0 rc_lookahead=30 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/masked_video.mp4':
Metadata:
software        : Lavf59.27.100
encoder         : Lavf58.76.100
Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1920x1080, q=2-31, 7.45 fps, 14906 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=N/A
frame=   45 fps=0.0 q=-1.0 Lsize=     248kB time=00:00:05.63 bitrate= 360.2kbits/s speed=9.76x
video:246kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.556042%
[libx264 @ 0x5dcaa06eaf80] frame I:1     Avg QP:18.58  size:  9682
[libx264 @ 0x5dcaa06eaf80] frame P:12    Avg QP:25.95  size:  6920
[libx264 @ 0x5dcaa06eaf80] frame B:32    Avg QP:28.12  size:  4966
[libx264 @ 0x5dcaa06eaf80] consecutive B-frames:  2.2%  8.9%  0.0% 88.9%
[libx264 @ 0x5dcaa06eaf80] mb I  I16..4: 20.8% 76.1%  3.1%
[libx264 @ 0x5dcaa06eaf80] mb P  I16..4:  0.5%  2.7%  1.2%  P16..4:  3.7%  1.4%  0.6%  0.0%  0.0%    skip:89.9%
[libx264 @ 0x5dcaa06eaf80] mb B  I16..4:  0.4%  0.0%  0.1%  B16..8:  3.6%  2.5%  0.6%  direct: 0.2%  skip:92.5%  L0:51.3% L1:44.9% BI: 3.8%
[libx264 @ 0x5dcaa06eaf80] 8x8 transform intra:63.5% inter:2.9%
[libx264 @ 0x5dcaa06eaf80] coded y,uvDC,uvAC intra: 6.3% 0.0% 0.0% inter: 0.9% 0.0% 0.0%
[libx264 @ 0x5dcaa06eaf80] i16 v,h,dc,p: 78% 13%  9%  0%
[libx264 @ 0x5dcaa06eaf80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 44%  3% 53%  0%  0%  0%  0%  0%  0%
[libx264 @ 0x5dcaa06eaf80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 17% 42%  3%  2%  3%  2%  3%  3%
[libx264 @ 0x5dcaa06eaf80] i8c dc,h,v,p: 100%  0%  0%  0%
[libx264 @ 0x5dcaa06eaf80] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x5dcaa06eaf80] ref P L0: 70.6% 29.4%
[libx264 @ 0x5dcaa06eaf80] ref B L0: 85.7% 14.3%
[libx264 @ 0x5dcaa06eaf80] ref B L1: 92.3%  7.7%
[libx264 @ 0x5dcaa06eaf80] kb/s:333.40
Version Details
Version ID
12093a2cbbd53848e1033678c0f9bc89ff9c0a390a2c416a885cb3715b9926bd
Version Created
February 22, 2025
Run on Replicate →