back to portfolio

mohit / object detector

Object Detector

Real-time detection with YOLOv8.

Point a camera at your desk and you know what you're looking at: a laptop, a mug, a phone. A computer sees a grid of pixel values. Getting from that grid to "mug, 87% sure" takes a model that can find an object, name it and place a box around it, many times a second.

I wanted to see how far a small model could get on an ordinary webcam, so I built this.

The app opens your webcam, runs YOLOv8 on every frame and draws a labelled box around each object it finds. Each box carries a confidence score, so you can see how sure the model is. Press Esc and the camera is released.

Think of it as a webcam with a caption for everything in frame.

What you can do

  • Detect 80 kinds of object from the COCO dataset, from people and pets to cars, laptops and pizza.
  • See a box and a confidence score on every detection, live.
  • Run it on a standard laptop. The nano model weighs about 6.3 MB and manages roughly 10 to 30 frames a second, depending on your hardware.
  • Swap in a larger YOLOv8 model when you want accuracy over speed.
  • Raise the confidence threshold to cut down on false boxes.
  • Use your GPU with no code changes if CUDA is installed.

Where it stops

It reads a live webcam feed and knows only the 80 COCO classes. A custom object needs a model trained on your own images. The nano model trades some accuracy for speed, so poor lighting and awkward angles will cost you detections.

Frames are processed on your machine. No cloud, no account.

Built with Python, YOLOv8 through Ultralytics, OpenCV and Jupyter Notebook.