Glossary

Image Classification

Discover image classification with Ultralytics YOLO: train custom models for healthcare, agriculture, retail, and more using cutting-edge tools.

Image classification is a fundamental task in computer vision (CV) that involves assigning a single, specific label to an entire image from a predefined set of categories. The primary goal is to identify the main subject of an image and categorize it accordingly. For example, a classification model would analyze an image and output a label like "cat," "dog," or "car." This task forms the basis for many more complex CV applications and is a core component of machine learning (ML). The process relies on algorithms, most notably Convolutional Neural Networks (CNNs), to learn distinguishing features from large labeled datasets.

How Image Classification Works

Image classification models are trained using supervised learning, where they are fed a vast number of images that have already been manually labeled with the correct class. During training, the neural network learns to identify patterns, textures, shapes, and color combinations associated with each category. This learning is achieved through a process called backpropagation, which adjusts the model's internal parameters, or weights, to minimize the difference between its predictions and the actual labels.

Modern classification models often use deep learning architectures with many layers. Early layers might learn to recognize simple features like edges and corners, while deeper layers combine these to identify more complex structures like eyes, wheels, or faces. The final layer of the network typically uses a softmax function to produce a probability score for each possible class. The class with the highest probability is chosen as the final prediction. Key to this process is feature extraction, where the model automatically learns the most informative features for the classification task.

Applications of Image Classification

Image classification is used across numerous industries to automate and scale visual recognition tasks. Two prominent examples include:

  1. Medical Image Analysis: In healthcare, classification models analyze medical scans like X-rays, MRIs, and CT scans to help radiologists detect diseases. For instance, a model can be trained on thousands of mammograms to classify images as either "benign" or "malignant," assisting in the early detection of breast cancer. This can lead to faster diagnoses and reduced human error. For more on this, see the American Cancer Society's overview of AI in cancer detection.
  2. Agriculture Technology: Farmers use image classification to monitor crop health from images captured by drones or satellites. A model can classify images of plant leaves into categories like "healthy," "diseased," or "pest-infested." This allows for targeted application of pesticides or fertilizers, improving crop yields and promoting sustainable farming. Learn more about how Ultralytics supports AI in agriculture.

Image Classification With Ultralytics

While renowned for object detection, Ultralytics YOLO models also excel at image classification tasks. State-of-the-art models like YOLO11 can be easily trained or fine-tuned on custom datasets using the intuitive Ultralytics Python package or the no-code Ultralytics HUB platform.

Our documentation provides extensive resources, including model training tips and a detailed guide on how to use YOLO11 for image classification. Developers can leverage pre-trained models on benchmark datasets like ImageNet, CIFAR-100, and Caltech-101 or train a new model from scratch. For those interested in the latest advancements, resources like Papers With Code offer a comprehensive overview of top-performing models. You can also compare YOLO model performance on standard benchmarks. Frameworks like PyTorch and TensorFlow provide the foundation for building and training these models.

Join the Ultralytics community

Join the future of AI. Connect, collaborate, and grow with global innovators

Join now
Link copied to clipboard