qaihm-bot commited on
Commit
7005014
·
verified ·
1 Parent(s): a6955aa

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

Files changed (1) hide show
  1. README.md +64 -60
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/quic/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.47.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.47.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.47.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/quic/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/quic/ai-hub-models/blob/main/qai_hub_models/models/trocr) for usage instructions.
47
 
48
  ## Model Details
49
 
@@ -60,60 +60,64 @@ See our repository for [TrOCR on GitHub](https://github.com/quic/ai-hub-models/b
60
  ## Performance Summary
61
  | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
62
  |---|---|---|---|---|---|---
63
- | TrOCRDecoder | ONNX | float | Snapdragon® X Elite | 2.326 ms | 67 - 67 MB | NPU
64
- | TrOCRDecoder | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 1.462 ms | 0 - 248 MB | NPU
65
- | TrOCRDecoder | ONNX | float | Qualcomm® QCS8550 (Proxy) | 2.15 ms | 0 - 84 MB | NPU
66
- | TrOCRDecoder | ONNX | float | Qualcomm® QCS9075 | 2.709 ms | 7 - 16 MB | NPU
67
- | TrOCRDecoder | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.248 ms | 0 - 218 MB | NPU
68
- | TrOCRDecoder | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.145 ms | 0 - 223 MB | NPU
69
- | TrOCRDecoder | ONNX | float | Snapdragon® X2 Elite | 1.155 ms | 68 - 68 MB | NPU
70
- | TrOCRDecoder | QNN_DLC | float | Snapdragon® X Elite | 2.163 ms | 7 - 7 MB | NPU
71
- | TrOCRDecoder | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 1.399 ms | 0 - 236 MB | NPU
72
- | TrOCRDecoder | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 1.958 ms | 1 - 3 MB | NPU
73
- | TrOCRDecoder | QNN_DLC | float | Qualcomm® SA8775P | 2.858 ms | 7 - 144 MB | NPU
74
- | TrOCRDecoder | QNN_DLC | float | Qualcomm® QCS9075 | 2.539 ms | 7 - 15 MB | NPU
75
- | TrOCRDecoder | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 2.798 ms | 1 - 217 MB | NPU
76
- | TrOCRDecoder | QNN_DLC | float | Qualcomm® SA8295P | 2.953 ms | 7 - 130 MB | NPU
77
- | TrOCRDecoder | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.206 ms | 0 - 225 MB | NPU
78
- | TrOCRDecoder | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.135 ms | 1 - 212 MB | NPU
79
- | TrOCRDecoder | QNN_DLC | float | Snapdragon® X2 Elite | 1.464 ms | 7 - 7 MB | NPU
80
- | TrOCRDecoder | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 1.391 ms | 0 - 244 MB | NPU
81
- | TrOCRDecoder | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 8.124 ms | 7 - 20 MB | CPU
82
- | TrOCRDecoder | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 2.006 ms | 0 - 3 MB | NPU
83
- | TrOCRDecoder | TFLITE | float | Qualcomm® SA8775P | 2.883 ms | 0 - 152 MB | NPU
84
- | TrOCRDecoder | TFLITE | float | Qualcomm® QCS9075 | 2.6 ms | 0 - 83 MB | NPU
85
- | TrOCRDecoder | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 2.803 ms | 0 - 223 MB | NPU
86
- | TrOCRDecoder | TFLITE | float | Qualcomm® SA7255P | 8.124 ms | 7 - 20 MB | CPU
87
- | TrOCRDecoder | TFLITE | float | Qualcomm® SA8295P | 2.996 ms | 0 - 137 MB | NPU
88
- | TrOCRDecoder | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.183 ms | 0 - 243 MB | NPU
89
- | TrOCRDecoder | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.119 ms | 0 - 223 MB | NPU
90
- | TrOCREncoder | ONNX | float | Snapdragon® X Elite | 18.762 ms | 48 - 48 MB | NPU
91
- | TrOCREncoder | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 12.53 ms | 16 - 407 MB | NPU
92
- | TrOCREncoder | ONNX | float | Qualcomm® QCS8550 (Proxy) | 18.16 ms | 15 - 18 MB | NPU
93
- | TrOCREncoder | ONNX | float | Qualcomm® QCS9075 | 21.963 ms | 15 - 19 MB | NPU
94
- | TrOCREncoder | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.983 ms | 16 - 330 MB | NPU
95
- | TrOCREncoder | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.29 ms | 16 - 325 MB | NPU
96
- | TrOCREncoder | ONNX | float | Snapdragon® X2 Elite | 7.543 ms | 48 - 48 MB | NPU
97
- | TrOCREncoder | QNN_DLC | float | Snapdragon® X Elite | 18.773 ms | 2 - 2 MB | NPU
98
- | TrOCREncoder | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 12.596 ms | 0 - 380 MB | NPU
99
- | TrOCREncoder | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 18.133 ms | 2 - 3 MB | NPU
100
- | TrOCREncoder | QNN_DLC | float | Qualcomm® SA8775P | 20.859 ms | 2 - 290 MB | NPU
101
- | TrOCREncoder | QNN_DLC | float | Qualcomm® QCS9075 | 22.171 ms | 2 - 12 MB | NPU
102
- | TrOCREncoder | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 28.337 ms | 1 - 358 MB | NPU
103
- | TrOCREncoder | QNN_DLC | float | Qualcomm® SA8295P | 25.823 ms | 2 - 290 MB | NPU
104
- | TrOCREncoder | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.941 ms | 2 - 310 MB | NPU
105
- | TrOCREncoder | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.262 ms | 2 - 304 MB | NPU
106
- | TrOCREncoder | QNN_DLC | float | Snapdragon® X2 Elite | 8.012 ms | 2 - 2 MB | NPU
107
- | TrOCREncoder | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 8.489 ms | 6 - 232 MB | NPU
108
- | TrOCREncoder | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 38.66 ms | 7 - 150 MB | NPU
109
- | TrOCREncoder | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 12.152 ms | 7 - 9 MB | NPU
110
- | TrOCREncoder | TFLITE | float | Qualcomm® SA8775P | 64.81 ms | 7 - 146 MB | NPU
111
- | TrOCREncoder | TFLITE | float | Qualcomm® QCS9075 | 15.782 ms | 6 - 66 MB | NPU
112
- | TrOCREncoder | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 22.021 ms | 7 - 345 MB | NPU
113
- | TrOCREncoder | TFLITE | float | Qualcomm® SA7255P | 38.66 ms | 7 - 150 MB | NPU
114
- | TrOCREncoder | TFLITE | float | Qualcomm® SA8295P | 20.816 ms | 7 - 271 MB | NPU
115
- | TrOCREncoder | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 5.825 ms | 7 - 152 MB | NPU
116
- | TrOCREncoder | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 4.609 ms | 6 - 151 MB | NPU
 
 
 
 
117
 
118
  ## License
119
  * 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/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
 
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
  ## 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