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
root
2020-06-19 12:38:19 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
405057c4a2af1d25f87a2c1ae27214b402e189a4
405057c4
2 parents
3a77a866
9d533114
Merge branch 'master' of
http://khuhub.khu.ac.kr/2020-1-capstone-design1/KHY_Project1
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 @
405057c
...
...
@@ -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