Unit 3-Non CNN approaches to object recognition
Unit 3-Non CNN approaches to object recognition
Instance
Segmentation
Topics
• Difference between object detection and image classification
• Traditional, non CNN approaches to object detection
• R-CNN
• Regions with CNN features
• Fast R-CNN
• fast region-based CNN
• Faster R-CNN
Image classification vs object detection
How confident is
NEED FOR OBJECT DETECTION the model that
the identified
entity is the one
that is claimed?
we are very
confident that there
is an
entity, say a dog,
in the image, but its
scale and position
in the image is not
as prominent as
that of its owner, a
Person entity?
Image classification vs object detection
• Image classification
• tell you that there is at least an image, but not exactly how many of them
there are
• do not tell you where the identified entity in the image is.
• object detection
• tells you the placement of an entity in the image
• gives you bounding boxes and class labels (along with the probability of
detection) of all the entities identified in an image.
Differences between object detection
and image classification
Scenario 1
• Assume You are watching the movie 101 https://www.youtub
e.com/watch?v=nT-
Dalmatians, pCZyKmcw
• To know how many Dalmatians you can
actually count in a given movie scene from
that movie.
• Image Classification could, at best, tell you
that there is at least one dog or one
• Dalmatian but not exactly how many of them
there are.
Scenario 2
• Want to extract the image of the dog from there to search on the
web for its breed or similar dogs like it
• Problem here is that searching the whole image might not work,
and without identifying individual objects from the image, you
have to do the cut extract-search job manually for this task
Object detection
• Need a technique that not only identifies the entities in an image but also tells you
their placement in the image.
• Object detection gives you bounding boxes and class labels (along with the
probability of detection) of all the entities identified in an image.
Applications
Facial Recognition feature that you have in Facebook, Google Photos
• Face Recognition: Google Photos uses facial recognition technology to identify and group photos of the
same person across different albums and time periods.
Autonomous vehicle
It helps them detect other vehicles, pedestrians, cyclists, traffic signs, and obstacles on the road, enabling
safe navigation
Application in phone
To find out how many of the guests present at your party were actually enjoying it, you can even run an
object detection for Smiling Faces or a Smile Detector
Smile Shutter feature @phone
• To automatically click the image when most of the faces in the scene are detected as smiling
Object detection
• Traditional approaches:
• Haar features
• cascading classifiers
• Viola-Jones algorithm
Introduction
Before CNN
OpenCV libraries used for object detection - Smartphones, Robotic projects, and many others
innovative ideas drawing inspirations from different fields of science and mathematics
Haar features
cascading classifiers
Viola-Jones algorithm
Haar Features (Haar wavelet – derived from maths)
Haar classifier, or a Haar cascade classifier, is a machine learning object detection program that identifies
objects in an image and video
These features on the image makes it easy to find out the edges or the lines in the image, or to pick areas
where there is a sudden change in the intensities of the pixels.
Haar or Haar-like features are formations of rectangles with varying pixel density.
sum up the pixel intensity in the adjacent rectangular regions at specific locations in the detection region.
Haar Features