# Image classification

> Canonical: https://skillalmanac.com/glossary/image-classification | Last verified: 2026-11-25 | Index status: index-eligible

Image classification assigns category labels to an image. A common single-label, closed-set setup chooses one category from a fixed list; other setups can use text-specified categories. A model performing the task is an image classifier.

Also called: image classifier, image classifiers, image classification model, image classification machine learning.

## In plain language

In a common single-label, closed-set setup, image classification means showing a computer a picture and asking it to pick a name from a list decided in advance. Sorting a folder of photos into cats and dogs is the usual picture of it. A forced-choice classifier can return a listed label even when none fits. Other systems can abstain or use text-specified categories; this example is not the only classification setup. Lighting, camera angle, partly hidden objects and cluttered backgrounds all make the task harder than it looks to a person. It also says nothing about where in the picture the object is.

## Technical definition

In that closed-set setup, a classifier maps an image, a grid of pixel values, to a label or scores over the fixed categories. Statistical approaches learn from labelled example images, often with convolutional neural networks, rather than relying on hand-written rules, according to IBM. Task-specific labelled images are not a universal requirement: CLIP uses natural-language supervision and can transfer zero-shot using class descriptions. Evaluation still needs suitable held-out examples. The Stanford CS231n notes list viewpoint, scale, deformation, occlusion, illumination, background clutter and intra-class variation as difficulties a model has to cope with. Public benchmarks such as the ImageNet challenge have been used to evaluate classification.

## How it shows up when you use agents

Image classification is a task in [computer vision](/glossary/computer-vision). A common [supervised learning](/glossary/supervised-learning) setup learns from labelled images, while CLIP demonstrates transfer through text-specified categories without task-specific image-label training. In an agent session it usually appears indirectly. A coding agent may write code that loads a trained classifier, or a pipeline may sort uploaded photos before a language model sees them.

What goes wrong when it is misunderstood is mostly about scope. A forced-choice, closed-set classifier answers "which of these labels?" even when none fits; an abstaining or open-vocabulary system has different behavior. If you ask an agent to use one for a new kind of image, check that the label list covers what you expect to see. Ask for results on images that were not used in training, and look at a sample of wrong answers rather than a single summary score.

Datasets matter as much as the model. Duplicates between training and test images make a classifier look better than it is, and the [split-leakage-check](/skills/skill-almanac/split-leakage-check) skill can compare supplied original-image/group IDs in split tables. It does not compare pixels or detect transformed copies; check those separately. For the network type often used, see [convolutional neural network](/glossary/convolutional-neural-network).

## Common confusions

- **Image classification versus object detection.** The illustrated single-label setup gives a category or scores for the whole image. Detection also says where objects are. This entry covers the first.
- **Label versus truth.** A forced-choice output is a choice from its list; other classification setups differ. It is not evidence that the list is complete.
- **Training performance versus held-out performance.** A model can fit its training images well and still do poorly on new ones. Judge it on images it has not seen.
- **Classifier versus language model.** A vision-language system can describe an image in prose, but a classifier returns category labels or scores; CLIP can use natural-language class descriptions rather than a training-time fixed list.

## Worked examples in this catalogue

### [split-leakage-check](https://skillalmanac.com/skills/skill-almanac/split-leakage-check)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The skill checks train, validation and test files for duplicates, shared groups, time and label leakage and prints JSON.

Why it exercises the concept: Hypothetical preparation: supply split tables with tracked original-image or provenance-group IDs. This checker flags configured tabular text/group signals, not duplicate pixels, crops or transformations; separate visual/similarity checks are needed. No test executed.

### [image-spec-check](https://skillalmanac.com/skills/skill-almanac/image-spec-check)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The skill checks exported images against your own spec table and says exactly what to resize, crop, re-export or replace.

Why it exercises the concept: A classifier expects inputs that match the format it was trained on, which is why image specs matter. The skill is adjacent: it checks image files, not model predictions.

### [huggingface-datasets](https://skillalmanac.com/skills/huggingface/huggingface-datasets)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The skill reads Hugging Face datasets through the Dataset Viewer API: metadata, rows, search and filters.

Why it exercises the concept: For a labelled-data workflow, the illustrated Dataset Viewer API reads hosted metadata and rows. It does not train or run a classifier; the package's separate creation/upload flows are outside this example.

### [AI Hallucination: What to Check in Agent Output](https://skillalmanac.com/learn/ai-hallucination-what-to-check)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A guide with a checklist for reviewing agent output: claims, quotes, sources and figures before you rely on them.

Why it exercises the concept: Adjacent: a classifier's label can be confidently wrong in the same way, so the habit of checking output against evidence carries over.

## Related terms

- [Computer vision](https://skillalmanac.com/glossary/computer-vision.md)
- [Convolutional neural network (CNN)](https://skillalmanac.com/glossary/convolutional-neural-network.md)
- [Supervised learning](https://skillalmanac.com/glossary/supervised-learning.md)
- [Classification](https://skillalmanac.com/glossary/classification.md)
- [Deep learning](https://skillalmanac.com/glossary/deep-learning.md)
- [Vision model](https://skillalmanac.com/glossary/vision-model.md)

## Sources

- [Image Classification (CS231n course notes)](https://cs231n.github.io/classification/), Stanford University (accessed 2026-11-24)
- [What is image classification?](https://www.ibm.com/think/topics/image-classification), IBM (accessed 2026-11-24)
- [ImageNet Large Scale Visual Recognition Challenge](https://arxiv.org/abs/1409.0575), arXiv (accessed 2026-11-24)
- [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/abs/2103.00020), Radford et al. (arXiv) (accessed 2026-11-25)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
