Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such file or directory: 'groundingdino_swint_ogc.pth' #497

Open
lylsalt opened this issue May 4, 2024 · 1 comment
Open

No such file or directory: 'groundingdino_swint_ogc.pth' #497

lylsalt opened this issue May 4, 2024 · 1 comment

Comments

@lylsalt
Copy link

lylsalt commented May 4, 2024

how to solve this problem I am sure i have this file
(label) D:\Desktop\text\Grounded-Segment-Anything>python automatic_label_ram_demo.py --config GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py --ram_checkpoint ram_swi
n_large_14m.pth --grounded_checkpoint groundingdino_swint_ogc.pth --sam_checkpoint sam_vit_h_4b8939.pth --input_image assets/demo9.jpg --output_dir "outputs" --box_threshold 0.25 --text_threshold 0.2 --iou_threshold 0.5 --device "cuda"
final text_encoder_type: bert-base-uncased
Traceback (most recent call last):
File "automatic_label_ram_demo.py", line 236, in
model = load_model(config_file, grounded_checkpoint, device=device)
File "automatic_label_ram_demo.py", line 84, in load_model
checkpoint = torch.load(model_checkpoint_path, map_location="cpu")
File "C:\Users\LYL.conda\envs\label\lib\site-packages\torch\serialization.py", line 997, in load
with _open_file_like(f, 'rb') as opened_file:
File "C:\Users\LYL.conda\envs\label\lib\site-packages\torch\serialization.py", line 444, in _open_file_like
return _open_file(name_or_buffer, mode)
File "C:\Users\LYL.conda\envs\label\lib\site-packages\torch\serialization.py", line 425, in init
super().init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'groundingdino_swint_ogc.pth'

@jtabor
Copy link

jtabor commented May 10, 2024

You need to download the weights. From the readme:

mkdir weights
cd weights
wget -q https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth
cd ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants