Sync docs to current architecture

README rewritten for the current design: two pipelines (chroma-only vs single
segmenter, default anime-seg), the screen_color prior (--screen-color / config,
green default), correct debug-file list, and HF/hf-mirror notes for the seg models.
No rescue/recolour layer is documented (it was removed).

green_screen_matting_workflow.md keeps the phase-1 green-screen spec but gains a
status note pointing to the README for the evolved architecture, and its debug-file
list is corrected (foreground_rgb / color_mask / seg_mask, not the old
foreground_background / foreground_correction / despill_mask).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-01 15:46:21 +08:00
parent 7555321cfc
commit 22ef1d6336
2 changed files with 72 additions and 37 deletions
+14 -4
View File
@@ -4,6 +4,16 @@
本方案不使用 YOLO / Faster R-CNN 作为主流程。原因是本任务不是目标检测,而是像素级 alpha matting。
## 0. 现状说明(架构已演进)
本文档是**第一阶段的绿幕方案原始规格**,仍准确描述 “Chroma + ViTMatte” 这条管线。实现此后已泛化,**当前架构以 [README](../README.md) 为准**,主要变化:
- **两条管线**(`segmentation.enabled` 切换):无分割模型的 Chroma + ViTMatte;或单个语义分割模型(默认 anime-seg,可切 birefnet)定 trimap 拓扑,ViTMatte 细化。
- **背景色泛化**:`screen_color` 先验(如 `#CFEFFF`),chroma / despill 不再写死绿色;`null` 时才走本文档的绿幕自动探测。
- **已移除**:染绿修复(recolor)、发丝补救(dropout-fill)、BiRefNet+anime-seg 结合方案——它们只是给“生图即染色/断裂”的坏素材擦屁股;源头改用干净背景生图后不再需要。
下文其余章节描述绿幕基线流程,仍然有效。
## 1. 目标
- 输入:RGB / PNG 图像,背景主色为绿色,但不要求严格等于 `#00FF00`。
@@ -371,17 +381,17 @@ edge = alpha 梯度区域 + 外扩 1 - 3 px
result_rgba.png
debug/bg_confidence.png
debug/trimap.png
debug/seg_mask.png # 分割管线才有
debug/alpha.png
debug/foreground_rgb.png
debug/foreground_background.png
debug/foreground_correction.png
debug/despill_mask.png
debug/foreground_rgb.png # 去溢后的前景色
debug/color_mask.png # 每像素去溢权重
debug/preview_black.png
debug/preview_white.png
debug/preview_gray.png
debug/preview_red.png
debug/preview_blue.png
debug/qa_grid.png
debug/metadata.json
```
## 16. QA 质检