Giter Club home page Giter Club logo

Comments (12)

Yuhuoo avatar Yuhuoo commented on May 22, 2024 4

I think it is related to rembg, try VPN and upgrade the gdown.

Is there another way to avoid using the VPN? I'm using the linux server.

The error occurs because of the rembg cannot download the u2net.pth from the google driver.
The solutions steps as follows,
1、Installing the rembg==1.0.27
2、Downloading the u2net.pth from https://docs.google.com/uc?export=download&id=1ao1ovG1Qtx4b7EoskHXmi2E9rp5CHLcZ and puting the pretrained model into ~/.u2net/u2net

from icon.

YuliangXiu avatar YuliangXiu commented on May 22, 2024

Could you explain it in more detail? I can't figure out what is happening only from the error log.

from icon.

shuoshuoxu avatar shuoshuoxu commented on May 22, 2024

(icon) xs@b209f4798a74:~/ICON-master/apps$ python infer.py -cfg ../configs/pifu.yaml -gpu 0 -in_dir ../examples -out_dir ../results
OMP: Info #273: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
normal environment...
PIFU:
w/ Global Image Encoder: True
Image Features used by MLP: ['image', 'normal_F', 'normal_B']
Dim of Image Features (global): 12
Dim of Geometry Features (PIFu): 1 (z-value)
Dim of MLP's first layer: 13

Resume MLP weights from ../data/ckpt/pifu.ckpt
Resume normal model from ../data/ckpt/normal.ckpt
Using cache found in /home/xs/.cache/torch/hub/NVIDIA_DeepLearningExamples_torchhub
Using cache found in /home/xs/.cache/torch/hub/NVIDIA_DeepLearningExamples_torchhub
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/ch.py:1203: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
want_out = 'out' in inspect.getargspec(func).args
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.int is a deprecated alias for the builtin int. To silence this warning, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.complex is a deprecated alias for the builtin complex. To silence this warning, use complex by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.unciode is a deprecated alias for np.compat.unciode. To silence this warning, use np.compat.unciode by itself. In the likely event your code does not need to work on Python 2 you can use the builtin str for which np.compat.unciode is itself an alias. Doing this will not modify any behaviour and is safe. If you specifically wanted the numpy scalar type, use np.str_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.str is a deprecated alias for the builtin str. To silence this warning, use str by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.str_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.int is a deprecated alias for the builtin int. To silence this warning, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.complex is a deprecated alias for the builtin complex. To silence this warning, use complex by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.unciode is a deprecated alias for np.compat.unciode. To silence this warning, use np.compat.unciode by itself. In the likely event your code does not need to work on Python 2 you can use the builtin str for which np.compat.unciode is itself an alias. Doing this will not modify any behaviour and is safe. If you specifically wanted the numpy scalar type, use np.str_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.str is a deprecated alias for the builtin str. To silence this warning, use str by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.str_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
Using pymaf as HPS Estimator

Dataset Size: 9
0%| | 0/9 [02:14<?, ?it/s]
Traceback (most recent call last):
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn
conn.connect()
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connection.py", line 358, in connect
self.sock = conn = self._new_conn()
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f5d04b26b50>: Failed to establish a new connection: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='drive.google.com', port=443): Max retries exceeded with url: /uc?id=1tCU5MM1LhRgGou5OpmpjBQbSrYIUoYab (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5d04b26b50>: Failed to establish a new connection: [Errno 110] Connection timed out'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "infer.py", line 101, in
for data in pbar:
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/tqdm/std.py", line 1195, in iter
for obj in iterable:
File "/home/xs/ICON-master/apps/../lib/dataset/TestDataset.py", line 181, in getitem
img_icon, img_hps, img_ori, img_mask, uncrop_param = process_image(img_path, self.det, self.hps_type, 512)
File "/home/xs/ICON-master/apps/../lib/pymaf/utils/imutils.py", line 118, in process_image
io.BytesIO(remove(buf.getvalue()))).convert("RGBA")
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/rembg/bg.py", line 91, in remove
session = ort_session("u2net")
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/rembg/detect.py", line 33, in ort_session
gdown.download(url, str(path), use_cookies=False)
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/gdown/download.py", line 146, in download
res = sess.get(url, headers=headers, stream=True, verify=verify)
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/requests/sessions.py", line 542, in get
return self.request('GET', url, **kwargs)
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='drive.google.com', port=443): Max retries exceeded with url: /uc?id=1tCU5MM1LhRgGou5OpmpjBQbSrYIUoYab (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5d04b26b50>: Failed to establish a new connection: [Errno 110] Connection timed out'))

from icon.

louyanyang avatar louyanyang commented on May 22, 2024

@YuliangXiu @shuoshuoxu, same error. any one solve the problem?

from icon.

YuliangXiu avatar YuliangXiu commented on May 22, 2024

I think it is related to rembg, try VPN and upgrade the gdown.

from icon.

Jeff-sjtu avatar Jeff-sjtu commented on May 22, 2024

I found the model got stuck in this line.

from icon.

Jeff-sjtu avatar Jeff-sjtu commented on May 22, 2024

I found the model got stuck in this line.

To be more specifically, it stuck in the code remove(buf.getvalue()).

from icon.

YuliangXiu avatar YuliangXiu commented on May 22, 2024

呵呵,我(娄艳阳)已收到您的信,祝你事事顺心,快乐相随

娄同学,我建议你关闭自动回复……

from icon.

Yuhuoo avatar Yuhuoo commented on May 22, 2024

I think it is related to rembg, try VPN and upgrade the gdown.

Is there another way to avoid using the VPN? I'm using the linux server.

from icon.

caiyongqi avatar caiyongqi commented on May 22, 2024

I think it is related to rembg, try VPN and upgrade the gdown.

Is there another way to avoid using the VPN? I'm using the linux server.

The error occurs because of the rembg cannot download the u2net.pth from the google driver. The solutions steps as follows, 1、Installing the rembg==1.0.27 2、Downloading the u2net.pth from https://docs.google.com/uc?export=download&id=1ao1ovG1Qtx4b7EoskHXmi2E9rp5CHLcZ and puting the pretrained model into ~/.u2net/u2net

Nice! But it should be '~/.u2net/'.

from icon.

louyanyang avatar louyanyang commented on May 22, 2024

from icon.

louyanyang avatar louyanyang commented on May 22, 2024

from icon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.