image-classification · vision FCMAE + GRN · 1,000 ImageNet classes WASM q8 · 29.54 MB License: Apache-2.0

ConvNeXt V2 Tiny — 29.5 MB Pure-ConvNet FCMAE+GRN ImageNet-1k Classifier

Meta's ConvNeXt V2 Tiny pairs Fully Convolutional Masked Autoencoder (FCMAE) pretraining with Global Response Normalization (GRN) in a pure 7×7 depthwise-convolutional architecture (28.6M params, zero self-attention) — delivering ViT-class ImageNet-1k accuracy in a fast 29.54 MB CPU WASM download (~221 ms per image) entirely on your device.

At a glance

ConvNeXt V2 Tiny model specification and runtime grounding
Upstream model facebook/convnextv2-tiny-1k-224
Loaded ONNX repo Xenova/convnextv2-tiny-1k-224 (onnx/model_quantized.onnx)
Pipeline task image-classification · { top_k: 3–10 } (1,000 ImageNet-1k labels)
Architecture ConvNextV2ForImageClassification — 28.6M params, 4 stages [3, 3, 9, 3], channels [96, 192, 384, 768], 7×7 depthwise conv + GRN, zero self-attention
Image processor ConvNextImageProcessor — shortest_edge: 224, crop_pct: 0.875, bicubic resample, rescale 1/255, ImageNet mean/std
Backend & size CPU WASM q8 — 29.54 MB (29,538,332 B) via shared @huggingface/transformers@3.7.5 in lib/webai.js (~221 ms typical CPU WASM latency)
License Apache-2.0 (upstream weights and ONNX build)

Live ImageNet-1k Inspector

Choose a multi-domain starter photo, upload or drop your own image, press Ctrl/Cmd+V to paste from clipboard, or capture a live webcam snapshot. Everything executes locally in a dedicated Web Worker.

Initialising model loader…

No photo selected yet.

Top-1 class–
Top-1 score–
Top-1 vs Top-2 margin–
Shannon entropy–
Latency–
Backend / dtypewasm · q8
NaN / invalid0
Raw pipeline output (exact ImageNet-1k label/score pairs)
[]

Why ConvNeXt V2 Tiny is distinct from ViT, ResNet-50, and MobileNet

Unlike Vision Transformers (which split images into fixed patches with global quadratic self-attention) or classic ResNet-50 (3×3 bottlenecks with BatchNorm), ConvNeXt V2 modernises pure convolutions: 7×7 depthwise kernels give a wide local receptive field with genuine spatial translation equivariance, FCMAE self-supervised pretraining prevents feature collapse during masked training, and Global Response Normalization (GRN) adds inter-channel feature competition across stages [3, 3, 9, 3].

Architectural comparison of browser image classifiers
Architecture Core primitive Params WASM q8 footprint Inductive bias
ConvNeXt V2 Tiny 7×7 depthwise conv + FCMAE + GRN 28.6M 29.54 MB Translation equivariant, strong local-to-global hierarchy
ViT-Base/16 16×16 patch tokens + global self-attention 86.6M ~87 MB Global token mixing, weaker translation bias
ResNet-50 3×3 conv bottlenecks + BatchNorm 25.6M ~26 MB Narrower 3×3 receptive field, supervised pretraining
MobileNet V2/V4 Lightweight inverted residuals ~3.5M–9M ~4–10 MB Ultra-low compute, lower fine-grained capacity

How the API works

Transformers.js runs ConvNeXt V2 Tiny through the standard image-classification pipeline inside a Web Worker. ConvNextImageProcessor automatically applies the 87.5% shortest-edge crop, 224×224 bicubic resize, and ImageNet channel normalisation:

import { pipeline } from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.5";

const classifier = await pipeline("image-classification", "Xenova/convnextv2-tiny-1k-224", {
  device: "wasm",
  dtype: "q8",
});
const results = await classifier(image, { top_k: 5 });

See inside the code

Inspect the exact ES modules powering this page — off-main-thread inference and pure ranking/entropy maths.

Show the code — worker.js: ensureLoaded() (shared 3.7.5 WASM q8 + epoch guards)
Show the code — worker.js: classifyImage() (white-flatten, top_k, real nanCount)
Show the code — convnext-core.mjs: analyzeClassification() (ranking, margin, Shannon entropy)

Explore the 5-route use-case ladder

References & model card