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
gaoqiong
MIGraphX
Commits
707d86da
Commit
707d86da
authored
Aug 17, 2023
by
Ted Themistokleous
Browse files
Replace cat photo with picture of my own bird, update script
Using photo of my own pet bird to beat copyright and not get sued.
parent
fd88122c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
2 deletions
+2
-2
examples/onnxruntime/resnet50/bird.jpg
examples/onnxruntime/resnet50/bird.jpg
+0
-0
examples/onnxruntime/resnet50/cat.jpg
examples/onnxruntime/resnet50/cat.jpg
+0
-0
examples/onnxruntime/resnet50/resnet50.py
examples/onnxruntime/resnet50/resnet50.py
+2
-2
No files found.
examples/onnxruntime/resnet50/bird.jpg
0 → 100644
View file @
707d86da
2.72 MB
examples/onnxruntime/resnet50/cat.jpg
deleted
100644 → 0
View file @
fd88122c
32.9 KB
examples/onnxruntime/resnet50/resnet50.py
View file @
707d86da
...
...
@@ -57,7 +57,7 @@ torch.onnx.export(
# Pre-processing for ResNet-50 Inferencing, from https://pytorch.org/hub/pytorch_vision_resnet/
resnet50
.
eval
()
filename
=
'
cat
.jpg'
# change to your filename
filename
=
'
bird
.jpg'
# change to your filename
input_image
=
Image
.
open
(
filename
)
preprocess
=
T
.
Compose
([
...
...
@@ -102,6 +102,6 @@ def run_sample(session, image_file, categories, inputs):
return
ort_outputs
ort_output
=
run_sample
(
session_fp32
,
'
cat
.jpg'
,
categories
,
input_batch
)
ort_output
=
run_sample
(
session_fp32
,
'
bird
.jpg'
,
categories
,
input_batch
)
print
(
"resnet50, time = {} ms"
.
format
(
format
(
sum
(
latency
)
*
1000
/
len
(
latency
),
'.2f'
)))
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