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
09a87a5e
Commit
09a87a5e
authored
Jun 30, 2023
by
yangql
Browse files
Update Tutorial_Python.md
parent
2ae2e5e3
Pipeline
#388
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
Doc/Tutorial_Python.md
Doc/Tutorial_Python.md
+2
-6
No files found.
Doc/Tutorial_Python.md
View file @
09a87a5e
# 分类器
本示例通过ResNet50模型说明如何使用O
nnx
Run
T
ime Python API进行分类模型的推理,包括预处理、推理并获取推理结果。
本示例通过ResNet50模型说明如何使用O
NNX
Run
t
ime Python API进行分类模型的推理,包括预处理、推理并获取推理结果。
## 模型简介
本示例使用了经典的ResNet50模型,onnx文件在Resource/Models/文件夹下,模型结构可以通过netron (https://netron.app/) 查看,该模型的输入shape为[1,3,224,224] ,数据排布为NCHW。
## 预处理
在将数据输入到模型之前,需要对图像做如下预处理操作:
...
...
@@ -62,8 +60,6 @@ def Preprocessing(pathOfImage):
return norm_img_data
```
## 推理
完成预处理后,就可以执行推理了:
...
...
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