mirror of
https://git.mirrors.martin98.com/https://github.com/danielgatis/rembg
synced 2025-08-15 02:06:01 +08:00
fix model choices
This commit is contained in:
parent
972f82ccbb
commit
9405b96d80
@ -2,8 +2,8 @@ flask>=1.1.2
|
|||||||
numpy>=1.19.5
|
numpy>=1.19.5
|
||||||
pillow>=8.0.1
|
pillow>=8.0.1
|
||||||
scikit-image>=0.17.2
|
scikit-image>=0.17.2
|
||||||
torch>=1.7.0
|
torch>=1.9.1
|
||||||
torchvision>=0.8.1
|
torchvision>=0.10.1
|
||||||
waitress>=1.4.4
|
waitress>=1.4.4
|
||||||
tqdm>=4.51.0
|
tqdm>=4.51.0
|
||||||
requests>=2.24.0
|
requests>=2.24.0
|
||||||
|
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.27",
|
version="1.0.28",
|
||||||
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",
|
||||||
|
@ -18,8 +18,8 @@ def main():
|
|||||||
os.path.splitext(os.path.basename(x))[0]
|
os.path.splitext(os.path.basename(x))[0]
|
||||||
for x in set(glob.glob(model_path + "/*"))
|
for x in set(glob.glob(model_path + "/*"))
|
||||||
]
|
]
|
||||||
if len(model_choices) == 0:
|
|
||||||
model_choices = ["u2net", "u2netp", "u2net_human_seg"]
|
model_choices = list(set(model_choices + ["u2net", "u2netp", "u2net_human_seg"]))
|
||||||
|
|
||||||
ap = argparse.ArgumentParser()
|
ap = argparse.ArgumentParser()
|
||||||
|
|
||||||
|
@ -52,8 +52,8 @@ def index():
|
|||||||
os.path.splitext(os.path.basename(x))[0]
|
os.path.splitext(os.path.basename(x))[0]
|
||||||
for x in set(glob.glob(model_path + "/*"))
|
for x in set(glob.glob(model_path + "/*"))
|
||||||
]
|
]
|
||||||
if len(model_choices) == 0:
|
|
||||||
model_choices = ["u2net", "u2netp", "u2net_human_seg"]
|
model_choices = list(set(model_choices + ["u2net", "u2netp", "u2net_human_seg"]))
|
||||||
|
|
||||||
if model not in model_choices:
|
if model not in model_choices:
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user