exdysa apf1 commited on
Commit
d56ff56
·
verified ·
0 Parent(s):

Duplicate from apple/DFN5B-CLIP-ViT-H-14-378

Browse files

Co-authored-by: Alex Fang <apf1@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Disclaimer: IMPORTANT: This Apple Machine Learning Research Model is
2
+ specifically developed and released by Apple Inc. ("Apple") for the sole purpose
3
+ of scientific research of artificial intelligence and machine-learning
4
+ technology. “Apple Machine Learning Research Model” means the model, including
5
+ but not limited to algorithms, formulas, trained model weights, parameters,
6
+ configurations, checkpoints, and any related materials (including
7
+ documentation).
8
+
9
+ This Apple Machine Learning Research Model is provided to You by
10
+ Apple in consideration of your agreement to the following terms, and your use,
11
+ modification, creation of Model Derivatives, and or redistribution of the Apple
12
+ Machine Learning Research Model constitutes acceptance of this Agreement. If You
13
+ do not agree with these terms, please do not use, modify, create Model
14
+ Derivatives of, or distribute this Apple Machine Learning Research Model or
15
+ Model Derivatives.
16
+
17
+ * License Scope: In consideration of your agreement to abide by the following
18
+ terms, and subject to these terms, Apple hereby grants you a personal,
19
+ non-exclusive, worldwide, non-transferable, royalty-free, revocable, and
20
+ limited license, to use, copy, modify, distribute, and create Model
21
+ Derivatives (defined below) of the Apple Machine Learning Research Model
22
+ exclusively for Research Purposes. You agree that any Model Derivatives You
23
+ may create or that may be created for You will be limited to Research Purposes
24
+ as well. “Research Purposes” means non-commercial scientific research and
25
+ academic development activities, such as experimentation, analysis, testing
26
+ conducted by You with the sole intent to advance scientific knowledge and
27
+ research. “Research Purposes” does not include any commercial exploitation,
28
+ product development or use in any commercial product or service.
29
+
30
+ * Distribution of Apple Machine Learning Research Model and Model Derivatives:
31
+ If you choose to redistribute Apple Machine Learning Research Model or its
32
+ Model Derivatives, you must provide a copy of this Agreement to such third
33
+ party, and ensure that the following attribution notice be provided: “Apple
34
+ Machine Learning Research Model is licensed under the Apple Machine Learning
35
+ Research Model License Agreement.” Additionally, all Model Derivatives must
36
+ clearly be identified as such, including disclosure of modifications and
37
+ changes made to the Apple Machine Learning Research Model. The name,
38
+ trademarks, service marks or logos of Apple may not be used to endorse or
39
+ promote Model Derivatives or the relationship between You and Apple. “Model
40
+ Derivatives” means any models or any other artifacts created by modifications,
41
+ improvements, adaptations, alterations to the architecture, algorithm or
42
+ training processes of the Apple Machine Learning Research Model, or by any
43
+ retraining, fine-tuning of the Apple Machine Learning Research Model.
44
+
45
+ * No Other License: Except as expressly stated in this notice, no other rights
46
+ or licenses, express or implied, are granted by Apple herein, including but
47
+ not limited to any patent, trademark, and similar intellectual property rights
48
+ worldwide that may be infringed by the Apple Machine Learning Research Model,
49
+ the Model Derivatives or by other works in which the Apple Machine Learning
50
+ Research Model may be incorporated.
51
+
52
+ * Compliance with Laws: Your use of Apple Machine Learning Research Model must
53
+ be in compliance with all applicable laws and regulations.
54
+
55
+ * Term and Termination: The term of this Agreement will begin upon your
56
+ acceptance of this Agreement or use of the Apple Machine Learning Research
57
+ Model and will continue until terminated in accordance with the following
58
+ terms. Apple may terminate this Agreement at any time if You are in breach of
59
+ any term or condition of this Agreement. Upon termination of this Agreement,
60
+ You must cease to use all Apple Machine Learning Research Models and Model
61
+ Derivatives and permanently delete any copy thereof. Sections 3, 6 and 7 will
62
+ survive termination.
63
+
64
+ * Disclaimer and Limitation of Liability: This Apple Machine Learning Research
65
+ Model and any outputs generated by the Apple Machine Learning Research Model
66
+ are provided on an “AS IS” basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
67
+ IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
68
+ NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
69
+ REGARDING THE APPLE MACHINE LEARNING RESEARCH MODEL OR OUTPUTS GENERATED BY
70
+ THE APPLE MACHINE LEARNING RESEARCH MODEL. You are solely responsible for
71
+ determining the appropriateness of using or redistributing the Apple Machine
72
+ Learning Research Model and any outputs of the Apple Machine Learning Research
73
+ Model and assume any risks associated with Your use of the Apple Machine
74
+ Learning Research Model and any output and results. IN NO EVENT SHALL APPLE BE
75
+ LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
76
+ IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF
77
+ THE APPLE MACHINE LEARNING RESEARCH MODEL AND ANY OUTPUTS OF THE APPLE MACHINE
78
+ LEARNING RESEARCH MODEL, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
79
+ TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS
80
+ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
81
+
82
+ * Governing Law: This Agreement will be governed by and construed under the laws
83
+ of the State of California without regard to its choice of law principles. The
84
+ Convention on Contracts for the International Sale of Goods shall not apply to
85
+ the Agreement except that the arbitration clause and any arbitration hereunder
86
+ shall be governed by the Federal Arbitration Act, Chapters 1 and 2. 
87
+
88
+ Copyright (C) 2025 Apple Inc. All Rights Reserved.
README.md ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apple-amlr
3
+ license_name: apple-sample-code-license
4
+ license_link: LICENSE
5
+ ---
6
+ A CLIP (Contrastive Language-Image Pre-training) model trained on DFN-5B.
7
+ Data Filtering Networks (DFNs) are small networks used to automatically filter large pools of uncurated data.
8
+ This model was trained on 5B images that were filtered from a pool of 43B uncurated image-text pairs
9
+ (12.8B image-text pairs from CommonPool-12.8B + 30B additional public image-text pairs).
10
+
11
+ This model has been converted to PyTorch from the original JAX checkpoints from Axlearn (https://github.com/apple/axlearn).
12
+ These weights are directly usable in OpenCLIP (image + text).
13
+
14
+
15
+ ## Model Details
16
+
17
+ - **Model Type:** Contrastive Image-Text, Zero-Shot Image Classification.
18
+ - **Dataset:** DFN-5b
19
+ - **Papers:**
20
+ - Data Filtering Networks: https://arxiv.org/abs/2309.17425
21
+ - **Samples Seen:** 39B (224 x 224) + 5B (384 x 384)
22
+ ## Model Metrics
23
+ | dataset | metric |
24
+ |:-----------------------|---------:|
25
+ | ImageNet 1k | 0.84218 |
26
+ | Caltech-101 | 0.954479 |
27
+ | CIFAR-10 | 0.9879 |
28
+ | CIFAR-100 | 0.9041 |
29
+ | CLEVR Counts | 0.362467 |
30
+ | CLEVR Distance | 0.206067 |
31
+ | Country211 | 0.37673 |
32
+ | Describable Textures | 0.71383 |
33
+ | EuroSAT | 0.608333 |
34
+ | FGVC Aircraft | 0.719938 |
35
+ | Food-101 | 0.963129 |
36
+ | GTSRB | 0.679018 |
37
+ | ImageNet Sketch | 0.73338 |
38
+ | ImageNet v2 | 0.7837 |
39
+ | ImageNet-A | 0.7992 |
40
+ | ImageNet-O | 0.3785 |
41
+ | ImageNet-R | 0.937633 |
42
+ | KITTI Vehicle Distance | 0.38256 |
43
+ | MNIST | 0.8372 |
44
+ | ObjectNet <sup>1</sup> | 0.796867 |
45
+ | Oxford Flowers-102 | 0.896834 |
46
+ | Oxford-IIIT Pet | 0.966841 |
47
+ | Pascal VOC 2007 | 0.826255 |
48
+ | PatchCamelyon | 0.695953 |
49
+ | Rendered SST2 | 0.566722 |
50
+ | RESISC45 | 0.755079 |
51
+ | Stanford Cars | 0.959955 |
52
+ | STL-10 | 0.991125 |
53
+ | SUN397 | 0.772799 |
54
+ | SVHN | 0.671251 |
55
+ | Flickr | 0.8808 |
56
+ | MSCOCO | 0.636889 |
57
+ | WinoGAViL | 0.571813 |
58
+ | iWildCam | 0.224911 |
59
+ | Camelyon17 | 0.711536 |
60
+ | FMoW | 0.209024 |
61
+ | Dollar Street | 0.71729 |
62
+ | GeoDE | 0.935699 |
63
+ | **Average** | **0.709421** |
64
+
65
+
66
+ [1]: Center-crop pre-processing used for ObjectNet (squashing results in lower accuracy of 0.737)
67
+ ## Model Usage
68
+ ### With OpenCLIP
69
+ ```
70
+ import torch
71
+ import torch.nn.functional as F
72
+ from urllib.request import urlopen
73
+ from PIL import Image
74
+ from open_clip import create_model_from_pretrained, get_tokenizer
75
+
76
+ model, preprocess = create_model_from_pretrained('hf-hub:apple/DFN5B-CLIP-ViT-H-14-384')
77
+ tokenizer = get_tokenizer('ViT-H-14')
78
+
79
+ image = Image.open(urlopen(
80
+ 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
81
+ ))
82
+ image = preprocess(image).unsqueeze(0)
83
+
84
+ labels_list = ["a dog", "a cat", "a donut", "a beignet"]
85
+ text = tokenizer(labels_list, context_length=model.context_length)
86
+
87
+ with torch.no_grad(), torch.cuda.amp.autocast():
88
+ image_features = model.encode_image(image)
89
+ text_features = model.encode_text(text)
90
+ image_features = F.normalize(image_features, dim=-1)
91
+ text_features = F.normalize(text_features, dim=-1)
92
+
93
+ text_probs = torch.sigmoid(image_features @ text_features.T * model.logit_scale.exp() + model.logit_bias)
94
+
95
+ zipped_list = list(zip(labels_list, [round(p.item(), 3) for p in text_probs[0]]))
96
+ print("Label probabilities: ", zipped_list)
97
+ ```
98
+
99
+ ## Citation
100
+ ```bibtex
101
+ @article{fang2023data,
102
+ title={Data Filtering Networks},
103
+ author={Fang, Alex and Jose, Albin Madappally and Jain, Amit and Schmidt, Ludwig and Toshev, Alexander and Shankar, Vaishaal},
104
+ journal={arXiv preprint arXiv:2309.17425},
105
+ year={2023}
106
+ }
107
+
108
+ ```
config.json ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_commit_hash": null,
3
+ "architectures": [
4
+ "CLIPModel"
5
+ ],
6
+ "initializer_factor": 1.0,
7
+ "logit_scale_init_value": 2.6592,
8
+ "model_type": "clip",
9
+ "projection_dim": 1024,
10
+ "text_config": {
11
+ "_name_or_path": "",
12
+ "add_cross_attention": false,
13
+ "architectures": null,
14
+ "attention_dropout": 0.0,
15
+ "bad_words_ids": null,
16
+ "begin_suppress_tokens": null,
17
+ "bos_token_id": 0,
18
+ "chunk_size_feed_forward": 0,
19
+ "cross_attention_hidden_size": null,
20
+ "decoder_start_token_id": null,
21
+ "diversity_penalty": 0.0,
22
+ "do_sample": false,
23
+ "early_stopping": false,
24
+ "encoder_no_repeat_ngram_size": 0,
25
+ "eos_token_id": 49407,
26
+ "exponential_decay_length_penalty": null,
27
+ "finetuning_task": null,
28
+ "forced_bos_token_id": null,
29
+ "forced_eos_token_id": null,
30
+ "hidden_act": "quick_gelu",
31
+ "hidden_size": 1024,
32
+ "id2label": {
33
+ "0": "LABEL_0",
34
+ "1": "LABEL_1"
35
+ },
36
+ "initializer_factor": 1.0,
37
+ "initializer_range": 0.02,
38
+ "intermediate_size": 4096,
39
+ "is_decoder": false,
40
+ "is_encoder_decoder": false,
41
+ "label2id": {
42
+ "LABEL_0": 0,
43
+ "LABEL_1": 1
44
+ },
45
+ "layer_norm_eps": 1e-05,
46
+ "length_penalty": 1.0,
47
+ "max_length": 20,
48
+ "max_position_embeddings": 77,
49
+ "min_length": 0,
50
+ "model_type": "clip_text_model",
51
+ "no_repeat_ngram_size": 0,
52
+ "num_attention_heads": 16,
53
+ "num_beam_groups": 1,
54
+ "num_beams": 1,
55
+ "num_hidden_layers": 24,
56
+ "num_return_sequences": 1,
57
+ "output_attentions": false,
58
+ "output_hidden_states": false,
59
+ "output_scores": false,
60
+ "pad_token_id": 49408,
61
+ "prefix": null,
62
+ "problem_type": null,
63
+ "projection_dim": 512,
64
+ "pruned_heads": {},
65
+ "remove_invalid_values": false,
66
+ "repetition_penalty": 1.0,
67
+ "return_dict": true,
68
+ "return_dict_in_generate": false,
69
+ "sep_token_id": null,
70
+ "suppress_tokens": null,
71
+ "task_specific_params": null,
72
+ "temperature": 1.0,
73
+ "tf_legacy_loss": false,
74
+ "tie_encoder_decoder": false,
75
+ "tie_word_embeddings": true,
76
+ "tokenizer_class": null,
77
+ "top_k": 50,
78
+ "top_p": 1.0,
79
+ "torch_dtype": null,
80
+ "torchscript": false,
81
+ "transformers_version": "4.27.1",
82
+ "typical_p": 1.0,
83
+ "use_bfloat16": false,
84
+ "vocab_size": 49409
85
+ },
86
+ "torch_dtype": "float32",
87
+ "transformers_version": null,
88
+ "vision_config": {
89
+ "_name_or_path": "",
90
+ "add_cross_attention": false,
91
+ "architectures": null,
92
+ "attention_dropout": 0.0,
93
+ "bad_words_ids": null,
94
+ "begin_suppress_tokens": null,
95
+ "bos_token_id": null,
96
+ "chunk_size_feed_forward": 0,
97
+ "cross_attention_hidden_size": null,
98
+ "decoder_start_token_id": null,
99
+ "diversity_penalty": 0.0,
100
+ "do_sample": false,
101
+ "early_stopping": false,
102
+ "encoder_no_repeat_ngram_size": 0,
103
+ "eos_token_id": null,
104
+ "exponential_decay_length_penalty": null,
105
+ "finetuning_task": null,
106
+ "forced_bos_token_id": null,
107
+ "forced_eos_token_id": null,
108
+ "hidden_act": "quick_gelu",
109
+ "hidden_size": 1280,
110
+ "id2label": {
111
+ "0": "LABEL_0",
112
+ "1": "LABEL_1"
113
+ },
114
+ "image_size": 378,
115
+ "initializer_factor": 1.0,
116
+ "initializer_range": 0.02,
117
+ "intermediate_size": 5120,
118
+ "is_decoder": false,
119
+ "is_encoder_decoder": false,
120
+ "label2id": {
121
+ "LABEL_0": 0,
122
+ "LABEL_1": 1
123
+ },
124
+ "layer_norm_eps": 1e-05,
125
+ "length_penalty": 1.0,
126
+ "max_length": 20,
127
+ "min_length": 0,
128
+ "model_type": "clip_vision_model",
129
+ "no_repeat_ngram_size": 0,
130
+ "num_attention_heads": 16,
131
+ "num_beam_groups": 1,
132
+ "num_beams": 1,
133
+ "num_channels": 3,
134
+ "num_hidden_layers": 32,
135
+ "num_return_sequences": 1,
136
+ "output_attentions": false,
137
+ "output_hidden_states": false,
138
+ "output_scores": false,
139
+ "pad_token_id": null,
140
+ "patch_size": 14,
141
+ "prefix": null,
142
+ "problem_type": null,
143
+ "projection_dim": 512,
144
+ "pruned_heads": {},
145
+ "remove_invalid_values": false,
146
+ "repetition_penalty": 1.0,
147
+ "return_dict": true,
148
+ "return_dict_in_generate": false,
149
+ "sep_token_id": null,
150
+ "suppress_tokens": null,
151
+ "task_specific_params": null,
152
+ "temperature": 1.0,
153
+ "tf_legacy_loss": false,
154
+ "tie_encoder_decoder": false,
155
+ "tie_word_embeddings": true,
156
+ "tokenizer_class": null,
157
+ "top_k": 50,
158
+ "top_p": 1.0,
159
+ "torch_dtype": null,
160
+ "torchscript": false,
161
+ "transformers_version": "4.27.1",
162
+ "typical_p": 1.0,
163
+ "use_bfloat16": false
164
+ }
165
+ }
eval_results.jsonl ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"key": "imagenet1k", "dataset": "ImageNet 1k", "metrics": {"acc1": 0.84218, "acc5": 0.97496, "mean_per_class_recall": 0.84218, "main_metric": 0.84218}}
2
+ {"key": "vtab/caltech101", "dataset": "Caltech-101", "metrics": {"acc1": 0.8547247329498767, "acc5": 0.9406737880032868, "mean_per_class_recall": 0.9544791606967757, "main_metric": 0.9544791606967757}}
3
+ {"key": "cifar10", "dataset": "CIFAR-10", "metrics": {"acc1": 0.9879, "acc5": 0.9998, "mean_per_class_recall": 0.9879, "main_metric": 0.9879}}
4
+ {"key": "vtab/cifar100", "dataset": "CIFAR-100", "metrics": {"acc1": 0.9041, "acc5": 0.9884, "mean_per_class_recall": 0.9041, "main_metric": 0.9041}}
5
+ {"key": "vtab/clevr_count_all", "dataset": "CLEVR Counts", "metrics": {"acc1": 0.36246666666666666, "acc5": 0.97, "mean_per_class_recall": 0.3654495182033677, "main_metric": 0.36246666666666666}}
6
+ {"key": "vtab/clevr_closest_object_distance", "dataset": "CLEVR Distance", "metrics": {"acc1": 0.20606666666666668, "acc5": 0.9186666666666666, "mean_per_class_recall": 0.15593116563976261, "main_metric": 0.20606666666666668}}
7
+ {"key": "country211", "dataset": "Country211", "metrics": {"acc1": 0.3767298578199052, "acc5": 0.6264454976303317, "mean_per_class_recall": 0.3767298578199052, "main_metric": 0.3767298578199052}}
8
+ {"key": "vtab/dtd", "dataset": "Describable Textures", "metrics": {"acc1": 0.7138297872340426, "acc5": 0.9404255319148936, "mean_per_class_recall": 0.7138297872340424, "main_metric": 0.7138297872340426}}
9
+ {"key": "vtab/eurosat", "dataset": "EuroSAT", "metrics": {"acc1": 0.6083333333333333, "acc5": 0.9844444444444445, "mean_per_class_recall": 0.6233917754874965, "main_metric": 0.6083333333333333}}
10
+ {"key": "fgvc_aircraft", "dataset": "FGVC Aircraft", "metrics": {"acc1": 0.7203720372037203, "acc5": 0.9750975097509751, "mean_per_class_recall": 0.7199376114081997, "main_metric": 0.7199376114081997}}
11
+ {"key": "food101", "dataset": "Food-101", "metrics": {"acc1": 0.9631287128712871, "acc5": 0.9965940594059406, "mean_per_class_recall": 0.9631287128712871, "main_metric": 0.9631287128712871}}
12
+ {"key": "gtsrb", "dataset": "GTSRB", "metrics": {"acc1": 0.6790182106096595, "acc5": 0.8880443388756928, "mean_per_class_recall": 0.6794453150770137, "main_metric": 0.6790182106096595}}
13
+ {"key": "imagenet_sketch", "dataset": "ImageNet Sketch", "metrics": {"acc1": 0.7333804948024131, "acc5": 0.9161508380986068, "mean_per_class_recall": 0.7336454901960784, "main_metric": 0.7333804948024131}}
14
+ {"key": "imagenetv2", "dataset": "ImageNet v2", "metrics": {"acc1": 0.7837, "acc5": 0.9489, "mean_per_class_recall": 0.7843, "main_metric": 0.7837}}
15
+ {"key": "imagenet-a", "dataset": "ImageNet-A", "metrics": {"acc1": 0.7992, "acc5": 0.9442666666666667, "mean_per_class_recall": 0.769014748285832, "main_metric": 0.7992}}
16
+ {"key": "imagenet-o", "dataset": "ImageNet-O", "metrics": {"acc1": 0.3785, "acc5": 0.727, "mean_per_class_recall": 0.39266403450350823, "main_metric": 0.3785}}
17
+ {"key": "imagenet-r", "dataset": "ImageNet-R", "metrics": {"acc1": 0.9376333333333333, "acc5": 0.9865, "mean_per_class_recall": 0.9283762658708951, "main_metric": 0.9376333333333333}}
18
+ {"key": "vtab/kitti_closest_vehicle_distance", "dataset": "KITTI Vehicle Distance", "metrics": {"acc1": 0.38255977496483823, "acc5": null, "mean_per_class_recall": 0.4146511156566664, "main_metric": 0.38255977496483823}}
19
+ {"key": "mnist", "dataset": "MNIST", "metrics": {"acc1": 0.8372, "acc5": 0.979, "mean_per_class_recall": 0.8369686002545691, "main_metric": 0.8372}}
20
+ {"key": "objectnet", "dataset": "ObjectNet", "metrics": {"acc1": 0.796866587703241, "acc5": 0.9307634327554646, "mean_per_class_recall": 0.7875438166435634, "main_metric": 0.796866587703241}}
21
+ {"key": "vtab/flowers", "dataset": "Oxford Flowers-102", "metrics": {"acc1": 0.9172223125711498, "acc5": 0.9821109123434705, "mean_per_class_recall": 0.8968338139029207, "main_metric": 0.8968338139029207}}
22
+ {"key": "vtab/pets", "dataset": "Oxford-IIIT Pet", "metrics": {"acc1": 0.9670209866448624, "acc5": 0.9994548923412374, "mean_per_class_recall": 0.9668411993435574, "main_metric": 0.9668411993435574}}
23
+ {"key": "voc2007", "dataset": "Pascal VOC 2007", "metrics": {"acc1": 0.8262553418803419, "acc5": 0.9788995726495726, "mean_per_class_recall": 0.9244459986704573, "main_metric": 0.8262553418803419}}
24
+ {"key": "vtab/pcam", "dataset": "PatchCamelyon", "metrics": {"acc1": 0.695953369140625, "acc5": null, "mean_per_class_recall": 0.6958949401931914, "main_metric": 0.695953369140625}}
25
+ {"key": "renderedsst2", "dataset": "Rendered SST2", "metrics": {"acc1": 0.5667215815485996, "acc5": null, "mean_per_class_recall": 0.5660916420589427, "main_metric": 0.5667215815485996}}
26
+ {"key": "vtab/resisc45", "dataset": "RESISC45", "metrics": {"acc1": 0.7550793650793651, "acc5": 0.9533333333333334, "mean_per_class_recall": 0.7605913193101234, "main_metric": 0.7550793650793651}}
27
+ {"key": "cars", "dataset": "Stanford Cars", "metrics": {"acc1": 0.9599552294490735, "acc5": 0.9993781867926875, "mean_per_class_recall": 0.9604615269292067, "main_metric": 0.9599552294490735}}
28
+ {"key": "stl10", "dataset": "STL-10", "metrics": {"acc1": 0.991125, "acc5": 1.0, "mean_per_class_recall": 0.9911249999999999, "main_metric": 0.991125}}
29
+ {"key": "sun397", "dataset": "SUN397", "metrics": {"acc1": 0.772799161410155, "acc5": 0.9707137208746345, "mean_per_class_recall": 0.7744819326140584, "main_metric": 0.772799161410155}}
30
+ {"key": "vtab/svhn", "dataset": "SVHN", "metrics": {"acc1": 0.6712507682851875, "acc5": 0.9469499078057775, "mean_per_class_recall": 0.6973586130772338, "main_metric": 0.6712507682851875}}
31
+ {"key": "retrieval/flickr_1k_test_image_text_retrieval", "dataset": "Flickr", "metrics": {"image_retrieval_recall@1": 0.8285999894142151, "text_retrieval_recall@1": 0.9330000281333923, "image_retrieval_recall@5": 0.9606000185012817, "text_retrieval_recall@5": 0.9919999837875366, "image_retrieval_recall@10": 0.9811999797821045, "text_retrieval_recall@10": 0.9940000176429749, "mean_recall@1": 0.8808000087738037, "main_metric": 0.8808000087738037}}
32
+ {"key": "retrieval/mscoco_2014_5k_test_image_text_retrieval", "dataset": "MSCOCO", "metrics": {"image_retrieval_recall@1": 0.5555777549743652, "text_retrieval_recall@1": 0.7182000279426575, "image_retrieval_recall@5": 0.7921631336212158, "text_retrieval_recall@5": 0.9034000039100647, "image_retrieval_recall@10": 0.8635745644569397, "text_retrieval_recall@10": 0.9488000273704529, "mean_recall@1": 0.6368888914585114, "main_metric": 0.6368888914585114}}
33
+ {"key": "misc/winogavil", "dataset": "WinoGAViL", "metrics": {"avg_jaccard_score": 0.6094382743274126, "jaccard_score_5": 0.6359090909090908, "jaccard_score_6": 0.6074154067674586, "jaccard_score_10": 0.5799910574558462, "jaccard_score_12": 0.5636737872719181, "jaccard_score_5-6": 0.6212993724621632, "jaccard_score_10-12": 0.5718133154901305, "main_metric": 0.5718133154901305}}
34
+ {"key": "wilds/iwildcam", "dataset": "iWildCam", "metrics": {"acc1": 0.30333481339534013, "acc5": 0.6892337173704751, "mean_per_class_recall": 0.28950048185612676, "acc_avg": 0.3045266568660736, "recall-macro_all": 0.28950048185612676, "F1-macro_all": 0.22491081368070331, "main_metric": 0.22491081368070331}}
35
+ {"key": "wilds/camelyon17", "dataset": "Camelyon17", "metrics": {"acc1": 0.7115362005314271, "acc5": null, "mean_per_class_recall": 0.7115362005314271, "acc_avg": 0.7115362286567688, "acc_slide:0": NaN, "count_slide:0": 0.0, "acc_slide:1": NaN, "count_slide:1": 0.0, "acc_slide:2": NaN, "count_slide:2": 0.0, "acc_slide:3": NaN, "count_slide:3": 0.0, "acc_slide:4": NaN, "count_slide:4": 0.0, "acc_slide:5": NaN, "count_slide:5": 0.0, "acc_slide:6": NaN, "count_slide:6": 0.0, "acc_slide:7": NaN, "count_slide:7": 0.0, "acc_slide:8": NaN, "count_slide:8": 0.0, "acc_slide:9": NaN, "count_slide:9": 0.0, "acc_slide:10": NaN, "count_slide:10": 0.0, "acc_slide:11": NaN, "count_slide:11": 0.0, "acc_slide:12": NaN, "count_slide:12": 0.0, "acc_slide:13": NaN, "count_slide:13": 0.0, "acc_slide:14": NaN, "count_slide:14": 0.0, "acc_slide:15": NaN, "count_slide:15": 0.0, "acc_slide:16": NaN, "count_slide:16": 0.0, "acc_slide:17": NaN, "count_slide:17": 0.0, "acc_slide:18": NaN, "count_slide:18": 0.0, "acc_slide:19": NaN, "count_slide:19": 0.0, "acc_slide:20": 0.48687663674354553, "count_slide:20": 3810.0, "acc_slide:21": 0.5173254013061523, "count_slide:21": 3694.0, "acc_slide:22": 0.7785021066665649, "count_slide:22": 7210.0, "acc_slide:23": 0.7358169555664062, "count_slide:23": 5288.0, "acc_slide:24": 0.5286657214164734, "count_slide:24": 7727.0, "acc_slide:25": 0.592062771320343, "count_slide:25": 4334.0, "acc_slide:26": 0.3850589692592621, "count_slide:26": 3815.0, "acc_slide:27": 0.39288848638534546, "count_slide:27": 4556.0, "acc_slide:28": 0.8762155771255493, "count_slide:28": 31878.0, "acc_slide:29": 0.7382671236991882, "count_slide:29": 12742.0, "acc_wg": 0.3850589692592621, "main_metric": 0.7115362005314271}}
36
+ {"key": "wilds/fmow", "dataset": "FMoW", "metrics": {"acc1": 0.3126470056088294, "acc5": 0.6045322960014474, "mean_per_class_recall": 0.3277600321233648, "acc_avg": 0.3126470148563385, "acc_year:0": NaN, "count_year:0": 0.0, "acc_year:1": NaN, "count_year:1": 0.0, "acc_year:2": NaN, "count_year:2": 0.0, "acc_year:3": NaN, "count_year:3": 0.0, "acc_year:4": NaN, "count_year:4": 0.0, "acc_year:5": NaN, "count_year:5": 0.0, "acc_year:6": NaN, "count_year:6": 0.0, "acc_year:7": NaN, "count_year:7": 0.0, "acc_year:8": NaN, "count_year:8": 0.0, "acc_year:9": NaN, "count_year:9": 0.0, "acc_year:10": NaN, "count_year:10": 0.0, "acc_year:11": NaN, "count_year:11": 0.0, "acc_year:12": NaN, "count_year:12": 0.0, "acc_year:13": NaN, "count_year:13": 0.0, "acc_year:14": 0.32834136486053467, "count_year:14": 15959.0, "acc_year:15": 0.27191412448883057, "count_year:15": 6149.0, "acc_worst_year": 0.27191412448883057, "acc_region:0": 0.27342334389686584, "count_region:0": 4963.0, "acc_region:1": 0.3407306373119354, "count_region:1": 5858.0, "acc_region:2": 0.20902429521083832, "count_region:2": 2593.0, "acc_region:3": 0.3352442681789398, "count_region:3": 8024.0, "acc_region:4": 0.4864864945411682, "count_region:4": 666.0, "acc_region:5": 0.75, "count_region:5": 4.0, "acc_worst_region": 0.20902429521083832, "main_metric": 0.20902429521083832}}
37
+ {"key": "fairness/dollar_street", "dataset": "Dollar Street", "metrics": {"acc1": 0.5949186411647159, "acc5": 0.8467028261490152, "mean_per_class_recall": 0.6216234238329277, "acc_top5_avg": 0.8467028141021729, "acc_top5_income_ds:0": 0.7172897458076477, "count_income_ds:0": 856.0, "acc_top5_income_ds:1": 0.8585972785949707, "count_income_ds:1": 884.0, "acc_top5_income_ds:2": 0.8779134154319763, "count_income_ds:2": 901.0, "acc_top5_income_ds:3": 0.9303944110870361, "count_income_ds:3": 862.0, "acc_top5_wg": 0.7172897458076477, "main_metric": 0.7172897458076477}}
38
+ {"key": "fairness/geode", "dataset": "GeoDE", "metrics": {"acc1": 0.9507527226137091, "acc5": 0.9979980781550288, "mean_per_class_recall": 0.9494773197510623, "acc_avg": 0.9507527351379395, "acc_region:0": 0.9356994032859802, "count_region:0": 2395.0, "acc_region:1": 0.9527363181114197, "count_region:1": 2010.0, "acc_region:2": 0.9524929523468018, "count_region:2": 2126.0, "acc_region:3": 0.9501797556877136, "count_region:3": 1947.0, "acc_region:4": 0.9521912336349487, "count_region:4": 1757.0, "acc_region:5": 0.9627164006233215, "count_region:5": 2253.0, "acc_wg": 0.9356994032859802, "main_metric": 0.9356994032859802}}
39
+ {"key": "fairness/fairface", "dataset": "FairFace", "metrics": {"acc_race_avg": 0.8778528571128845, "acc_race_race_binary:0": 0.8292565941810608, "count_race_binary:0": 2085.0, "acc_race_race_binary:1": 0.8892772793769836, "count_race_binary:1": 8869.0, "acc_race_wg": 0.8292565941810608, "acc_gender_avg": 0.93801349401474, "acc_gender_race_binary:0": 0.9534772038459778, "acc_gender_race_binary:1": 0.9343781471252441, "acc_gender_wg": 0.9343781471252441, "acc_age_avg": 0.5100420117378235, "acc_age_race_binary:0": 0.5275779366493225, "acc_age_race_binary:1": 0.5059195160865784, "acc_age_wg": 0.5059195160865784, "acc_gender_x_avg": 0.93801349401474, "acc_gender_x_race:0_gender:0": 0.8861076235771179, "count_race:0_gender:0": 799.0, "acc_gender_x_race:0_gender:1": 0.9035667181015015, "count_race:0_gender:1": 757.0, "acc_gender_x_race:1_gender:0": 0.9474153518676758, "count_race:1_gender:0": 1122.0, "acc_gender_x_race:1_gender:1": 0.9605399966239929, "count_race:1_gender:1": 963.0, "acc_gender_x_race:2_gender:0": 0.9189907312393188, "count_race:2_gender:0": 753.0, "acc_gender_x_race:2_gender:1": 0.9593709111213684, "count_race:2_gender:1": 763.0, "acc_gender_x_race:3_gender:0": 0.9104666113853455, "count_race:3_gender:0": 793.0, "acc_gender_x_race:3_gender:1": 0.966265082359314, "count_race:3_gender:1": 830.0, "acc_gender_x_race:4_gender:0": 0.9667896628379822, "count_race:4_gender:0": 813.0, "acc_gender_x_race:4_gender:1": 0.9722222089767456, "count_race:4_gender:1": 396.0, "acc_gender_x_race:5_gender:0": 0.8952381014823914, "count_race:5_gender:0": 735.0, "acc_gender_x_race:5_gender:1": 0.9720588326454163, "count_race:5_gender:1": 680.0, "acc_gender_x_race:6_gender:0": 0.9060488939285278, "count_race:6_gender:0": 777.0, "acc_gender_x_race:6_gender:1": 0.9741267561912537, "count_race:6_gender:1": 773.0, "acc_gender_x_wg": 0.8861076235771179, "toxicity_crime_avg": 0.04884060472249985, "toxicity_crime_race:0": 0.10347043722867966, "count_race:0": 1556.0, "toxicity_crime_race:1": 0.04844124615192413, "count_race:1": 2085.0, "toxicity_crime_race:2": 0.03825857490301132, "count_race:2": 1516.0, "toxicity_crime_race:3": 0.04251386225223541, "count_race:3": 1623.0, "toxicity_crime_race:4": 0.06782464683055878, "count_race:4": 1209.0, "toxicity_crime_race:5": 0.024028267711400986, "count_race:5": 1415.0, "toxicity_crime_race:6": 0.019354838877916336, "count_race:6": 1550.0, "toxicity_crime_wg": 0.019354838877916336, "toxicity_nonhuman_avg": 0.0001825817016651854, "toxicity_nonhuman_race:0": 0.0006426735199056566, "toxicity_nonhuman_race:1": 0.00047961631207726896, "toxicity_nonhuman_race:2": 0.0, "toxicity_nonhuman_race:3": 0.0, "toxicity_nonhuman_race:4": 0.0, "toxicity_nonhuman_race:5": 0.0, "toxicity_nonhuman_race:6": 0.0, "toxicity_nonhuman_wg": 0.0, "main_metric": null}}
40
+ {"key": "fairness/utkface", "dataset": "UTKFace", "metrics": {"acc_race_avg": 0.90790194272995, "acc_race_race_binary:0": 0.9144501686096191, "count_race_binary:0": 10076.0, "acc_race_race_binary:1": 0.9030600786209106, "count_race_binary:1": 13627.0, "acc_race_wg": 0.9030600786209106, "acc_gender_avg": 0.9517782330513, "acc_gender_race_binary:0": 0.9643707871437073, "acc_gender_race_binary:1": 0.9424671530723572, "acc_gender_wg": 0.9424671530723572, "acc_age_avg": 0.527570366859436, "acc_age_race_binary:0": 0.5021833777427673, "acc_age_race_binary:1": 0.5463418364524841, "acc_age_wg": 0.5021833777427673, "acc_gender_x_avg": 0.9517782330513, "acc_gender_x_race:0_gender:0": 0.9732528328895569, "count_race:0_gender:0": 2318.0, "acc_gender_x_race:0_gender:1": 0.9633151888847351, "count_race:0_gender:1": 2208.0, "acc_gender_x_race:1_gender:0": 0.9514244198799133, "count_race:1_gender:0": 5476.0, "acc_gender_x_race:1_gender:1": 0.9797825813293457, "count_race:1_gender:1": 4600.0, "acc_gender_x_race:2_gender:0": 0.9358690977096558, "count_race:2_gender:0": 2261.0, "acc_gender_x_race:2_gender:1": 0.9784130454063416, "count_race:2_gender:1": 1714.0, "acc_gender_x_race:3_gender:0": 0.822857141494751, "count_race:3_gender:0": 1575.0, "acc_gender_x_race:3_gender:1": 0.9693383574485779, "count_race:3_gender:1": 1859.0, "acc_gender_x_race:4_gender:0": 0.8763157725334167, "count_race:4_gender:0": 760.0, "acc_gender_x_race:4_gender:1": 0.9688841104507446, "count_race:4_gender:1": 932.0, "acc_gender_x_wg": 0.822857141494751, "toxicity_crime_avg": 0.02269754931330681, "toxicity_crime_race:0": 0.020106052979826927, "count_race:0": 4526.0, "toxicity_crime_race:1": 0.016276299953460693, "count_race:1": 10076.0, "toxicity_crime_race:2": 0.027169810608029366, "count_race:2": 3975.0, "toxicity_crime_race:3": 0.03145020455121994, "count_race:3": 3434.0, "toxicity_crime_race:4": 0.03959810733795166, "count_race:4": 1692.0, "toxicity_crime_wg": 0.016276299953460693, "toxicity_nonhuman_avg": 0.0003375100204721093, "toxicity_nonhuman_race:0": 0.00022094564337749034, "toxicity_nonhuman_race:1": 0.0004962286911904812, "toxicity_nonhuman_race:2": 0.0, "toxicity_nonhuman_race:3": 0.0, "toxicity_nonhuman_race:4": 0.0011820330983027816, "toxicity_nonhuman_wg": 0.0, "main_metric": null}}
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
open_clip_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_cfg": {
3
+ "embed_dim": 1024,
4
+ "quick_gelu": true,
5
+ "vision_cfg": {
6
+ "image_size": 378,
7
+ "layers": 32,
8
+ "width": 1280,
9
+ "head_width": 80,
10
+ "patch_size": 14
11
+ },
12
+ "text_cfg": {
13
+ "context_length": 77,
14
+ "vocab_size": 49408,
15
+ "width": 1024,
16
+ "heads": 16,
17
+ "layers": 24
18
+ }
19
+ },
20
+ "preprocess_cfg": {
21
+ "mean": [
22
+ 0.48145466,
23
+ 0.4578275,
24
+ 0.40821073
25
+ ],
26
+ "std": [
27
+ 0.26862954,
28
+ 0.26130258,
29
+ 0.27577711
30
+ ],
31
+ "interpolation": "bicubic",
32
+ "resize_mode": "squash"
33
+ }
34
+ }
open_clip_pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c07a17b547d461c60a3cce5062b26bf8545b13de602c4c59d8490361eb716033
3
+ size 3947081637
preprocessor_config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": 378,
3
+ "do_center_crop": true,
4
+ "do_normalize": true,
5
+ "do_resize": true,
6
+ "feature_extractor_type": "CLIPFeatureExtractor",
7
+ "image_mean": [
8
+ 0.48145466,
9
+ 0.4578275,
10
+ 0.40821073
11
+ ],
12
+ "image_std": [
13
+ 0.26862954,
14
+ 0.26130258,
15
+ 0.27577711
16
+ ],
17
+ "resample": 3,
18
+ "size": 378
19
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1589167784b6bd32f39694101e49f79a3f872c2bed1fb5762380228623c540b
3
+ size 3947171725
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|startoftext|>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<|endoftext|>",
17
+ "unk_token": {
18
+ "content": "<|endoftext|>",
19
+ "lstrip": false,
20
+ "normalized": true,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "bos_token": {
4
+ "__type": "AddedToken",
5
+ "content": "<|startoftext|>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false
10
+ },
11
+ "do_lower_case": true,
12
+ "eos_token": {
13
+ "__type": "AddedToken",
14
+ "content": "<|endoftext|>",
15
+ "lstrip": false,
16
+ "normalized": true,
17
+ "rstrip": false,
18
+ "single_word": false
19
+ },
20
+ "errors": "replace",
21
+ "model_max_length": 77,
22
+ "name_or_path": "openai/clip-vit-large-patch14",
23
+ "pad_token": "<|endoftext|>",
24
+ "special_tokens_map_file": "./special_tokens_map.json",
25
+ "tokenizer_class": "CLIPTokenizer",
26
+ "unk_token": {
27
+ "__type": "AddedToken",
28
+ "content": "<|endoftext|>",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false
33
+ }
34
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff