Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-2-capstone-design2
/
2014104149
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Graduate
2020-11-28 05:40:23 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c80b1ab8896cd4c721e25fe4e5b0807bc1391b56
c80b1ab8
1 parent
7471c9a8
Convert color BGR to RGB
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
flask/app.py
flask/app.py
View file @
c80b1ab
...
...
@@ -101,10 +101,10 @@ def verify():
image
=
base64
.
b64decode
(
request
.
form
[
'image'
])
image_np
=
np
.
frombuffer
(
image
,
dtype
=
np
.
uint8
)
image_np
=
cv2
.
imdecode
(
image_np
,
cv2
.
IMREAD_UNCHANGED
)
image_np
=
cv2
.
cvtColor
(
image_np
,
cv2
.
COLOR_BGR2RGB
)
image_np
=
prewhiten
(
image_np
)
image_np
=
resize
(
image_np
)
image_np
=
image_np
.
reshape
(
-
1
,
image_size
,
image_size
,
3
)
print
(
image_np
.
shape
)
# get embedding
feed_dict
=
{
input_placeholder
:
image_np
,
phase_train_placeholder
:
False
}
embedding
=
sess
.
run
(
embeddings_placeholder
,
feed_dict
=
feed_dict
)
...
...
Please
register
or
login
to post a comment