Rembg is a tool to remove images background
add mask post process
Daniel Gatis37359b3079ad
diff --git a/rembg/bg.py b/rembg/bg.pyindex 5822720..a78b2cc 100644--- a/rembg/bg.py+++ b/rembg/bg.py@@ -3,15 +3,9 @@ from enum import Enumfrom typing import List, Optional, Unionimport numpy as np+from cv2 import (BORDER_DEFAULT, MORPH_ELLIPSE, MORPH_OPEN, GaussianBlur,+ getStructuringElement, morphologyEx)from PIL import Image-from cv2 import (- getStructuringElement,- morphologyEx,- GaussianBlur,- MORPH_OPEN,- MORPH_ELLIPSE,- BORDER_DEFAULT,-)from PIL.Image import Image as PILImagefrom pymatting.alpha.estimate_alpha_cf import estimate_alpha_cffrom pymatting.foreground.estimate_foreground_ml import estimate_foreground_ml