nikopueringer/CorridorKey2.0

Corridor Key 2.0 for all your green and blue screen needs

What it solves

CorridorKey 2.0 automatically separates the foreground subject from the background in video footage, producing an alpha matte (a black-and-white mask) and the foreground color. This is a tedious manual task in visual effects and motion graphics; the model speeds it up and can follow hints to pick the right subject.

How it works

You feed it a video (or a folder of frames). The model runs on your GPU and predicts an alpha matte for every frame. You can optionally provide a hint: a first-frame matte, a full hint video, or nothing. The hint tells the model which object to keep. Internally it uses three frozen foundation models (from NVIDIA, Microsoft, and Google DeepMind) plus its own trained weights. It processes the clip in overlapping temporal windows (called Hann windows) to keep results consistent across frames. It can output the matte, the foreground, and other review formats. It also handles HDR by outputting OpenEXR sequences with unclipped values.

Who it's for

Video editors, VFX artists, and motion designers who need clean cutouts or mattes for compositing. It is also open for developers who want to build custom Python tools. The official plugin (paid) integrates with many media apps, but this repo is free to use for commercial or personal work.

Highlights

  • Three inference modes: no hint, first-frame hint, or full hint video.
  • Automatic memory management; works on GPUs with as little as 4 GB VRAM (for 1440p).
  • Supports HDR output via OpenEXR with unclipped scene-linear RGB.
  • Outputs include matte, foreground, checkerboard composite, and straight cutout.
  • Can process long clips without loading the whole video into RAM.
  • Includes a drag-and-drop launcher for Windows and Linux.
  • No silent failures: missing files or unsupported inputs raise clear errors.

Related

  • Project
  • Project
  • Project
  • Project