A video segmenter
Segments images and video with SAM3 on the guest GPU (ncnn and Vulkan).
GPUPython with uvPython · Node.js · Rust

- 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.
- 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.
- 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.
- $ 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.pygit clone https://github.com/brekkylab/ailoy
git clone https://github.com/brekkylab/ailoy-examples
(cd ailoy/bindings/node && npm install && npm run build)
cd ailoy-examples/sam3/node
npm install
npm startgit clone https://github.com/brekkylab/ailoy
git clone https://github.com/brekkylab/ailoy-examples
cd ailoy-examples
cargo run --example sam3needs 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