rembg
rembg copied to clipboard
SAM model returns inversed
Describe the bug
I tried using the SAM model to remove the background and normally I get this result (using e.g. u2netp)
With SAM I am getting the opposite:
To Reproduce Code:
session = new_session("sam")
sam_prompt = [{"type": "rectangle", "data": [0, 0, width, height], "label": 1}]
res = remove(cvImage, session=session, sam_prompt=sam_prompt)
Input image
Expected behavior
- Any idea why SAM returns the opposite?
- Where can I find more information on e.g. what the
labelproperty is doing? - For those kind of images, which model is the best?
Thank you!
Rembg version: v2.0.57