pre notice
to visit the orignal article, please click here A gentle guide to deep learning object detection
things need to be clarified: thecv2
version must be3.3+
, no metter python2 or python3, with the rightcv2
version, this python script can run very well.
how to run the python script
python filter_object_detection.py --prototxt MobileNetSSD_deploy.prototxt --model MobileNetSSD_deploy.caffemodel
where can we download the caffe trained model files
model files what we need is MobileNetSSD_deploy.prototxt
and MobileNetSSD_deploy.caffemodel
, we can download them here caffe models link
python script
# coding=utf-8
# import the necessary packages
from imutils.video import VideoStream
from imutils.video import FPS
import numpy as np
import argparse
import imutils
import time
import cv2
# construct the argument