← All models

object-detection Β· vision Β· WASM Β· ~10 MB

YOLO11 β€” the newest YOLO, and the NMS is back

YOLO11 is Ultralytics' latest detector β€” more accurate than YOLOv10 at the same tiny size. But it makes the opposite design choice: where YOLOv10 trains an NMS-free head that hands back tidy, deduplicated boxes, YOLO11 keeps the classic dense head β€” one forward pass returns 8400 overlapping candidate boxes that you must clean up yourself with Non-Max-Suppression. Drop an image, then slide the IoU threshold and watch NMS collapse the duplicate flood in real time, entirely on your device.

At a glance

Modelwebnn/yolo11n (nano)
Taskobject-detection β€” run via raw ONNX Runtime Web (see note below)
Runtimeonnxruntime-web 1.21 (transformers.js has no yolo11 class)
ArchitectureYOLO11-nano Β· C3k2 / C2PSA backbone Β· classic dense detection head (needs NMS)
Output tensor[1, 84, 8400] β€” 8400 anchors Γ— (4 box coords + 80 class scores), NOT deduplicated
Classes80 COCO categories (person, car, dog, chair, bottle…)
Post-processargmax the 80 class scores per anchor β†’ threshold β†’ Non-Max-Suppression
Quantizationfp32 ONNX (opset 19)
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~10 MB, cached after first load
LicenseAGPL-3.0 (Ultralytics YOLO11) β€” weights loaded from the canonical HF repo, unmodified
Web APIsWebAssembly, Web Workers, OffscreenCanvas, Canvas β€” all Baseline widely available

Run it

Pick or drop an image and hit Detect. YOLO11 runs once at a low floor; the two sliders then filter the cached candidates and re-run NMS live β€” no re-inference. Score decides how sure a box must be; IoU decides how aggressively NMS merges overlapping boxes.

Drop an image here, or click to choose
Two cats sleeping on a pink couch A cozy sunlit bedroom with a bookshelf A riverside at golden hour with a swan
0.35
0.45

See inside β€” the NMS step YOLOv10 removed

This is the whole point of YOLO11 vs YOLOv10. YOLO11's dense head emits a fixed [1, 84, 8400] tensor: 8400 candidate boxes, most of them near-duplicates of the same object. First we argmax the 80 class scores at each anchor to get its best label and confidence; then we drop everything below the score floor; then Non-Max-Suppression walks the survivors from most to least confident, throwing away any box that overlaps an already-kept box of the same class by more than the IoU threshold. Watch the numbers move as you drag the sliders β€” every step runs on the cached candidates, no re-inference.

Run detection to see the NMS pipeline.

Why it matters

YOLO11 is the current default when people say "just use YOLO" β€” it's the accuracy sweet spot at the nano size, and it runs at ~10 MB entirely in a page. Understanding that it needs NMS (and YOLOv10 doesn't) is the difference between a detector that works and one that draws three boxes around every object. Here you can feel both halves β€” the raw model output and the classical clean-up β€” with nothing uploaded.

Use cases

Basics

One image, two sliders β€” watch score + NMS turn 8400 raw candidates into clean boxes.

Practical

Inventory counter β€” tally objects by class from a photo, on-device, with a tuned NMS.

Wild

Live webcam detector β€” real-time boxes with a per-frame latency and FPS readout.

Multi-model

YOLO11 boxes β†’ crop one β†’ a ViT classifier names it more finely.

How the API works

Because transformers.js has no yolo11 class, we run the ONNX graph directly and hand-write the three steps a pipeline would normally own β€” letterbox in, decode the dense head out, and dedupe with NMS:

import * as ort from "onnxruntime-web";

const session = await ort.InferenceSession.create(modelBytes); // ~10 MB fp32 ONNX
// preprocess: resize longest edge β†’ 640, pad to 640Γ—640, /255 β†’ Float32 [1,3,640,640]
const { output0 } = await session.run({ images: input });
// output0.dims === [1, 84, 8400]  (channel-major: value(c, a) = data[c*8400 + a])
// per anchor a: cx,cy,w,h = data[0..3][a];  classScores = data[4..83][a]
//   β†’ argmax the 80 class scores, threshold, then run Non-Max-Suppression (IoU) to dedupe

This page runs the model once at a low floor (0.05) inside a Web Worker β€” letterboxing on an OffscreenCanvas and decoding the head there β€” then caches every candidate and re-runs the client-side NMS as you drag the sliders, so both knobs are instant and never re-run inference. The ONNX weights are fetched through Cache Storage, so a returning visit auto-initialises with no re-download.

References