← sources

Real-time Funko Pop recognition on a phone

source: reddit (reddit:computervision)published 2026-10-09 12:35ingested 2026-10-10 02:35

retained text

I built a Funko Pop scanner that runs fully on-device (44 ms per scan on an iPhone 16 Pro, \~165 ms on a Pixel 10) for a conference talk. A coding agent did most of the ML work, and I spent most of my time checking it against reality. Sharing what happened, because the failure was more interesting than the result.

**Pipeline**

1. Detector: RF-DETR Nano fine-tuned as a single-class "funko" detector
2. Square crop around the box (10% margin, so the figure isn't squashed)
3. Embedding model: CLIP ViT-B/32 with a 256-d projection, fine-tuned for retrieval
4. Nearest neighbour (dot product) over 818 catalog vectors, with an unknown-figure threshold

**On-device**

Exported with ExecuTorch: Core ML on iOS, Vulkan on Android. Getting RF-DETR onto Vulkan took some graph surgery: exporting attention as plain matmul + softmax instead of the SDPA decomposition, splits as slices, constant-folding the weight transposes, and restricting the partitioner to the ops the shipped Vulkan backend actually has. That took it from 96 GPU partitions to 6, and dropping the input from 384 to 320 px cost nothing measurable (mAP@50 0.997 vs 0.996 on the Roboflow test split, 0.930 vs 0.935 mAP on the synthetic one).

Code, training pipeline and models: [https://github.com/NorbertKlockiewicz/funko-scanner](https://github.com/NorbertKlockiewicz/funko-scanner)

document fetched 2026-10-10 00:23 · canonical https://reddit.com/r/computervision/comments/1x1k7io/realtime_funko_pop_recognition_on_a_phone