nomewang / M3DM

MIT License
129 stars 16 forks source link

How use the pretrained model provided in this repository? #17

Closed limaodaxia closed 9 months ago

limaodaxia commented 10 months ago
D:\PyCharmProjects\M3DM>python main.py --method_name DINO+Point_MAE --memory_bank multiple --rgb_backbone_name vit_base_patch8_224_dino --xyz_backbone_name Point_MAE --save_feature
D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\site-packages\timm\models\_factory.py:114: UserWarning: Mapping deprecated model name vit_base_patch8_224_dino to current vit_base_patch8_224.dino.
  model = create_fn(
Traceback (most recent call last):
  File "D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\site-packages\urllib3\connectionpool.py", line 711, in urlopen
    self._prepare_proxy(conn)
  File "D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\site-packages\urllib3\connectionpool.py", line 1007, in _prepare_proxy
    conn.connect()
  File "D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\site-packages\urllib3\connection.py", line 369, in connect
    self.sock = conn = self._connect_tls_proxy(hostname, conn)
  File "D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\site-packages\urllib3\connection.py", line 504, in _connect_tls_proxy
    socket = ssl_wrap_socket(
  File "D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\site-packages\urllib3\util\ssl_.py", line 453, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\site-packages\urllib3\util\ssl_.py", line 495, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\ssl.py", line 1073, in _create
    self.do_handshake()
  File "D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:1131)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\site-packages\requests\adapters.py", line 486, in send
    resp = conn.urlopen(
  File "D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\site-packages\urllib3\connectionpool.py", line 798, in urlopen
    retries = retries.increment(
  File "D:\ProgramFiles\DeveloperTools\Anaconda3\envs\3dad\lib\site-packages\urllib3\util\retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /timm/vit_base_patch8_224.dino/resolve/main/model.safetensors (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1131)')))

It seems that I can not download model from the huggingface because of the network problem. So I download the model the model "dino_vitbase8_pretrain.pth" which is provided in the repository. I tried to change the 'init(...., checkpoint_path='',.....)' into 'init(...., checkpoint_path='dino_vitbase8_pretrain.pth',.....)' in the Models.py. Just like the picture below. image but it didn't work. where should I modify the code?

LeeGitCode commented 9 months ago

did you solve it?

limaodaxia commented 9 months ago

did you solve it?

yes, just use a vpn.