Ultralytics YOLO27: Join the waitlist.
Get Started
Computer Vision Foundations·Read the Metrics·Lesson 10/10
Lessonbeginner

From Lab to Production

Install Ultralytics, run YOLO26 on your own images, check the output against your spec, and choose your next step.

Ten minutes with a pretrained model answers the question that decides your whole plan: does an off-the-shelf model already cover your classes and your camera, or do you need your own data? Here you install Ultralytics, run YOLO26 on real images, and check the result against the spec you wrote in the first lesson.

Outcome

Run YOLO26 on your own images and decide from the output whether to prototype with pretrained weights or build a dataset.

Fast Track
If you already know your way around, here's the short version.
  1. Install: pip install ultralytics, then yolo checks.

  2. Predict: yolo predict model=yolo26n.pt source=https://ultralytics.com/images/bus.jpg.

  3. Check: which of your spec's classes are pretrained, and are the boxes right on your images?

  4. Choose the next course from the answer.

Hands-on

Install#

pip install ultralytics
yolo checks

The first line installs the ultralytics Python package and the yolo command, plus PyTorch if it's missing. yolo checks prints your Python, PyTorch, and CUDA versions and the hardware Ultralytics will use, so you can confirm the setup before running anything. Use a fresh virtual environment; the quickstart covers conda, Docker, and GPU setups.

Python version

The ultralytics package installs on Python 3.8 and newer, but current PyTorch releases need Python 3.10 or newer. If your environment is older, create a fresh virtual environment with a recent Python first.

PyTorch Start Locally selector with Stable, Mac, Pip, Python, and Default chosen, showing the pip3 install command for torch, torchvision, and torchaudio

A GPU that isn't used

Symptom: yolo checks shows CPU on a machine with an NVIDIA GPU, and inference is slow. Cause: a CPU-only PyTorch build — the default pip wheel on Windows, for example. Fix: pick your OS, package manager, and CUDA version in the PyTorch selector above, run the command it shows, then reinstall ultralytics. On a Mac, as in the screenshot, the default build is right; Ultralytics runs on the CPU unless you pass device=mps to use the Apple GPU.

A first prediction#

from ultralytics import YOLO

model = YOLO("yolo26n.pt")  # downloads the ~5 MB nano model on first use
results = model("https://ultralytics.com/images/bus.jpg", save=True)

for box in results[0].boxes:
    print(model.names[int(box.cls)], round(float(box.conf), 2))

Both print a one-line summary per image and save the annotated image under runs/detect/predict:

image 1/1 .../bus.jpg: 640x480 4 persons, 1 bus, 19.7ms
Speed: 0.9ms preprocess, 19.7ms inference, 0.4ms postprocess per image at shape (1, 3, 640, 480)
Results saved to runs/detect/predict

Line by line: the image was resized to 640×480 for inference; the model found four people and a bus; inference took about 20 ms on a laptop CPU. The Speed line is your first latency check — compare it with the frame rate in your spec's input line. Open the saved image: every box has the class, box, and confidence from the detection lesson.

Check the output against your spec#

QuestionIf yesIf no
Are your classes among the 80 COCO classes the model knows?Prototype with no training at allYou need labeled data and a fine-tune (fine-tuning guide)
On your images, do boxes above your threshold land on the right objects?The task and viewpoint matchExpect a domain gap: collect data from your cameras
Is the output type the one your decision line needs?Keep the taskSwitch weights: -seg, -sem, -depth, -pose, -obb, or -cls
Is it fast enough for your frame rate on the target hardware?Move onTry a smaller model or an optimized export format

The first question has an exact answer: model.names lists every class the pretrained model knows. For the forklift spec, person is a COCO class and forklift isn't, so no threshold will make the pretrained model find a forklift. That's the most common first-run result — the model covers part of the spec — and the right move is to prototype the decision logic on the classes you have while you build the dataset for the rest.

What changes in production#

A deployed model meets conditions its dataset never sampled: new cameras, seasons, products, uniforms. Without retraining, accuracy erodes; with regular retraining on what production shows you, it recovers:

Two charts of model accuracy over time: a model that decays without retraining, and a regularly retrained model that recovers accuracy at each update

Every lesson in this course feeds that loop: the spec defines a failure, the coverage audit says where to look, the label linter and guideline make new data useful, and honest splits and metrics tell you whether the retrained model is actually better. Two habits make it work from day one: log a sample of inputs and predictions, including low-confidence ones, and keep the frozen test set so every model is compared on the same images. Observability and Drift covers data drift monitoring in depth.

Where to go next#

CourseTake it when
Building High-Performance YOLO DatasetsYour classes aren't pretrained, or your scenes differ from COCO
Train your first YOLO modelYou have a labeled dataset and want to fine-tune
Ultralytics YOLO in ProductionYou have a model and need export, tracking, and monitoring
Build with Ultralytics PlatformYou want data, labeling, training, and deployment in one place

Prefer a browser-based workflow? Ultralytics Platform runs the same loop — upload, annotate, train, deploy — without a local install:

Try It

Edit the solution script: put your spec's classes in spec_classes and your own image paths in sources, then run it and open the saved results. Make a table — image, classes detected, matches your spec (yes or no) — and end with one sentence choosing your next step and the course that covers it.

Commit
git add -A && git commit -m "docs(academy): completed Computer Vision Foundations"
Done When
You've finished the lesson when all of these are true.
  • You have run YOLO26 on at least three of your own images and opened the saved results.

  • You know which of your spec's classes are pretrained and which need your own data.

  • You have one sentence naming your next step and the course you'll take for it.

Show solution
from pathlib import Path

from ultralytics import YOLO

model = YOLO("yolo26n.pt")

# 1. Which classes in your output line does the pretrained model already know?
spec_classes = {"person", "forklift"}
known = set(model.names.values())
print(f"pretrained: {sorted(spec_classes & known)}  needs your own data: {sorted(spec_classes - known)}")

# 2. What does it find on your images?
sources = [
    "https://ultralytics.com/images/bus.jpg",  # replace with your own images
    "https://ultralytics.com/images/zidane.jpg",
]
for source, result in zip(sources, model.predict(sources, conf=0.25, save=True, verbose=False)):
    names = [result.names[int(c)] for c in result.boxes.cls]
    print(f"{Path(source).name}: {len(names)} detections -> {sorted(set(names))}")
pretrained: ['person']  needs your own data: ['forklift']
bus.jpg: 5 detections -> ['bus', 'person']
zidane.jpg: 3 detections -> ['person', 'tie']

For the forklift spec: person is covered, forklift isn't. Next step: prototype the zone rule on people with the pretrained model now, and start Building High-Performance YOLO Datasets to collect and label forklifts from the warehouse cameras.

What's next

Course complete — take the final quiz to earn your certificate, then continue with Building High-Performance YOLO Datasets to turn your spec into a dataset ready for training.