What is object detection?
Object detection is the computer vision task of locating and classifying every object of interest in an image. For each object the model returns three things: a class label (person, pallet, truck), a bounding box giving its position and size, and a confidence score. Where image recognition says that an image contains a forklift, object detection says there are two forklifts and gives the coordinates of each.
Detection is the workhorse of applied vision because counting, locating, and tracking all depend on it. Safety monitoring, inventory counting, traffic analysis, and shelf auditing are all detection problems with business logic layered on top.
How object detection works
A detection model is a convolutional neural network (CNN) or transformer trained on images where every object has been drawn around and labeled. Two-stage detectors first propose candidate regions and then classify each one; they are accurate but slower. One-stage detectors, such as the YOLO (You Only Look Once) family, predict boxes and classes in a single pass and run fast enough for live video on modest hardware. Many detectors use anchor boxes, preset box shapes that the model adjusts, although newer designs predict boxes directly.
Output quality is measured with intersection over union (IoU), which compares a predicted box with the labeled one, and with precision and recall at a chosen confidence threshold. Lowering the threshold catches more objects and produces more false positives; raising it does the opposite.
Object detection in practice
A regional distributor’s yard has forty trailer spots and a recurring problem: drivers cannot find the trailer they are assigned. A camera on a light pole runs a detector that recognizes trailers and reads their unit numbers. The yard management system now shows which spot each trailer occupies, updated every few seconds, and dwell time per trailer becomes a reportable metric. The same camera feed flags pedestrians inside the truck lane and sends an alert to the yard supervisor’s radio.
What to watch for
- Small, overlapping, or partly hidden objects are where detectors fail most, so include those cases in the training and test images.
- Decide the confidence threshold with the people who bear the cost of each error type, because a missed pedestrian and a false alarm carry very different consequences.
- Labeling boxes is slow. Budget labeling time per image and consider active learning to label the most useful images first.
- Check frame rate against the camera count and the hardware. Detection on thirty cameras needs a very different budget from detection on one.