-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] '{}' is not of type 'array' when using sam model. #569
Comments
Hi, Gao. Have you solved this problem yet? I think I have the same problem with you. |
not solved |
Does anyone know why this is happening? |
I have the same problem. Have you solved it? |
This is a character escaping issue. If you are running this from the cmd prompt, it should look like this:
If you're running from PowerShell 5.1, it should look like this: rembg i -m sam -x '{ \"sam_prompt\": [{\"type\": \"point\", \"data\": [724, 740], \"label\": 1}] }' .\1305696_1704870215425_1705054411.png xxx.png If you're running from PowerShell 7.4, it should look like this: rembg i -m sam -x '{ "sam_prompt": [{"type": "point", "data": [724, 740], "label": 1}] }' .\1305696_1704870215425_1705054411.png xxx.png |
I got the same error on the HTTP server. How to solve this when using it interactively on the HTTP server? |
The error reporting location should be located in |
Hello, is anybody help me "how to to use SAM model with library usage". I am trying to handle as following code line but I am getting error.
Error
|
Hello,
|
This issue is stale because it has been open for 30 days with no activity. |
jsonschema.exceptions.ValidationError: '{}' is not of type 'array' Failed validating 'type' in schema: On instance: 这里的 prompt={} 应该改为一个数组from rembg import remove prompt = [{'type': 'label', 'data': [0.5, 0.5], 'label': 1}] |
Describe the bug
Unable to use the "sam" model in cli.
rembg i -m sam -x '{ "sam_prompt": [{"type": "point", "data": [724, 740], "label": 1}] }' .\1305696_1704870215425_1705054411.png xxx.png
Getting error: '{}' is not of type 'array'
To Reproduce
rembg i -m sam -x '{ "sam_prompt": [{"type": "point", "data": [724, 740], "label": 1}] }' .\1305696_1704870215425_1705054411.png xxx.png
OS Version:
window 11
Rembg version:
v2.0.53
The text was updated successfully, but these errors were encountered: