CPGA-Net (Shyandram, IJPRAI), low-light image enhancement
(brighten dark photos) via Channel Prior + Gamma Correction, converted to LiteRT and running fully on the
CompiledModel GPU (ML Drift) on Android. 0.025 M params / 0.1 MB fp16 — the smallest model in the
LiteRT-Models zoo.
How it converts (litert-torch) — three numerically-exact fixes
Gamma correction x^γ → exp(γ·log x) — torch.pow lowers to the banned POW; the identity
x^γ = exp(γ·log x) is exact (base clamped to [1e-9,1]) and uses native EXP/LOG.
CBAM / gamma global pools → mean(3).mean(2) and F.max_pool2d(x, (H,W)).
The dark/bright channel prior (max/min over RGB) stays as REDUCE_MAX/REDUCE_MIN.
Center-crop, resize 256×256, RGB scaled to [0,1], NCHW.
Performance
Measured on a Pixel 8a (Tensor G3, Android 16) with the standard TFLite benchmark_model tool — 10 warm-up runs then 50 timed runs, reported as the tool's mean.
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.
XNNPACK declines these fp16 graphs — it reports failed to delegate DEPTHWISE_CONV_2D and then fails to allocate tensors — so there is no usable CPU number. Disabling XNNPACK falls back to reference kernels, which measured about 20× slower than the GPU on models of this size and would not represent CPU inference anyone would ship.
Snapdragon NPU (Hexagon)
The NPU is 3.23x faster than the GPU (4.62 ms against 14.94 ms) and loads 8.62x faster (103 ms against 886 ms).
backend
compiled
inference (median / min)
load
NPU (Hexagon v81)
on-device JIT
4.62 ms / 4.53 ms
103 ms
GPU (Adreno)
—
14.94 ms / 14.75 ms
886 ms
Measured on a Samsung Galaxy S26 (Snapdragon 8 Elite Gen 5 / SM8850, Hexagon v81, Android 16) with LiteRT CompiledModel 2.2.0, one accelerator per process, 5 warm-up runs then N=50 timed runs, median reported. Every run held thermal status NONE throughout. Headroom 0.52–0.53, where 1.0 is the throttling threshold.
The NPU rows ran the published file unchanged. LiteRT compiled it for the Hexagon on the device at first load. That first compile took 2.2 s here. The load column above is the cached load every later run pays. Recipe and the runtime libraries it needs: NPU guide.
Measured on a Raspberry Pi 5 Model B Rev 1.1 (8 GB, Raspberry Pi OS 64-bit) with the LiteRT benchmark_model tool from litert-cli-nightly 0.2.0.dev20260805: CPU inference (XNNPACK, 4 threads), 3 invocations per file of 10 warm-up plus 50 timed runs (the tool caps a phase at 150 s, so very slow graphs run fewer — the Runs column is the actual timed total). The latency is the median across invocations; the spread is the min–max over all timed runs. No thermal throttling occurred during these runs (vcgencmd get_throttled stayed 0x0).