Image-to-Text
PyTorch
android
qaihm-bot commited on
Commit
9811a5b
·
verified ·
1 Parent(s): 7005014

See https://github.com/qualcomm/ai-hub-models/releases/v0.49.1 for changelog.

Files changed (1) hide show
  1. README.md +64 -64
README.md CHANGED
@@ -14,7 +14,7 @@ pipeline_tag: image-to-text
14
  End-to-end text recognition approach with pre-trained image transformer and text transformer models for both image understanding and wordpiece-level text generation.
15
 
16
  This is based on the implementation of TrOCR found [here](https://huggingface.co/microsoft/trocr-small-stage1).
17
- This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/main/qai_hub_models/models/trocr) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary).
18
 
19
  Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) to run these models on a hosted Qualcomm® device.
20
 
@@ -27,23 +27,23 @@ Below are pre-exported model assets ready for deployment.
27
 
28
  | Runtime | Precision | Chipset | SDK Versions | Download |
29
  |---|---|---|---|---|
30
- | ONNX | float | Universal | QAIRT 2.42, ONNX Runtime 1.24.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/trocr/releases/v0.48.0/trocr-onnx-float.zip)
31
- | QNN_DLC | float | Universal | QAIRT 2.43 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/trocr/releases/v0.48.0/trocr-qnn_dlc-float.zip)
32
- | TFLITE | float | Universal | QAIRT 2.43, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/trocr/releases/v0.48.0/trocr-tflite-float.zip)
33
 
34
  For more device-specific assets and performance metrics, visit **[TrOCR on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/trocr)**.
35
 
36
 
37
  ### Option 2: Export with Custom Configurations
38
 
39
- Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/main/qai_hub_models/models/trocr) Python library to compile and export the model with your own:
40
  - Custom weights (e.g., fine-tuned checkpoints)
41
  - Custom input shapes
42
  - Target device and runtime configurations
43
 
44
  This option is ideal if you need to customize the model beyond the default configuration provided here.
45
 
