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

Custom classnames and templates #98

Merged
merged 3 commits into from
Jul 7, 2023
Merged

Conversation

mehdidc
Copy link
Collaborator

@mehdidc mehdidc commented Jul 7, 2023

Supports a generic way to use custom prompts / templates / classnames.
Default stay the same as currently, with the addition of the possibility to provide a custom prompts / templates and classname files.

e.g.
clip_benchmark eval --dataset "wds/imagenet1k" --model ViT-B-32 --pretrained laion400m_e32 --custom_template_file <path> --custom_classname_file <path>

the template file can be either in the usual format https://github.com/LAION-AI/CLIP_benchmark/blob/main/clip_benchmark/datasets/en_zeroshot_classification_templates.json or in the CuPL format https://github.com/LAION-AI/CLIP_benchmark/blob/main/clip_benchmark/datasets/cupl_prompts.json to have class-specific prompts. In the case of CuPL format, the classnames file will not be used.

@mehdidc mehdidc merged commit 940bab8 into main Jul 7, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

None yet

1 participant