-
Notifications
You must be signed in to change notification settings - Fork 186
Open
Description
The help
for foreground-ratio
mentions no-remove-bg
but I don't see any logic related to no-remove-bg
/arg.no_remove_bg
Lines 30 to 35 in ff21fc4
parser.add_argument( | |
"--foreground-ratio", | |
default=0.85, | |
type=float, | |
help="Ratio of the foreground size to the image size. Only used when --no-remove-bg is not specified. Default: 0.85", | |
) |
If I try python run.py /path/to/rgb.png --output-dir output/ --no-remove-bg
, the error is run.py: error: unrecognized arguments: --no-remove-bg
because there is no argparse
for it.
On digging deeper I see that background removal is not optional:
Lines 87 to 96 in ff21fc4
rembg_session = rembg.new_session() | |
images = [] | |
idx = 0 | |
for image_path in args.image: | |
def handle_image(image_path, idx): | |
image = remove_background( | |
Image.open(image_path).convert("RGBA"), rembg_session | |
) | |
image = resize_foreground(image, args.foreground_ratio) |
Metadata
Metadata
Assignees
Labels
No labels