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
ResNet50_onnxruntime
Commits
246a8f1b
Commit
246a8f1b
authored
Oct 20, 2023
by
yangql
Browse files
Update README.md
parent
d1b598b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
README.md
README.md
+7
-9
No files found.
README.md
View file @
246a8f1b
...
@@ -42,24 +42,20 @@ Imagenet-1k
...
@@ -42,24 +42,20 @@ Imagenet-1k
## 推理
## 推理
### Python版本推理
### Python版本推理
采用ONNXRuntime框架使用DCU进行推理,下面介绍如何运行python代码示例,Python示例的详细说明见Doc目录下的Tutorial_Python.md。
采用ONNXRuntime框架使用DCU进行推理,下面介绍如何运行python代码示例,Python示例的详细说明见Doc目录下的Tutorial_Python.md。
#### 设置Python环境变量
```
export PYTHONPATH=/opt/dtk/lib:$PYTHONPATH
```
#### 运行示例
#### 运行示例
```
python
```
python
# 进入resnet50 onnxruntime工程根目录
# 进入resnet50 onnxruntime工程根目录
cd
<
path_to_resnet50_onnxruntime
>
cd
<
path_to_resnet50_onnxruntime
>
# 下载模型
sh
.
/
Resource
/
Models
/
download
.
sh
# 进入示例程序目录
# 进入示例程序目录
cd
Python
/
cd
Python
/
# 安装依赖
# 安装依赖
pip
install
-
r
requirements
.
txt
pip
install
-
r
requirements
.
txt
# 下载模型
sh
.
/
Resource
/
Models
/
download
.
sh
# 运行示例
# 运行示例
python
Classifier
.
py
python
Classifier
.
py
```
```
...
@@ -68,10 +64,12 @@ python Classifier.py
...
@@ -68,10 +64,12 @@ python Classifier.py
采用ONNXRuntime框架使用DCU进行推理,下面介绍如何运行C++代码示例,C++示例的详细说明见Doc目录下的Tutorial_Cpp.md。
采用ONNXRuntime框架使用DCU进行推理,下面介绍如何运行C++代码示例,C++示例的详细说明见Doc目录下的Tutorial_Cpp.md。
#### 构建工程
#### 构建工程
```
```
source /opt/dtk/env.sh
cd <path_to_resnet50_onnxruntime>
# 下载模型
sh ./Resource/Models/download.sh
# 安装Opencv依赖
# 安装Opencv依赖
cd <path_to_resnet50_onnxruntime>
sh ./3rdParty/InstallOpenCVDependences.sh
sh ./3rdParty/InstallOpenCVDependences.sh
rbuild build -d depend
rbuild build -d depend
...
...
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