← All models

object-detection · vision · WASM · ~9 MB

YOLOv10 — real-time detection with no NMS

Every detector before it flooded you with thousands of overlapping boxes and leaned on a Non-Max-Suppression clean-up pass to dedupe them. YOLOv10 trains a one-to-one head that emits at most one box per object — already deduplicated — so a single forward pass returns a tidy set of detections with no NMS and lower latency. Drop an image and watch it box 80 everyday COCO classes, entirely on your device.

At a glance

Modelonnx-community/yolov10n (nano)
Taskobject-detection — run via raw ONNX Runtime Web (see note below)
Runtimeonnxruntime-web 1.21 (transformers.js has no yolov10 class)
ArchitectureYOLOv10-nano · consistent dual assignments · NMS-free one-to-one head
Output tensor[1, 300, 6] — top-300 boxes, each x1,y1,x2,y2,score,class, score-sorted
Classes80 COCO categories (person, car, dog, chair, bottle…)
Quantizationfp32 ONNX (the int8 build needs a ConvInteger op the WASM backend lacks)
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~9 MB, cached after first load — tiny for a detector
LicenseAGPL-3.0 (THU-MIG YOLOv10) — 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. YOLOv10 runs once at a low floor; the score slider then filters the (already NMS-free) boxes live without re-running the model.

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.30

See inside — the NMS-free head

This is the whole point of YOLOv10. A classic detector's raw output is a mess of near-duplicate boxes that only becomes usable after an NMS pass throws most of them away. YOLOv10's one-to-one head does that assignment during training, so the graph hands back a fixed [1, 300, 6] tensor where each surviving row is already a distinct object — no suppression step here in the browser. Below is the raw list above the current threshold: the label, the score, and the box as x, y, width, height in the image's own pixels.

Run detection to see the raw boxes.

Why it matters

Dropping NMS isn't just academic tidiness — NMS is a serial, threshold-sensitive post-process that adds latency and can merge or drop the wrong boxes in crowded scenes. An end-to-end NMS-free head makes detection a single deterministic tensor op, which is exactly what you want when you're running it on a live camera on-device, at ~9 MB.

Use cases

Basics

One image, labelled boxes, a threshold slider — feel NMS-free detection first-hand.

Practical

Inventory counter — tally objects by class from a photo, on-device.

Wild

Live webcam detector — real-time boxes with a per-frame latency readout.

Multi-model

YOLOv10 boxes → crop one → a ViT classifier names it more finely.

How the API works

Because transformers.js has no yolov10 class, we run the ONNX graph directly and hand-write the two steps a pipeline would normally own — letterbox in, decode the head out:

import * as ort from "onnxruntime-web";

const session = await ort.InferenceSession.create(modelBytes); // ~9 MB fp32 ONNX
// preprocess: resize longest edge → 640, pad to 640×640, /255 → Float32 [1,3,640,640]
const output = (await session.run({ images: input })).output0;
// output.dims === [1, 300, 6]; each row = [x1, y1, x2, y2, score, classId]
//   already NMS-free & score-sorted — just scale the boxes back to the source image

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 — caches every box, and filters the cached list as you drag the slider, so the slider is instant and never re-runs inference. The ONNX weights are fetched through Cache Storage, so a returning visit auto-initialises with no re-download.

References