Computer vision experiment · 2025

Object detection, trained from scratch.

A video object-detection demo built end to end: my own street footage, a hand-labelled dataset of around 600 frames, a custom-trained YOLOv5n model and OpenCV rendering the detections back onto the video.

My role
Independent developer
Model
YOLOv5n
Training data
~600 labelled frames
Status
Completed experiment
Video frame with YOLOv5n bounding boxes labelling cars, bushes, buildings and road signs with confidence scores
A frame from the demo: the model's Polish class labels mark cars (samochód), bushes (krzak), buildings (budynek) and road signs (znak), each with its confidence score.

Overview

The whole pipeline, not just the model

The goal was to own every step of a small computer-vision project: film the footage, build the dataset, train the detector, and render the result - rather than running a pre-trained model on someone else's data.

The detector recognises custom classes from my own neighbourhood footage - cars, bushes, buildings and road signs - because it was trained on frames from that footage, not on a public dataset. That choice made the project harder and far more instructive: every weakness in the result traced back to a decision I had made about data, labelling or training.

Demo video

The detector in motion

The full demo shows the trained model running across the street footage, with bounding boxes, class labels and confidence scores rendered by OpenCV.

Hosted on YouTube in privacy-enhanced mode. Open the video on YouTube - opens in a new tab for the full player.

Pipeline

From footage to annotated video

Three stages, each owned end to end - and each one taught a different lesson about where vision projects actually spend their time.

Dataset

Frames extracted from my own street footage and labelled by hand. The set grew from roughly 100 images to around 600 after early runs showed the small set simply was not enough.

Training

YOLOv5 variants trained and compared on my own hardware. The nano model, YOLOv5n, turned out to be the best fit for this footage.

Inference & rendering

OpenCV runs the video through the trained model and renders bounding boxes, class labels and confidence scores back onto every frame.

What I learned

Honest lessons from a small dataset

  1. 01Dataset size is the first bottleneck: around 100 labelled images was far too little for YOLOv5n, and detections only became usable after the set grew to roughly 600 frames
  2. 02The dataset is the project - extracting, reviewing and hand-labelling frames took more effort than the training runs themselves
  3. 03Training on my own hardware was slow enough that renting a GPU is the right call for any next iteration
  4. 04Model choice is empirical: I compared YOLOv5 variants and rendering approaches against the same footage, and the smallest model won for this use case

Six hundred labelled frames, one working detector.

Watch on YouTube - opens in a new tab