Desktop GUI for generating masks and removing objects from EXR image sequences. Each model plugs in as a backend; the green-screen chroma key is used as the shared "alpha hint" that every backend consumes.
This repository contains the host app, Nuke bridge, installers, and backend
wrappers only. Model weights, generated EXR outputs, and third-party upstream
checkouts are intentionally not committed; setup.sh or model packs install
those locally.
| Backend | Task | Output | Extra install |
|---|---|---|---|
ChromaKey (no AI) |
mask | Matte/*.exr (float32) |
— |
CorridorKey |
mask | Matte/*.exr + optional Comp/, Processed/, AlphaHint/ |
auto (~300 MB) |
MatAnyone2 |
mask | Matte/*.exr |
auto (~600 MB on first run) |
VideoMaMa |
mask | Matte/*.exr |
./setup.sh --videomama (~10 GB SVD + UNet) |
EffectErase |
object removal | Cleaned/*.exr |
./setup.sh --effecterase (~10 GB Wan 2.1 + weights) |
VOID (Netflix) |
object removal | Cleaned/*.exr |
./setup.sh --void (~30 GB CogVideoX-Fun + pass1/2 weights) |
Masks feed forward: run a masking backend first, then pick
EffectErase / VOID, select the output's Matte/ folder as the "Existing
mask folder", and the removal backends will use those masks instead of
rebuilding them from a chroma key.
cd /path/to/RotoscopeApp
./setup.sh # CorridorKey + MatAnyone2 (default; the two you need for masking)
./setup.sh --videomama # + VideoMaMa weights
./setup.sh --effecterase # + EffectErase + Wan 2.1 weights
./setup.sh --void # + Netflix VOID (manual weight download still required)
./setup.sh --all # everythingsetup.sh installs uv if missing, creates a
Python 3.11 venv under CorridorKey/.venv, and shares it across all
backends. MatAnyone2 is installed from a local clone with UI/training deps
(gradio, PySide6, cchardet, tensorboard, …) stripped — it will not
build on Python 3.11 otherwise.
./run.shPick an EXR sequence folder, choose a backend, tweak the green-screen hint,
and press Run. Output lands in output/ (or whatever you pick) as
half-float PXR24-compressed EXR.
The same backends can be used from Nuke through a thin bridge that keeps all
PyTorch work outside the Nuke process. Install the menu shim from nuke/menu.py
and use RotoAI > Run Selected Read... or RotoAI > Create RotoAI Node.
See docs/nuke_integration.md for setup, model-pack manifests, and CLI usage.
rotoscope_app/
├── __main__.py # module entry (python -m rotoscope_app)
├── app.py # Tkinter GUI, registry-driven
├── alpha_hint.py # HSV chroma-key hint generator (shared by all backends)
├── exr_io.py # cv2-based EXR read/write (float32 linear)
└── backends/
├── __init__.py # registry — add new backends here
├── base.py # KeyerBackend protocol + KeyerParams
├── chromakey_only.py
├── corridorkey.py
├── matanyone2.py
├── videomama.py
├── effecterase.py
└── void.py
- Create
rotoscope_app/backends/my_backend.pyimplementing theKeyerBackendprotocol (a class withname: str,task_type: "mask" | "remove", and arun(params, on_progress, cancel_event)method). - Add a lazy loader and
register(...)call inrotoscope_app/backends/__init__.py. - Relaunch
./run.sh— the combobox picks it up automatically.
The base class intentionally stays minimal (no ABC, just a protocol) so a
backend can be as small as the ChromaKeyOnlyBackend in
chromakey_only.py or wrap a shell CLI like EffectEraseBackend does.
- CorridorKey's
CHECKPOINT_DIRis relative to the repo root, so the CorridorKey backend temporarilychdirs intoCorridorKey/during a run. - Both the Apple Silicon (MPS) and CPU code paths work; CUDA is only relevant if you repoint the venv at a GPU host.
- The chroma-key hint function is exposed module-level (
alpha_hint.chroma_key_hint) so you can prototype a new backend against the same hints.