README.md
7.6 KB · 149 lines · markdown Raw
1 ---
2 license: mit
3 pipeline_tag: zero-shot-image-classification
4 library_name: open_clip
5 ---
6 # Model Card for CLIP ViT-B/16 - LAION-2B
7
8 # Table of Contents
9
10 1. [Model Details](#model-details)
11 2. [Uses](#uses)
12 3. [Training Details](#training-details)
13 4. [Evaluation](#evaluation)
14 5. [Acknowledgements](#acknowledgements)
15 6. [Citation](#citation)
16
17 # Model Details
18
19 ## Model Description
20
21 A CLIP ViT-B/16 model trained with the LAION-2B English subset of LAION-5B (https://laion.ai/blog/laion-5b/) using OpenCLIP (https://github.com/mlfoundations/open_clip).
22
23 Model training done by Mehdi Cherti on the [JUWELS Booster](https://apps.fz-juelich.de/jsc/hps/juwels/booster-overview.html) supercomputer. See acknowledgements below.
24
25 # Uses
26
27 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.
28
29 The OpenAI CLIP paper includes a discussion of potential downstream impacts to provide an example for this sort of analysis. Additionally, the LAION-5B blog (https://laion.ai/blog/laion-5b/) and upcoming paper include additional discussion as it relates specifically to the training dataset.
30
31 ## Direct Use
32
33 Zero-shot image classification, image and text retrieval, among others.
34
35 ## Downstream Use
36
37 Image classification and other image task fine-tuning, linear probe image classification, image generation guiding and conditioning, among others.
38
39 ## Out-of-Scope Use
40
41 As per the OpenAI models,
42
43 **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.
44
45 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.
46
47 Since the model has not been purposefully trained in or evaluated on any languages other than English, its use should be limited to English language use cases.
48
49 Further the above notice, the LAION-5B dataset used in training of these models has additional considerations, see below.
50
51 # Training Details
52
53 ## Training Data
54
55 This model was trained with the 2 Billion sample English subset of LAION-5B (https://laion.ai/blog/laion-5b/).
56
57 **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.
58
59 ## Training Procedure
60
61 TODO
62
63 # Evaluation
64
65 Evaluation done with code in the [LAION CLIP Benchmark suite](https://github.com/LAION-AI/CLIP_benchmark).
66
67 ## Testing Data, Factors & Metrics
68
69 ### Testing Data
70
71 The testing is performed with VTAB+ (A combination of VTAB (https://arxiv.org/abs/1910.04867) w/ additional robustness datasets) for classification and COCO and Flickr for retrieval.
72
73
74 ## Results
75
76 The model achieves a 70.2 zero-shot top-1 accuracy on ImageNet-1k.
77
78 An initial round of benchmarks have been performed on a wider range of datasets, currently viewable at https://github.com/LAION-AI/CLIP_benchmark/blob/main/benchmark/results.ipynb
79
80 # Acknowledgements
81
82 Acknowledging the Gauss Centre for Supercomputing e.V. (http://gauss-centre.eu) for funding this part of work by providing computing time through the John von Neumann Institute for Computing (NIC) on the GCS Supercomputer JUWELS Booster at Jülich Supercomputing Centre (JSC).
83
84 # Citation
85
86 **BibTeX:**
87
88 LAION-5B
89 ```bibtex
90 @inproceedings{schuhmann2022laionb,
91 title={{LAION}-5B: An open large-scale dataset for training next generation image-text models},
92 author={Christoph Schuhmann and
93 Romain Beaumont and
94 Richard Vencu and
95 Cade W Gordon and
96 Ross Wightman and
97 Mehdi Cherti and
98 Theo Coombes and
99 Aarush Katta and
100 Clayton Mullis and
101 Mitchell Wortsman and
102 Patrick Schramowski and
103 Srivatsa R Kundurthy and
104 Katherine Crowson and
105 Ludwig Schmidt and
106 Robert Kaczmarczyk and
107 Jenia Jitsev},
108 booktitle={Thirty-sixth Conference on Neural Information Processing Systems Datasets and Benchmarks Track},
109 year={2022},
110 url={https://openreview.net/forum?id=M3Y74vmsMcY}
111 }
112 ```
113
114 OpenAI CLIP paper
115 ```
116 @inproceedings{Radford2021LearningTV,
117 title={Learning Transferable Visual Models From Natural Language Supervision},
118 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},
119 booktitle={ICML},
120 year={2021}
121 }
122 ```
123
124 OpenCLIP software
125 ```
126 @software{ilharco_gabriel_2021_5143773,
127 author = {Ilharco, Gabriel and
128 Wortsman, Mitchell and
129 Wightman, Ross and
130 Gordon, Cade and
131 Carlini, Nicholas and
132 Taori, Rohan and
133 Dave, Achal and
134 Shankar, Vaishaal and
135 Namkoong, Hongseok and
136 Miller, John and
137 Hajishirzi, Hannaneh and
138 Farhadi, Ali and
139 Schmidt, Ludwig},
140 title = {OpenCLIP},
141 month = jul,
142 year = 2021,
143 note = {If you use this software, please cite it as below.},
144 publisher = {Zenodo},
145 version = {0.1},
146 doi = {10.5281/zenodo.5143773},
147 url = {https://doi.org/10.5281/zenodo.5143773}
148 }
149 ```