mirror of
https://git.mirrors.martin98.com/https://github.com/danielgatis/rembg
synced 2025-08-16 19:05:55 +08:00
add alpha matting
This commit is contained in:
parent
135550812c
commit
01f1769493
2
setup.py
2
setup.py
@ -11,7 +11,7 @@ with open("requirements.txt") as f:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="rembg",
|
name="rembg",
|
||||||
version="1.0.12",
|
version="1.0.13",
|
||||||
description="Remove image background",
|
description="Remove image background",
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
|
@ -70,9 +70,9 @@ def remove(
|
|||||||
data,
|
data,
|
||||||
model_name="u2net",
|
model_name="u2net",
|
||||||
alpha_matting=False,
|
alpha_matting=False,
|
||||||
alpha_matting_foreground_threshold=235,
|
alpha_matting_foreground_threshold=240,
|
||||||
alpha_matting_background_threshold=15,
|
alpha_matting_background_threshold=10,
|
||||||
alpha_matting_erode_structure_size=15,
|
alpha_matting_erode_structure_size=10,
|
||||||
):
|
):
|
||||||
model = model_u2net
|
model = model_u2net
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ def main():
|
|||||||
ap.add_argument(
|
ap.add_argument(
|
||||||
"-af",
|
"-af",
|
||||||
"--alpha-matting-foreground-threshold",
|
"--alpha-matting-foreground-threshold",
|
||||||
default=235,
|
default=240,
|
||||||
type=int,
|
type=int,
|
||||||
help="The trimap foreground threshold.",
|
help="The trimap foreground threshold.",
|
||||||
)
|
)
|
||||||
@ -40,7 +40,7 @@ def main():
|
|||||||
ap.add_argument(
|
ap.add_argument(
|
||||||
"-ab",
|
"-ab",
|
||||||
"--alpha-matting-background-threshold",
|
"--alpha-matting-background-threshold",
|
||||||
default=15,
|
default=10,
|
||||||
type=int,
|
type=int,
|
||||||
help="The trimap background threshold.",
|
help="The trimap background threshold.",
|
||||||
)
|
)
|
||||||
@ -48,7 +48,7 @@ def main():
|
|||||||
ap.add_argument(
|
ap.add_argument(
|
||||||
"-ae",
|
"-ae",
|
||||||
"--alpha-matting-erode-size",
|
"--alpha-matting-erode-size",
|
||||||
default=15,
|
default=10,
|
||||||
type=int,
|
type=int,
|
||||||
help="Size of element used for the erosion.",
|
help="Size of element used for the erosion.",
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user