Spaces:
Running on Zero
Running on Zero
update all references: green → green/blue
Browse files
README.md
CHANGED
|
@@ -20,12 +20,12 @@ tags:
|
|
| 20 |
- pytorch
|
| 21 |
- zerogpu
|
| 22 |
- mcp-server
|
| 23 |
-
short_description: Remove green
|
| 24 |
---
|
| 25 |
|
| 26 |
-
# CorridorKey Green Screen Matting
|
| 27 |
|
| 28 |
-
Remove green screen backgrounds from video. Handles transparent objects (glass, water, cloth) that traditional chroma key cannot.
|
| 29 |
|
| 30 |
Based on [CorridorKey](https://github.com/nikopueringer/CorridorKey) by Corridor Digital.
|
| 31 |
|
|
@@ -36,7 +36,7 @@ Based on [CorridorKey](https://github.com/nikopueringer/CorridorKey) by Corridor
|
|
| 36 |
|
| 37 |
## Pipeline
|
| 38 |
|
| 39 |
-
1. **BiRefNet** - Generates coarse foreground mask (ONNX, or fast classical HSV for green screens)
|
| 40 |
2. **CorridorKey GreenFormer** - Refines alpha matte + extracts clean foreground (PyTorch on GPU, ONNX on CPU)
|
| 41 |
3. **GPU Postprocessing** - Despill, despeckle (connected components), resize — all on GPU via torchvision, single CPU transfer at the end
|
| 42 |
|
|
|
|
| 20 |
- pytorch
|
| 21 |
- zerogpu
|
| 22 |
- mcp-server
|
| 23 |
+
short_description: Remove green/blue screen from video, even glass & hair
|
| 24 |
---
|
| 25 |
|
| 26 |
+
# CorridorKey Green/Blue Screen Matting
|
| 27 |
|
| 28 |
+
Remove green or blue screen backgrounds from video. Handles transparent objects (glass, water, cloth) that traditional chroma key cannot.
|
| 29 |
|
| 30 |
Based on [CorridorKey](https://github.com/nikopueringer/CorridorKey) by Corridor Digital.
|
| 31 |
|
|
|
|
| 36 |
|
| 37 |
## Pipeline
|
| 38 |
|
| 39 |
+
1. **BiRefNet** - Generates coarse foreground mask (ONNX, or fast classical HSV for green/blue screens)
|
| 40 |
2. **CorridorKey GreenFormer** - Refines alpha matte + extracts clean foreground (PyTorch on GPU, ONNX on CPU)
|
| 41 |
3. **GPU Postprocessing** - Despill, despeckle (connected components), resize — all on GPU via torchvision, single CPU transfer at the end
|
| 42 |
|
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
"""CorridorKey Green Screen Matting - HuggingFace Space.
|
| 2 |
|
| 3 |
Self-contained Gradio app with dual inference paths:
|
| 4 |
- GPU (ZeroGPU H200): PyTorch batched inference via GreenFormer
|
|
@@ -1008,7 +1008,7 @@ with gr.Blocks(title="CorridorKey") as demo:
|
|
| 1008 |
|
| 1009 |
with gr.Row():
|
| 1010 |
with gr.Column(scale=1):
|
| 1011 |
-
input_video = gr.Video(label="Upload Green Screen Video")
|
| 1012 |
with gr.Accordion("Settings", open=True):
|
| 1013 |
resolution = gr.Radio(
|
| 1014 |
choices=["1024", "2048"], value="1024",
|
|
@@ -1070,7 +1070,7 @@ with gr.Blocks(title="CorridorKey") as demo:
|
|
| 1070 |
# ---------------------------------------------------------------------------
|
| 1071 |
def cli_main():
|
| 1072 |
import argparse
|
| 1073 |
-
parser = argparse.ArgumentParser(description="CorridorKey Green Screen Matting")
|
| 1074 |
parser.add_argument("--input", required=True)
|
| 1075 |
parser.add_argument("--output", default="output")
|
| 1076 |
parser.add_argument("--device", default="auto", choices=["auto", "cpu", "cuda"])
|
|
|
|
| 1 |
+
"""CorridorKey Green/Blue Screen Matting - HuggingFace Space.
|
| 2 |
|
| 3 |
Self-contained Gradio app with dual inference paths:
|
| 4 |
- GPU (ZeroGPU H200): PyTorch batched inference via GreenFormer
|
|
|
|
| 1008 |
|
| 1009 |
with gr.Row():
|
| 1010 |
with gr.Column(scale=1):
|
| 1011 |
+
input_video = gr.Video(label="Upload Green/Blue Screen Video")
|
| 1012 |
with gr.Accordion("Settings", open=True):
|
| 1013 |
resolution = gr.Radio(
|
| 1014 |
choices=["1024", "2048"], value="1024",
|
|
|
|
| 1070 |
# ---------------------------------------------------------------------------
|
| 1071 |
def cli_main():
|
| 1072 |
import argparse
|
| 1073 |
+
parser = argparse.ArgumentParser(description="CorridorKey Green/Blue Screen Matting")
|
| 1074 |
parser.add_argument("--input", required=True)
|
| 1075 |
parser.add_argument("--output", default="output")
|
| 1076 |
parser.add_argument("--device", default="auto", choices=["auto", "cpu", "cuda"])
|