hkchengrex / Tracking-Anything-with-DEVA

[ICCV 2023] Tracking Anything with Decoupled Video Segmentation
https://hkchengrex.com/Tracking-Anything-with-DEVA/
Other
1.27k stars 129 forks source link

cannot read the pth file? #23

Closed Lanson426 closed 1 year ago

Lanson426 commented 1 year ago

ubuntu 18.04 cuda 11.6 torch 1.21

when i run python demo/demo_gradio.py and chose the Text prompt to run it shows as follows:

OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like bert-base-uncased is not the path to a directory containing a file named config.json. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

when i chose the Automatic it shows that:

Traceback (most recent call last): File "/home/lanson/anaconda3/envs/DEVA/lib/python3.10/site-packages/gradio/routes.py", line 516, in predict output = await route_utils.call_process_api( File "/home/lanson/anaconda3/envs/DEVA/lib/python3.10/site-packages/gradio/route_utils.py", line 219, in call_process_api output = await app.get_blocks().process_api( File "/home/lanson/anaconda3/envs/DEVA/lib/python3.10/site-packages/gradio/blocks.py", line 1437, in process_api result = await self.call_function( File "/home/lanson/anaconda3/envs/DEVA/lib/python3.10/site-packages/gradio/blocks.py", line 1109, in call_function prediction = await anyio.to_thread.run_sync( File "/home/lanson/anaconda3/envs/DEVA/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/home/lanson/anaconda3/envs/DEVA/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/home/lanson/anaconda3/envs/DEVA/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, args) File "/home/lanson/anaconda3/envs/DEVA/lib/python3.10/site-packages/gradio/utils.py", line 650, in wrapper response = f(args, **kwargs) File "/home/lanson/桌面/Code/Tracking-Anything-with-DEVA/demo/demo_gradio.py", line 118, in demo_automatic sam_model = get_sam_model(cfg, 'cuda') File "/home/lanson/桌面/Code/Tracking-Anything-with-DEVA/deva/ext/automatic_sam.py", line 35, in get_sam_model sam = sam_model_registrySAM_ENCODER_VERSION.to( File "/home/lanson/桌面/Code/Grounded-Segment-Anything/segment_anything/segment_anything/build_sam.py", line 15, in build_sam_vit_h return _build_sam( File "/home/lanson/桌面/Code/Grounded-Segment-Anything/segment_anything/segment_anything/build_sam.py", line 105, in _build_sam state_dict = torch.load(f) File "/home/lanson/anaconda3/envs/DEVA/lib/python3.10/site-packages/torch/serialization.py", line 705, in load with _open_zipfile_reader(opened_file) as opened_zipfile: File "/home/lanson/anaconda3/envs/DEVA/lib/python3.10/site-packages/torch/serialization.py", line 242, in init super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer)) RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

Hope you can help me , Thanks very much!

hkchengrex commented 1 year ago

Maybe don't use chinese characters in your path?