Python错误:需要以下参数:-p /-shape-predictor

时间:2020-03-24 04:53:04

标签: python opencv

我是使用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

1 个答案:

答案 0 :(得分:0)

如用法所述,您需要传递必要的参数-p/--shape-predictor

您可以按以下方式运行此脚本:

python detect_blinks.py -p my/path/to/predictor
相关问题