Commit 74935734 authored by shangxl's avatar shangxl
Browse files

增加readme中python推理命令参数介绍,修改loadMode参数实现方式

parent 409bf0b7
...@@ -38,7 +38,7 @@ def softmax(arr): ...@@ -38,7 +38,7 @@ def softmax(arr):
if __name__ == '__main__': if __name__ == '__main__':
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("loadMode", type=int,help="0:DeepLabV3 Single Image Sample.\t 1:DeepLabV3 Multiple Image Sample.") parser.add_argument("--loadMode", type=int,help="0:DeepLabV3 Single Image Sample.\t 1:DeepLabV3 Multiple Image Sample.")
parser.add_argument("--enable_offload_copy", action="store_true") parser.add_argument("--enable_offload_copy", action="store_true")
precision_group = parser.add_mutually_exclusive_group() precision_group = parser.add_mutually_exclusive_group()
precision_group.add_argument("--int8",action="store_true") precision_group.add_argument("--int8",action="store_true")
......
...@@ -95,9 +95,15 @@ cd Python/ ...@@ -95,9 +95,15 @@ cd Python/
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
# 运行示例 # 运行示例
python DeepLabV3.py python DeepLabV3.py [--loadMode] [--enable_offload_copy] [--int8/--fp16]
``` ```
参数说明:
- --loadMode:加载图片的方式,值为1时加载多张图片进行分割,值为0时加载单张图片进行分割,默认值为1
- --enable_offload_copy:设置offload_copy模式,如果没有指定,默认为offload_copy==false
- --int8/--fp16: 分别表示采用int8模式与fp16模型
### C++版本推理 ### C++版本推理
注意:当使用操作系统不一样时,CMakeList需要做相应的修改: 注意:当使用操作系统不一样时,CMakeList需要做相应的修改:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment