Ultralytics YOLO27: Join the waitlist.
Get Started
Train your first YOLO model·Predict·Lesson 3/10
Lessonbeginner

Choose an Ultralytics YOLO Model Size

Compare YOLO26 n, s, m, l, and x, benchmark them on your target hardware, and pick the smallest size that fits your latency budget.

Pick too large and a 30 FPS camera app runs at 12 FPS; pick too small and you give away accuracy a bigger model would deliver for free on a GPU. Since the size you train is the size you ship, this choice comes before the long training run.

YOLO26 ships in five sizes — n, s, m, l, and x — for all seven tasks: detect, segment, semantic segmentation, classify, pose, OBB, and depth. In this lesson you'll turn a frame rate into a millisecond budget, measure two sizes on your own machine with Benchmark mode, and choose.

Outcome

You can convert a frame-rate target into a millisecond budget, benchmark YOLO26 sizes on your hardware, and justify a first size and a fallback in one line.

Fast Track
If you already know your way around, here's the short version.
  1. Budget = 1000 ÷ target FPS: 30 FPS means 33 ms per frame for everything.

  2. Benchmark yolo26n and yolo26s with yolo benchmark ... format=onnx on the target machine.

  3. Pick the smallest size that fits with headroom; ignore benchmark mAP on coco8.

  4. Train it; step up one size only if accuracy on your own validation set falls short.

Hands-on

Know the Lineup#

Ultralytics Platform model page Overview tab, showing a trained model's summary metrics and details

These are the official COCO detection numbers from the YOLO26 docs, all at 640 pixels:

ModelParams (M)FLOPs (B)mAP50-95CPU ONNX (ms)T4 TensorRT10 (ms)
yolo26n2.45.540.938.91.7
yolo26s9.520.948.687.22.5
yolo26m20.468.453.1220.04.7
yolo26l24.886.855.0286.26.2
yolo26x55.7194.457.5525.811.8

Every size exists for every task — swap the suffix, as in yolo26s-seg.pt, yolo26s-sem.pt, yolo26s-depth.pt, yolo26s-cls.pt, yolo26s-pose.pt, or yolo26s-obb.pt. Migrating an older project? The YOLO11 vs YOLO26 comparison shows what changes.

Read the table as "what does the next size cost?":

StepmAP gainedExtra FLOPsCPU latency multiplier
n → s+7.7×3.8×2.2
s → m+4.5×3.3×2.5
m → l+1.9×1.3×1.3
l → x+2.5×2.2×1.8

The first step is the best deal; after m, each point of COCO accuracy gets expensive. And COCO, with 80 varied classes, is harder than most real projects: on a narrow task, such as one product on a conveyor, n and s often land within a point of m.

Start From the Budget#

Your inference latency budget is 1000 ms ÷ target FPS, and the model must share it with decoding, drawing, and your own logic. Typical starting points:

TargetStart with
Phone, Raspberry Pi, browser, or other small edge AI devicen
Laptop or desktop CPU, 10–30 FPSn, then s if there's headroom
Single GPU, real-time videos or m
Offline batch processing, accuracy firstl or x

Worked Example: Measure Two Sizes#

Benchmark mode exports the model, validates it on coco8, and times inference on your machine. format=onnx limits the run to one format so it finishes in seconds; leave it out to compare every export format.

yolo benchmark model=yolo26n.pt imgsz=640 format=onnx
yolo benchmark model=yolo26s.pt imgsz=640 format=onnx

Real results on an Apple M5 Pro laptop CPU:

|     Format   Status❔   Size (MB)   metrics/mAP50-95(B)   Inference time (ms/im)   FPS   |
| 1   ONNX     ✅         9.5         0.6693                13.87                    72.08 |   <- yolo26n
| 1   ONNX     ✅         36.5        0.6654                30.87                    32.39 |   <- yolo26s

Reading it against a 30 FPS (33 ms) budget:

  • yolo26n, 13.87 ms: fits with 19 ms to spare for decoding and drawing.
  • yolo26s, 30.87 ms: technically fits, with no room for anything else. The same benchmark took 60 ms while other jobs were running on the machine.
  • Size (MB): the ONNX file size, which matters for app downloads and mobile memory.
  • metrics/mAP50-95(B): ignore it here. coco8 has four validation images: enough to prove the export works, far too few to rank accuracy.

Decision: train yolo26n first, and keep yolo26s at a lower imgsz as the fallback.

Avoid These Mistakes#

Benchmarking on the wrong machine

Symptom: a model that ran at 70 FPS on your laptop runs at 8 FPS on the edge device. Fix: benchmark on the device that will run the model, under realistic load — other processes, camera decoding, the actual runtime format.

Comparing sizes at different settings

Symptom: "s was faster than n" in your notes. Cause: one run used imgsz=480 or a different format. Fix: compare sizes at the same imgsz, format, and batch, and change one variable at a time.

Train at the size you'll deploy

Don't train x and plan to shrink it to n later with model pruning or quantization: a smaller architecture means training again. Pick the size first; treat quantization as an extra speedup on top of the right size, not a substitute for it.

Deeper latency work — batching, quantization, and runtime choice — belongs to Cost and Latency Tuning in the Production course, and the performance metrics guide explains each accuracy number.

Try It

Pick your project's target device and frame rate. Benchmark yolo26n and yolo26s with format=onnx on that device (or the closest machine you have), then write a three-line size decision: your ms budget, the two measured latencies, and the size you'll train first plus your fallback.

Done When
You've finished the lesson when all of these are true.
  • You have measured ms per image for two YOLO26 sizes at the same imgsz and format.

  • You've written your per-frame budget in milliseconds and how much headroom each size leaves.

  • You've chosen a first size to train and a fallback, with one sentence of reasoning.

Show solution
Budget:   30 FPS on a laptop CPU -> 33 ms per frame, shared with decode and drawing
Measured: ONNX at 640 -> yolo26n 13.9 ms (19 ms headroom), yolo26s 30.9 ms (none; 60 ms under load)
Decision: train yolo26n first. If accuracy on our val set falls short,
          try yolo26s at imgsz=480 and re-benchmark before committing.
What's next

You know which model to train. Next, put your data into the folder and label format that Ultralytics YOLO expects.