I'm trying to label an image with the help of the SAM models, but only some of them work. ViT-B Quant works without problems, but when selecting ViT-L Quant or ViT-H Quant, I'm getting an exception and the program crashes. The full traceback is below. Seems weird, because when I open the link mentioned in the traceback using safari it works.
(Great job on the tool btw, this is exactly what I was looking for and I'm excited to get it working!!)
Traceback (most recent call last):
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/urllib/request.py", line 1354, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/http/client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/http/client.py", line 1302, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/http/client.py", line 1251, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/http/client.py", line 1011, in _send_output
self.send(msg)
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/http/client.py", line 951, in send
self.connect()
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/http/client.py", line 1418, in connect
super().connect()
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/http/client.py", line 922, in connect
self.sock = self._create_connection(
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/socket.py", line 787, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/site-packages/anylabeling/services/auto_labeling/model.py", line 123, in get_model_abs_path
urllib.request.urlretrieve(
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/urllib/request.py", line 247, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/urllib/request.py", line 1397, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/urllib/request.py", line 1357, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/site-packages/anylabeling/utils.py", line 15, in run
self.func(*self.args, **self.kwargs)
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/site-packages/anylabeling/services/auto_labeling/model_manager.py", line 148, in _load_model
model_info["model"] = SegmentAnything(
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/site-packages/anylabeling/services/auto_labeling/segment_anything.py", line 52, in __init__
encoder_model_abs_path = self.get_model_abs_path(
File "/Users/tobias/opt/anaconda3/envs/anylabeling/lib/python3.8/site-packages/anylabeling/services/auto_labeling/model.py", line 128, in get_model_abs_path
raise Exception(
Exception: Could not download model from https://github.com/vietanhdev/anylabeling-assets/releases/download/v0.2.0/segment_anything_vit_l_encoder_quant.onnx: <urlopen error [Errno 8] nodename nor servname provided, or not known>