How Does AI Detect Objects? (Technical)

Source: Deep Learning on Medium

Deep Learning Approach

When utilizing Deep Learning techniques, there are two main approaches to Object Detection, the first being designing and training a network architecture from scratch, including the structure of layers and the initialization of weight parameter values. The second approach is to utilize the concept of Transfer Learning and leverage a pre-trained network that’s trained on a large dataset before the onset of your dedicated training on the custom datasets.

Transfer Learning is the method of reusing knowledge gained from solving a problem and applying the knowledge gained to an associated but separate problem

The second approach eliminates the lengthy time disadvantages accompanied by the first-mentioned approach, which is that the time taken to train a network from scratch is far more significant and will require more effort when compared to adopting an already-trained network.

Below are some quick overview of Convolutional Neural Networks(CNN) models for Object Detection

Region-Based Convolutional Neural Networks (RCNN) And Its Variants

RCNN is a deep learning method for solving object detection and segmentation. The technique was introduced in 2014 and presented the concept of region-based convolutional neural networks or RCNN for short.

RCNN utilizes a selective search algorithm to propose region of interest in an image and, after that, uses a convolutional neural network to detect the presence of the object of interest within the proposed region.

RCNN utilizes CNN for feature extraction and binary SVM for classification of objects. Although RCNNs does consist of a manual technique to propose region of interest, therefore it isn’t truly an end to end learnable solution.

Image from

RCNN can be computationally expensive and takes an average of 40–50 seconds to complete predictions on each image. Its successors, Fast-RCNN and Faster-RCNN, tackle some of the performance and efficiency problems prevalent in RCNN. Also, RCNN cannot be used for real-time applications due to the time it takes to conduct and complete predictions on images.

You Only Look Once (YOLO)

YOLO is a redefinition of the standard object detection paradigm utilized by alternative object detection techniques. Popular techniques such as RCNN leverage region-based classifiers and are passing images thousands of times through the network to gain a prediction. Also, RCNN is a two-stage process, the first stage generates the regions of the proposal, and the second stage is where the object detection occurs.

On the other hand, YOLO is a one-step process for object detection. It is also a neural network model that requires just one pass of an image through its network to conduct object detection. An obvious benefit is that YOLO proposes greater efficiency when compared to RCNNs.

YOLO works by overlaying grids on an image, where each cell within the grid plays two roles:

  1. Each cell predicts bounding boxes, and a confidence value is assigned to each bounding box. The confidence value is a representation of the probability that the content of the grid contains an object. Therefore, the low confidence value is assigned to areas of the image without any objects.
  2. Each cell also produces a classification probability result. The classification probability represents the chance that if a grid contains an object, the object is likely to be the class with the highest probability.

Using YOLO for object detection has several benefits, the major one being that it can be used within real-time applications such as the object detection systems embedded in autonomous vehicle systems.

Below is a video containing more information on YOLO: