未验证 提交 2b47dd7d 编写于 作者: B Bin Long 提交者: GitHub

Update infer.py

上级 f2a8b2b9
...@@ -29,7 +29,7 @@ from concurrent.futures import ThreadPoolExecutor, as_completed ...@@ -29,7 +29,7 @@ from concurrent.futures import ThreadPoolExecutor, as_completed
gflags.DEFINE_string("conf", default="", help="Configuration File Path") gflags.DEFINE_string("conf", default="", help="Configuration File Path")
gflags.DEFINE_string("input_dir", default="", help="Directory of Input Images") gflags.DEFINE_string("input_dir", default="", help="Directory of Input Images")
gflags.DEFINE_boolean("use_pr", default=False, help="Use optimized model") gflags.DEFINE_boolean("use_pr", default=True, help="Use optimized model")
gflags.DEFINE_string("trt_mode", default="", help="Use optimized model") gflags.DEFINE_string("trt_mode", default="", help="Use optimized model")
gflags.DEFINE_string("ext", default=".jpeg|.jpg", help="Input Image File Extensions") gflags.DEFINE_string("ext", default=".jpeg|.jpg", help="Input Image File Extensions")
gflags.FLAGS = gflags.FLAGS gflags.FLAGS = gflags.FLAGS
...@@ -307,7 +307,7 @@ if __name__ == "__main__": ...@@ -307,7 +307,7 @@ if __name__ == "__main__":
gflags.FLAGS(sys.argv) gflags.FLAGS(sys.argv)
if (gflags.FLAGS.conf == "" or gflags.FLAGS.input_dir == ""): if (gflags.FLAGS.conf == "" or gflags.FLAGS.input_dir == ""):
print("Usage: python infer.py --conf=/config/path/to/your/model " + print("Usage: python infer.py --conf=/config/path/to/your/model " +
"--input_dir=/directory/of/your/input/images [--use_pr=True]") "--input_dir=/directory/of/your/input/images")
exit(-1) exit(-1)
# set empty to turn off as default # set empty to turn off as default
trt_mode = gflags.FLAGS.trt_mode trt_mode = gflags.FLAGS.trt_mode
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册