Split trimap and dropout-fill segmentation backends
Add SegmentationSettings.fill_backend / fill_model_name so the dropout-fill can use a different (higher-recall) segmenter than the trimap. Default is now the combination the investigation converged on: BiRefNet builds the trimap (reliable topology -- finger gap removed, strands kept as sure_fg), anime-seg drives the fill (more, more-coherent anime wisps). Because the fill only adds (max), a higher-recall-but-less-reliable mask there is harmless. On TestImage2 this eliminates the strand breakage a full anime-seg pipeline caused (lost 699 -> 0) while keeping ~91% of its extra wisp recall (gained 1133 -> 1031). Strands stay continuous; the recovered wisps are anime-seg's coherent curves rather than BiRefNet's grainy fill. Also adds an optional unsharp-mask knob (segmentation.sharpen, default off). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,8 @@ segmentation:
|
||||
enabled: true
|
||||
backend: birefnet # birefnet | anime-seg (anime-seg needs model_name: skytnt/anime-seg)
|
||||
model_name: ZhengPeng7/BiRefNet
|
||||
fill_backend: anime-seg # dropout-fill uses anime-seg (higher wisp recall; add-only, harmless)
|
||||
fill_model_name: skytnt/anime-seg
|
||||
device: cuda
|
||||
input_size: 1024
|
||||
|
||||
|
||||
Reference in New Issue
Block a user