Ultralytics YOLO27: Join the waitlist.
License YOLO
Back to Ultralytics Glossary

Supervised Learning

Supervised learning trains models on labeled input-output examples so they can predict labels for new data. Classification, regression, and training.

Supervised learning is the branch of machine learning (ML) in which a model learns to map inputs to outputs from labeled examples, inputs paired with the correct answer, often called the ground truth. During training the model's predictions are compared with those labels and its parameters are adjusted to reduce the difference. The goal is generalization: accurate predictions on new inputs the model has never seen. Many of the most widely deployed ML systems are supervised, including spam filters, credit scoring, demand forecasting, image classifiers, and object detectors.

How Supervised Learning Works#

A supervised dataset is a collection of (input, label) pairs, split into training data for fitting the model, validation data for tuning settings and choosing when to stop, and test data for a final, unbiased estimate of performance. For each training batch the model makes predictions, a loss function measures how far they are from the labels, and an optimization algorithm such as stochastic gradient descent updates the model weights to lower that loss. One pass over the training set is an epoch, and training usually runs for many epochs while the validation score is monitored.

A model that keeps lowering its training loss while its validation score gets worse is overfitting: it is memorizing the training labels, including their noise, instead of learning patterns that transfer. More data, data augmentation, regularization, and early stopping counter it.

Classification, Regression, and Structured Outputs#

  • Classification: Predicts a discrete category, such as spam or not spam, or which of the 1,000 ImageNet classes an image shows.
  • Regression: Predicts a continuous value, such as a house price, tomorrow's demand, or the distance to an object, with linear regression as the simplest model.
  • Structured outputs: Many vision tasks combine both. Object detection classifies each object and regresses its box coordinates, segmentation classifies every pixel, and pose estimation regresses keypoint positions.

The same supervised recipe applies to very different models, from classic algorithms such as logistic regression, random forests, and gradient-boosted trees on tabular data to deep neural networks on images, audio, and text.

Labeled Data and Its Cost#

Labels come from human annotators, from records such as past fraud cases or purchases, and from instruments, and their quality caps the model's quality. Systematic labeling errors, inconsistent annotation rules, class imbalance, and data leakage between training and test sets are common causes of models that score well in development and fail in deployment. Because data labeling is often the most expensive part of a project, related methods cut the number of labels needed. Active learning asks annotators to label only the most informative samples, and transfer learning starts from a model pretrained on a large dataset, so a new task needs far fewer labeled examples.

YOLO26 training is supervised learning on labeled images: each training image has a label file listing every object's class ID and normalized box coordinates, and the train mode updates the model to reduce the loss between its predicted classes and boxes and those labels. This example fine-tunes pretrained weights on COCO8, an 8-image sample of the COCO dataset, with 4 training and 4 validation images, for checking that a training pipeline runs end to end:

from ultralytics import YOLO

# Start from weights pretrained on the full COCO dataset
model = YOLO("yolo26n.pt")

# Supervised training: images paired with box and class labels
results = model.train(data="coco8.yaml", epochs=3, imgsz=640)

Supervised vs. Other Learning Paradigms#

  • Unsupervised learning: Uses no labels and finds structure in the inputs alone, such as clusters or compressed representations.
  • Semi-supervised learning: Trains on a small labeled set plus a large unlabeled one, often by assigning pseudo-labels to confident predictions on the unlabeled data.
  • Self-supervised learning: Creates labels from the data itself, such as the next word in a sentence or a hidden patch of an image, and is how large language models and vision foundation models are pretrained before supervised fine-tuning.
  • Reinforcement learning: Learns from rewards earned by actions in an environment, with no labeled correct action for each situation.
  • Few-shot learning: Recognizes new classes from a handful of labeled examples, typically 1 to 10 per class, by building on knowledge from pretraining.

Explore solutions

Computer vision in sports

Computer vision in sports

Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Turn drone and aerial imagery into real-time insights for agriculture, aquaculture, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Apply computer vision in aerospace with Ultralytics YOLO for aircraft inspection, runway FOD detection, airport ground operations, and composite defect detection.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning