Algorithm Search⌘K

Problemintro

Object recognition

Also called visual recognition.

Say which known objects or object classes an image shows, from instance recognition of one particular object to recognition of a category.

Object recognition is the problem of saying which objects an image shows. It ranges from instance recognition, finding one particular object such as a given book cover or building, to category recognition, saying that the image contains a dog or a car of any kind. The answer can be a label for the whole image, a box for each object as in object detection, or a label for each pixel as in semantic segmentation. The hard part is that the same object gives very different pixels under changes of viewpoint, light, occlusion and, for a category, the shape and look of each member.

In plain words

You show the computer a photo and ask "what is in it?" The question can mean different things. "Is this my car?" asks about one particular object. "Is there a car?" asks about a kind of object. "Where are all the cars?" also asks for their positions.

A photo is only a grid of numbers. The same car looks different from the front and from the side, in sun and in shade, and half hidden behind a tree. Two cars of different makes look more different still. A recognition method must give the same answer for all these pictures and a different answer for a picture of a truck. Older methods matched small distinctive patches or counted typical patterns. Modern methods learn the whole mapping from many labelled photos.

Definition

Fix a finite set of labels CC: either a set of known object instances, each given by one or more model images, or a set of categories, each given by labelled training images. The input is a digital image II. The problem has three common output forms:

  • Classification. A label c∈Cc \in C, or a score for each label, for the image as a whole. Single-label classification assumes one main object; multi-label classification asks for every label present.
  • Detection. A set of triples (label, box, score), one for each object; see object detection.
  • Segmentation. A label for each pixel (semantic segmentation), or a mask for each object (instance segmentation).

There is no closed-form correct answer: the ground truth is what human annotators say, and a method is judged by its error on a labelled test set, such as the top-5 error of ImageNet classification (the true label is not among the five best-scored labels) or the detection mean average precision of PASCAL VOC and COCO.

Variants

  • Instance recognition. Find a known rigid object, often with its pose. Local features and geometry solve it well, because the object has the same texture in every image.
  • Category recognition. Find any member of a class. The members differ in shape and appearance, so the method must learn what the class has in common.
  • Closed set and open set. In a closed set every input belongs to one of the labels; in an open set the method must also say "none of these".
  • Fine-grained recognition. Tell apart close categories, such as bird species or car models.
  • Face recognition and verification. Name a person, or say whether two faces are of the same person.
  • Few-shot and zero-shot recognition. Recognize a class from a few examples, or from a description only.

Examples

  • A book cover. Given one photo of a cover, find it in a photo of a shelf. Matching SIFT keypoints and checking that the matches agree with one affine or projective map finds it even when it is small, rotated and partly hidden.
  • The 20 PASCAL VOC classes. Person, car, cat, chair, bottle and 15 more, in everyday photos with clutter and several objects per image.
  • ImageNet classification. 1000 classes and over a million training images; the score is the top-1 or top-5 error.
  • A non-example. Finding the edges or the corners of an image is not recognition; it names no object. Matching two photos of the same scene for 3D reconstruction is not recognition either, although it uses the same features.

Known algorithms

AlgorithmTimeSpacePropertiesCode
EigenfacesO(M^2 P + M^3) worst · average · bestO(M P + M^2) extradeterministiclinearnearest neighborsupervised1 language
Geometric hashingO(K m^4 + N K m^4 n) worstΘ(K m^4) extrarandomizednot exactofflineiterative1 language
Local binary patternsO(W H P + 2^P P) worst · average · bestO(2^P) extradeterministicexactgray scale invariantnot heuristicnot rotation invariant1 language
Shape contextO(n^2 + m^2 + n m K + (n + m)^3) worst · average · bestO((n + m)^2 + (n + m) K) extradeterministicexactnot heuristicnot rotation invariantscale invarianttranslation invariant1 language
Spatial pyramid matchingO(M 4^L) denseO(n L) extradeterministicexactpositive semidefinitesymmetric1 language

Bounds

The problem has no useful worst-case lower bound; the measure of a method is its error rate on a benchmark, and every number below depends on the data set, the metric and the year. On ImageNet classification, Russakovsky et al. (2015) report that the top-5 error of the winning entries fell from about 28 percent in 2010 to under 7 percent in 2014, with the largest single drop in 2012, when a convolutional network won. For instance recognition, the cost is the matching: with mm features in the image and MM in a database, exact nearest-neighbour search costs O(mM)O(mM) distance computations, and approximate search with trees or quantization makes it sublinear in MM in practice. Alignment that tries every triple of model points against every triple of image points has O(m3n3)O(m^3 n^3) hypotheses for mm model and nn image features, which is why indexing and voting methods were developed.

Reductions

  • Detection to classification. Sliding-window detection runs an image classifier on every window of an image pyramid, and proposal-based detectors classify a few thousand candidate regions.
  • Instance recognition to retrieval. Recognizing a known object among many is image retrieval with a geometric check of the top results.
  • Segmentation to classification. A pixel label is a classification of the pixel with its context.

Applications

Photo search and organization, visual search on phones, industrial inspection and bin picking, face unlock and photo tagging, driver assistance and autonomous driving (pedestrians, cars and signs), medical imaging, robotics, and content filtering.

References

  1. Richard Szeliski, Computer Vision, Algorithms and Applications, second edition, Springer, 2022, Chapter 6, Recognition: Section 6.1 (instance recognition), Section 6.2 (image classification), Section 6.3 (object detection), Section 6.4 (semantic segmentation)
  2. David G. Lowe, Distinctive image features from scale-invariant keypoints, International Journal of Computer Vision 60(2), 2004, 91-110, The recognition of known objects by matching keypoints, clustering the matches with a Hough transform on pose, and checking each cluster with an affine fit
  3. Mark Everingham, Luc Van Gool, Christopher K. I. Williams, John Winn and Andrew Zisserman, The PASCAL Visual Object Classes (VOC) challenge, International Journal of Computer Vision 88(2), 2010, 303-338, The classification, detection and segmentation tasks on 20 classes, and their evaluation
  4. Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg and Li Fei-Fei, ImageNet large scale visual recognition challenge, International Journal of Computer Vision 115(3), 2015, 211-252, The classification task with 1000 classes, the top-5 error, and the results of the challenge from 2010 to 2014

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a contract.yaml