mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #164] Reproduce zeroshot results on CIFAR10 and MNIST dataset. #144
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#144
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 @xcpeng on GitHub (Oct 27, 2021).
Original GitHub issue: https://github.com/openai/CLIP/issues/164
Thank you for your work on CLIP!
I was trying to reproduce the zeroshot prediction results listed in Table 11 in the paper. Though I can reproduce most of the results in the Table 11, I found there are huge gaps on CIFAR10 and MNIST datasets.
Here I show the results using released RN50 models
I have attached my implementation below to reproduce my results. Could you help me to check what leads to the gap on CIFAR10 and MNIST?
With this implementation, I can reproduce most of the results in Table 11, except for 4 or 5 datasets (including MNIST and CIFAR10).
@xcpeng commented on GitHub (Oct 27, 2021):
In addition, I also checked the implementation in https://github.com/openai/CLIP/blob/fcab8b6eb92af684e7ff0a904464be7b99b49b88/notebooks/Prompt_Engineering_for_ImageNet.ipynb
I changed the dataset from ImageNet in the notebook to CIFAR10, and got the result: 71.48%, which is very close to the result I got from my implementation (71.5%).
I have attached the
ipynbfile.zeroshot_cifar.zip
@tfwang08 commented on GitHub (Nov 26, 2021):
The result of my implementation is 72.25% on cifar10 and 41.01% on cifar100. I use template of imagenet.
@tfwang08 commented on GitHub (Nov 26, 2021):
I tried other models on cifar10, and the results were lower than those reported in the paper.
@vtddggg commented on GitHub (Dec 23, 2021):
@xcpeng @tfwang96 Also get 71.5% zero-shot acc on cifar10. Have you solved this problem?
I suspect that the author may use a different data preprocess for cifar10.
@msxingpeng commented on GitHub (Dec 28, 2021):
No, I haven't figured out what causes the gap. Would be great if the authors can reveal more details on these datasets.
@tfwang08 commented on GitHub (Dec 29, 2021):
Me too.
@dengandong commented on GitHub (Sep 23, 2022):
Have you guys tried UCF101? I obtain 58.6% with ViT-B/32, but the reported is 64.5%.
@msxingpeng commented on GitHub (Sep 23, 2022):
Unfortunately no
@serena-li commented on GitHub (Nov 11, 2022):
I was trying to reproduce the zeroshot but found there are It's only 49 accurate on MNIST datasets.
Could you help me to check what is wrong?
@zanedurante commented on GitHub (Feb 15, 2023):
Were you ever able to replicate their results? I am using a single center frame but only getting ~53% accuracy... not sure what is different.
EDIT: This notebook helped a lot! https://github.com/openai/CLIP/blob/main/notebooks/Prompt_Engineering_for_ImageNet.ipynb
@aknirala commented on GitHub (Jun 13, 2023):
I thought this may be because CIFAR-10 would have different mean and variance. So I did following, before classifying:
This changed preprocess to:
Sadly for RN50 it reduced the accuracy for CIFAR-10 to 70.17
@shyammarjit commented on GitHub (Sep 28, 2023):
Please refer to
github.com/openai/CLIP@fcab8b6eb9/notebooks/Prompt_Engineering_for_ImageNet.ipynbfor this concern.