GitHubGet started
← All use cases

A video segmenter

Segments images and video with SAM3 on the guest GPU (ncnn and Vulkan).

GPUPython with uvPython · Node.js · Rust

examples/sam3
The sam3 agent tracking a child through a video on the guest GPU
You Remove background
What it made
  • baby-no-background.gif3.1 MB
  • baby-no-background.webp5.2 MB

97 frames tracked in 406.6 s on the guest GPU

It segments from a word

Name what to find and SAM3 masks every one, or follows it through a video.

the skill, run_sam3.py
  • detectevery instance of a word
  • segmentone object, from points or a box
  • trackobjects through a video

On your GPU, inside the VM

SAM3 runs through ncnn on Vulkan in the VM, on your machine's GPU.

the agent's microVM
  • python:3.12-slim-trixiewith ncnn and OpenCV
  • Virtio-GPU Venusyour GPU, over Vulkan
  • 2 vCPUs · 4 GiB
  • /modelsSAM3, converted on first run

Try your own images

Put images or video frames in ./context and ask in words.

ailoy-examples/sam3/python
  • $ uv run main.py "Find every cat in the photos in context and mask them"

Run it

git clone https://github.com/brekkylab/ailoy
git clone https://github.com/brekkylab/ailoy-examples
cd ailoy-examples/sam3/python
uv run main.py
needs GPU · Python with uv · and a logged-in Claude Code, Codex or Gemini CLI, or an API key

Run your first agent
in its own microVM

Install the package, name a model and run it