我从 Github 复制了这段代码,但它对我不起作用。
示例代码:
ap = argparse.ArgumentParser()
ap.add_argument("-s", "--source", required=True, help="Path to the source of shapes")
ap.add_argument("-t", "--target", required=True, help="Path to the target image")
args = vars(ap.parse_args())
这个输出
usage: detect_leaf.py [-h] -s SOURCE -t TARGET
detect_leaf.py: error: argument -s/--source is required
请帮我。谢谢