46
- See our repository for [TrOCR on GitHub](https://github.com/qualcomm/ai-hub-models/blob/main/qai_hub_models/models/trocr) for usage instructions.
47
 
48
  ## Model Details
49
 
@@ -60,64 +60,64 @@ See our repository for [TrOCR on GitHub](https://github.com/qualcomm/ai-hub-mode
60
  ## Performance Summary
61
  | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
62
  |---|---|---|---|---|---|---
63
- | TrOCRDecoder | ONNX | float | Snapdragon® X2 Elite | 1.138 ms | 68 - 68 MB | NPU
64
- | TrOCRDecoder | ONNX | float | Snapdragon® X Elite | 2.401 ms | 67 - 67 MB | NPU
65
- | TrOCRDecoder | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 1.469 ms | 0 - 262 MB | NPU
66
- | TrOCRDecoder | ONNX | float | Qualcomm® QCS8550 (Proxy) | 2.125 ms | 2 - 16 MB | NPU
67
- | TrOCRDecoder | ONNX | float | Qualcomm® QCS9075 | 2.674 ms | 7 - 16 MB | NPU
68
- | TrOCRDecoder | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.277 ms | 0 - 218 MB | NPU
69
- | TrOCRDecoder | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.149 ms | 1 - 229 MB | NPU
70
- | TrOCRDecoder | QNN_DLC | float | Snapdragon® X2 Elite | 1.624 ms | 7 - 7 MB | NPU
71
- | TrOCRDecoder | QNN_DLC | float | Snapdragon® X Elite | 2.159 ms | 7 - 7 MB | NPU
72
- | TrOCRDecoder | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 1.378 ms | 0 - 232 MB | NPU
73
- | TrOCRDecoder | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 4.248 ms | 7 - 143 MB | NPU
74
- | TrOCRDecoder | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 2.163 ms | 1 - 51 MB | NPU
75
- | TrOCRDecoder | QNN_DLC | float | Qualcomm® SA8775P | 2.851 ms | 7 - 144 MB | NPU
76
- | TrOCRDecoder | QNN_DLC | float | Qualcomm® QCS9075 | 2.563 ms | 7 - 16 MB | NPU
77
- | TrOCRDecoder | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 2.859 ms | 1 - 214 MB | NPU
78
- | TrOCRDecoder | QNN_DLC | float | Qualcomm® SA7255P | 4.248 ms | 7 - 143 MB | NPU
79
- | TrOCRDecoder | QNN_DLC | float | Qualcomm® SA8295P | 3.006 ms | 7 - 128 MB | NPU
80
- | TrOCRDecoder | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.304 ms | 0 - 226 MB | NPU
81
- | TrOCRDecoder | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.206 ms | 1 - 211 MB | NPU
82
- | TrOCRDecoder | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 1.4 ms | 0 - 249 MB | NPU
83
- | TrOCRDecoder | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 4.254 ms | 0 - 155 MB | NPU
84
- | TrOCRDecoder | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 2.003 ms | 0 - 3 MB | NPU
85
- | TrOCRDecoder | TFLITE | float | Qualcomm® SA8775P | 2.915 ms | 0 - 152 MB | NPU
86
- | TrOCRDecoder | TFLITE | float | Qualcomm® QCS9075 | 2.585 ms | 0 - 83 MB | NPU
87
- | TrOCRDecoder | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 2.846 ms | 0 - 222 MB | NPU
88
- | TrOCRDecoder | TFLITE | float | Qualcomm® SA7255P | 4.254 ms | 0 - 155 MB | NPU
89
- | TrOCRDecoder | TFLITE | float | Qualcomm® SA8295P | 2.912 ms | 0 - 136 MB | NPU
90
- | TrOCRDecoder | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.183 ms | 0 - 244 MB | NPU
91
- | TrOCRDecoder | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.129 ms | 0 - 223 MB | NPU
92
- | TrOCREncoder | ONNX | float | Snapdragon® X2 Elite | 7.498 ms | 48 - 48 MB | NPU
93
- | TrOCREncoder | ONNX | float | Snapdragon® X Elite | 18.707 ms | 48 - 48 MB | NPU
94
- | TrOCREncoder | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 12.636 ms | 0 - 386 MB | NPU
95
- | TrOCREncoder | ONNX | float | Qualcomm® QCS8550 (Proxy) | 18.122 ms | 0 - 57 MB | NPU
96
- | TrOCREncoder | ONNX | float | Qualcomm® QCS9075 | 21.879 ms | 15 - 19 MB | NPU
97
- | TrOCREncoder | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.986 ms | 16 - 333 MB | NPU
98
- | TrOCREncoder | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.284 ms | 16 - 325 MB | NPU
99
- | TrOCREncoder | QNN_DLC | float | Snapdragon® X2 Elite | 7.946 ms | 2 - 2 MB | NPU
100
- | TrOCREncoder | QNN_DLC | float | Snapdragon® X Elite | 18.729 ms | 2 - 2 MB | NPU
101
- | TrOCREncoder | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 12.691 ms | 0 - 377 MB | NPU
102
- | TrOCREncoder | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 47.586 ms | 2 - 291 MB | NPU
103
- | TrOCREncoder | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 18.168 ms | 2 - 4 MB | NPU
104
- | TrOCREncoder | QNN_DLC | float | Qualcomm® SA8775P | 20.874 ms | 2 - 290 MB | NPU
105
- | TrOCREncoder | QNN_DLC | float | Qualcomm® QCS9075 | 22.425 ms | 2 - 12 MB | NPU
106
- | TrOCREncoder | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 28.297 ms | 0 - 358 MB | NPU
107
- | TrOCREncoder | QNN_DLC | float | Qualcomm® SA7255P | 47.586 ms | 2 - 291 MB | NPU
108
- | TrOCREncoder | QNN_DLC | float | Qualcomm® SA8295P | 25.787 ms | 2 - 290 MB | NPU
109
- | TrOCREncoder | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.935 ms | 2 - 312 MB | NPU
110
- | TrOCREncoder | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.249 ms | 2 - 305 MB | NPU
111
- | TrOCREncoder | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 8.505 ms | 61 - 288 MB | NPU
112
- | TrOCREncoder | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 38.663 ms | 7 - 150 MB | NPU
113
- | TrOCREncoder | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 12.094 ms | 7 - 9 MB | NPU
114
- | TrOCREncoder | TFLITE | float | Qualcomm® SA8775P | 64.865 ms | 7 - 145 MB | NPU
115
- | TrOCREncoder | TFLITE | float | Qualcomm® QCS9075 | 15.907 ms | 6 - 66 MB | NPU
116
- | TrOCREncoder | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 21.895 ms | 7 - 347 MB | NPU
117
- | TrOCREncoder | TFLITE | float | Qualcomm® SA7255P | 38.663 ms | 7 - 150 MB | NPU
118
- | TrOCREncoder | TFLITE | float | Qualcomm® SA8295P | 20.805 ms | 0 - 264 MB | NPU
119
- | TrOCREncoder | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 5.816 ms | 6 - 145 MB | NPU
120
- | TrOCREncoder | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 4.61 ms | 6 - 151 MB | NPU
121
 
122
  ## License
123
  * The license for the original implementation of TrOCR can be found
 
14
  End-to-end text recognition approach with pre-trained image transformer and text transformer models for both image understanding and wordpiece-level text generation.
15
 
16
  This is based on the implementation of TrOCR found [here](https://huggingface.co/microsoft/trocr-small-stage1).
17
+ This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/tree/v0.49.1/qai_hub_models/models/trocr) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary).
18
 
19
  Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) to run these models on a hosted Qualcomm® device.
