From 57fa63cffc3305c63fffd2d57d149b017ff7d381 Mon Sep 17 00:00:00 2001 From: AhBumm <103174943+AhBumm@users.noreply.github.com> Date: Fri, 5 Dec 2025 15:43:00 +0800 Subject: [PATCH] Change inlier ratio threshold from 0.6 to 0.5 --- rmbg_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rmbg_tools.py b/rmbg_tools.py index b7ee535..ee2f212 100644 --- a/rmbg_tools.py +++ b/rmbg_tools.py @@ -58,7 +58,7 @@ def estimate_bg_color_from_border(img_lab: np.ndarray, border_width: int = BORDE print(f"[estimate_bg_color] inlier_ratio={inlier_ratio:.3f} (thresh={inlier_thresh})") - if inlier_ratio < 0.6: # At least 60% of the border should be background + if inlier_ratio < 0.5: # At least 50% of the border should be background print("[estimate_bg_color] inlier ratio too low, reject.") return bg_color.astype(np.float32), False, 10.0 @@ -259,4 +259,4 @@ class MOD_RMBG_NODE: tensor_out = ndarray2tensor(rgba) tensor_fg_mask = ndarray2tensor(fg_mask) tensor_bg_mask = ndarray2tensor(bg_mask_vis) - return (tensor_out, tensor_fg_mask, tensor_bg_mask,) \ No newline at end of file + return (tensor_out, tensor_fg_mask, tensor_bg_mask,)