Comments (3)
thanks. I forgot to create this directory before downloading the models.
Fix in version 1.0.6, pip install again.
from rembg.
Have you tested? I have installed rembg,but when I use "rembg -o /home/zc/transformed.png /home/zc/PycharmProjects/pythonProject/modeltest.png", but it returns an error:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 852, in validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 326, in connect
ssl_context=context)
File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 332, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/lib/python3.6/ssl.py", line 817, in init
self.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/fl/.local/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/fl/.local/lib/python3.6/site-packages/six.py", line 702, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 852, in validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 326, in connect
ssl_context=context)
File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 332, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/lib/python3.6/ssl.py", line 817, in init
self.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/fl/.local/lib/python3.6/site-packages/rembg/cmd/cli.py", line 6, in
from ..bg import remove
File "/home/fl/.local/lib/python3.6/site-packages/rembg/bg.py", line 8, in
model_u2net = detect.load_model(model_name="u2net")
File "/home/fl/.local/lib/python3.6/site-packages/rembg/u2net/detect.py", line 51, in load_model
path,
File "/home/fl/.local/lib/python3.6/site-packages/rembg/u2net/detect.py", line 24, in download
resp = requests.get(url, stream=True)
File "/home/fl/.local/lib/python3.6/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/home/fl/.local/lib/python3.6/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/home/fl/.local/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/home/fl/.local/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/home/fl/.local/lib/python3.6/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
How can I solve it?
Looking forward to receiving your reply!
Thank you very much!
from rembg.
You need to disable the path limit after installing the python
instruction: https://i.ntnu.no/wiki/-/wiki/English/Installing+Python
(its few years late but this may help newies like me out there)
from rembg.
Related Issues (20)
- How disable GPU HOT 2
- [BUG] FileNotFoundError when trying command HOT 2
- Using rembg with GPU consumes more time compared to using CPU. HOT 4
- [BUG] Not using GPU!
- About the model of API "https://photoroom.com/api" HOT 4
- recommended CUDA, cuDNN and onnxruntime for Windows 11? HOT 3
- OSError: [WinError 6] Handle non valido HOT 2
- 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 3
- [BUG] rembg[cli] not availible on mac HOT 1
- [BUG] ...improper removal of background HOT 2
- Unable to Set Output Image Format via extras param HOT 2
- [FEATURE] ... HOT 1
- [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 1
- [FEATURE] allow to add border
- [FEATURE] Add --gpu 0 --gpu 1 HOT 3
- [BUG] env["CUDA_VISIBLE_DEVICES"] = "0" doesn't work HOT 2
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.