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
yolov5_migraphx
Commits
bfc5da30
Commit
bfc5da30
authored
Jun 02, 2023
by
Your Name
Browse files
修改模型输入数据格式
parent
93c2d221
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
Python/YoloV5_infer_migraphx.py
Python/YoloV5_infer_migraphx.py
+1
-1
No files found.
Python/YoloV5_infer_migraphx.py
View file @
bfc5da30
...
@@ -38,7 +38,7 @@ class YOLOv5:
...
@@ -38,7 +38,7 @@ class YOLOv5:
# 执行推理
# 执行推理
print
(
"Start to inference"
)
print
(
"Start to inference"
)
start
=
time
.
time
()
start
=
time
.
time
()
result
=
self
.
model
.
run
({
self
.
model
.
get_parameter_names
()[
0
]:
migraphx
.
argument
(
input_img
)
})
result
=
self
.
model
.
run
({
self
.
model
.
get_parameter_names
()[
0
]:
input_img
})
print
(
'net forward time: {:.4f}'
.
format
(
time
.
time
()
-
start
))
print
(
'net forward time: {:.4f}'
.
format
(
time
.
time
()
-
start
))
# 模型输出结果后处理
# 模型输出结果后处理
boxes
,
scores
,
class_ids
=
self
.
process_output
(
result
)
boxes
,
scores
,
class_ids
=
self
.
process_output
(
result
)
...
...
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