Zero-Shot Image Classification
OpenCLIP
gabrielilharco commited on
Commit
d110532
1 Parent(s): 767e6d1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +137 -5
README.md CHANGED
@@ -1,8 +1,140 @@
1
  ---
2
- tags:
3
- - zero-shot-image-classification
4
- - clip
5
- library_name: open_clip
6
  license: mit
 
 
 
 
 
 
 
 
 
7
  ---
8
- # Model card for CLIP-ViT-B-16-DataComp.XL-s13B-b90K
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
 
 
 
 
2
  license: mit
3
+ widget:
4
+ - src: >-
5
+ https://huggingface.co/datasets/mishig/sample_images/resolve/main/cat-dog-music.png
6
+ candidate_labels: playing music, playing sports
7
+ example_title: Cat & Dog
8
+ library_name: open_clip
9
+ datasets:
10
+ - mlfoundations/datacomp_pools
11
+ pipeline_tag: zero-shot-image-classification
12
  ---
13
+ # Model card for CLIP ViT-B-16 trained DataComp-1B
14
+
15
+ # Table of Contents
16
+
17
+ 1. [Model Details](#model-details)
18
+ 2. [Uses](#uses)
19
+ 3. [Training Details](#training-details)
20
+ 4. [Evaluation](#evaluation)
21
+ 5. [Acknowledgements](#acknowledgements)
22
+ 6. [Citation](#citation)
23
+ 7. [How To Get Started With the Model](#how-to-get-started-with-the-model)
24
+
25
+
26
+ # Model Details
27
+
28
+ ## Model Description
29
+
30
+ A CLIP ViT-B/16 model trained with the DataComp-1B (https://github.com/mlfoundations/datacomp) using OpenCLIP (https://github.com/mlfoundations/open_clip).
31
+
32
+ Model training done on the [stability.ai](https://stability.ai/) cluster.
33
+
34
+ # Uses
35
+
36
+ As per the original [OpenAI CLIP model card](https://github.com/openai/CLIP/blob/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1/model-card.md), this model is intended as a research output for research communities. We hope that this model will enable researchers to better understand and explore zero-shot, arbitrary image classification. We also hope it can be used for interdisciplinary studies of the potential impact of such model.
37
+
38
+ The OpenAI CLIP paper includes a discussion of potential downstream impacts to provide an example for this sort of analysis. Additionally, the DataComp paper (https://arxiv.org/abs/2304.14108) include additional discussion as it relates specifically to the training dataset.
39
+
40
+ ## Direct Use
41
+
42
+ Zero-shot image classification, image and text retrieval, among others.
43
+
44
+ ## Downstream Use
45
+
46
+ Image classification and other image task fine-tuning, linear probe image classification, image generation guiding and conditioning, among others.
47
+
48
+ ## Out-of-Scope Use
49
+
50
+ As per the OpenAI models,
51
+
52
+ **Any** deployed use case of the model - whether commercial or not - is currently out of scope. Non-deployed use cases such as image search in a constrained environment, are also not recommended unless there is thorough in-domain testing of the model with a specific, fixed class taxonomy. This is because our safety assessment demonstrated a high need for task specific testing especially given the variability of CLIP’s performance with different class taxonomies. This makes untested and unconstrained deployment of the model in any use case currently potentially harmful.
53
+
54
+ Certain use cases which would fall under the domain of surveillance and facial recognition are always out-of-scope regardless of performance of the model. This is because the use of artificial intelligence for tasks such as these can be premature currently given the lack of testing norms and checks to ensure its fair use.
55
+
56
+ # Training Details
57
+
58
+ ## Training Data
59
+
60
+ This model was trained with the 1.4 Billion samples of the DataComp-1B dataset (https://arxiv.org/abs/2304.14108).
61
+
62
+ **IMPORTANT NOTE:** The motivation behind dataset creation is to democratize research and experimentation around large-scale multi-modal model training and handling of uncurated, large-scale datasets crawled from publically available internet. Our recommendation is therefore to use the dataset for research purposes. Be aware that this large-scale dataset is uncurated. Keep in mind that the uncurated nature of the dataset means that collected links may lead to strongly discomforting and disturbing content for a human viewer. Therefore, please use the demo links with caution and at your own risk. It is possible to extract a “safe” subset by filtering out samples based on the safety tags (using a customized trained NSFW classifier that we built). While this strongly reduces the chance for encountering potentially harmful content when viewing, we cannot entirely exclude the possibility for harmful content being still present in safe mode, so that the warning holds also there. We think that providing the dataset openly to broad research and other interested communities will allow for transparent investigation of benefits that come along with training large-scale models as well as pitfalls and dangers that may stay unreported or unnoticed when working with closed large datasets that remain restricted to a small community. Providing our dataset openly, we however do not recommend using it for creating ready-to-go industrial products, as the basic research about general properties and safety of such large-scale models, which we would like to encourage with this release, is still in progress.
63
+
64
+ ## Training Procedure
65
+
66
+ Please see https://arxiv.org/abs/2304.14108.
67
+
68
+ # Evaluation
69
+
70
+ Evaluation done on 38 datasets, using the [DataComp repo](https://github.com/mlfoundations/datacomp) and the [LAION CLIP Benchmark](https://github.com/LAION-AI/CLIP_benchmark).
71
+
72
+ ## Testing Data, Factors & Metrics
73
+
74
+ ### Testing Data
75
+
76
+ The testing is performed on a suite of 38 datasets. See our paper for more details (https://arxiv.org/abs/2304.14108).
77
+
78
+ ## Results
79
+
80
+ The model achieves a 73.5% zero-shot top-1 accuracy on ImageNet-1k. See our paper for more details and results (https://arxiv.org/abs/2304.14108).
81
+
82
+ # Acknowledgements
83
+
84
+ Acknowledging [stability.ai](https://stability.ai/) for the compute used to train this model.
85
+
86
+ # Citation
87
+
88
+ **BibTeX:**
89
+
90
+ DataComp
91
+ ```bibtex
92
+ @article{datacomp,
93
+ title={DataComp: In search of the next generation of multimodal datasets},
94
+ author={Samir Yitzhak Gadre, Gabriel Ilharco, Alex Fang, Jonathan Hayase, Georgios Smyrnis, Thao Nguyen, Ryan Marten, Mitchell Wortsman, Dhruba Ghosh, Jieyu Zhang, Eyal Orgad, Rahim Entezari, Giannis Daras, Sarah Pratt, Vivek Ramanujan, Yonatan Bitton, Kalyani Marathe, Stephen Mussmann, Richard Vencu, Mehdi Cherti, Ranjay Krishna, Pang Wei Koh, Olga Saukh, Alexander Ratner, Shuran Song, Hannaneh Hajishirzi, Ali Farhadi, Romain Beaumont, Sewoong Oh, Alex Dimakis, Jenia Jitsev, Yair Carmon, Vaishaal Shankar, Ludwig Schmidt},
95
+ journal={arXiv preprint arXiv:2304.14108},
96
+ year={2023}
97
+ }
98
+ ```
99
+
100
+
101
+ OpenAI CLIP paper
102
+ ```
103
+ @inproceedings{Radford2021LearningTV,
104
+ title={Learning Transferable Visual Models From Natural Language Supervision},
105
+ author={Alec Radford and Jong Wook Kim and Chris Hallacy and A. Ramesh and Gabriel Goh and Sandhini Agarwal and Girish Sastry and Amanda Askell and Pamela Mishkin and Jack Clark and Gretchen Krueger and Ilya Sutskever},
106
+ booktitle={ICML},
107
+ year={2021}
108
+ }
109
+ ```
110
+
111
+ OpenCLIP software
112
+ ```
113
+ @software{ilharco_gabriel_2021_5143773,
114
+ author = {Ilharco, Gabriel and
115
+ Wortsman, Mitchell and
116
+ Wightman, Ross and
117
+ Gordon, Cade and
118
+ Carlini, Nicholas and
119
+ Taori, Rohan and
120
+ Dave, Achal and
121
+ Shankar, Vaishaal and
122
+ Namkoong, Hongseok and
123
+ Miller, John and
124
+ Hajishirzi, Hannaneh and
125
+ Farhadi, Ali and
126
+ Schmidt, Ludwig},
127
+ title = {OpenCLIP},
128
+ month = jul,
129
+ year = 2021,
130
+ note = {If you use this software, please cite it as below.},
131
+ publisher = {Zenodo},
132
+ version = {0.1},
133
+ doi = {10.5281/zenodo.5143773},
134
+ url = {https://doi.org/10.5281/zenodo.5143773}
135
+ }
136
+ ```
137
+
138
+ # How to Get Started with the Model
139
+
140
+ See https://github.com/mlfoundations/open_clip