Skip to content

armgit / rembg

Public Imported from GitHub
0

Rembg is a tool to remove images background

add mask post process

Daniel Gatis37359b3079ad
diff --git a/rembg/bg.py b/rembg/bg.py
index 5822720..a78b2cc 100644
--- a/rembg/bg.py
+++ b/rembg/bg.py
@@ -3,15 +3,9 @@ from enum import Enum
from typing import List, Optional, Union
import 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 PILImage
from pymatting.alpha.estimate_alpha_cf import estimate_alpha_cf
from pymatting.foreground.estimate_foreground_ml import estimate_foreground_ml