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

CLIPForImageClassification #27802

Closed
2 tasks done
Andron00e opened this issue Dec 2, 2023 · 2 comments
Closed
2 tasks done

CLIPForImageClassification #27802

Andron00e opened this issue Dec 2, 2023 · 2 comments

Comments

@Andron00e
Copy link

Andron00e commented Dec 2, 2023

Model description

CLIPForImageClassification is an add-on CLIPModel from hub. With one linear classifier on top of the CLIP it performs in Image Classification task as good as ViTForImageClassification does. Moreover, there are several options how to produce a classification with this model.
The first one is to use "image_embeds" output of CLIP and then produce a classification with [projection_dim, num_classes] Linear Layer.
The second one is to use "logits_per_image" output of CLIP and then do classification.

Currently, the model implementation is partially available. With weights of it, retrained on CIFAR10 dataset. My next goal is to expand the range of labels and implement the second variant of this model.

Open source status

  • The model implementation is available
  • The model weights are available

Provide useful links for the implementation

Repo with implementation
Pre-trained model on hub

@NielsRogge
Copy link
Contributor

Thanks for the suggestion, I've review the PR above

@NielsRogge
Copy link
Contributor

This is now supported by #28952.

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

No branches or pull requests

2 participants