/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
litert
Опубликована
28 июн 2026

xfeat-litert

Классификация и разметка3 профессии

Облегчённый экстрактор локальных признаков XFeat в формате LiteRT/TFLite для поиска ключевых точек и сопоставления изображений на устройствах.

209скачиваний за 30 дней0лайковвеса обновлены8 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

XFeat LiteRT — это версия лёгкого сверточного экстрактора локальных признаков XFeat, подготовленная сообществом LiteRT для запуска на устройствах и GPU. Модель содержит около 1,5 млн параметров и распространяется в формате TFLite; для варианта FP16 указан размер файла 1,4 МБ. Веса XFeat сохранены, а вычислительный граф переавторен для GPU-совместимости. Вход — нормализованное одноканальное изображение размером 480×640; модель выдаёт плотные дескрипторы, логиты ключевых точек и карту надёжности на сетке 60×80.

Модель предназначена для сопоставления изображений и может служить компонентом SLAM, AR и регистрации изображений. Фильтрация ключевых точек, выборка дескрипторов и взаимное сопоставление выполняются на стороне приложения. В карточке приведены измерения на мобильных устройствах, Raspberry Pi и в браузере; скорость зависит от устройства и среды выполнения, а приведённые показатели разных LiteRT и TFLite-бэкендов напрямую несопоставимы.

По данным карточки, XFeat обучен на публичных данных MegaDepth и синтетических гомографиях и формирует геометрические признаки, а не сведения о лицах или личности. Модель распространяется по лицензии Apache-2.0. Заявлена совместимость GPU-графа; XNNPACK отклоняет некоторые графы, поэтому для них нет пригодного показателя CPU-инференса.

Сценарии применения

  • поиск ключевых точек на изображениях
  • сопоставление двух видов одной сцены
  • оценка геометрического соответствия изображений
  • извлечение локальных дескрипторов для SLAM
  • регистрация изображений в приложениях дополненной реальности

Ограничения

Входной формат фиксирован: нормализованное серое изображение 480×640; постобработка и сопоставление дескрипторов выполняются вне модели. Поддержка и скорость зависят от бэкенда: XNNPACK отклоняет некоторые графы, а показатели разных сред выполнения напрямую несопоставимы.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Measured on device (edge-compat, xfeat): Galaxy S26 · LiteRT 2.2.0 · GPU (ML Drift) · 4.13 ms p50 (2026-08-25); Galaxy S26 · LiteRT 2.2.0 · NPU (QNN/HTP) · 607 ms p50 (2026-08-25); Raspberry Pi 5 · LiteRT 2.2.0.dev20260804 · CPU/XNNPACK, 4 threads · 32.2 ms p50 (2026-08-31); browser · Chromium 151 on M4 Max · LiteRT.js 2.5.3 · WebGPU · 12.7 ms p50 · output matches CPU (2026-08-11). Record: https://github.com/john-rocky/edge-compat/blob/main/cards/xfeat__xfeat/CARD.md

Measured on device (edge-compat, xfeat_fp16): Galaxy S26 · LiteRT 2.2.0 · GPU (ML Drift) · 4.31 ms p50 (2026-08-25); Galaxy S26 · LiteRT 2.2.0 · NPU (QNN/HTP) · 385 ms p50 (2026-08-25); Raspberry Pi 5 · LiteRT 2.2.0.dev20260804 · CPU/XNNPACK, 4 threads · 32.5 ms p50 (2026-08-31); browser · Chromium 151 on M4 Max · LiteRT.js 2.5.3 · WebGPU · 12.4 ms p50 · output matches CPU (2026-08-11). Record: https://github.com/john-rocky/edge-compat/blob/main/cards/xfeat__xfeat_fp16/CARD.md

XFeat (Accelerated Features) — LiteRT (CompiledModel GPU)

XFeat (Apache-2.0, ~1.5M, a lightweight pure-CNN local feature extractor for image matching — SLAM / AR / image registration) re-authored to a GPU-native LiteRT .tflite via litert_torch. FP16, 1.4 MB, input [1, 480, 640, 1] NHWC normalized grayscale.

XFeat on-device: two-view local feature matching

167 mutual-nearest-neighbor matches between two views of the same scene, from the on-device fp16 model. Photo: "Lily the Golden Retriever in the grass" (Wikimedia Commons, Public Domain); second view is a synthetic homography (rotation + translation).

Verified on a Pixel 8a: full LITERT_CL residency (72/72 nodes, 1 partition), ~0.4 ms, GPU output matches CPU/PyTorch (corr 0.9999).

I/O

  • Input [1, 480, 640, 1] NHWC, grayscale, per-image InstanceNorm applied host-side ((g - mean)/sqrt(var+1e-5) over the image).
  • Outputs (all at H/8 × W/8 = 60×80): feats [1,64,60,80] dense descriptors; keypoints [1,65,60,80] keypoint logits; heatmap [1,1,60,80] reliability. Keypoint NMS, descriptor bilinear-sampling, and mutual-nearest-neighbor matching run host-side.

