add Segment Anything

This commit is contained in:
Qing
2023-04-06 21:55:20 +08:00
parent ed36744339
commit a6aec566d9
20 changed files with 1885 additions and 299 deletions

View File

@@ -82,6 +82,16 @@ def parse_args():
action="store_true",
help=INTERACTIVE_SEG_HELP,
)
parser.add_argument(
"--interactive-seg-model",
default="vit_l",
help=AVAILABLE_INTERACTIVE_SEG_MODELS,
)
parser.add_argument(
"--interactive-seg-device",
default="cpu",
help=AVAILABLE_INTERACTIVE_SEG_DEVICES,
)
parser.add_argument(
"--enable-remove-bg",
action="store_true",
@@ -230,12 +240,4 @@ def parse_args():
if not output_dir.is_dir():
parser.error(f"invalid --output-dir: {output_dir} is not a directory")
if args.enable_gfpgan:
if args.enable_realesrgan:
logger.info("Use realesrgan as GFPGAN background upscaler")
else:
logger.info(
f"GFPGAN no background upscaler, use --enable-realesrgan to enable it"
)
return args