Skip to content

armgit / rembg

Public Imported from GitHub
0

Rembg is a tool to remove images background

Remove unnecessary blank lines in ben_custom.py and dis_custom.py for cleaner code.

Daniel Gatisb0dd8e3773b7
diff --git a/rembg/sessions/ben_custom.py b/rembg/sessions/ben_custom.py
index 4d907df..9513385 100644
--- a/rembg/sessions/ben_custom.py
+++ b/rembg/sessions/ben_custom.py
@@ -60,7 +60,6 @@ class BenCustomSession(BaseSession):
mask = Image.fromarray((pred * 255).astype("uint8"), mode="L")
mask = mask.resize(img.size, Image.Resampling.LANCZOS)
-
return [mask]
@classmethod
diff --git a/rembg/sessions/dis_custom.py b/rembg/sessions/dis_custom.py
index 891b207..f98632b 100644
--- a/rembg/sessions/dis_custom.py
+++ b/rembg/sessions/dis_custom.py
@@ -8,6 +8,7 @@ from PIL.Image import Image as PILImage
from .base import BaseSession
+
class DisCustomSession(BaseSession):
"""This is a class representing a custom session for the Dis model."""
@@ -27,7 +28,6 @@ class DisCustomSession(BaseSession):
super().__init__(model_name, sess_opts, *args, **kwargs)
-
def predict(self, img: PILImage, *args, **kwargs) -> List[PILImage]:
"""
Predicts the mask image for the input image.