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_migraphx
Commits
a30cc948
Commit
a30cc948
authored
Jun 14, 2023
by
liucong
Browse files
修改python代码
parent
1eff8465
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
Python/Classifier.py
Python/Classifier.py
+1
-1
No files found.
Python/Classifier.py
View file @
a30cc948
...
@@ -18,7 +18,7 @@ def Preprocessing(pathOfImage):
...
@@ -18,7 +18,7 @@ def Preprocessing(pathOfImage):
new_size
=
[
int
(
round
(
ratio
*
image
.
shape
[
0
])),
256
]
new_size
=
[
int
(
round
(
ratio
*
image
.
shape
[
0
])),
256
]
else
:
else
:
new_size
=
[
256
,
int
(
round
(
ratio
*
image
.
shape
[
1
]))]
new_size
=
[
256
,
int
(
round
(
ratio
*
image
.
shape
[
1
]))]
image
=
np
.
array
(
cv2
.
resize
(
image
,
(
new_size
[
1
],
new_size
[
0
])))
# w h 格式
image
=
np
.
array
(
cv2
.
resize
(
image
,
(
new_size
[
1
],
new_size
[
0
])))
# 裁剪中心窗口为224*224
# 裁剪中心窗口为224*224
h
,
w
,
c
=
image
.
shape
h
,
w
,
c
=
image
.
shape
...
...
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