Slalom Build
Published in

Slalom Build

Spot Skeletons in your Closet (using Deep Learning CV)

Exploration of pre-trained and custom-trained Computer Vision models to create a fun “Spooky Object Detector.”

Exploring Pre-trained models

What are pre-trained models? In simple terms, any model trained on a set of data points pertinent to a specific problem domain can be used as-is or as a starting point for any related problem domain. This helps with the time or computational restrictions or technical expertise associated with building a model from scratch. Just like how you are planning to revamp your Batman costume into Black Panther costume this year. Gotcha!

  1. It has one of the lower error rates.
  2. And it can attain > 78.1% accuracy on the ImageNet dataset.
Top 5 predictions of the InceptionV3 model for the test images

Training Your Own Model

While reviewing a number of articles and papers on building a custom model, I came across YOLOv3 — a popular object detection model (YOLO — You Only Look Once). An image needs to be forwarded only once through the network and the model can identify up to 80 different objects in it. It is extremely fast and accurate like a Single Shot Multibox Detector (SSD). I decided to go for it.

  1. Number of possible bounding boxes are predicted in each cell.
  2. Two confidence scores or probability scores are predicted by the network a. Object location — Probability that the bounding box is actually enclosing an object.
    b. Object recognition — Probability that the object in the bounding box belongs to particular class.
  3. Based on the non-maximum suppression method, it disregards the bounding boxes with lower confidence or one of the overlapping bounding boxes with lower confidence.
Spooky Object Detector Results
Results from re-trained YOLO model
  • Data augmentation capabilities with YOLOv3.
  • Hyperparameter tuning.

--

--

The Build Blog is a collection of perspectives and viewpoints on the craft of building digital products today, written by the technologists that build them. By builders, for builders.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store