20
 
 
27
 
28
  | Runtime | Precision | Chipset | SDK Versions | Download |
29
  |---|---|---|---|---|
30
+ | ONNX | float | Universal | QAIRT 2.42, ONNX Runtime 1.24.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/trocr/releases/v0.49.1/trocr-onnx-float.zip)
31
+ | QNN_DLC | float | Universal | QAIRT 2.43 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/trocr/releases/v0.49.1/trocr-qnn_dlc-float.zip)
32
+ | TFLITE | float | Universal | QAIRT 2.43, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/trocr/releases/v0.49.1/trocr-tflite-float.zip)
33
 
34
  For more device-specific assets and performance metrics, visit **[TrOCR on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/trocr)**.
35
 
36
 
37
  ### Option 2: Export with Custom Configurations
38
 
39
+ Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/tree/v0.49.1/qai_hub_models/models/trocr) Python library to compile and export the model with your own:
40
  - Custom weights (e.g., fine-tuned checkpoints)
41
  - Custom input shapes
42
  - Target device and runtime configurations
43
 
44
  This option is ideal if you need to customize the model beyond the default configuration provided here.
45
 
46
+ See our repository for [TrOCR on GitHub](https://github.com/qualcomm/ai-hub-models/tree/v0.49.1/qai_hub_models/models/trocr) for usage instructions.
47
 
48
  ## Model Details
49
 
 
60
  ## Performance Summary
61
  | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
62
  |---|---|---|---|---|---|---
63
+ | TrOCRDecoder | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.154 ms | 0 - 229 MB | NPU
64
+ | TrOCRDecoder | ONNX | float | Snapdragon® X2 Elite | 1.158 ms | 68 - 68 MB | NPU
65
+ | TrOCRDecoder | ONNX | float | Snapdragon® X Elite | 2.323 ms | 67 - 67 MB | NPU
66
+ | TrOCRDecoder | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 1.488 ms | 0 - 256 MB | NPU
67
+ | TrOCRDecoder | ONNX | float | Qualcomm® QCS8550 (Proxy) | 2.146 ms | 0 - 108 MB | NPU
68
+ | TrOCRDecoder | ONNX | float | Qualcomm® QCS9075 | 2.679 ms | 7 - 16 MB | NPU
69
+ | TrOCRDecoder | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.227 ms | 0 - 250 MB | NPU
70
+ | TrOCRDecoder | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.126 ms | 1 - 212 MB | NPU
71
+ | TrOCRDecoder | QNN_DLC | float | Snapdragon® X2 Elite | 1.566 ms | 7 - 7 MB | NPU
72
+ | TrOCRDecoder | QNN_DLC | float | Snapdragon® X Elite | 2.145 ms | 7 - 7 MB | NPU
73
+ | TrOCRDecoder | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 1.385 ms | 0 - 234 MB | NPU
74
+ | TrOCRDecoder | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 4.235 ms | 7 - 144 MB | NPU
75
+ | TrOCRDecoder | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 2.183 ms | 3 - 5 MB | NPU
76
+ | TrOCRDecoder | QNN_DLC | float | Qualcomm® SA8775P | 2.852 ms | 7 - 144 MB | NPU
77
+ | TrOCRDecoder | QNN_DLC | float | Qualcomm® QCS9075 | 2.544 ms | 7 - 16 MB | NPU
78
+ | TrOCRDecoder | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 2.8 ms | 1 - 215 MB | NPU
79
+ | TrOCRDecoder | QNN_DLC | float | Qualcomm® SA7255P | 4.235 ms | 7 - 144 MB | NPU
80
+ | TrOCRDecoder | QNN_DLC | float | Qualcomm® SA8295P | 2.948 ms | 7 - 128 MB | NPU
81
+ | TrOCRDecoder | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.202 ms | 0 - 226 MB | NPU
82
+ | TrOCRDecoder | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.105 ms | 0 - 223 MB | NPU
83
+ | TrOCRDecoder | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 1.378 ms | 0 - 236 MB | NPU
84
+ | TrOCRDecoder | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 4.26 ms | 0 - 155 MB | NPU
85
+ | TrOCRDecoder | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 2.229 ms | 0 - 2 MB | NPU
86
+ | TrOCRDecoder | TFLITE | float | Qualcomm® SA8775P | 2.886 ms | 0 - 152 MB | NPU
87
+ | TrOCRDecoder | TFLITE | float | Qualcomm® QCS9075 | 2.571 ms | 0 - 83 MB | NPU
88
+ | TrOCRDecoder | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 2.809 ms | 0 - 222 MB | NPU
89
+ | TrOCRDecoder | TFLITE | float | Qualcomm® SA7255P | 4.26 ms | 0 - 155 MB | NPU
90
+ | TrOCRDecoder | TFLITE | float | Qualcomm® SA8295P | 2.977 ms | 0 - 136 MB | NPU
91
+ | TrOCRDecoder | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.178 ms | 0 - 237 MB | NPU
92
+ | TrOCREncoder | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.283 ms | 16 - 325 MB | NPU
93
+ | TrOCREncoder | ONNX | float | Snapdragon® X2 Elite | 7.481 ms | 48 - 48 MB | NPU
94
+ | TrOCREncoder | ONNX | float | Snapdragon® X Elite | 18.683 ms | 48 - 48 MB | NPU
95
+ | TrOCREncoder | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 12.6 ms | 16 - 404 MB | NPU
96
+ | TrOCREncoder | ONNX | float | Qualcomm® QCS8550 (Proxy) | 18.208 ms | 0 - 85 MB | NPU
97
+ | TrOCREncoder | ONNX | float | Qualcomm® QCS9075 | 22.038 ms | 15 - 19 MB | NPU
98
+ | TrOCREncoder | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.961 ms | 16 - 331 MB | NPU
99
+ | TrOCREncoder | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.261 ms | 2 - 304 MB | NPU
100
+ | TrOCREncoder | QNN_DLC | float | Snapdragon® X2 Elite | 8.001 ms | 2 - 2 MB | NPU
101
+ | TrOCREncoder | QNN_DLC | float | Snapdragon® X Elite | 18.754 ms | 2 - 2 MB | NPU
102
+ | TrOCREncoder | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 12.7 ms | 2 - 382 MB | NPU
103
+ | TrOCREncoder | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 47.585 ms | 2 - 291 MB | NPU
104
+ | TrOCREncoder | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 18.099 ms | 2 - 3 MB | NPU
105
+ | TrOCREncoder | QNN_DLC | float | Qualcomm® SA8775P | 20.841 ms | 2 - 290 MB | NPU
106
+ | TrOCREncoder | QNN_DLC | float | Qualcomm® QCS9075 | 22.164 ms | 2 - 12 MB | NPU
107
+ | TrOCREncoder | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 28.494 ms | 0 - 357 MB | NPU
108
+ | TrOCREncoder | QNN_DLC | float | Qualcomm® SA7255P | 47.585 ms | 2 - 291 MB | NPU
109
+ | TrOCREncoder | QNN_DLC | float | Qualcomm® SA8295P | 25.762 ms | 2 - 290 MB | NPU
110
+ | TrOCREncoder | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.942 ms | 2 - 311 MB | NPU
111
+ | TrOCREncoder | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 4.615 ms | 6 - 151 MB | NPU
112
+ | TrOCREncoder | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 8.5 ms | 3 - 231 MB | NPU
113
+ | TrOCREncoder | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 38.752 ms | 7 - 150 MB | NPU
114
+ | TrOCREncoder | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 12.117 ms | 7 - 9 MB | NPU
115
+ | TrOCREncoder | TFLITE | float | Qualcomm® SA8775P | 14.627 ms | 7 - 145 MB | NPU
116
+ | TrOCREncoder | TFLITE | float | Qualcomm® QCS9075 | 15.802 ms | 6 - 66 MB | NPU
117
+ | TrOCREncoder | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 22.081 ms | 7 - 345 MB | NPU
118
+ | TrOCREncoder | TFLITE | float | Qualcomm® SA7255P | 38.752 ms | 7 - 150 MB | NPU
119
+ | TrOCREncoder | TFLITE | float | Qualcomm® SA8295P | 20.762 ms | 7 - 271 MB | NPU
120
+ | TrOCREncoder | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 5.848 ms | 7 - 151 MB | NPU
121
 
122
  ## License
123
  * The license for the original implementation of TrOCR can be found