Repository navigation
Releases
GLiNER2.5 Decide — Android sample APK 0.1 (debug)
Pre-built APK of the gliner25decide sample, built from 2a160f8 (the same code as android/ in litert-community/GLiNER2.5-Decide-LiteRT).
gliner25decide-0.1-debug.apk: 19,291,588 bytes, Android 8.0 or newer (API 26), arm64-v8a. It is a debug build because the model installer copies the files into the app withrun-as.- SHA-256:
7cb637d9366a4bb0bdcb8dd3cc8c332c378421754d4fadc78def2e2dc5593cef(also ingliner25decide-0.1-debug.apk.sha256).
The model files (2.45 GB) are not in the APK. Download them and run the installer as in Download, build and install, with adb install gliner25decide-0.1-debug.apk in place of the Gradle build.
v3: MoGe-2 Monocular Geometry
MoGe-2 ViT-S (35M params)
Monocular 3D geometry estimation — affine point map, surface normals, depth mask, and metric scale from a single image.
| File | Size | Input | Output |
|---|---|---|---|
moge.tflite |
136 MB | Float32 [1, 3, 448, 448] NCHW | Points [1,448,448,3] + Normal [1,448,448,3] + Mask [1,448,448,1] + Scale [1,1,1,1] |
- CompiledModel GPU: 835 ops, all GPU-native, ~522 ms on Pixel 8a
- Preprocessing: RGB / 255 (range [0, 1]), NCHW layout. DINOv2 applies ImageNet stats internally.
- Original: microsoft/MoGe (CVPR'25 Oral) | MIT License
Sample app: moge/
v2: CLIP + DSINE + Whisper + SmolVLM
New Models
CLIP ViT-B/32 — Zero-Shot Classification
clip_image_encoder.tflite(352 MB) — image encoder, CompiledModel GPUtext_embeddings.bin(192 KB) +labels.txt— 96 pre-computed label embeddings
DSINE — Surface Normal Estimation (CVPR 2024)
dsine.tflite(282 MB) — encoder + decoder initial prediction, CompiledModel GPU
Whisper-tiny — Speech Recognition
whisper_encoder.tflite(33 MB) — mel spectrogram encoder, CompiledModel GPUwhisper_decoder.onnx(199 MB) — autoregressive text decoder, ONNX Runtime CPUvocab.json+mel_filters.bin+config.json— tokenizer and preprocessing
SmolVLM-256M — Vision-Language Model
smolvlm_vision.tflite(357 MB) — SigLIP vision encoder + connector, CompiledModel GPUsmolvlm_decoder.onnx(515 MB) — SmolLM2 language model, ONNX Runtime CPUembed_tokens.bin(108 MB) — token embedding matrix
Setup (large models)
Models are too large for APK assets. Push via adb:
adb push <model> /data/local/tmp/
adb shell "run-as <package> cp /data/local/tmp/<model> /data/data/<package>/files/"v1 - YOLO11n + Depth Anything V2
Models
YOLO11n (Object Detection)
- yolo11n.tflite (10 MB) — 18+ FPS on Pixel 8a GPU
- Input: Float32 [1, 384, 384, 3] NHWC, normalized 0-1
- Output: Float32 [1, 84, 3024] — bbox + 80 COCO classes
- Converted from SavedModel (GPU-compatible, no PACK/SPLIT ops)
Depth Anything V2 (Monocular Depth)
- depth_anything_v2_fp16w.tflite (47 MB) — FP16 weights
- Input: Float32 [1, 392, 518, 3] NHWC, ImageNet normalized
- Output: Float32 [1, 392, 518, 1] — relative inverse depth
- Native Keras conversion (correlation 0.9995 with PyTorch)
Both models run on LiteRT CompiledModel GPU (ML Drift).
DepthAnything V2 Small — Native Keras TFLite (v2.0)
DepthAnything V2 Small — Native Keras NHWC Models
Native Keras conversion with near-perfect PyTorch quality. Replaces v1.0 onnx2tf models.
| Model | Input | Speed (Pixel 8a) | Quality (vs PyTorch) | Size |
|---|---|---|---|---|
depth_anything_v2_keras.tflite |
518x518 | 9ms | corr=0.9995 | 99 MB |
depth_anything_v2_keras_392x518.tflite |
392x518 | ~7ms | corr=0.9999 | 98 MB |
What's New (vs v1.0)
- Quality: corr=0.845 → 0.9995 (native Keras, no onnx2tf conversion artifacts)
- Speed: 575ms → 9ms (CompiledModel ML Drift GPU, was old Interpreter API)
- Compatibility: Works on Pixel 6+ with LiteRT 2.1.3 CompiledModel API
Usage
implementation("com.google.ai.edge.litert:litert:2.1.3")
val options = CompiledModel.Options(Accelerator.GPU)
options.gpuOptions = CompiledModel.GpuOptions(
precision = CompiledModel.GpuOptions.Precision.FP32
)
val model = CompiledModel.create(context.assets, "depth_anything_v2_keras.tflite", options, null)Place model in sample-app/app/src/main/assets/ and see sample-app/ for full example.
DepthAnything V2 Small - Model Files
Model Files
| File | Format | Size | Description |
|---|---|---|---|
depth_anything_v2_nhwc.tflite |
TFLite FP32 NHWC | 94 MB | Recommended - GPU delegate compatible, 579ms on Pixel 10 Pro |
depth_anything_v2.onnx |
ONNX FP32 | 94 MB | ONNX Runtime CPU inference, 1437ms |
depth_anything_v2_qualcomm.tflite |
TFLite FP32 NHWC | 94 MB | Qualcomm AI Hub pre-converted model, 571ms |
Usage
Place model files in app/src/main/assets/ and build with Android Studio.
Conversion Pipeline (for NHWC TFLite)
- Patch PyTorch model (4D CLS concat, GELU tanh approximation)
- Export to ONNX (opset 18)
- Fix ConvTranspose kernel_shape, replace Erf→Tanh
- Simplify with onnxsim
- Convert with onnx2tf (
-osd -coion)
See scripts/ for conversion code.