Comments (11)
Hi, Gao. Have you solved this problem yet? I think I have the same problem with you.
from rembg.
Hi, Gao. Have you solved this problem yet? I think I have the same problem with you.
not solved
from rembg.
Does anyone know why this is happening?
from rembg.
I have the same problem. Have you solved it?
from rembg.
I think it stems from the default being wrong here -
Line 153 in 0dcdb08
This is also relevant to #577
from rembg.
This is a character escaping issue. If you are running this from the cmd prompt, 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 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
from rembg.
I got the same error on the HTTP server.
How to solve this when using it interactively on the HTTP server?
from rembg.
The error reporting location should be located in
Link Text
It means there is a problem with the json format input of your prompt.
from rembg.
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.
bg_cleaned_image = remove(data=my_image, session=rembg.new_session("sam", sam_prompt=[{"type": "point", "data": [724, 740], "label": 1}])
Error
raise error
jsonschema.exceptions.ValidationError: '{}' is not of type 'array'
Failed validating 'type' in schema:
'type': 'array'},
'type': {'type': 'string'}},
'type': 'object'},
'type': 'array'}
On instance:
'{}'
from rembg.
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.
bg_cleaned_image = remove(data=my_image, session=rembg.new_session("sam", sam_prompt=[{"type": "point", "data": [724, 740], "label": 1}])
Error
raise error jsonschema.exceptions.ValidationError: '{}' is not of type 'array' Failed validating 'type' in schema: 'type': 'array'}, 'type': {'type': 'string'}}, 'type': 'object'}, 'type': 'array'} On instance: '{}'
Hello,
Try with sam_prompt outside of the session argument.
For me it works with the following code :
session_rmbg = new_session(model_name="sam")
input ect...
output = remove(input, session=session_rmbg, sam_prompt=[{"type": 'point', "data": [1600, 2400], "label": 1}])
from rembg.
This issue is stale because it has been open for 30 days with no activity.
from rembg.
Related Issues (20)
- How to fix black border after remove bg? HOT 3
- [BUG] ... KeyError: 'in_ch' RMBG-1.4 HOT 2
- requirements HOT 1
- Why downloading humgan_seg also downloads same u2net default HOT 2
- [BUG] jsonschema.exceptions.ValidationError: '{}' is not of type 'array' HOT 4
- [BUG] rembg[cli] not availible on mac HOT 1
- [BUG] ...improper removal of background HOT 4
- Unable to Set Output Image Format via extras param HOT 3
- [FEATURE] ... HOT 2
- [BUG] If there is a hole in the main object of the photo and the background is visible inside it (like a ring), rembg cannot remove the bg of that part HOT 4
- [FEATURE] allow to add border HOT 2
- [FEATURE] Add --gpu 0 --gpu 1 HOT 4
- [BUG] env["CUDA_VISIBLE_DEVICES"] = "0" doesn't work HOT 2
- How do I uninstall Onnx Runtime and Rembg?
- [BUG] onnx runtime errors HOT 2
- [BUG] custom model on windows HOT 1
- [BUG] When using the API, it sometimes gets stuck and the request never completes. The terminal shows an error message when this happens. HOT 2
- [BUG] Missing dependencies from pypi HOT 2
- [BUG] This module is not using GPU at all. HOT 11
- [BUG] Sam model sessions do not respect providers argument HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rembg.