From Lab to Production
The smallest end-to-end loop: install, predict, measure, decide.

Concepts are nice. A model running on your machine is better. In this final lesson, we install Ultralytics via the quickstart, run inference on a real image with YOLO26, look at the output, and connect it back to the framing exercise from lesson 1. By the end you'll know whether your project is ready to move into the Building High-Performance YOLO Datasets course — and whether your next step is data collection, fine-tuning, model deployment, or shipping to the edge.
Hands-on
Install#

The Ultralytics quickstart starts with the package on PyPI. One command:
pip install ultralyticsThat installs the ultralytics Python library and the yolo command-line tool. Both wrap the same models — pick whichever fits your shell habits.
Ultralytics supports Python 3.9+. If your environment is older, create a fresh virtual environment with a recent Python before installing.
A first prediction#
The smallest possible CLI test runs through Predict mode:
yolo predict model=yolo26n.pt source='https://ultralytics.com/images/bus.jpg'That command:
- Downloads
yolo26n.pt(the smallest Ultralytics YOLO26 detection model — about 6 MB). - Runs it on a bus image.
- Saves the annotated result to
runs/detect/predict/.
Open the saved image. You should see a bus, some people, and labeled boxes.
The same thing in Python#
from ultralytics import YOLO
model = YOLO("yolo26n.pt")
results = model("https://ultralytics.com/images/bus.jpg")
for box in results[0].boxes:
cls = model.names[int(box.cls)]
conf = float(box.conf)
x1, y1, x2, y2 = box.xyxy[0].tolist()
print(f"{cls} ({conf:.2f}): ({x1:.0f},{y1:.0f}) → ({x2:.0f},{y2:.0f})")You'll see a list of detections. Each one has the three pieces from lesson 3: class, box, confidence.
Connect it back to your task spec#
Take the task spec from lesson 1 (input / output / decision). Now answer:
| Question | For your project |
|---|---|
| Does Ultralytics YOLO26's pretrained class list contain your classes? | If yes — you may not need custom training to start. If no — follow the fine-tuning guide. |
| Are the detections at confidence > 0.5 in the right places? | If yes — your task is well-matched. If not — likely a domain gap (lesson 6), data drift, or class mismatch. |
| What threshold gives you the precision/recall tradeoff your decision needs? | Sweep, pick deliberately. |
If you've made it this far you have:
- A task spec you can defend.
- A dataset plan that covers reality.
- A grasp of metrics that won't lie to you.
- Ultralytics installed and a model running.
That's everything you need to start the next course — and to start thinking about MLOps and model monitoring once your first model is in production.
Where the next course goes#
The Building High-Performance YOLO Datasets course picks up exactly here, before you train anything:
- Translate this lesson's task spec into a dataset specification.
- Plan and run a representative data collection.
- Write a labeling guide and run a structured annotation pass.
- QC the labels, split cleanly, and pick augmentation that matches deployment.
- Confirm readiness with the Dataset Readiness Checklist — then fine-tune.
After that, Train your first YOLO model covers writing the data.yaml, running model.train(...), validating, and exporting. Each step uses everything we covered here.
Show solution
from ultralytics import YOLO
model = YOLO("yolo26n.pt")
results = model.predict(
source="https://ultralytics.com/images/bus.jpg",
conf=0.25,
save=True,
)
print(f"Found {len(results[0].boxes)} detections")
for box in results[0].boxes:
print(f" {model.names[int(box.cls)]} @ {float(box.conf):.2f}")