IT Vizag
← Computer Vision in Practice

▶ Sign up free for the video, slides & prompts

The lesson below is open to all. Enter your email once to unlock every video, slide deck, prompt and code example on this device.

Checking…

Computer Vision in Practice · Lesson 7 of 15 · 2 min read · 6 min video

Object detection

Boxes, classes and confidence: how models like YOLO find many objects at once.

📄 Download slides (PDF)· free sign-up

Classification says "there's a bus in this picture". Object detection says "there are two buses, three bikes and an auto, and here is where each one is", with a box around every object.

What a detector outputs

For each object it finds:

  • A bounding box: x, y, width and height
  • A class: car, bus, person…
  • A confidence score: how sure it is, from 0 to 1

How modern detectors work

A one-stage detector like YOLO (You Only Look Once) works in a single pass:

  1. A CNN backbone extracts features from the whole image
  2. The image is divided into a grid, and each cell predicts boxes, classes and confidences for objects centred there
  3. Non-maximum suppression (NMS) removes duplicate boxes for the same object, keeping the most confident one

Two-stage detectors, like Faster R-CNN, first propose regions and then classify each one. They're often more accurate but slower. Newer transformer detectors, like DETR and RT-DETR, skip NMS altogether.

Detection in a few lines

🔒 Code example: sign up free (above) to unlock it.

Training on your own classes

To detect things the pre-trained model doesn't know, such as auto-rickshaws, label your own images:

  • Draw a box around every object in every image, with tools such as Label Studio, CVAT or Roboflow
  • Export in the YOLO or COCO format
  • Fine-tune the pre-trained detector on your data

Choosing a confidence threshold

  • Low threshold: catches more objects, but more false alarms
  • High threshold: fewer false alarms, but misses some objects

Choose it based on which mistake costs more in your app.

Tip: Label every instance of a class in each image. A missed label teaches the model that the object is background.

In one line

A detector finds every object in an image with a box, a class and a confidence score, and YOLO-style models do it in one fast pass, cleaned up with non-maximum suppression.

Saved on this device. Sign in to keep progress everywhere.

Share with a friend