Rembg is a tool to remove images background
fix lint
Daniel Gatis96ce3cce5600
diff --git a/rembg/cli.py b/rembg/cli.pyindex 10adb29..983f7dd 100644--- a/rembg/cli.py+++ b/rembg/cli.py@@ -34,7 +34,14 @@ def main() -> None:"--model",default="u2net",type=click.Choice(- ["u2net", "u2netp", "u2net_human_seg", "u2net_cloth_seg", "silueta", "isnet-general-use"]+ [+ "u2net",+ "u2netp",+ "u2net_human_seg",+ "u2net_cloth_seg",+ "silueta",+ "isnet-general-use",+ ]),show_default=True,show_choices=True,@@ -103,7 +110,14 @@ def i(model: str, input: IO, output: IO, **kwargs) -> None:"--model",default="u2net",type=click.Choice(- ["u2net", "u2netp", "u2net_human_seg", "u2net_cloth_seg", "silueta", "isnet-general-use"]+ [+ "u2net",+ "u2netp",+ "u2net_human_seg",+ "u2net_cloth_seg",+ "silueta",+ "isnet-general-use",+ ]),show_default=True,show_choices=True,diff --git a/rembg/session_cloth.py b/rembg/session_cloth.pyindex d2967d1..575aff1 100644--- a/rembg/session_cloth.py+++ b/rembg/session_cloth.py@@ -56,7 +56,10 @@ pallete3 = [class ClothSession(BaseSession):def predict(self, img: PILImage) -> List[PILImage]:ort_outs = self.inner_session.run(- None, self.normalize(img, (0.485, 0.456, 0.406), (0.229, 0.224, 0.225), (768, 768))+ None,+ self.normalize(+ img, (0.485, 0.456, 0.406), (0.229, 0.224, 0.225), (768, 768)+ ),)pred = ort_outsdiff --git a/rembg/session_dis.py b/rembg/session_dis.pyindex 1d4244f..e215806 100644--- a/rembg/session_dis.py+++ b/rembg/session_dis.py@@ -11,9 +11,7 @@ class DisSession(BaseSession):def predict(self, img: PILImage) -> List[PILImage]:ort_outs = self.inner_session.run(None,- self.normalize(- img, (0.485, 0.456, 0.406), (1., 1., 1.), (1024, 1024)- ),+ self.normalize(img, (0.485, 0.456, 0.406), (1.0, 1.0, 1.0), (1024, 1024)),)pred = ort_outs[0][:, 0, :, :]diff --git a/rembg/session_factory.py b/rembg/session_factory.pyindex a15c8ed..ce6ae1b 100644--- a/rembg/session_factory.py+++ b/rembg/session_factory.py@@ -72,5 +72,5 @@ def new_session(model_name: str = "u2net") -> BaseSession:str(full_path),providers=ort.get_available_providers(),sess_options=sess_opts,- )+ ),)