Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
deeplabv3_migraphx
Commits
74935734
Commit
74935734
authored
Sep 10, 2025
by
shangxl
Browse files
增加readme中python推理命令参数介绍,修改loadMode参数实现方式
parent
409bf0b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
Python/DeepLabV3.py
Python/DeepLabV3.py
+1
-1
README.md
README.md
+7
-1
No files found.
Python/DeepLabV3.py
View file @
74935734
...
@@ -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"
)
...
...
README.md
View file @
74935734
...
@@ -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需要做相应的修改:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment