Files
BGfilter/configs/default.yaml
T
lhk229 5ab3d7eb7c Lower seg_loose_threshold to 0.08
Route faint hair (BiRefNet M 0.08-0.15) into the unknown band instead of sure
background, giving ViTMatte a chance at it. On its own this does not recover the
green-contaminated shoulder wisps: those are ~pure green (dominance +0.88, like
the screen) so ViTMatte cuts them regardless of trimap -- that is handled by the
upcoming segmentation dropout-fill. The finger gap (M~0.02) stays sure background.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 22:01:23 +08:00

51 lines
1.1 KiB
YAML

model:
model_name: hustvl/vitmatte-base-composition-1k
device: cuda
matting_method: vitmatte
fallback_to_chroma_alpha: false
segmentation:
enabled: true
model_name: ZhengPeng7/BiRefNet
device: cuda
input_size: 1024
trimap:
sure_bg_threshold: 0.92
sure_fg_threshold: 0.12
unknown_radius_ratio: 0.012
fg_safe_radius_ratio: 0.006
seg_core_threshold: 0.60
seg_loose_threshold: 0.08
alpha_post:
chroma_suppress: true
chroma_suppress_bg_low: 0.35
chroma_suppress_bg_high: 0.80
chroma_suppress_strength: 1.0
foreground:
enabled: true
method: ml
fallback_to_unmix: true
ml_regularization: 0.00001
# Legacy "unmix" method params (used only when method: unmix).
edge_low: 0.005
edge_high: 0.995
min_unmix_alpha: 0.08
unmix_strength: 0.70
local_strength: 0.45
local_blur_radius: 11
local_alpha_threshold: 0.92
local_bg_confidence_max: 0.20
green_excess_margin: 0.015
bg_confidence_weight: 0.70
despill:
enabled: true
edge_low: 0.005
strength: 0.92
green_excess_margin: 0.015
edge_expand_radius: 2
alpha_weight_floor: 0.35