Object Detection: Finding and Boxing Things
Classification tells you what a whole picture is. But the real world is full of scenes with many things at once: a street with cars and people, a shelf with dozens of products, a kitchen full of ingredients. For those, you need to know not just what is there but where each thing is and how many. That is the job of object detection, and it is the task behind some of the most impressive computer vision you see today.
What You'll Learn
- How object detection differs from classification
- What a bounding box is and why it matters
- How self-driving cars and retail systems use detection
- The link between detection and counting
Detection draws boxes
Object detection does two things at the same time. For every object it finds in a scene, it says what the object is (like classification) and it draws a bounding box around it, a rectangle marking exactly where the object sits in the image. So instead of one label for the whole photo, you get many labeled boxes.
Detection is classification plus location, repeated for every object in the scene.
| Criteria | Classification | Object detection |
|---|---|---|
| Output | One label for the image | A labeled box for each object |
| Tells you what | Yes | Yes |
| Tells you where | No | Yes, with a box |
| Handles many objects | No | Yes |
| Example answer | Street scene | 3 cars, 2 people, 1 dog, each boxed |
Classification
- Output
- One label for the image
- Tells you what
- Yes
- Tells you where
- No
- Handles many objects
- No
- Example answer
- Street scene
Object detection
- Output
- A labeled box for each object
- Tells you what
- Yes
- Tells you where
- Yes, with a box
- Handles many objects
- Yes
- Example answer
- 3 cars, 2 people, 1 dog, each boxed
Picture a photo of a busy crosswalk. A classifier says "street." A detector says: person here, person there, car in the corner, bicycle in the middle, traffic light up top, each with its own rectangle. That extra information, the location and the count, is what makes detection so useful.
Under the hood it still relies on the same foundation from earlier lessons. The system learned from many examples where people had already drawn boxes and labeled them. From those examples it learned the patterns for each object and how to locate them. Nobody wrote rules for what a pedestrian looks like from every angle.
Where detection shows up
Self-driving and driver-assist cars. This is the headline example. A car needs to know, many times per second, where every other car, pedestrian, cyclist, and traffic sign is around it. Object detection draws boxes around all of them in the camera feed so the car's software can react: brake for the person stepping off the curb, stay in the lane, stop at the sign. The car does not need a poetic description of the street. It needs precise locations, right now. Detection provides them. It is worth being clear that these systems are powerful but not perfect, which is why human attention still matters, a point we return to in the limits lesson.
Retail shelf checks. Stores use detection to look at photos of shelves and find which products are present, which are missing, and whether items are in the right place. A staff member, or a small robot, captures the shelf, and the system boxes each product and flags gaps. This replaces slow manual counting and helps stores restock before customers find an empty shelf.
Security and safety. Detection can spot when a person enters a restricted area, count how many people are in a space for crowd safety, or notice when someone is not wearing required safety gear on a worksite. These uses raise real privacy questions, which we cover in the next lesson on face recognition.
Everyday life. Sports broadcasts use detection to track the ball and players. Wildlife researchers use it to count animals in camera-trap photos. Warehouses use it to track packages. Farmers use it to count fruit on trees to estimate a harvest.
- ScenePhoto or video frame
- DetectorFinds every object
- Boxes + labelsWhat and where
- ActionBrake, restock, count, alert
Detection and counting go together
Once a system can box every object, counting is almost free: count the boxes. This quiet superpower drives a lot of practical value.
- Count people in a queue to open another checkout.
- Count cars at an intersection to time traffic lights.
- Count products on a shelf to trigger a restock.
- Count animals in a field or fish in a photo for research.
Counting by hand is slow, boring, and error-prone. Detection does it consistently at scale. Many "AI counts X automatically" products you hear about are object detection with a counting step bolted on.
Detection in video, not just photos
So far we have talked about single images, but detection really shines in video. A video is just many images per second. Run detection on each frame and you can follow an object as it moves, which is called tracking. That is how a system keeps the same car boxed as it drives across the screen, or follows one player through a match. Tracking is what turns still-image detection into something that understands motion, and it is central to self-driving cars, sports analysis, and security cameras.
Keep in mind that faster and more detailed detection needs more computing power, especially for live video. A phone can run a simple detector, while a self-driving car carries powerful hardware to detect and track many objects at once without delay.
Key Takeaways
- Object detection finds every object in a scene, labels each one, and draws a bounding box showing where it is.
- It is classification plus location, repeated for each object, so it also tells you how many things are present.
- Self-driving cars rely on detection to locate other cars, pedestrians, and signs many times per second.
- Retail, security, sports, farming, and research all use detection to find, locate, and count things automatically.
- Run detection across video frames and you get tracking, which follows objects as they move, though live video needs more computing power.