Minimal usage

import numpy as np
from PIL import Image
from ai_edge_litert.interpreter import Interpreter

def extract(path):
    g = np.asarray(Image.open(path).convert("L").resize((640, 480)), np.float32)
    g = (g - g.mean()) / np.sqrt(g.var() + 1e-5)          # host instance-norm
    it = Interpreter(model_path="xfeat_fp16.tflite"); it.allocate_tensors()
    it.set_tensor(it.get_input_details()[0]["index"], g[None, None]); it.invoke()
    feats, heat, klog = (it.get_tensor(o["index"])[0] for o in
                         sorted(it.get_output_details(), key=lambda o: o["index"]))
    return feats, heat, klog   # [64,60,80], [1,60,80], [65,60,80]
# decode: per-cell softmax over the 65 logits (64 positions + dustbin) * reliability,
# 5x5 NMS + top-K, bilinear-sample feats at kp/8, L2-normalize, mutual-NN (cos >= 0.82)

Kotlin (Android, LiteRT CompiledModel GPU)

// implementation("com.google.ai.edge.litert:litert:2.1.5")
val model = CompiledModel.create(File(ctx.filesDir, "xfeat_fp16.tflite").absolutePath,
    CompiledModel.Options(Accelerator.GPU), null)
val inBuf = model.createInputBuffers(); val outBuf = model.createOutputBuffers()
inBuf[0].writeFloat(grayNorm)             // [1,1,480,640] instance-normalized grayscale
model.run(inBuf, outBuf)
val feats = outBuf[0].readFloat()         // [64*60*80] dense descriptors
val heat = outBuf[1].readFloat()          // [60*80] reliability
val klog = outBuf[2].readFloat()          // [65*60*80] cell logits
// decode + mutual-NN matching: see XFeatMatcher.kt in the image_matching LiteRT sample.

GPU-clean re-authoring

  • Input gray + InstanceNorm moved host-side (its spatial reduction over H·W would overflow fp16 on the delegate).
  • _unfold2d(x, 8) (space-to-depth via unfold → >4-D / GATHER_ND) → a one-hot Conv2d(1,64,k=8,s=8) (exact, single CONV_2D). Result: zero GATHER/SELECT/TopK/Cast, no >4-D — full GPU residency.

Training data & PII

XFeat is trained on public correspondence data (MegaDepth + synthetic homographies). It outputs geometric keypoints/descriptors only — no faces, identities, or personal attributes. Official weights; only the op graph was re-authored for GPU.

Sample app + conversion script

https://github.com/google-ai-edge/litert-samples (compiled_model_api, two-image matching).

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.

RuntimeBackendGraph on GPULatency
TFLite benchmark_model (TfLiteGpuDelegateV2) — xfeat.tfliteGPU (OpenCL)72 / 7222.8 ms
TFLite benchmark_model (TfLiteGpuDelegateV2) — xfeat_fp16.tfliteGPU (OpenCL)73 / 7324.1 ms
TFLite benchmark_model — xfeat.tfliteCPU (XNNPACK, 4 threads)—XNNPACK declined the graph
TFLite benchmark_model — xfeat_fp16.tfliteCPU (XNNPACK, 4 threads)—XNNPACK declined the graph

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)

  • xfeat.tflite — the GPU is faster: 4.13 ms against 607.5 ms on the NPU, a factor of 147. The NPU still loads 6.30x faster (98 ms against 620 ms).
  • xfeat_fp16.tflite — the GPU is faster: 4.31 ms against 384.5 ms on the NPU, a factor of 89. The NPU still loads 6.37x faster (100 ms against 640 ms).
filebackendcompiledinference (median / min)load
xfeat.tfliteNPU (Hexagon v81)on-device JIT607.5 ms / 589.1 ms98 ms
xfeat.tfliteGPU (Adreno)—4.13 ms / 2.32 ms620 ms
xfeat_fp16.tfliteNPU (Hexagon v81)on-device JIT384.5 ms / 369.8 ms100 ms
xfeat_fp16.tfliteGPU (Adreno)—4.31 ms / 3.04 ms640 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.68–0.69, 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. Those first compiles took 729 ms to 774 ms here. The load column above is the cached load every later run pays. Recipe and the runtime libraries it needs: NPU guide.

GPU wiring: GPU guide.

Raspberry Pi 5 (CPU)

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).

FileInference (median)Spread (min–max)RunsPeak memory
xfeat.tflite32.2 ms31.9–33.9 ms150138 MB
xfeat_fp16.tflite32.5 ms32.2–33.5 ms150138 MB

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · litert

Нельзя запустить

В репозитории нет весов в формате PyTorch/safetensors.

Ревизия весов
f5001dc

0 моделей