Skip to content
WebAI

vision / image-classification

Image classification

Labels a whole image with one or more classes. The mobile-grade backbones here are the oldest reliable browser AI workload: a few megabytes, well-tested WebGL and WebAssembly paths, and frame rates high enough to run on a video element.

4 entries

Open demo →

Catalog comparison

Entries include models, tools and applications. An upstream example documents a browser integration, not a test on your device. Missing versions, measurements and licenses remain unverified. Historical estimates are not benchmark results.

Catalog comparison
EntryEntry typeFrameworkResourcesLicenseBrowser evidenceLinks

MobileNet (TensorFlow.js)

Classifies browser image, canvas or video elements. Model version and width multiplier affect its output and resource requirements.

Tasks: Image classification

ModelTensorFlow.js

Download size: Not verified

Code license: Apache-2.0

Weight license: Not verified

Upstream browser example

Reference ↗

Source review is not a browser execution test.

Sources and comparison details
Exact model ID
Not verified
Natural languages
Not specified
Programming languages
Not specified
Other reported capabilities
Not specified
Package
@tensorflow-models/mobilenet
Runtime version
@tensorflow-models/mobilenet@2.1.1
Execution backend
Not verified
Code license
Apache-2.0
Weight license
Not verified

Deployment variants

Unspecified variant
Download size: Not verified
Peak runtime memory: Not measured
Quantization / precision: Not verified
Weight revision: Not verified

Performance and compatibility measurements

Compare only results with the same task, input, hardware, browser and precision. No ranking is inferred from model size.

Not measured

ViT Base (224)

Vision Transformer trained on ImageNet-1k; the standard accuracy baseline for image classification.

Tasks: Image classification

ModelTransformers.js

q4f16: 48.9 MiB

q8: 84.2 MiB

fp16: 165.4 MiB

fp32: 330.5 MiB

Code license: Apache-2.0

Weight license: Apache-2.0

Upstream browser example

Reference ↗

Source review is not a browser execution test.

Sources and comparison details
Exact model ID
Xenova/vit-base-patch16-224
Natural languages
Not specified
Programming languages
Not specified
Other reported capabilities
ImageNet-1k
Package
Not verified
Runtime version
@huggingface/transformers@4.3.0
Execution backend
Not verified
Code license
Apache-2.0
Weight license
Apache-2.0

Deployment variants

q4f16
Download size: 48.9 MiB
Peak runtime memory: Not measured
Quantization / precision: q4f16
Weight revision: 66fef688e8dbe77dd9d5aa256353f9ad8b0ef799
Weight artifact ↗
q8
Download size: 84.2 MiB
Peak runtime memory: Not measured
Quantization / precision: q8
Weight revision: 66fef688e8dbe77dd9d5aa256353f9ad8b0ef799
Weight artifact ↗
fp16
Download size: 165.4 MiB
Peak runtime memory: Not measured
Quantization / precision: fp16
Weight revision: 66fef688e8dbe77dd9d5aa256353f9ad8b0ef799
Weight artifact ↗
fp32
Download size: 330.5 MiB
Peak runtime memory: Not measured
Quantization / precision: fp32
Weight revision: 66fef688e8dbe77dd9d5aa256353f9ad8b0ef799
Weight artifact ↗

Performance and compatibility measurements

Compare only results with the same task, input, hardware, browser and precision. No ranking is inferred from model size.

Not measured

ResNet-50

Convolutional classification baseline; widely used as the reference point other models are compared against.

Tasks: Image classification

ModelTransformers.js

q8: 24.6 MiB

fp16: 48.7 MiB

q4f16: 48.8 MiB

fp32: 97.4 MiB

Code license: Apache-2.0

Weight license: Apache-2.0

Upstream browser example

Reference ↗

Source review is not a browser execution test.

Sources and comparison details
Exact model ID
Xenova/resnet-50
Natural languages
Not specified
Programming languages
Not specified
Other reported capabilities
ImageNet-1k
Package
Not verified
Runtime version
@huggingface/transformers@4.3.0
Execution backend
Not verified
Code license
Apache-2.0
Weight license
Apache-2.0

Deployment variants

