import numpy as np
import argparse
import cv2
ap=argparse.ArgumentParser()
ap.add_argument("-i","D:\python learning\IMG_20130614_000526.jpg",required=True,help="path to input image")
ap.add_argument("-p","D:\python learning\deep-learning-face-detection\deploy.prototxt.txt",required=True,help="path to Caffe 'deploy' prototxt file")
ap.add_argument("-m","D:\python learning\deep-learning-face-detection\res10_300x300_ssd_iter_140000.caffemodel",required=True,help="path to Caffe pretrained model")
ap.add_argument("-c", "--confidence",type=float,default=0.5,help="minimum probability to filter weak detections")
args=vars(ap.parse_args())
Ошибка:
Traceback (most recent call last):
File "D:\python learning\detectfaces.py", line 6, in <module>
ap.add_argument("-p","D:\python learning\deep-learning-face-detection\deploy.prototxt.txt",required=True,help="path to Caffe 'deploy' prototxt file")
File "C:\Users\RAJKUMAR\AppData\Local\Programs\Python\Python36-32\lib\argparse.py", line 1320, in add_argument
kwargs = self._get_optional_kwargs(*args, **kwargs)
File "C:\Users\RAJKUMAR\AppData\Local\Programs\Python\Python36-32\lib\argparse.py", line 1451, in _get_optional_kwargs
raise ValueError(msg % args)
ValueError: invalid option string 'D:\\python learning\\deep-learning-face-detection\\deploy.prototxt.txt': must start with a character '-'
>>>