--- title: CorridorKey emoji: 🎬 colorFrom: yellow colorTo: yellow sdk: gradio sdk_version: 6.9.0 app_file: app.py python_version: "3.10" pinned: false tags: - green-screen - background-removal - video-matting - alpha-matting - vfx - corridor-digital - transparency - onnx - pytorch - zerogpu - mcp-server short_description: Remove green background from video, even transparent objects --- # CorridorKey Green Screen Matting Remove green screen backgrounds from video. Handles transparent objects (glass, water, cloth) that traditional chroma key cannot. Based on [CorridorKey](https://github.com/nikopueringer/CorridorKey) by Corridor Digital. ## Inference Paths - **GPU (ZeroGPU H200)**: PyTorch GreenFormer with batched inference (batch 32 at 1024, batch 8 at 2048) - **CPU (fallback)**: ONNX Runtime sequential inference (batch 1) ## Pipeline 1. **BiRefNet** - Generates coarse foreground mask (ONNX) 2. **CorridorKey GreenFormer** - Refines alpha matte + extracts clean foreground (PyTorch on GPU, ONNX on CPU) 3. **Compositing** - Despill, despeckle, composite on new background ## API ### REST API **Step 1: Submit request** ```bash curl -X POST "https://luminia-corridorkey.hf.space/gradio_api/call/process_video" \ -H "Content-Type: application/json" \ -d '{"data": ["video.mp4", "1024", 5, "Hybrid (auto)", true, 400]}' ``` **Step 2: Get result** ```bash curl "https://luminia-corridorkey.hf.space/gradio_api/call/process_video/{event_id}" ``` ### MCP (Model Context Protocol) **MCP Config:** ```json { "mcpServers": { "corridorkey": { "url": "https://luminia-corridorkey.hf.space/gradio_api/mcp/" } } } ``` ## Credits - [CorridorKey](https://github.com/nikopueringer/CorridorKey) by Niko Pueringer / Corridor Digital - [EZ-CorridorKey](https://github.com/edenaion/EZ-CorridorKey) UI reference by edenaion - [BiRefNet](https://github.com/ZhengPeng7/BiRefNet) by ZhengPeng7