Image-to-Text
Transformers
ONNX
florence2
image-text-to-text
florence-2
vision-language
image-captioning
ocr
object-detection
int8
quantized
Instructions to use Heliosoph/florence-2-base-ft-quantized-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Heliosoph/florence-2-base-ft-quantized-onnx with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="Heliosoph/florence-2-base-ft-quantized-onnx")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("Heliosoph/florence-2-base-ft-quantized-onnx") model = AutoModelForImageTextToText.from_pretrained("Heliosoph/florence-2-base-ft-quantized-onnx") - Notebooks
- Google Colab
- Kaggle
Upload 12 files
Browse files- LICENSE.txt +21 -0
- config.json +233 -0
- decoder_model_quantized.onnx +3 -0
- embed_tokens_quantized.onnx +3 -0
- encoder_model_quantized.onnx +3 -0
- generation_config.json +13 -0
- merges.txt +0 -0
- preprocessor_config.json +83 -0
- special_tokens_map.json +0 -0
- tokenizer.json +0 -0
- vision_encoder_quantized.onnx +3 -0
- vocab.json +0 -0
LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) Microsoft Corporation.
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE
|
config.json
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "microsoft/Florence-2-base-ft",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Florence2ForConditionalGeneration"
|
| 5 |
+
],
|
| 6 |
+
"bos_token_id": 0,
|
| 7 |
+
"eos_token_id": 2,
|
| 8 |
+
"ignore_index": -100,
|
| 9 |
+
"is_encoder_decoder": true,
|
| 10 |
+
"num_image_tokens": 577,
|
| 11 |
+
"model_type": "florence2",
|
| 12 |
+
"pad_token_id": 1,
|
| 13 |
+
"projection_dim": 768,
|
| 14 |
+
"text_config": {
|
| 15 |
+
"_name_or_path": "",
|
| 16 |
+
"activation_dropout": 0.1,
|
| 17 |
+
"activation_function": "gelu",
|
| 18 |
+
"add_bias_logits": false,
|
| 19 |
+
"add_cross_attention": false,
|
| 20 |
+
"add_final_layer_norm": false,
|
| 21 |
+
"architectures": null,
|
| 22 |
+
"attention_dropout": 0.1,
|
| 23 |
+
"bad_words_ids": null,
|
| 24 |
+
"begin_suppress_tokens": null,
|
| 25 |
+
"bos_token_id": 0,
|
| 26 |
+
"chunk_size_feed_forward": 0,
|
| 27 |
+
"classif_dropout": 0.1,
|
| 28 |
+
"classifier_dropout": 0.0,
|
| 29 |
+
"cross_attention_hidden_size": null,
|
| 30 |
+
"d_model": 768,
|
| 31 |
+
"decoder_attention_heads": 12,
|
| 32 |
+
"decoder_ffn_dim": 3072,
|
| 33 |
+
"decoder_layerdrop": 0.0,
|
| 34 |
+
"decoder_layers": 6,
|
| 35 |
+
"decoder_start_token_id": 2,
|
| 36 |
+
"diversity_penalty": 0.0,
|
| 37 |
+
"do_sample": false,
|
| 38 |
+
"dropout": 0.1,
|
| 39 |
+
"early_stopping": true,
|
| 40 |
+
"encoder_attention_heads": 12,
|
| 41 |
+
"encoder_ffn_dim": 3072,
|
| 42 |
+
"encoder_layerdrop": 0.0,
|
| 43 |
+
"encoder_layers": 6,
|
| 44 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 45 |
+
"eos_token_id": 2,
|
| 46 |
+
"exponential_decay_length_penalty": null,
|
| 47 |
+
"finetuning_task": null,
|
| 48 |
+
"forced_bos_token_id": 0,
|
| 49 |
+
"forced_eos_token_id": 2,
|
| 50 |
+
"gradient_checkpointing": false,
|
| 51 |
+
"id2label": {
|
| 52 |
+
"0": "LABEL_0",
|
| 53 |
+
"1": "LABEL_1",
|
| 54 |
+
"2": "LABEL_2"
|
| 55 |
+
},
|
| 56 |
+
"init_std": 0.02,
|
| 57 |
+
"is_decoder": false,
|
| 58 |
+
"is_encoder_decoder": true,
|
| 59 |
+
"label2id": {
|
| 60 |
+
"LABEL_0": 0,
|
| 61 |
+
"LABEL_1": 1,
|
| 62 |
+
"LABEL_2": 2
|
| 63 |
+
},
|
| 64 |
+
"length_penalty": 1.0,
|
| 65 |
+
"max_length": 20,
|
| 66 |
+
"max_position_embeddings": 1024,
|
| 67 |
+
"min_length": 0,
|
| 68 |
+
"model_type": "florence2_language",
|
| 69 |
+
"no_repeat_ngram_size": 3,
|
| 70 |
+
"normalize_before": false,
|
| 71 |
+
"num_beam_groups": 1,
|
| 72 |
+
"num_beams": 3,
|
| 73 |
+
"num_hidden_layers": 6,
|
| 74 |
+
"num_return_sequences": 1,
|
| 75 |
+
"output_attentions": false,
|
| 76 |
+
"output_hidden_states": false,
|
| 77 |
+
"output_scores": false,
|
| 78 |
+
"pad_token_id": 1,
|
| 79 |
+
"prefix": null,
|
| 80 |
+
"problem_type": null,
|
| 81 |
+
"pruned_heads": {},
|
| 82 |
+
"remove_invalid_values": false,
|
| 83 |
+
"repetition_penalty": 1.0,
|
| 84 |
+
"return_dict": true,
|
| 85 |
+
"return_dict_in_generate": false,
|
| 86 |
+
"scale_embedding": false,
|
| 87 |
+
"sep_token_id": null,
|
| 88 |
+
"suppress_tokens": null,
|
| 89 |
+
"task_specific_params": null,
|
| 90 |
+
"temperature": 1.0,
|
| 91 |
+
"tf_legacy_loss": false,
|
| 92 |
+
"tie_encoder_decoder": false,
|
| 93 |
+
"tie_word_embeddings": true,
|
| 94 |
+
"tokenizer_class": null,
|
| 95 |
+
"top_k": 50,
|
| 96 |
+
"top_p": 1.0,
|
| 97 |
+
"torch_dtype": null,
|
| 98 |
+
"torchscript": false,
|
| 99 |
+
"typical_p": 1.0,
|
| 100 |
+
"use_bfloat16": false,
|
| 101 |
+
"use_cache": true,
|
| 102 |
+
"vocab_size": 51289
|
| 103 |
+
},
|
| 104 |
+
"transformers_version": "4.38.2",
|
| 105 |
+
"vision_config": {
|
| 106 |
+
"_name_or_path": "",
|
| 107 |
+
"add_cross_attention": false,
|
| 108 |
+
"architectures": null,
|
| 109 |
+
"bad_words_ids": null,
|
| 110 |
+
"begin_suppress_tokens": null,
|
| 111 |
+
"bos_token_id": null,
|
| 112 |
+
"chunk_size_feed_forward": 0,
|
| 113 |
+
"cross_attention_hidden_size": null,
|
| 114 |
+
"decoder_start_token_id": null,
|
| 115 |
+
"depths": [
|
| 116 |
+
1,
|
| 117 |
+
1,
|
| 118 |
+
9,
|
| 119 |
+
1
|
| 120 |
+
],
|
| 121 |
+
"dim_embed": [
|
| 122 |
+
128,
|
| 123 |
+
256,
|
| 124 |
+
512,
|
| 125 |
+
1024
|
| 126 |
+
],
|
| 127 |
+
"diversity_penalty": 0.0,
|
| 128 |
+
"do_sample": false,
|
| 129 |
+
"drop_path_rate": 0.1,
|
| 130 |
+
"early_stopping": false,
|
| 131 |
+
"enable_checkpoint": false,
|
| 132 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 133 |
+
"eos_token_id": null,
|
| 134 |
+
"exponential_decay_length_penalty": null,
|
| 135 |
+
"finetuning_task": null,
|
| 136 |
+
"forced_bos_token_id": null,
|
| 137 |
+
"forced_eos_token_id": null,
|
| 138 |
+
"id2label": {
|
| 139 |
+
"0": "LABEL_0",
|
| 140 |
+
"1": "LABEL_1"
|
| 141 |
+
},
|
| 142 |
+
"image_feature_source": [
|
| 143 |
+
"spatial_avg_pool",
|
| 144 |
+
"temporal_avg_pool"
|
| 145 |
+
],
|
| 146 |
+
"image_pos_embed": {
|
| 147 |
+
"max_pos_embeddings": 50,
|
| 148 |
+
"type": "learned_abs_2d"
|
| 149 |
+
},
|
| 150 |
+
"is_decoder": false,
|
| 151 |
+
"is_encoder_decoder": false,
|
| 152 |
+
"label2id": {
|
| 153 |
+
"LABEL_0": 0,
|
| 154 |
+
"LABEL_1": 1
|
| 155 |
+
},
|
| 156 |
+
"length_penalty": 1.0,
|
| 157 |
+
"max_length": 20,
|
| 158 |
+
"min_length": 0,
|
| 159 |
+
"model_type": "",
|
| 160 |
+
"no_repeat_ngram_size": 0,
|
| 161 |
+
"num_beam_groups": 1,
|
| 162 |
+
"num_beams": 1,
|
| 163 |
+
"num_groups": [
|
| 164 |
+
4,
|
| 165 |
+
8,
|
| 166 |
+
16,
|
| 167 |
+
32
|
| 168 |
+
],
|
| 169 |
+
"num_heads": [
|
| 170 |
+
4,
|
| 171 |
+
8,
|
| 172 |
+
16,
|
| 173 |
+
32
|
| 174 |
+
],
|
| 175 |
+
"num_return_sequences": 1,
|
| 176 |
+
"output_attentions": false,
|
| 177 |
+
"output_hidden_states": false,
|
| 178 |
+
"output_scores": false,
|
| 179 |
+
"pad_token_id": null,
|
| 180 |
+
"patch_padding": [
|
| 181 |
+
3,
|
| 182 |
+
1,
|
| 183 |
+
1,
|
| 184 |
+
1
|
| 185 |
+
],
|
| 186 |
+
"patch_prenorm": [
|
| 187 |
+
false,
|
| 188 |
+
true,
|
| 189 |
+
true,
|
| 190 |
+
true
|
| 191 |
+
],
|
| 192 |
+
"patch_size": [
|
| 193 |
+
7,
|
| 194 |
+
3,
|
| 195 |
+
3,
|
| 196 |
+
3
|
| 197 |
+
],
|
| 198 |
+
"patch_stride": [
|
| 199 |
+
4,
|
| 200 |
+
2,
|
| 201 |
+
2,
|
| 202 |
+
2
|
| 203 |
+
],
|
| 204 |
+
"prefix": null,
|
| 205 |
+
"problem_type": null,
|
| 206 |
+
"projection_dim": 768,
|
| 207 |
+
"pruned_heads": {},
|
| 208 |
+
"remove_invalid_values": false,
|
| 209 |
+
"repetition_penalty": 1.0,
|
| 210 |
+
"return_dict": true,
|
| 211 |
+
"return_dict_in_generate": false,
|
| 212 |
+
"sep_token_id": null,
|
| 213 |
+
"suppress_tokens": null,
|
| 214 |
+
"task_specific_params": null,
|
| 215 |
+
"temperature": 1.0,
|
| 216 |
+
"tf_legacy_loss": false,
|
| 217 |
+
"tie_encoder_decoder": false,
|
| 218 |
+
"tie_word_embeddings": true,
|
| 219 |
+
"tokenizer_class": null,
|
| 220 |
+
"top_k": 50,
|
| 221 |
+
"top_p": 1.0,
|
| 222 |
+
"torch_dtype": null,
|
| 223 |
+
"torchscript": false,
|
| 224 |
+
"typical_p": 1.0,
|
| 225 |
+
"use_bfloat16": false,
|
| 226 |
+
"visual_temporal_embedding": {
|
| 227 |
+
"max_temporal_embeddings": 100,
|
| 228 |
+
"type": "COSINE"
|
| 229 |
+
},
|
| 230 |
+
"window_size": 12
|
| 231 |
+
},
|
| 232 |
+
"vocab_size": 51289
|
| 233 |
+
}
|
decoder_model_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c529b26bafce2ee76f886f3a0e374bb646b07a6d8b7640fd8a50d7a48843dd67
|
| 3 |
+
size 97760937
|
embed_tokens_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b2258db1c8ee9b160576ccde3cd3814d83a2edaed0dd1c6ca9ff3c38fa62214
|
| 3 |
+
size 39390433
|
encoder_model_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f4ad7a68f1fb875d3bcf735ea14a7021b7ba7e83baf7cf10289881b4ed6d9b85
|
| 3 |
+
size 43651493
|
generation_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"decoder_start_token_id": 2,
|
| 5 |
+
"early_stopping": true,
|
| 6 |
+
"eos_token_id": 2,
|
| 7 |
+
"forced_bos_token_id": 0,
|
| 8 |
+
"forced_eos_token_id": 2,
|
| 9 |
+
"no_repeat_ngram_size": 3,
|
| 10 |
+
"num_beams": 3,
|
| 11 |
+
"pad_token_id": 1,
|
| 12 |
+
"transformers_version": "4.38.2"
|
| 13 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_valid_processor_keys": [
|
| 3 |
+
"images",
|
| 4 |
+
"do_resize",
|
| 5 |
+
"size",
|
| 6 |
+
"resample",
|
| 7 |
+
"do_center_crop",
|
| 8 |
+
"crop_size",
|
| 9 |
+
"do_rescale",
|
| 10 |
+
"rescale_factor",
|
| 11 |
+
"do_normalize",
|
| 12 |
+
"image_mean",
|
| 13 |
+
"image_std",
|
| 14 |
+
"do_convert_rgb",
|
| 15 |
+
"return_tensors",
|
| 16 |
+
"data_format",
|
| 17 |
+
"input_data_format"
|
| 18 |
+
],
|
| 19 |
+
"crop_size": {
|
| 20 |
+
"height": 768,
|
| 21 |
+
"width": 768
|
| 22 |
+
},
|
| 23 |
+
"do_center_crop": false,
|
| 24 |
+
"do_convert_rgb": null,
|
| 25 |
+
"do_normalize": true,
|
| 26 |
+
"do_rescale": true,
|
| 27 |
+
"do_resize": true,
|
| 28 |
+
"image_mean": [
|
| 29 |
+
0.485,
|
| 30 |
+
0.456,
|
| 31 |
+
0.406
|
| 32 |
+
],
|
| 33 |
+
"image_processor_type": "CLIPImageProcessor",
|
| 34 |
+
"image_seq_length": 577,
|
| 35 |
+
"image_std": [
|
| 36 |
+
0.229,
|
| 37 |
+
0.224,
|
| 38 |
+
0.225
|
| 39 |
+
],
|
| 40 |
+
"processor_class": "Florence2Processor",
|
| 41 |
+
"resample": 3,
|
| 42 |
+
"rescale_factor": 0.00392156862745098,
|
| 43 |
+
"size": {
|
| 44 |
+
"height": 768,
|
| 45 |
+
"width": 768
|
| 46 |
+
},
|
| 47 |
+
"tasks_answer_post_processing_type": {
|
| 48 |
+
"<OCR>": "pure_text",
|
| 49 |
+
"<OCR_WITH_REGION>": "ocr",
|
| 50 |
+
"<CAPTION>": "pure_text",
|
| 51 |
+
"<DETAILED_CAPTION>": "pure_text",
|
| 52 |
+
"<MORE_DETAILED_CAPTION>": "pure_text",
|
| 53 |
+
"<OD>": "description_with_bboxes",
|
| 54 |
+
"<DENSE_REGION_CAPTION>": "description_with_bboxes",
|
| 55 |
+
"<CAPTION_TO_PHRASE_GROUNDING>": "phrase_grounding",
|
| 56 |
+
"<REFERRING_EXPRESSION_SEGMENTATION>": "polygons",
|
| 57 |
+
"<REGION_TO_SEGMENTATION>": "polygons",
|
| 58 |
+
"<OPEN_VOCABULARY_DETECTION>": "description_with_bboxes_or_polygons",
|
| 59 |
+
"<REGION_TO_CATEGORY>": "pure_text",
|
| 60 |
+
"<REGION_TO_DESCRIPTION>": "pure_text",
|
| 61 |
+
"<REGION_TO_OCR>": "pure_text",
|
| 62 |
+
"<REGION_PROPOSAL>": "bboxes"
|
| 63 |
+
},
|
| 64 |
+
"task_prompts_without_inputs": {
|
| 65 |
+
"<OCR>": "What is the text in the image?",
|
| 66 |
+
"<OCR_WITH_REGION>": "What is the text in the image, with regions?",
|
| 67 |
+
"<CAPTION>": "What does the image describe?",
|
| 68 |
+
"<DETAILED_CAPTION>": "Describe in detail what is shown in the image.",
|
| 69 |
+
"<MORE_DETAILED_CAPTION>": "Describe with a paragraph what is shown in the image.",
|
| 70 |
+
"<OD>": "Locate the objects with category name in the image.",
|
| 71 |
+
"<DENSE_REGION_CAPTION>": "Locate the objects in the image, with their descriptions.",
|
| 72 |
+
"<REGION_PROPOSAL>": "Locate the region proposals in the image."
|
| 73 |
+
},
|
| 74 |
+
"task_prompts_with_input": {
|
| 75 |
+
"<CAPTION_TO_PHRASE_GROUNDING>": "Locate the phrases in the caption: {input}",
|
| 76 |
+
"<REFERRING_EXPRESSION_SEGMENTATION>": "Locate {input} in the image with mask",
|
| 77 |
+
"<REGION_TO_SEGMENTATION>": "What is the polygon mask of region {input}",
|
| 78 |
+
"<OPEN_VOCABULARY_DETECTION>": "Locate {input} in the image.",
|
| 79 |
+
"<REGION_TO_CATEGORY>": "What is the region {input}?",
|
| 80 |
+
"<REGION_TO_DESCRIPTION>": "What does the region {input} describe?",
|
| 81 |
+
"<REGION_TO_OCR>": "What text is in the region {input}?"
|
| 82 |
+
}
|
| 83 |
+
}
|
special_tokens_map.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
vision_encoder_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b79d54f23f666f731549db23cb070c35a979ce19cbd9720e90e67a78dc9768c
|
| 3 |
+
size 93746540
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|