How a Detector Finds Vehicles in a Street Scene and Draws a Box Around Each: Object Detection
Object detection with a convolutional detector, from the grid through the threshold to the box around the vehicle.
Object detection answers two questions at once. What is in the image, and where is it? This page works through a trained detector with 185,880 parameters on street scenes. You pick a cell of the grid and see how pixels turn into eight raw values and the raw values into a box with a class.
Choose a scene at the top. You can leave the two thresholds next to it unchanged at first. Steps 6 and 7 show their effect. Click in the image to select the grid cell whose numbers the steps show. Press “Play” and the computation runs by itself, or use the step list to jump to any point.
All computations run in your browser. Teaching example, not a production forecast.
What the Walkthrough Shows and Where It Ends
The detector lays a grid of 20 × 11 cells over the scene. Six convolutional layers condense the image until 96 features are available for each cell. A final layer turns them into eight raw values per cell. The first says whether the center of a vehicle lies in the cell, three decide the class, and four describe the box. Your browser carries out the calculation steps on this page with the trained weights.
Each of the 220 cells receives a score between 0 and 1 that says how confidently it reports a vehicle of a class. If the score reaches a threshold, the cell becomes a candidate. Because neighboring cells often report the same vehicle, only the box with the highest score is kept among several heavily overlapping boxes of the same class. This filtering is called non-maximum suppression. The detector follows the basic idea of YOLO, a widely used object detection method, but is not a YOLO model. It allows one object per cell and has no predefined box shapes.
The detector was trained with PyTorch in 20,000 steps on 888 scenes. The boxes and classes come from the predictions of a large detection network, which were cleaned up after a review. On this page, the box and class of a vehicle are called the label. No human drew the boxes. Vans count as trucks, and pickups count as cars. In half of the training examples, vehicles from other scenes were also pasted in.
The measurement used 84 additional scenes that were held out of every training run. On those scenes, the detector finds 261 of 301 vehicles and reports 60 boxes that match no label. The number of vehicles is correct in 61 of the 84 scenes. These figures are slightly optimistic because the network shown was selected from three candidates after the measurement. The eight scenes on this page were selected because, at the default thresholds, the detector finds every vehicle from the label there and reports no box without a matching label.
This page is a teaching example, not a production system. Only synthetically generated street scenes seen at an oblique angle have been tested. The measurement does not apply to photos from the real world, to vertical top-down views, or to other vehicle types. The walkthrough for semantic segmentation shows how a network classifies each pixel individually instead of drawing a box.
More Interactive Models
If you have a question about this, just give us a call: +49 40 60940415.