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
|
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:
|
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) |
The
helpforforeground-ratiomentionsno-remove-bgbut I don't see any logic related tono-remove-bg/arg.no_remove_bgstable-fast-3d/run.py
Lines 30 to 35 in ff21fc4
If I try
python run.py /path/to/rgb.png --output-dir output/ --no-remove-bg, the error isrun.py: error: unrecognized arguments: --no-remove-bgbecause there is noargparsefor it.On digging deeper I see that background removal is not optional:
stable-fast-3d/run.py
Lines 87 to 96 in ff21fc4