↓ Skip to main content
  1. Projects/

Browser ML Demos

Jianchao Li
Author
Jianchao Li
Research engineer who builds with AI. I write about AI, software engineering, and investing.

A collection of interactive demos showcasing machine learning models running directly in your browser. These demos use Transformers.js to run inference locally — your data never leaves your device.

Visual Question Answering

Ask questions about images and get natural language answers powered by the Moondream vision-language model.

Moondream2 (SigLIP + Phi-1.5) · ~1.9 GB download, cached after first visit
Try Demo

Image Captioning

Generate natural language captions for any image using a Vision Transformer and GPT-2 decoder.

ViT-GPT2 (8-bit quantized) · ~246 MB download, cached after first visit
Try Demo

Model downloads
#

Both demos run on the CPU through ONNX Runtime Web (WebAssembly). The browser downloads the model weights from Hugging Face on the first visit and caches them, so later visits start much faster.

DemoModelWeights loadedDownload
Visual Question AnsweringXenova/moondream2 (ONNX export of vikhyatk/moondream2)token embeddings (fp16, 210 MB), vision encoder (fp16, 879 MB), decoder (4-bit, 824 MB)~1.9 GB
Image CaptioningXenova/vit-gpt2-image-captioningencoder (8-bit, 87 MB), decoder (8-bit, 159 MB)~246 MB

The VQA model is large: use a desktop browser on an unmetered connection.

Privacy
#

Since these models run entirely in your browser, your images never leave your device. No data is sent to any server.

Related

Understanding Fully Convolutional Networks

··32 mins
I will start from the problem of semantic segmentation, introduce how to use CNNs to solve it, and talk about fully convolutional networks, a widely used framework for semantic segmentation, in great detail. Moreover, I will analyze the MXNet implementation of FCNs.