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-19 12:34:27 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9d53311430b62d6932d4798ea2285becf581c697
9d533114
1 parent
b8ef7386
Update client.py
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
client/client.py
client/client.py
View file @
9d53311
...
...
@@ -113,7 +113,7 @@ class Client(tk.Frame):
if
(
x2
-
x1
)
*
(
y2
-
y1
)
<
15000
:
# 얼굴 해상도가 너무 낮으면 무시
continue
image
=
frame
image
=
frame
[
int
(
y1
):
int
(
y2
),
int
(
x1
):
int
(
x2
)]
image_list
.
append
(
image
)
# MTCNN 데이터 저장
face_list
.
append
(
face
.
numpy
())
...
...
@@ -168,10 +168,11 @@ class Client(tk.Frame):
self
.
logging
(
'출석확인: '
+
data
[
'student_id'
])
asyncio
.
ensure_future
(
self
.
set_rectangle
())
else
:
if
data
[
'status'
]
==
'fail'
:
send
=
json
.
dumps
({
'action'
:
'save_image'
,
'image'
:
image
.
tolist
()})
await
websocket
.
send
(
send
)
elif
data
[
'status'
]
==
'already'
:
# 이미지 DB에 저장, 일단 보류
#if data['status'] == 'fail':
# send = json.dumps({'action': 'save_image', 'image': image.tolist()})
# await websocket.send(send)
if
data
[
'status'
]
==
'already'
:
asyncio
.
ensure_future
(
self
.
set_rectangle
())
except
Exception
as
e
:
self
.
logging
(
e
)
...
...
Please
register
or
login
to post a comment