mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #412] Evaluation of CLIP on Mnist is only 10% accuracy #354
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#354
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @GitOutOfMyBed on GitHub (Dec 16, 2023).
Original GitHub issue: https://github.com/openai/CLIP/issues/412
According to the paper, they were able to achieve 80% accuracy on MNIST. However, I tested mnist on clip and get only 10-20%. Does anyone know what I am doing wrong here?
@VimukthiRandika1997 commented on GitHub (Dec 24, 2023):
text = clip.tokenize(classes).to(device)change this one to something like this!torch.cat([clip.tokenize(f"a photo of a {c}") for c in classes]).to(device)The results on the paper depends on how they have set up the preprocessing data, I am not sure how they put it!
@GitOutOfMyBed commented on GitHub (Dec 25, 2023):
I tried that and got better results but they were still nowhere near 88%.
@mgupta70 commented on GitHub (Jan 31, 2024):
Performance varies a lot depending on the description template and model you choose.
For instance, when you use: "a photo of the number {}", the top-1 accuracies over MNIST are:
RN50 - 51.28
RN101 - 44.34
RN50x4 - 56.64
ViT-B/32 - 40.11
ViT-B/16 - 53.95
Whereas, if you use 80 templates of Imagenet, you will get:
RN50 - 26.5
RN101 - 36.14
RN50x4 - 59.53
ViT-B/32 - 30.16
ViT-B/16 - 44.22
@EnalisUs commented on GitHub (Dec 14, 2024):
You should sampling your data in batch to train re-train the CLIP model with your data if you want to keep this class as text for text encoder, the batch should be contains images and text from different classes