image-classification Β· vision Β· WASM Β· ~26 MB
Same job as the ViT and ConvNeXt demos β name what's in an image across ImageNet's 1,000 classes β but this is the 2015 original that made 50-layer networks trainable at all. ResNet's trick is the skip connection: each block learns a small residual on top of an identity shortcut, so gradients flow through dozens of layers without vanishing. Drop an image, read the labels, then run the backbone lineage race β ResNet 2015 vs ConvNeXt 2022 vs ViT β on one picture.
| Model | Xenova/resnet-50 |
|---|---|
| Task / pipeline | image-classification |
| Architecture | ResNet-50 β deep residual CNN, ~25.6M params, bottleneck blocks (1Γ1 β 3Γ3 β 1Γ1) wired with identity skip connections, BatchNorm + ReLU, 4 stages (3/4/6/3 blocks) |
| Labels | ImageNet-1k β 1,000 fixed classes |
| Quantization | q8 (8-bit) ONNX β verified non-degenerate (plain convs quantise cleanly) |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~26 MB, cached after first load |
| License | Apache-2.0 (Microsoft Research; original by He, Zhang, Ren & Sun) |
| Web APIs | WebAssembly, Web Workers, FileReader β all Baseline widely available |
Pick or drop an image and hit Classify. The bars are the softmax over ImageNet's 1,000 classes β only the top few are shown, drawn from the full distribution.

5 labels
The whole point of this page: run the same image through three generations of ImageNet backbone and watch how the field evolved. ResNet-50 (2015) is the residual CNN that everything else was measured against; ConvNeXt (2022) is a ResNet modernised block-by-block to match transformers; ViT is the pure transformer that dropped convolutions entirely. Same 1,000 classes, three very different machines. Where all three agree, trust the label; where they split, the image is genuinely hard. Loading ConvNeXt adds ~29 MB and ViT ~88 MB the first time.
Residual CNN Β· 2015 Β· β
Modern ConvNet Β· 2022 Β· β
Transformer Β· β
ResNet's final layer produces one raw score β a logit β per class. A softmax turns those into probabilities that sum to 100%. The table shows the top classes with their raw logit next to the softmax probability. The two numbers below describe the shape of the whole distribution: the top-1 margin (how far the winner leads the runner-up) and the normalised entropy (0 = certain, 1 = spread thin).
| Class | logit | softmax |
|---|
Confidence (low β β high):
Before ResNet, stacking more layers made networks worse, not better β gradients
vanished on the way back and deep plain nets were harder to optimise than shallow ones. The fix
is almost embarrassingly simple: instead of asking a block to learn a full transformation
H(x), ask it to learn the residual F(x) = H(x) β x,
then add the untouched input back: output = F(x) + x. That + x is the
skip (identity) connection. It gives gradients a direct highway to every
earlier layer, so a 50-layer network trains as easily as a shallow one, and any block that has
nothing useful to add can fall back to the identity for free. ResNet-50 stacks
bottleneck blocks β a 1Γ1 conv squeezes the channels, a 3Γ3 conv does the
spatial work, a 1Γ1 conv expands them back β across four stages (3, 4, 6, 3 blocks). This one
idea unlocked networks with hundreds of layers and is still wired into ConvNeXt, every
transformer's residual stream, and most modern architectures. The race above lets you watch how
much (or how little) accuracy the seven years since bought on any given image.
ResNet-50 is the reference backbone of computer vision β the model almost every detector, segmenter, and feature extractor of the late 2010s was built on top of, and the number every new architecture still reports against. It's small, fast on the WASM backend, extremely well understood, and its ImageNet features transfer to almost any vision task.
Classify a sample and read the top-k β feel the original residual net name what's in an image.
Dependable on-device tagging: classify a batch of images into a searchable tag index.
Texture vs shape: strip colour and warp the image and watch a CNN's texture bias show.
Three-way vote: ResNet + ConvNeXt + ViT on one image for a robust majority answer.
The convenience path is two lines with Transformers.js:
import { pipeline } from "@huggingface/transformers";
const classify = await pipeline(
"image-classification",
"Xenova/resnet-50",
{ dtype: "q8" },
); // downloads + caches ~26 MB once
const output = await classify(imageURL, { top_k: 5 });
// β [{ label: "tiger cat", score: 0.96 }, { label: "tabby, tabby cat", score: 0.01 }, β¦]
This page goes one level deeper for "See inside": instead of the pipeline it runs the model's own
processor then model() in a single forward pass, so it can read the raw
logits tensor (all 1,000 classes) and compute the softmax, entropy, and margin
itself. Same weights, same result β it just keeps the intermediate numbers. Inference runs in a
Web Worker so the page never janks.