Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Computer Vision Workshop

You're reading from  The Computer Vision Workshop

Product type Book
Published in Jul 2020
Publisher Packt
ISBN-13 9781800201774
Pages 568 pages
Edition 1st Edition
Languages
Authors (3):
Hafsa Asad Hafsa Asad
Profile icon Hafsa Asad
Vishwesh Ravi Shrimali Vishwesh Ravi Shrimali
Profile icon Vishwesh Ravi Shrimali
Nikhil Singh Nikhil Singh
Profile icon Nikhil Singh
View More author details
Toc

7. Object Detection and Face Recognition

Activity 7.01: Object Detection in a Video Using MobileNet SSD

Solution:

  1. Firstly, open an untitled Jupyter Notebook and name the file Activity7.01.
  2. We will start by importing all the required libraries for this activity:
    import cv2
    import numpy as np
    import matplotlib.pyplot as plt
  3. The pre-trained model can detect a list of object classes. Let's define those classes:
    categories = {0:'background', 1:'aeroplane', 2:'bicycle', \
                  3:'bird', 4:'boat', 5:'bottle', \
                  6:'bus', 7:'car', 8:'cat', 9:'chair', \
                  10:'cow', 11: 'diningtable', 12: 'dog', \
     ...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}