How AI chroma keying works: neural unmixing vs traditional green screen removal
Green screen removal has worked the same way for decades. Pick a color. Set a tolerance range. Everything inside that range becomes transparent. Everything outside stays opaque.
That approach works well when the screen is evenly lit, the talent stays away from the edges, and nobody has flyaway hair. It falls apart the moment any of those conditions break.
AI chroma keying takes a different path. Instead of asking whether a pixel is green, it asks what color that pixel would be if the green screen was never there. The difference sounds subtle. The results are not.
Why traditional chroma keying struggles
Every traditional keyer, from After Effects' built-in Keylight to DaVinci Resolve's Delta Keyer to Boris FX's Primatte, follows the same basic logic.
Step 1: Sample the background color. You pick a region of your green (or blue) screen, and the keyer records the RGB values in that area.
Step 2: Build a tolerance range. The keyer defines a zone of colors considered "background." Pixels inside this zone get removed. Pixels outside get kept.
Step 3: Generate a matte. The keyer produces a grayscale image where white means fully opaque (foreground) and black means fully transparent (background). Gray values represent partial transparency.
Step 4: Suppress spill. Green light bounces off the screen and contaminates the foreground subject. The keyer tries to remove that green cast from skin, hair, and clothing.
The tools for tuning this process have names you have probably seen before:
☼ Clip black / clip white control where the matte cuts between transparent and opaque ☼ Screen gain adjusts how aggressively the keyer removes the background color ☼ Spill suppression tries to neutralize the color contamination on the foreground ☼ Edge softness blurs the boundary between foreground and background
These parameters interact with each other in nonlinear ways. Pushing clip black to clean up the background can eat into fine hair detail. Increasing spill suppression can shift skin tones toward magenta. Every shot requires its own balance, and complex shots can take hours of manual tweaking.
The core problem is that traditional keyers treat chroma keying as a classification task. Each pixel gets sorted into one of two buckets: foreground or background. The keyer draws a boundary in color space, and pixels land on one side or the other.
Reality does not work in two buckets.
Where traditional keyers break down
Several common shooting conditions expose the limits of color-based thresholding.
Hair and fine detail. A single strand of hair is thin enough that the camera captures a blend of the hair color and the green screen behind it. The resulting pixel is neither fully foreground nor fully background. Traditional keyers either keep it (leaving a green halo) or remove it (making the talent look like they got a buzz cut). There is no good middle ground with color thresholding because the pixel genuinely contains both colors mixed together.
Motion blur. When someone moves quickly, the camera sensor integrates light over the full exposure time. The edge of a moving arm sweeps across both foreground and background during a single frame. The pixels along that motion blur ramp are a physical blend of subject and screen. A traditional keyer sees those blended pixels and has to guess. It almost always guesses wrong.
Semi-transparent materials. Veils, sheer fabric, glass, smoke, and water all let background light pass through. A traditional keyer cannot tell the difference between a semi-transparent foreground and a slightly off-shade background. Both produce pixels that are partially green.
Uneven lighting. The green screen is rarely one uniform shade. Wrinkles cast shadows. Lights create hot spots. The edges of the screen are dimmer than the center. A single color sample cannot capture all of that variation. You end up expanding your tolerance range until it starts eating foreground, or you rotoscope problem areas by hand.
Green spill on skin. Green light reflecting off the screen onto the talent creates pixels where the skin genuinely contains green. Spill suppression algorithms try to subtract the green, but they are working backwards from a blended result. They cannot know what the original skin color was.
What AI chroma keying does differently
AI chroma keying reframes the entire problem. Instead of classifying pixels, it unmixes them.
The concept comes from how light physically combines when you place an object in front of a colored background. For any pixel in a green screen shot, the final color is a blend of two things: the foreground color (what the object actually looks like) and the background color (the green screen), mixed according to the alpha (transparency) at that point.
Mathematically, the relationship is straightforward:
observed color = (foreground color x alpha) + (background color x (1 - alpha))
A traditional keyer knows the observed color and the background color. It tries to figure out alpha by checking how close the observed color is to the background. That works when alpha is 0 or 1 (fully transparent or fully opaque), but it breaks for everything in between.
An AI keyer learns the inverse function. Given an observed color and a known background, it predicts both the original foreground color and the alpha simultaneously. It does this by training on millions of examples where the ground truth is known.
The training data comes from compositing real foreground objects over known backgrounds. The network sees the composited result and learns to recover the original foreground and alpha. After enough training, it can generalize to new subjects it has never seen.
This is neural unmixing. The network does not ask "is this pixel green?" It asks "what color would this pixel be without the green screen, and how transparent is it?"
The result is a continuous alpha channel that matches the physical reality of the shot. A hair strand that is 30% transparent gets an alpha value near 0.3. A motion-blurred edge that ramps from opaque to transparent gets a smooth gradient in the alpha channel. A sheer fabric that lets 60% of light through gets an alpha near 0.4.
No manual parameter tweaking. No clip black/white tradeoffs. The network handles each pixel based on what it learned about how light mixes.
Why AI preserves what traditional keyers lose
The quality difference comes down to one thing: continuous alpha values versus binary decisions.
A traditional keyer must draw a line somewhere. Pixels on one side are kept. Pixels on the other side are removed. Even keyers that produce "soft" edges are still working from a threshold. They just blur the boundary after the fact, which softens real detail along with artifacts.
An AI keyer never makes a binary decision. Every pixel gets a precise alpha value between 0.0 and 1.0. That precision preserves:
☼ Individual hair strands that are partially transparent get matched alpha values instead of being forced to fully opaque or fully removed ☼ Motion blur gradients that ramp smoothly from subject to background get corresponding smooth alpha ramps ☼ Semi-transparent fabrics get alpha values that reflect how much light actually passes through the material ☼ Fine wisps and flyaways that would be invisible to a color threshold get recovered because the network recognizes the pattern even when the color is barely distinguishable from the background ☼ Spill correction happens as part of the unmixing. The network predicts the original foreground color without the green contamination, rather than trying to subtract green after the fact
The difference is visible on first inspection. Where a traditional key shows harsh edges, chattering mattes, and green fringing, an AI key produces clean edges with natural transparency falloff. Hair looks like hair. Motion blur looks like motion blur. Transparent materials stay transparent.
Current AI keying tools
Several tools apply these ideas, each with a different approach and different tradeoffs.
CorridorKey is an open-source neural chroma keyer created by Corridor Digital, the YouTube production team with millions of subscribers. It implements neural unmixing directly and produces both a foreground image (with spill removed) and a clean alpha matte. The model runs on your local GPU.
EZ-CorridorKey is a source-available GUI fork of CorridorKey, developed by EZSCAPE. With over 4,000 stars on GitHub, it is the #1 fork of the original CorridorKey repository. It wraps the neural unmixing model in a drag-and-drop interface with batch processing, progress tracking, and output format options. Version 2.0 added blue screen support alongside the original green screen keying. It is currently a work in progress. The code is on GitHub and anyone can build it, or download it from Gumroad.
Adobe Rotobrush (After Effects) uses a different AI approach. Rather than unmixing foreground and background, it uses segmentation: the network identifies what is a person (or object) and generates a matte based on shape recognition. This works without a green screen at all, which is powerful, but it does not model the physical light mixing the way neural unmixing does. Edge quality on transparent or semi-transparent regions is often weaker.
BlaceKey and various research implementations apply similar neural unmixing concepts with different model architectures and training data. The field is moving quickly, and new tools appear regularly.
Each tool has different requirements and produces different quality. CorridorKey and EZ-CorridorKey need an NVIDIA GPU with reasonable VRAM (4 GB minimum, 8+ GB recommended). Adobe Rotobrush runs within After Effects and uses Adobe's own compute pipeline. Standalone research models vary widely in their setup complexity.
Limitations of AI keying
AI keying is not a universal replacement for traditional methods. It comes with real constraints.
Speed. Neural unmixing is computationally expensive. Processing a single 1080p frame can take one to several seconds depending on your GPU. That rules out real-time preview during editing. You process your footage first, then composite the results. Traditional keyers run in real time on modern hardware.
GPU requirements. The neural networks need a GPU with enough VRAM to hold the model and process frames at full resolution. Integrated graphics and older discrete GPUs may not have enough memory. If your machine does not have a supported NVIDIA GPU, you may be limited to CPU processing, which is dramatically slower.
Batch workflow. Because processing is not real-time, AI keying fits a batch pipeline. You feed in your green screen footage, wait for the model to process all frames, then bring the results into your compositor. This adds a step to your workflow that traditional keying avoids. If you need to re-key after a creative change, you process the whole sequence again.
Non-standard screen colors. Most AI keyers are trained on green and blue screen footage. EZ-CorridorKey v2.0 supports both green and blue screens. If you shot on a red, yellow, or other non-standard screen color, the model may not handle it well. Traditional keyers work on any color you can sample.
Complex scene interactions. Scenes with multiple overlapping semi-transparent elements, complex reflections, or foreground objects that match the screen color can still challenge AI keyers. The models are trained on typical production footage, and unusual edge cases can produce artifacts.
Still evolving. AI keying is newer technology. The models improve with each generation. Current results are impressive but not perfect. There are shots where a skilled compositor with traditional tools and manual rotoscoping will still produce a better result, especially for high-end VFX work where every pixel matters and time budgets allow for manual refinement.
For many productions, the practical workflow is to use AI keying as the first pass, then refine problem areas with traditional tools. The AI handles 90% of the work, and the compositor focuses human attention on the remaining 10%.
How to choose between AI and traditional keying
The right tool depends on your footage and your deadline.
Use traditional keying when:
☼ Your green screen is well-lit and even ☼ The subject has hard edges (no fine hair or transparent materials) ☼ You need real-time preview while editing ☼ Your machine lacks a modern GPU ☼ You are comfortable with manual parameter adjustments
Use AI keying when:
☼ Your green screen has uneven lighting or wrinkles ☼ The subject has fine hair, motion blur, or semi-transparent elements ☼ You want a clean key without spending hours tweaking parameters ☼ You have a GPU with sufficient VRAM ☼ You can accommodate a batch processing step in your pipeline
Use both when:
☼ You need production-quality results on difficult footage ☼ The AI key is 95% there but specific frames need manual cleanup ☼ You are compositing for broadcast, film, or high-profile delivery
Frequently asked questions
Is AI chroma keying better than traditional green screen removal?
AI chroma keying produces better results on difficult footage with fine hair, motion blur, and semi-transparent materials. Traditional keying is faster and works in real time. For clean, well-lit green screen shots, both methods produce comparable results. For challenging footage, AI keying is measurably better at preserving edge detail and handling partial transparency.
Does AI chroma keying work without a green screen?
Neural unmixing specifically requires a known background color (green or blue screen). The technique depends on knowing what color to unmix from the foreground. Tools like Adobe Rotobrush use a different AI approach (segmentation) that works without a green screen by identifying objects based on shape rather than color. The two approaches solve different problems.
What GPU do I need for AI chroma keying?
Most AI keying tools require an NVIDIA GPU with at least 4 GB of VRAM. 8 GB or more is recommended for processing at full HD resolution without running out of memory. Consumer cards like the RTX 3060 (12 GB) or RTX 4060 (8 GB) work well. Older GTX cards with 4 GB can work but may require processing at reduced resolution.
How long does AI chroma keying take to process?
Processing time depends on resolution, GPU, and the specific model being used. On a mid-range GPU like the RTX 3060, expect roughly 1 to 3 seconds per frame at 1080p. A 10-second clip at 24 fps (240 frames) takes roughly 4 to 12 minutes. 4K footage takes longer. This is a batch process, not real-time, so you process first and composite later.
What is CorridorKey?
CorridorKey is an open-source AI chroma keyer created by Corridor Digital. It uses neural unmixing to separate foreground from background, producing both a clean foreground image (with green spill removed) and a precise alpha matte. The model runs locally on your GPU. EZ-CorridorKey is a source-available GUI fork by EZSCAPE that adds a visual interface, batch processing, and output format controls. Both are free to use.
EZ-CorridorKey is developed by Ed Zisk at EZSCAPE, creator of DITHERON, CRTified, and Cucolori.