Image Classification
LiteRT
LiteRT
ram
ram-plus
recognize-anything
image-tagging
multi-label
open-vocabulary
swin
on-device
gpu
Instructions to use litert-community/RAM-Plus-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use litert-community/RAM-Plus-LiteRT with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Card: add a measured Performance table (Pixel 8a, benchmark_model GPU+CPU), naming the runtime for each row
Browse files
README.md
CHANGED
|
@@ -109,3 +109,25 @@ A complete Android sample (image pick β tags) is in **google-ai-edge/litert-sa
|
|
| 109 |
[xinyu1205/recognize-anything](https://github.com/xinyu1205/recognize-anything) Β·
|
| 110 |
`xinyu1205/recognize-anything-plus-model` (Apache-2.0). Paper: *Open-Set Image Tagging with
|
| 111 |
Multi-Grained Text Supervision*.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
[xinyu1205/recognize-anything](https://github.com/xinyu1205/recognize-anything) Β·
|
| 110 |
`xinyu1205/recognize-anything-plus-model` (Apache-2.0). Paper: *Open-Set Image Tagging with
|
| 111 |
Multi-Grained Text Supervision*.
|
| 112 |
+
|
| 113 |
+
## Performance
|
| 114 |
+
|
| 115 |
+
Measured on a **Pixel 8a** (Tensor G3, Android 16) with the standard TFLite [`benchmark_model`](https://ai.google.dev/edge/litert/models/measurement) tool β 10 warm-up runs then 50 timed runs, reported as the tool's mean.
|
| 116 |
+
|
| 117 |
+
| Runtime | Backend | Graph on GPU | Latency |
|
| 118 |
+
|---|---|---|---|
|
| 119 |
+
| TFLite `benchmark_model` (`TfLiteGpuDelegateV2`) β `ram_taghead_fp16.tflite` | GPU (OpenCL) | 139 / 249 | 3499.7 ms |
|
| 120 |
+
| TFLite `benchmark_model` (`TfLiteGpuDelegateV2`) β `ram_reweight_fp16.tflite` | GPU (OpenCL) | 17 / 28 | 612.0 ms |
|
| 121 |
+
| TFLite `benchmark_model` (`TfLiteGpuDelegateV2`) β `ram_swin_s012_fp16.tflite` | GPU (OpenCL) | 105 / 2129 | did not run |
|
| 122 |
+
| TFLite `benchmark_model` (`TfLiteGpuDelegateV2`) β `ram_stage3_tail_fp16.tflite` | GPU (OpenCL) | 174 / 316 | 523.5 ms |
|
| 123 |
+
| TFLite `benchmark_model` β `ram_taghead_fp16.tflite` | CPU (XNNPACK, 4 threads) | β | 1550.1 ms |
|
| 124 |
+
| TFLite `benchmark_model` β `ram_reweight_fp16.tflite` | CPU (XNNPACK, 4 threads) | β | 312.8 ms |
|
| 125 |
+
| TFLite `benchmark_model` β `ram_swin_s012_fp16.tflite` | CPU (XNNPACK, 4 threads) | β | 2786.9 ms |
|
| 126 |
+
| TFLite `benchmark_model` β `ram_stage3_tail_fp16.tflite` | CPU (XNNPACK, 4 threads) | β | 217.0 ms |
|
| 127 |
+
|
| 128 |
+
**Any on-device figure recorded when this model shipped came from a different runtime.** It was taken through LiteRT's own `CompiledModel` accelerator (logcat reports it as `LITERT_CL`), which is the path the Kotlin sample app and the LiteRT API use, and it appears elsewhere on this card. The rows above are the classic TFLite OpenCL delegate, measured with a tool anyone can download and re-run. The two are not comparable, so read the rows above as a reproducible floor rather than as this model's speed on LiteRT.
|
| 129 |
+
|
| 130 |
+
On this delegate the CPU is the faster choice for `ram_taghead_fp16.tflite` (1550.1 ms on CPU against 3499.7 ms on GPU), `ram_reweight_fp16.tflite` (312.8 ms on CPU against 612.0 ms on GPU), `ram_stage3_tail_fp16.tflite` (217.0 ms on CPU against 523.5 ms on GPU) β worth knowing before you reach for the GPU on a mid-range phone.
|
| 131 |
+
|
| 132 |
+
Note that the GPU does not take the whole graph here (139 of 249 in `ram_taghead_fp16.tflite`, 17 of 28 in `ram_reweight_fp16.tflite`, 105 of 2129 in `ram_swin_s012_fp16.tflite`, 174 of 316 in `ram_stage3_tail_fp16.tflite`); the remainder runs on the CPU and the split costs a per-partition round trip.
|
| 133 |
+
|