我是使用python的新手,我想运行此代码,但出现此错误。
码:
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-p", "--shape-predictor", required=True, help="path to facial landmark predictor")
ap.add_argument("-v", "--video", type=str, default="", help="path to input video file")
args = vars(ap.parse_args())
enter image description here
用法:
detect_blinks.py [-h] -p SHAPE_PREDICTOR
我得到的错误是:
the following arguments are required: -p/--shape-predictor
最佳答案
如用法所示,您需要传递必要的参数-p/--shape-predictor
。
您可以按照以下方式运行此脚本:
python detect_blinks.py -p my/path/to/predictor
关于python - Python错误:需要以下参数:-p/-shape-predictor,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60825168/