7. Object Detection and Face Recognition
Activity 7.01: Object Detection in a Video Using MobileNet SSD
Solution:
- Firstly, open an untitled Jupyter Notebook and name the file
Activity7.01
. - We will start by importing all the required libraries for this activity:
import cv2 import numpy as np import matplotlib.pyplot as plt
- 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', \ ...