Skip to content

armgit / rembg

Public Imported from GitHub
0

Rembg is a tool to remove images background

fix linters

Daniel Gatis49d1686f65b7
diff --git a/rembg/bg.py b/rembg/bg.py
index fe1aa6e..8629f82 100644
--- a/rembg/bg.py
+++ b/rembg/bg.py
@@ -157,7 +157,7 @@ def post_process(mask: np.ndarray) -> np.ndarray:
"""
mask = morphologyEx(mask, MORPH_OPEN, kernel)
mask = GaussianBlur(mask, (5, 5), sigmaX=2, sigmaY=2, borderType=BORDER_DEFAULT)
- mask = np.where(mask < 127, 0, 255).astype(np.uint8) # convert again to binary
+ mask = np.where(mask < 127, 0, 255).astype(np.uint8) # type: ignore
return mask