Skip to content
tezvyn:
Menu

Image classification versus object detection

Source: interviewEasyHow cards are made

Summary

basic task definitions.

Key points

classification assigns one label to the whole image; detection localizes and labels multiple objects with bounding boxes and class scores.

What's really being asked

Whether you can crisply separate two tasks that beginners blur together, which underpins understanding detection architectures.

The full answer

Image classification takes an image and assigns it one label from a fixed set, typically outputting a probability distribution over all classes via a softmax, from which the top class is read. It assumes a single dominant subject and says nothing about location. Object detection is harder: it must find every object of interest, draw a bounding box around each, assign each box a class label, and attach a confidence score. So its output is a variable-length list of detections, each a tuple of box coordinates, class, and score, and it handles many objects of possibly different classes in one image. The two added requirements over classification are localization, knowing where, and multiplicity, handling several instances at once.

The mistakes people make

Saying detection is just classification with more classes. Omitting that detection localizes with boxes. Forgetting detection outputs a variable number of objects. Confusing detection with segmentation, which labels pixels rather than boxes.

What usually comes next

How do you evaluate detection versus classification. What is a bounding box format. How does detection handle a variable number of outputs. Where does segmentation fit relative to these two.

A concrete example

Given a street photo, a classifier might output the single label street scene or its most prominent class such as car. A detector instead outputs several boxes: one around each of three cars, one around a pedestrian, and one around a traffic light, each box tagged with its class and a confidence like zero point nine. The classifier gives one answer for the whole image; the detector gives a labeled, localized list of every object it finds.

Interview question

What does object detection provide that image classification does not?

  • a.Localization of multiple objects via bounding boxes with class labelsCorrect
  • b.A single most-likely label for the whole image
  • c.Pixel-level masks for every object instance
  • d.A higher-resolution version of the input image
Why?

Detection adds localization and handles multiple objects, outputting boxes with labels and scores. A single whole-image label is classification, and pixel-level masks describe segmentation rather than detection.

Just read this? Test yourself on what you have been reading.

Read the original → coursera.org

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on computer-vision — each one lists the topics its interview covers.

See open roles