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

How to use the retrival large model for image-text prediction (model_large_retrieval_coco) ? #199

Open
caydenwei opened this issue Feb 5, 2024 · 0 comments

Comments

@caydenwei
Copy link

In the Image-Text Matching part in Colab, I try to use the large retrieval coco model provided in README.
But it reports an Assertion error as follow, what can I do to do the prediction using model_url: https://storage.googleapis.com/sfr-vision-language-research/BLIP/models/model_large_retrieval_coco.pth

Traceback (most recent call last):
  File "/app-dev/rootfs/app/main.py", line 144, in <module>
    run_tasks(args.config, args.task)
  File "/app-dev/rootfs/app/main.py", line 103, in run_tasks
    clip = CLIP(pipeline=pipeline_name, impl=impl, model_name=model, **kwargs)
  File "/app-dev/rootfs/app/ops_clip.py", line 20, in __init__
    _, self.preprocess = self.clip.load_model()
  File "/app-dev/rootfs/app/framework/impl/clip/blip_predictor.py", line 30, in load_model
    model = blip_itm(med_config=os.path.join(blip_path, 'configs/med_config.json'), pretrained=self.model_url,
  File "/app-dev/rootfs/app/framework/impl/clip/BLIP/models/blip_itm.py", line 74, in blip_itm
    assert(len(msg.missing_keys)==0)
AssertionError
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

1 participant