Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
KHY_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Graduate
2020-06-17 22:47:15 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
96a8054e559872865e9a05e958a4377a1b9c7a29
96a8054e
1 parent
2cf26965
Modify distance logic
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
server/server.py
server/server.py
View file @
96a8054
...
...
@@ -130,12 +130,12 @@ async def thread(websocket, path):
db_embedding
=
np
.
frombuffer
(
row_data
[
'embedding'
],
dtype
=
np
.
float32
)
db_embedding
=
db_embedding
.
reshape
((
1
,
512
))
distance
=
await
get_distance
(
embedding
,
db_embedding
)
if
(
distance
<
distance_min
):
if
(
distance
<
0.4
):
verified_id
=
row_data
[
'student_id'
]
distance_min
=
distance
break
# 출석 데이터 전송
print
(
'[debug] distance:'
,
distance_min
)
send
=
''
if
distance_min
<
0.4
:
# 인증 성공
...
...
Please
register
or
login
to post a comment