WaveSpeed.ai
Home/Explore/Best Open Source Video Models/wavespeed-ai/sam3-video-rle
video-to-text

video-to-text

SAM 3 Video RLE

wavespeed-ai/sam3-video-rle

SAM 3 Video RLE is a unified foundation model for prompt-based segmentation in video. Track and segment objects across frames using text, points, or boxes, returning RLE encoded masks for efficient processing. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Input

Hint: You can drag and drop a file or click to upload

Whether to apply mask to video

Idle

{ "rle_url": "https://d2p7pge43lyniu.cloudfront.net/output/2a4b36a7-77c5-4b7c-9c42-d28eef15705c-u1_b5159ba1-08a2-4e29-9dd9-66a30506fa42_rle.json", "video_url": "https://d2p7pge43lyniu.cloudfront.net/output/2a4b36a7-77c5-4b7c-9c42-d28eef15705c-u1_f517c2b2-1e6c-4c63-b432-de43b9fb2e1f.mp4" }

Your request will cost $0.05 per run.

For $1 you can run this model approximately 20 times.

ExamplesView all

README

SAM3 Video Segmentation RLE

SAM3 Video Segmentation RLE is an advanced video segmentation model based on Meta's Segment Anything Model 3. It tracks and segments objects across video frames and returns masks in RLE (Run-Length Encoding) format — ideal for programmatic processing, automated pipelines, and integration with downstream workflows.

Why Choose This?

  • Video object tracking Segment and track objects consistently across all video frames.

  • RLE output format Returns compact Run-Length Encoded mask data for efficient storage and processing.

  • Multiple prompt types Segment objects using text prompts, point prompts, box prompts, or any combination.

  • Multi-object tracking Track multiple objects using comma-separated prompts (e.g., "person, cloth").

  • Prompt Enhancer Built-in tool to automatically improve your text prompts for better results.

  • Optional mask visualization Toggle apply_mask to preview segmentation on the video.

Parameters

ParameterRequiredDescription
videoYesSource video to segment (upload or URL)
promptYesText description of the object(s) to segment
point_promptsNoPoint coordinates to identify the target object
box_promptsNoBounding box coordinates to identify the target object
apply_maskNoApply mask overlay to the video output

How to Use

  1. Upload your video — drag and drop or paste a URL.
  2. Write your prompt — describe the object(s) to track (e.g., "the man", "person, cloth").
  3. Add point/box prompts (optional) — click "+ Add Item" for precise targeting.
  4. Enable apply_mask (optional) — check to visualize masks on the video.
  5. Run — submit and receive RLE-encoded segmentation data.

Output Format

The model returns RLE (Run-Length Encoding) data for each frame in JSON format, enabling efficient programmatic processing.

Decoding RLE in Python

from pycocotools import mask as mask_utils

rle_data = {"counts": "146301 3 147834 11 ...", "size": [height, width]}
binary_mask = mask_utils.decode(rle_data)  # Returns numpy array

Pricing

DurationCost
Per 5 seconds$0.05
1 minute$0.60
5 minutes$3.00
10 minutes$6.00

Billing Rules

  • Rate: $0.05 per 5 seconds
  • Minimum charge: 5 seconds
  • Maximum duration: 10 minutes (600 seconds)
  • Billed duration: Video length rounded up in 5-second units

Best Use Cases

  • Video Annotation — Generate frame-by-frame segmentation masks for training data.
  • Object Tracking Pipelines — Integrate tracking data into automated workflows.
  • Video Editing Automation — Extract masks for programmatic video processing.
  • Computer Vision — Track objects across frames for CV applications.
  • VFX Pipelines — Generate rotoscoping masks for visual effects work.

Pro Tips

  • Use comma-separated prompts to track multiple objects (e.g., "person, car, dog").
  • Use this model when you need programmatic access to frame-by-frame mask data.
  • Use SAM3 Video if you need direct video output.
  • RLE format is compatible with pycocotools for easy decoding.
  • Combine text prompts with point/box prompts for more accurate tracking.

Notes

  • Maximum video duration is 10 minutes per job.
  • Output is RLE-encoded JSON data, not a video file.
  • For longer videos, split into segments and process separately.
  • Use pycocotools or similar libraries to decode RLE data.

Related Models