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,)