提交 85e1f215 编写于 作者: B bingyanghuang 提交者: Tao Luo

Modify the helper information in full_pascalvoc_test_preprocess.py (#20475)

上级 f76a32df
...@@ -265,36 +265,53 @@ def run_convert(): ...@@ -265,36 +265,53 @@ def run_convert():
def main_pascalvoc_preprocess(args): def main_pascalvoc_preprocess(args):
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="Convert the full pascalvoc val set or local data to binary file." description="Convert the full pascalvoc val set or local data to binary file.",
) usage=None,
add_help=True)
parser.add_argument( parser.add_argument(
'--choice', choices=['local', 'VOC_test_2007'], required=True) '--choice', choices=['local', 'VOC_test_2007'], required=True)
parser.add_argument( parser.add_argument(
"--data_dir", "--data_dir",
default="/home/li/AIPG-Paddle/paddle/build/third_party/inference_demo/int8v2/pascalvoc_small", default="./third_party/inference_demo/int8v2/pascalvoc_small",
type=str, type=str,
help="Dataset root directory") help="Dataset root directory")
parser.add_argument( parser.add_argument(
"--img_annotation_list", "--img_annotation_list",
type=str, type=str,
default="test_100.txt", default="test_100.txt",
help="A file containing the image file path and relevant annotation file path" help="A file containing the image file path and corresponding annotation file path"
) )
parser.add_argument( parser.add_argument(
"--label_file", "--label_file",
type=str, type=str,
default="label_list", default="label_list",
help="List the labels in the same sequence as denoted in the annotation file" help="List of object labels with same sequence as denoted in the annotation file"
) )
parser.add_argument( parser.add_argument(
"--output_file", "--output_file",
type=str, type=str,
default="pascalvoc_small.bin", default="pascalvoc_small.bin",
help="File path of the output binary file") help="File path of the output binary file")
parser.add_argument("--resize_h", type=int, default=RESIZE_H) parser.add_argument(
parser.add_argument("--resize_w", type=int, default=RESIZE_W) "--resize_h",
parser.add_argument("--mean_value", type=str, default=MEAN_VALUE) type=int,
parser.add_argument("--ap_version", type=str, default=AP_VERSION) default=RESIZE_H,
help="Image preprocess with resize_h")
parser.add_argument(
"--resize_w",
type=int,
default=RESIZE_W,
help="Image prerocess with resize_w")
parser.add_argument(
"--mean_value",
type=str,
default=MEAN_VALUE,
help="Image preprocess with mean_value")
parser.add_argument(
"--ap_version",
type=str,
default=AP_VERSION,
help="Image preprocess with ap_version")
args = parser.parse_args() args = parser.parse_args()
if args.choice == 'local': if args.choice == 'local':
convert_pascalvoc_local2bin(args) convert_pascalvoc_local2bin(args)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册