q8
Download size: 24.6 MiB
Peak runtime memory: Not measured
Quantization / precision: q8
Weight revision: a16f29143f08c4e5c5a4a89f6f185d8edac4b6af
Weight artifact ↗
fp16
Download size: 48.7 MiB
Peak runtime memory: Not measured
Quantization / precision: fp16
Weight revision: a16f29143f08c4e5c5a4a89f6f185d8edac4b6af
Weight artifact ↗
q4f16
Download size: 48.8 MiB
Peak runtime memory: Not measured
Quantization / precision: q4f16
Weight revision: a16f29143f08c4e5c5a4a89f6f185d8edac4b6af
Weight artifact ↗
fp32
Download size: 97.4 MiB
Peak runtime memory: Not measured
Quantization / precision: fp32
Weight revision: a16f29143f08c4e5c5a4a89f6f185d8edac4b6af
Weight artifact ↗

Performance and compatibility measurements

Compare only results with the same task, input, hardware, browser and precision. No ranking is inferred from model size.

Not measured

MobileViT Small

Hybrid convolution / transformer classifier designed for mobile-class compute budgets.

Tasks: Image classification

ModelTransformers.js

q8: 6.0 MiB

q4f16: 7.0 MiB

fp16: 11.0 MiB

fp32: 21.6 MiB

Code license: Apache-2.0

Weight license: Other

Upstream browser example

Reference ↗

Source review is not a browser execution test.

Sources and comparison details
Exact model ID
Xenova/mobilevit-small
Natural languages
Not specified
Programming languages
Not specified
Other reported capabilities
ImageNet-1k
Package
Not verified
Runtime version
@huggingface/transformers@4.3.0
Execution backend
Not verified
Code license
Apache-2.0
Weight license
Other

Deployment variants

q8
Download size: 6.0 MiB
Peak runtime memory: Not measured
Quantization / precision: q8
Weight revision: a0e5dde3e1b3d9e49894dcaeeb1e046ed01edfc8
Weight artifact ↗
q4f16
Download size: 7.0 MiB
Peak runtime memory: Not measured
Quantization / precision: q4f16
Weight revision: a0e5dde3e1b3d9e49894dcaeeb1e046ed01edfc8
Weight artifact ↗
fp16
Download size: 11.0 MiB
Peak runtime memory: Not measured
Quantization / precision: fp16
Weight revision: a0e5dde3e1b3d9e49894dcaeeb1e046ed01edfc8
Weight artifact ↗
fp32
Download size: 21.6 MiB
Peak runtime memory: Not measured
Quantization / precision: fp32
Weight revision: a0e5dde3e1b3d9e49894dcaeeb1e046ed01edfc8
Weight artifact ↗

Performance and compatibility measurements

Compare only results with the same task, input, hardware, browser and precision. No ranking is inferred from model size.

Not measured

Application workflows

About Image classification

Image classification under Vision holds 4 catalogue entries: 4 models.

4 of them carry browser evidence, all from upstream browser examples.

The usual pattern for this task is to load quantised weights (ONNX, TFLite or a MediaPipe asset bundle) into the page, hand them to Transformers.js and TensorFlow.js, and accelerate with WebGPU or WebAssembly. What decides the experience is weight size, peak memory and decoding path — not the parameter count.

To see the output first, open the interactive demo for this task: switch models, edit the sample input and compare results on one page. Every demo states whether it is running real weights or a deterministic simulator.

At a glance

Entries
4 in total
Main runtime
Transformers.js and TensorFlow.js
Smallest known weights
6.0 MiB
Browser evidence
4 of 4 verified

Image classification: common questions

Can Image classification run directly in a browser?
Yes. 4 entries already carry browser evidence (tested here or an upstream example), so the approach works; whether it runs smoothly on your device depends on weight size, browser version and whether WebGPU is enabled.
How large is the model for Image classification?
We verified the weight file sizes of 3 entries in this task; the smallest tier is 6.0 MiB. Quantisation differs between entries, so the real download depends on the precision you pick. Files are reused from the HTTP cache or Cache Storage after the first download.
Which devices suit Image classification?
Any modern browser with WebAssembly is a starting point, and WebGPU usually makes it faster. Phones are tighter on memory, so run the demo once on the target device before deciding.
Does running a model here upload my data?
The demos on this site infer inside the tab, so inputs never reach a server. Weights and runtimes are fetched from a CDN on first use and then served from the browser cache.

Other tasks in this category

Browse all Vision models →