# python real_time_object_detection.py --prototxt MobileNetSSD_deploy.prototxt.txt --model MobileNetSSD_deploy.caffemodel
# 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 parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-p", "--prototxt", required=True,
help="path to Caffe 'deploy' prototxt file")
ap.add_argument("-m", "--model", required=True,
help="path to Caffe pre-trained model")
ap.add_argument("-c", "--confidence", type=float, default=0.2,
help="minimum probability to filter weak detections")
args = vars(ap.parse_args())
# initialize the list of class labels MobileNet SSD was trained to
# detect, then generate a set of bounding box colors for each class
CLASSES = ["background", "aeroplane", "bicycle", "bird", "boat",
"bottle",
使用深度学习神经网络进行目标实时检测
最新推荐文章于 2024-07-08 16:21:21 发布
在Windows上使用PyCharm进行深度学习实时目标检测时,遇到了模块缺失的问题,包括'imitools'和'cv2'。通过安装相应模块解决了问题。此外,运行real_time_object_detection.py时缺少必要参数,通过CMD命令行指定参数成功运行。提供了两个下载源以获取相关资源。
摘要由CSDN通过智能技术生成